From: ivan Date: Sun, 17 Oct 2004 09:35:56 +0000 (+0000) Subject: add some more example code to the synopsis, remove unnecessary use URI::Escape X-Git-Tag: Net_Artera_0_01~1 X-Git-Url: http://git.freeside.biz/gitweb/?p=Net-Artera.git;a=commitdiff_plain;h=0d025c34fef006a91da657b179227538c9e48c8e add some more example code to the synopsis, remove unnecessary use URI::Escape --- diff --git a/lib/Net/Artera.pm b/lib/Net/Artera.pm index dfc6da1..216eec0 100644 --- a/lib/Net/Artera.pm +++ b/lib/Net/Artera.pm @@ -3,7 +3,6 @@ package Net::Artera; use 5.005; use strict; use Data::Dumper; -use URI::Escape; use LWP::UserAgent; use XML::Simple; use Locale::Country; @@ -38,11 +37,38 @@ Net::Artera - Perl extension for Artera XML API. use Net::Artera; my $connection = new Net::Artera ( + 'rid' => 'reseller_id', 'username' => 'reseller_username', 'password' => 'reseller_password', 'production' => 0, ); + my $result = $artera->newOrder( + 'email' => $email, + 'cname' => $name, + 'ref' => $refnum,, + 'aid' => $affiliatenum, + 'add1' => $address1, + 'add2' => $address2, + 'add3' => $city, + 'add4' => $state, + 'zip' => $zip, + 'cid' => $country, + 'phone' => $phone, + 'fax' => $fax, + ); + + if ( $result->{'id'} == 1 ) { + #Success! + $serialnum = $result->{'ASN'}; + $keycode = $result->{'AKC'}; + } else { + #Failure + die $result->{'message'}; + } + + # etc... + =head1 DESCRIPTION This is a Perl module which speaks the Artera XML API.