X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2FSelfService.pm;h=e01d17b6a04d3181b7627601758b07914fa81977;hb=c39d6e73a98427d653e3d019aaa90f16bc1b6380;hp=0b65417ed8ba32c4336c8d42ec06e24a32f4b62f;hpb=6419542b10f8ebb0dada9dcb1a48cf78151ca82a;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm index 0b65417ed..e01d17b6a 100644 --- a/fs_selfservice/FS-SelfService/SelfService.pm +++ b/fs_selfservice/FS-SelfService/SelfService.pm @@ -38,6 +38,7 @@ $socket .= '.'.$tag if defined $tag && length($tag); 'list_contacts' => 'MyAccount/contact/list_contacts', 'edit_contact' => 'MyAccount/contact/edit_contact', 'delete_contact' => 'MyAccount/contact/delete_contact', + 'new_contact' => 'MyAccount/contact/new_contact', 'billing_history' => 'MyAccount/billing_history', 'edit_info' => 'MyAccount/edit_info', #add to ss cgi! @@ -1374,10 +1375,50 @@ error message, or empty on success. =item list_contacts +Takes a hash reference as parameter with a single key, B. + +Returns a hash reference with two parameters: B, which contains an error +message, or empty on success, and B, a list of contacts. + +B 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 + +=item contactnum + +=item class + +Contact class name (contact type). + +=item first + +First name + +=item last + +Last name + +=item title + +Position ("Director of Silly Walks"), NOT honorific ("Mr." or "Mrs.") + +=item emailaddress + +Comma-separated list of email addresses + +=item comment + +=item selfservice_access + +Y when enabled + +=back + =item edit_contact Updates information for the currently-logged in contact, or (optionally) the -specified contact +specified contact. Takes a hash reference as parameter with the following keys: @@ -1400,8 +1441,57 @@ If already logged in as a contact, this is optional. Returns a hash reference with a single parameter, B, which contains an error message, or empty on success. +=item new_contact + +Creates a new contact. + +Takes a hash reference as parameter with the following keys: + +=over 4 + +=item session_id + +=item first + +=item last + +=item emailaddress + +=item classnum + +Optional contact classnum (TODO: or name) + +=item comment + +=item selfservice_access + +Y to enable self-service access + +=item _password + +=back + +Returns a hash reference with a single parameter, B, which contains an +error message, or empty on success. + =item delete_contact +Deletes a contact. (Note: Cannot at this time delete the currently-logged in +contact.) + +Takes a hash reference as parameter with the following keys: + +=over 4 + +=item session_id + +=item contactnum + +=back + +Returns a hash reference with a single parameter, B, which contains an +error message, or empty on success. + =head2 "MY ACCOUNT" QUOTATION FUNCTIONS All of these functions require the user to be logged in, and the 'session_id'