7 my( $username, $password ) = ( @ARGV );
9 my $uri = new URI 'http://localhost:8008/';
11 my $server = new Frontier::Client ( 'url' => $uri );
13 my $result = $server->call('FS.API.new_customer',
15 'secret' => 'sharingiscaring',
19 'refnum' => 1, #advertising source
20 'agent_custid' => '323',
24 'company' => 'Bank of Soymerica',
27 'address1' => '1234 Soybean Ln.',
40 'daytime' => '555 444 3211',
43 'mobile' => '123 466 3332',
46 'invoicing_list' => 'tofu@example.com', #comma-separated email addresses
47 'postal_invoicing' => 1,
50 'payby' => 'CARD', # DCRD, CHEK, DCHK, BILL, etc.
51 'payinfo' => '4111111111111111', #card number / acctno@routing / PO#
52 'paydate' => '11/2019', #card expiration
53 'paycvv' => '123', #card CVV/security code
54 'payname' => 'Thomas Beast', #"Exact name on card" if different
57 die $result->{'error'} if $result->{'error'};
59 my $custnum = $result->{'custnum'};
60 warn "added new customer w/custnum $custnum\n";