NAME
Net::Artera - Perl extension for Artera XML API.
SYNOPSIS
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...
DESCRIPTION
This is a Perl module which speaks the Artera XML API. See <http://www.arteraturbo.com>. Artera Resellers can use this module to access some features of the API.
METHODS
- new [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Constructor. Options can be passed as a hash reference or a list. Options are case-insensitive.
Available options are:
- newTrial [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Options can be passed as a hash reference or a list. Options are case-insensitive.
Available options are:
- email (required)
- cname (required) - Customer's name
- ref (required) - Reseller's own order reference
- pid (required) - Artera Product ID
- priceid (required) - Artera Price ID
- aid - Affiliate ID number used when the Reseller wants to track some type of sales channel beneath them.
- add1*
- add2
- add3* - City
- add4* - State
- zip*
- cid* - Country ID. Defaults to 2 (USA). Can be specified as a numeric CID or as an ISO 3166 two-letter country code or full name.
- phone
- fax
*These fields are optional, but must be supplied as a set.
Returns a hash reference with the following keys (these keys are case-sensitive):
- id - This is the Result ID to indicate success or failure: 1 for success, anything else for failure
- message - Some descriptive text regarding the success or failure
- ASN - The Artera Serial Number
- AKC - The Artera Key Code
- TrialID - The Artera Trial Number
- Ref - The Reseller Reference
- CustomerID - Artera's CustomerID
- TrialLength - Trial Length
- newOrder [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Available options are the same as newTrial. Additionally the asn and akc fields may be specified to convert a trial to an order.
- statusChange [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Options can be passed as a hash reference or a list. Options are case-insensitive.
Available options are:
- ASN (required) - Artera Serial Number
- AKC (required) - Artera Key Code
- StatusID (required) - Possible StatusID values are as follows:
-
- 15 - Normal Unrestricted: re-enable a disabled Serial Number (e.g. a payment dispute has been resolved so the Serial Number needs to be re-enabled).
- 16 - Disable: temporarily prohibit an end-user's serial number from working (e.g. there is a payment dispute, so you want to turn off the Serial Number until the dispute is resolved).
- 17 - Terminate: permanently prohibit an end-user's Serial Number from working (e.g. subscription cancellation)
- Reason - Reason for terminating
Returns a hash reference with the following keys (these keys are case-sensitive):
- getProductStatus [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Options can be passed as a hash reference or a list. Options are case-insensitive.
Available options are:
Returns a hash reference with the following keys (these keys are case-sensitive):
- id - This is the Result ID to indicate success or failure: 1 for success, anything else for failure
- message - On failure, descriptive text regarding the failure
- StatusID (required) - Possible StatusID values are as follows:
-
- 15 - Normal Unrestricted: re-enable a disabled Serial Number (e.g. a payment dispute has been resolved so the Serial Number needs to be re-enabled).
- 16 - Disable: temporarily prohibit an end-user's serial number from working (e.g. there is a payment dispute, so you want to turn off the Serial Number until the dispute is resolved).
- 17 - Terminate: permanently prohibit an end-user's Serial Number from working (e.g. subscription cancellation)
- Description - Status description
- updateContentControl [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Options can be passed as a hash reference or a list. Options are case-insensitive.
Available options are:
- ASN (required) - Artera Serial Number
- AKC (required) - Artera Key Code
- UseContentControl (required) - 0 for off, 1 for on
Returns a hash reference with the following keys (these keys are case-sensitive):
- orderListByDate [ OPTIONS_HASHREF | OPTION => VALUE ... ]
-
Unimplemented.
BUGS
orderListByDate is unimplemented.
SEE ALSO
<http://www.arteraturbo.com>
AUTHOR
Ivan Kohler, <ivan-net-artera@420.am>
Freeside, open-source billing for ISPs: <http://www.sisd.com/freeside>
Not affiliated with Artera Group, Inc.
COPYRIGHT AND LICENSE
Copyright (C) 2004 Ivan Kohler
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 509:
You forgot a '=back' before '=head1'