add more documentation on order_pkg and the ability to order svc_phone too, RT#4722
authorivan <ivan>
Sat, 7 Feb 2009 20:16:11 +0000 (20:16 +0000)
committerivan <ivan>
Sat, 7 Feb 2009 20:16:11 +0000 (20:16 +0000)
FS/FS/ClientAPI/MyAccount.pm
fs_selfservice/FS-SelfService/SelfService.pm

index a85d63e..c0586af 100644 (file)
@@ -499,7 +499,7 @@ sub process_payment {
     'payinfo'  => $payinfo,
     'paydate'  => $p->{'year'}. '-'. $p->{'month'}. '-01',
     'payname'  => $payname,
-    'paybatch' => $paybatch,
+    'paybatch' => $paybatch, #this doesn't actually do anything
     'paycvv'   => $paycvv,
     map { $_ => $p->{$_} } @{ $payby2fields{$payby} }
   );
@@ -921,6 +921,7 @@ sub order_pkg {
     my %fields = (
       'svc_acct'     => [ qw( username domsvc _password sec_phrase popnum ) ],
       'svc_domain'   => [ qw( domain ) ],
+      'svc_phone'    => [ qw( phonenum pin sip_password ) ],
       'svc_external' => [ qw( id title ) ],
     );
   
index a826161..580ca73 100644 (file)
@@ -472,10 +472,14 @@ Array reference of all states in the current default country.
 Hash reference of card types; keys are card types, values are the exact strings
 passed to the process_payment function
 
-=item paybatch
+=cut
 
-Unique transaction identifier (prevents multiple charges), passed to the
-process_payment function
+#this doesn't actually work yet
+#
+#=item paybatch
+#
+#Unique transaction identifier (prevents multiple charges), passed to the
+#process_payment function
 
 =back
 
@@ -541,15 +545,19 @@ Card expiration month
 
 Card expiration year
 
-=item paybatch
+=cut
 
-Unique transaction identifier, returned from the payment_info function.
-Prevents multiple charges.
+#this doesn't actually work yet
+#
+#=item paybatch
+#
+#Unique transaction identifier, returned from the payment_info function.
+#Prevents multiple charges.
 
 =back
 
 Returns a hash reference with a single key, B<error>, empty on success, or an
-error message on errors
+error message on errors.
 
 =item process_payment_order_pkg
 
@@ -584,6 +592,10 @@ Returns a hash reference containing customer package information.  The hash refe
 
 Customer number
 
+=item error
+
+Empty on success, or an error message on errors.
+
 =item cust_pkg HASHREF
 
 Array reference of hash references, each of which has the fields of a cust_pkg
@@ -640,11 +652,11 @@ Primary key for this service
 
 =item svcpart
 
-Service definition (part_pkg)
+Service definition (see L<FS::part_svc>)
 
 =item pkgnum
 
-Customer package (cust_pkg)
+Customer package (see L<FS::cust_pkg>)
 
 =item overlimit
 
@@ -654,12 +666,6 @@ Blank if the service is not over limit, or the date the service exceeded its usa
 
 =back
 
-=item error
-
-Empty on success, or an error message on errors.
-
-=back
-
 =item list_svcs
 
 Returns service information for this customer.
@@ -698,6 +704,8 @@ mail alias).
 
 Account (svc_acct) services also have the following keys:
 
+=over 4
+
 =item username
 
 Username
@@ -744,6 +752,8 @@ Number of total bytes gained by recharge
 
 =back
 
+=back
+
 =item order_pkg
 
 Orders a package for this customer.
@@ -758,13 +768,22 @@ Session identifier
 
 =item pkgpart
 
-pkgpart of package to order
+Package to order (see L<FS::part_pkg>).
 
 =item svcpart
 
-optional svcpart, required only if the package definition does not contain
-one svc_acct service definition with quantity 1 (it may contain others with
-quantity >1)
+Service to order (see L<FS::part_svc>).
+
+Normally optional; required only to provision a non-svc_acct service, or if the
+package definition does not contain one svc_acct service definition with
+quantity 1 (it may contain others with quantity >1).  A svcpart of "none" can
+also be specified to indicate that no initial service should be provisioned.
+
+=back
+
+Fields used when provisioning an svc_acct service:
+
+=over 4
 
 =item username
 
@@ -784,6 +803,48 @@ Optional Access number number
 
 =back
 
+Fields used when provisioning an svc_domain service:
+
+=over 4
+
+=item domain
+
+Domain
+
+=back
+
+Fields used when provisioning an svc_phone service:
+
+=over 4
+
+=item phonenum
+
+Phone number
+
+=item pin
+
+Voicemail PIN
+
+=item sip_password
+
+SIP password
+
+=back
+
+Fields used when provisioning an svc_external service:
+
+=over 4
+
+=item id
+
+External numeric ID.
+
+=item title
+
+External text title.
+
+=back
+
 Returns a hash reference with a single key, B<error>, empty on success, or an
 error message on errors.  The special error '_decline' is returned for
 declined transactions.
@@ -1578,8 +1639,12 @@ Takes as input a hashref or list of key/value pairs with the following keys:
 
 =item field
 
+Field name for the returned HTML fragment.
+
 =item svcpart
 
+Service definition (see L<FS::part_svc>)
+
 =back
 
 Returns an HTML fragment for DID selection.
@@ -1611,14 +1676,23 @@ Note: Resellers can also use the B<signup_info> and B<new_customer> functions
 with their active session, and the B<customer_info> and B<order_pkg> functions
 with their active session and an additional I<custnum> parameter.
 
+For the most part, development of the reseller web interface has been
+superceded by agent-virtualized access to the backend.
+
 =over 4
 
 =item agent_login
 
+Agent login
+
 =item agent_info
 
+Agent info
+
 =item agent_list_customers
 
+List agent's customers.
+
 =back
 
 =head1 BUGS