[freeside-commits] branch FREESIDE_2_3_BRANCH updated. ec7b8b6a837587b66fb48fdf79c766c2bf0bff6f

Ivan ivan at 420.am
Thu Mar 6 12:08:20 PST 2014


The branch, FREESIDE_2_3_BRANCH has been updated
       via  ec7b8b6a837587b66fb48fdf79c766c2bf0bff6f (commit)
      from  68d4d9a02aa280f79614be40f8eb05e9d18f72cd (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 ec7b8b6a837587b66fb48fdf79c766c2bf0bff6f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Mar 6 12:08:17 2014 -0800

    backoffice API: add new_customer, RT#22830

diff --git a/bin/xmlrpc-new_customer b/bin/xmlrpc-new_customer
new file mode 100755
index 0000000..248d9e9
--- /dev/null
+++ b/bin/xmlrpc-new_customer
@@ -0,0 +1,62 @@
+#!/usr/bin/perl
+
+use strict;
+use Frontier::Client;
+use Data::Dumper;
+
+my( $username, $password ) = ( @ARGV );
+
+my $uri = new URI 'http://localhost:8008/';
+
+my $server = new Frontier::Client ( 'url' => $uri );
+
+my $result = $server->call('FS.API.new_customer',
+    #API shared secret
+    'secret'         => 'sharingiscaring',
+
+    #customer informaiton
+    'agentnum'       => 1,
+    'refnum'         => 1, #advertising source
+    'agent_custid'   => '323',
+
+    'first'          => 'Tofu',
+    'last'           => 'Beast',
+    'company'        => 'Bank of Soymerica',
+
+    #address
+    'address1'       => '1234 Soybean Ln.',
+    'city'           => 'Tofutown',
+    'county'         => '',
+    'state'          => 'CA',
+    'zip'            => '54321',
+    'country'        => 'US',
+    'latitude'       => '',
+    'longitude'      => '',
+    'geocode'        => '',
+    'censustract'    => '',
+    'censusyear'     => '',
+
+    #phones
+    'daytime'        => '555 444 3211',
+    'night'          => '',
+    'fax'            => '',
+    'mobile'         => '123 466 3332',
+
+    #invoicing info
+    'invoicing_list'   => 'tofu at example.com', #comma-separated email addresses
+    'postal_invoicing' => 1,
+
+    #billing information
+    'payby'          => 'CARD', # DCRD, CHEK, DCHK, BILL, etc.
+    'payinfo'        => '4111111111111111', #card number / acctno at routing / PO#
+    'paydate'        => '11/2019', #card expiration
+    'paycvv'         => '123',     #card CVV/security code
+    'payname'        => 'Thomas Beast', #"Exact name on card" if different
+);
+
+die $result->{'error'} if $result->{'error'};
+
+my $custnum = $result->{'custnum'};
+warn "added new customer w/custnum $custnum\n";
+
+1;

-----------------------------------------------------------------------

Summary of changes:
 bin/xmlrpc-new_customer |   62 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)
 create mode 100755 bin/xmlrpc-new_customer




More information about the freeside-commits mailing list