[freeside-commits] branch FREESIDE_3_BRANCH updated. b91dcaf3fc07c23955ce571c2257df4efff2923a
Ivan
ivan at 420.am
Fri Apr 10 09:34:03 PDT 2015
The branch, FREESIDE_3_BRANCH has been updated
via b91dcaf3fc07c23955ce571c2257df4efff2923a (commit)
from ad66b8e85a07f28adb3c8b5da7eff5ea69f31e62 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b91dcaf3fc07c23955ce571c2257df4efff2923a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Fri Apr 10 09:34:01 2015 -0700
new_customer_minimal accepts address, & doc it, RT#34084
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index 1c62f61..e1ee6cd 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -636,6 +636,16 @@ sub new_customer {
$cust_main->payinfo($cust_main->daytime)
if $cust_main->payby eq 'LECB' && ! $cust_main->payinfo;
+ if ( grep length($packet->{$_}), FS::cust_main->location_fields ) {
+ my $bill_hash;
+ foreach my $f (FS::cust_main->location_fields) {
+ $bill_hash->{$f} = $packet->{$f};
+ }
+ my $bill_location = FS::cust_location->new($bill_hash);
+ $cust_main->set('bill_location' => $bill_location);
+ $cust_main->set('ship_location' => $bill_location);
+ }
+
my @invoicing_list = $packet->{'invoicing_list'}
? split( /\s*\,\s*/, $packet->{'invoicing_list'} )
: ();
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm
index 039de6d..c77f332 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -254,7 +254,7 @@ FS::SelfService - Freeside self-service API
#!!! cancel_pkg example
# signup functionality
- use FS::SelfService qw( signup_info new_customer );
+ use FS::SelfService qw( signup_info new_customer new_customer_minimal );
my $signup_info = signup_info;
@@ -1258,6 +1258,147 @@ Default country
=back
+=item new_customer_minimal HASHREF
+
+Creates a new customer.
+
+Current differences from new_customer: An address is not required. promo_code
+and reg_code are not supported. If invoicing_list and _password is passed, a
+contact will be created with self-service access (no pkgpart or username is
+necessary). No initial billing is run (this may change in a future version).
+
+Takes a hash reference as parameter with the following keys:
+
+=over 4
+
+=item first
+
+first name (required)
+
+=item last
+
+last name (required)
+
+=item ss
+
+(not typically collected; mostly used for ACH transactions)
+
+=item company
+
+Company name
+
+=item address1
+
+Address line one
+
+=item address2
+
+Address line two
+
+=item city
+
+City
+
+=item county
+
+County
+
+=item state
+
+State
+
+=item zip
+
+Zip or postal code
+
+=item daytime
+
+Daytime phone number
+
+=item night
+
+Evening phone number
+
+=item fax
+
+Fax number
+
+=item payby
+
+CARD, DCRD, CHEK, DCHK, LECB, BILL, COMP or PREPAY (see L</signup_info> (required)
+
+=item payinfo
+
+Card number for CARD/DCRD, account_number at aba_number for CHEK/DCHK, prepaid "pin" for PREPAY, purchase order number for BILL
+
+=item paycvv
+
+Credit card CVV2 number (1.5+ or 1.4.2 with CVV schema patch)
+
+=item paydate
+
+Expiration date for CARD/DCRD
+
+=item payname
+
+Exact name on credit card for CARD/DCRD, bank name for CHEK/DCHK
+
+=item invoicing_list
+
+comma-separated list of email addresses for email invoices. The special value 'POST' is used to designate postal invoicing (it may be specified alone or in addition to email addresses),
+
+=item referral_custnum
+
+referring customer number
+
+=item agentnum
+
+Agent number
+
+=item pkgpart
+
+pkgpart of initial package
+
+=item username
+
+Username
+
+=item _password
+
+Password
+
+=item sec_phrase
+
+Security phrase
+
+=item popnum
+
+Access number (index, not the literal number)
+
+=item countrycode
+
+Country code (to be provisioned as a service)
+
+=item phonenum
+
+Phone number (to be provisioned as a service)
+
+=item pin
+
+Voicemail PIN
+
+=back
+
+Returns a hash reference with the following keys:
+
+=over 4
+
+=item error
+
+Empty on success, or an error message on errors. The special error '_decline' is returned for declined transactions; other error messages should be suitable for display to the user (and are customizable in under Configuration | View/Edit message catalog)
+
+=back
+
=item new_customer HASHREF
Creates a new customer. Takes a hash reference as parameter with the
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/Signup.pm | 10 ++
fs_selfservice/FS-SelfService/SelfService.pm | 143 +++++++++++++++++++++++++-
2 files changed, 152 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list