ePages 7.23.0 - DE_EPAGES/AvaTax/API/AvaTax.pm

Package DE_EPAGES::AvaTax::API::AvaTax

public API for AvaTax

Base
Exporter

Functions

AllowTaxChange
IsAuthorized
NotifyShopOwner
Ping
UpdateTax
UseAvaTax
Validate

AllowTaxChange

Returns true if lineitemavatax items may be modified in attributes TaxRate and TaxClass

Syntax
AllowTaxChange( );
Return
$AllowChange (boolean)
true, if attributes may be changed

IsAuthorized

Tests Authorization for AvaTax Webservice

Syntax
IsAuthorized( $Shop, $Service, $Username, $Password, $IsInTestMode );
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
shop object
$Service (string)
which AvaTax webservice
$Username (string)
Webservice username
$Password (string)
Webservice password
$IsInTestMode (Boolean)
connect to Webservice in test mode
Return
$Result (object)
webservice result

NotifyShopOwner

Notfies shop owner of a problem

Syntax
NotifyShopOwner( $ErrorCode );
Input
$Shop (object)
Shop
$ErrorCode (string)
Error code

Ping

Tests Ping for AvaTax Webservice

Syntax
Ping( $Shop, $Service, $Username, $Password, $IsInTestMode );
Input
$Shop (DE_EPAGES::Shop::API::Object::Shop)
shop object
$Service (string)
which AvaTax webservice
$Username (string)
Webservice username
$Password (string)
Webservice password
$IsInTestMode (Boolean)
connect to Webservice in test mode
Return
$Result (object)
webservice result

UpdateTax

calls GetTax for a lineitemcontainer and updates lineitemtax entries

Syntax
UpdateTax( $LineItemContainer );
Input
$LineItemContainer (object)
lineitem container

UseAvaTax

Check if we will use AvaTax for this order.

Syntax
UseAvaTax( $Shop, $hAddressInfo );
Input
$Shop (object)
shop
$hAddressInfo (ref.hash)
Address hash. used keys
  • CountryID - ISO CountryID
Return
$UseAvaTax (integer)
use code. Only use AvaTax if this is 1.
1 if AvaTax should be used.
-1 if LineItemClass does not match
-2 If TaxMethod does not match
-3 if Address Country does not match

Validate

Validates an address with AvaTax Address service The actual input values are taken from the Form element, if provided.

Syntax
Validate( $Address );
Input
$Shop (object)
Shop
$Address (object)
Address object
$Form (object)
form
Return
$Result (object)
Validation Result