run_bill_events option for order_pkg, RT#42053
[freeside.git] / fs_selfservice / FS-SelfService / SelfService.pm
index 144d982..bc54b1e 100644 (file)
@@ -112,6 +112,7 @@ $socket .= '.'.$tag if defined $tag && length($tag);
   'new_customer'              => 'Signup/new_customer',
   'new_customer_minimal'      => 'Signup/new_customer_minimal',
   'capture_payment'           => 'Signup/capture_payment',
+  'new_prospect'              => 'Signup/new_prospect',
   #N/A 'clear_signup_cache'        => 'Signup/clear_cache',
   'new_agent'                 => 'Agent/new_agent',
   'agent_login'               => 'Agent/agent_login',
@@ -1071,6 +1072,10 @@ Number of total bytes gained by recharge
 
 Orders a package for this customer.
 
+If signup_server-realtime is set, bills the new package, attemps to collect
+payment and (for auto-payment customers) cancels the package if the payment is
+declined.
+
 Takes a hash reference as parameter with the following keys:
 
 =over 4
@@ -1087,6 +1092,11 @@ Package to order (see L<FS::part_pkg>).
 
 Quantity for this package order (default 1).
 
+=item run_bill_events
+
+If true, runs billing events for the customer after ordering and billing the
+package (signup_server-realtime must be set).
+
 =item locationnum
 
 Optional locationnum for this package order, for existing locations.
@@ -1094,13 +1104,22 @@ Optional locationnum for this package order, for existing locations.
 Or, for new locations, pass the following fields: address1*, address2, city*,
 county, state*, zip*, country.  (* = required in this case)
 
+(None of this is required at all if you are just ordering a package
+at the customer's existing default service location.)
+
 =item address1
 
-=item address 2
+=item address2
 
 =item city
 
-=item 
+=item county
+
+=item state
+
+=item zip
+
+=item country
 
 =item svcpart
 
@@ -1260,7 +1279,7 @@ following keys:
 =item bill_date
 
 (Future) Bill date.  Indicates a future date for which billing could be run.
-Specified as a integer UNIX timestamp.  Pass this value to the B<order_renew>
+Specified as an integer UNIX timestamp.  Pass this value to the B<order_renew>
 function.
 
 =item bill_date_pretty
@@ -1276,7 +1295,7 @@ Base amount which will be charged if renewed early as of this date.
 
 Renewal date; i.e. even-futher future date at which the customer will be paid
 through if the early renewal is completed with the given B<bill-date>.
-Specified as a integer UNIX timestamp.
+Specified as an integer UNIX timestamp.
 
 =item renew_date_pretty
 
@@ -1337,6 +1356,11 @@ Session identifier
 
 pkgpart of package to cancel
 
+=item date
+
+Optional date, for future cancellation (expiration) instead of immediate
+cancellation.  Specified as an integer UNIX timestamp ("epoch time").
+
 =back
 
 Returns a hash reference with a single key, B<error>, empty on success, or an
@@ -1503,7 +1527,7 @@ message, or empty on success, and B<contacts>, a list of contacts.
 B<contacts> is an array reference of hash references (i.e. an array of structs,
  in XML-RPC).  Each hash reference (struct) has the following keys:
 
-=over4
+=over 4
 
 =item contactnum
 
@@ -1612,6 +1636,8 @@ Takes a hash reference as parameter with the following keys:
 Returns a hash reference with a single parameter, B<error>, which contains an
 error message, or empty on success.
 
+=back
+
 =head2 "MY ACCOUNT" QUOTATION FUNCTIONS
 
 All of these functions require the user to be logged in, and the 'session_id'
@@ -1755,8 +1781,6 @@ Removes a package from a quotation. Takes the following arguments:
 
 Returns 'error' => a string, which will be empty on success.
 
-=back
-
 =item quotation_order HASHREF
 
 Converts the packages in a quotation into real packages. Takes the following