summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-10-17 09:35:56 +0000
committerivan <ivan>2004-10-17 09:35:56 +0000
commit0d025c34fef006a91da657b179227538c9e48c8e (patch)
treeaa99616249d193d3048e1d2a5892a5f6f047e065
parent3768b709beed40479f29657ecf77a6357697951f (diff)
add some more example code to the synopsis, remove unnecessary use URI::Escape
-rw-r--r--lib/Net/Artera.pm28
1 files changed, 27 insertions, 1 deletions
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.