VirtueMart  3.2.14.9808
Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
TaxServiceSoap Class Reference
Inheritance diagram for TaxServiceSoap:
Inheritance graph
[legend]
Collaboration diagram for TaxServiceSoap:
Collaboration graph
[legend]

Public Member Functions

 __construct ($configurationName= 'Default')
 
 getTax (&$getTaxRequest)
 
 getTaxHistory (&$getTaxHistoryRequest)
 
 postTax (&$postTaxRequest)
 
 commitTax (&$commitTaxRequest)
 
 cancelTax (&$cancelTaxRequest)
 
 reconcileTaxHistory (&$reconcileTaxHistoryRequest)
 
 adjustTax (&$adjustTaxRequest)
 
 isAuthorized ($operations)
 
 ping ($message= '')
 
 applyPayment (&$applyPaymentRequest)
 
- Public Member Functions inherited from AvalaraSoapClient
 __getLastRequest ()
 
 __getLastResponse ()
 
 __getLastRequestHeaders ()
 
 __getLastResponseHeaders ()
 

Static Public Attributes

static $servicePath = '/Tax/TaxSvc.asmx'
 

Static Protected Attributes

static $classmap
 

Additional Inherited Members

- Protected Attributes inherited from AvalaraSoapClient
 $client
 

Constructor & Destructor Documentation

TaxServiceSoap::__construct (   $configurationName = 'Default')

Member Function Documentation

TaxServiceSoap::adjustTax ( $adjustTaxRequest)

Adjusts a previously calculated tax.

This is only available for unlocked tax documents (Sales Invoices, Purchase Invoices). *

Parameters
adjustTaxRequesta AdjustTaxRequest object indicating the document that should be edited.
Returns
a AdjustTaxResult object
Exceptions
SoapFault
TaxServiceSoap::applyPayment ( $applyPaymentRequest)

This method is used to apply a payment to a document for cash basis accounting. Applies a payment date to an existing invoice It sets the document PaymentDate and changes the reporting date from the DocDate default. It may be called before or after a document is committed. It should not be used for accrual basis accounting

Parameters
ApplyPaymentRequest$applyPaymentRequest
Returns
ApplyPaymentResult
TaxServiceSoap::cancelTax ( $cancelTaxRequest)

Cancels a previously calculated tax; This is for use as a compensating action when posting on the client fails to complete.

This is only available for saved tax document types (Sales Invoices, Purchase Invoices). A document that is saved but not posted will be deleted if canceled. A document that has been posted will revert to a saved state if canceled (in this case CancelTax should be called with a CancelTaxRequest#getCancelCode of PostFailed). A document that has been committed cannot be reverted to a posted state or deleted. In the case that a document on the client side no longer exists, a committed document can be virtually removed by calling CancelTax with a CancelCode of DocDeleted. The record will be retained in history but removed from all reports.

A document can be indicated solely by the CancelTaxRequest#getDocId if it is known. Otherwise the request must specify all of CancelTaxRequest#getCompanyCode, CancelTaxRequest#getDocCode, and CancelTaxRequest#getDocType in order to uniquely identify the document.

Parameters
cancelTaxRequesta CancelTaxRequest object indicating the document that should be canceled.
Returns
a CancelTaxResult object
Exceptions
SoapFault
TaxServiceSoap::commitTax ( $commitTaxRequest)

Commits a previously posted tax.

This is only available for posted tax documents (Sales Invoices, Purchase Invoices). Committed documents cannot be changed or deleted.

A document can be indicated solely by the CommitTaxRequest#getDocId if it is known. Otherwise the request must specify all of CommitTaxRequest#getCompanyCode, CommitTaxRequest#getDocCode, and CommitTaxRequest#getDocType in order to uniquely identify the document.

Parameters
commitTaxRequesta CommitTaxRequest object indicating the document that should be committed.
Returns
a CommitTaxResult object
Exceptions
SoapFault
TaxServiceSoap::getTax ( $getTaxRequest)

Calculates taxes on a document such as a sales order, sales invoice, purchase order, purchase invoice, or credit memo.
The tax data is saved Sales Invoice and Purchase Invoice document types GetTaxRequest#getDocType.

Parameters
getTaxRequestTax calculation request
Returns
GetTaxResult
Exceptions
SoapFault
TaxServiceSoap::getTaxHistory ( $getTaxHistoryRequest)

Retrieves a previously calculated tax document.

This is only available for saved tax documents (Sales Invoices, Purchase Invoices).

A document can be indicated solely by the PostTaxRequest#getDocId if it is known. Otherwise the request must specify all of PostTaxRequest#getCompanyCode, see PostTaxRequest#getDocCode and PostTaxRequest#getDocType in order to uniquely identify the document.

Parameters
getTaxHistoryRequesta GetTaxHistoryRequest object indicating the document for which history should be retrieved.
Returns
a GetTaxHistoryResult object
Exceptions
SoapFault
TaxServiceSoap::isAuthorized (   $operations)

Checks authentication of and authorization to one or more operations on the service.

This operation allows pre-authorization checking of any or all operations. It will return a comma delimited set of operation names which will be all or a subset of the requested operation names. For security, it will never return operation names other than those requested (no phishing allowed).

Example:
isAuthorized("GetTax,PostTax")

Parameters
string$operationsa comma-delimited list of operation names
Returns
IsAuthorizedResult
Exceptions
SoapFault
TaxServiceSoap::ping (   $message = '')

Verifies connectivity to the web service and returns version information about the service.

NOTE:This replaces TestConnection and is available on every service.

Parameters
string$messagefor future use
Returns
PingResult
Exceptions
SoapFault
TaxServiceSoap::postTax ( $postTaxRequest)

Posts a previously calculated tax

This is only available for saved tax documents (Sales Invoices, Purchase Invoices).

A document can be indicated solely by the PostTaxRequest#getDocId if it is known. Otherwise the request must specify all of PostTaxRequest#getCompanyCode, PostTaxRequest#getDocCode, and PostTaxRequest#getDocType in order to uniquely identify the document.

Parameters
postTaxRequesta PostTaxRequest object indicating the document that should be posted.
Returns
a PostTaxResult object
Exceptions
SoapFault
TaxServiceSoap::reconcileTaxHistory ( $reconcileTaxHistoryRequest)

Reconciles tax history to ensure the client data matches the AvaTax history.

The Reconcile operation allows reconciliation of the AvaTax history with the client accounting system. It must be used periodically according to your service contract.

Because there may be a large number of documents to reconcile, it is designed to be called repetitively until all documents have been reconciled. It should be called until no more documents are returned. Each subsequent call should pass the previous results ReconcileTaxHistoryRequest#getLastDocId.

When all results have been reconciled, Reconcile should be called once more with ReconcileTaxHistoryRequest#getLastDocId equal to the last document code processed and ReconcileTaxHistoryRequest#isReconciled set to true to indicate that all items have been reconciled. If desired, this may be done incrementally with each result set. Just send Reconciled as true when requesting the next result set and the prior results will be marked as reconciled.

The postTax, commitTax, and cancelTax operations can be used to correct any differences. getTax should be called if any committed documents are out of balance (GetTaxResult#getTotalAmount or GetTaxResult#getTotalTax don't match the accounting system records). This is to make sure the correct tax is reported.

Parameters
reconcileTaxHistoryRequesta Reconciliation request
Returns
A collection of documents that have been posted or committed since the last reconciliation.
Exceptions
SoapFault

Member Data Documentation

TaxServiceSoap::$classmap
staticprotected
Initial value:
= array(
'BaseAddress' => 'Address',
'ValidAddress' => 'ValidAddress',
'Message' => 'Message',
'ValidateRequest' => 'ValidateRequest',
'IsAuthorizedResult' => 'IsAuthorizedResult',
'PingResult' => 'PingResult',
'ValidateResult' => 'ValidateResult',
'Line'=>'Line',
'AdjustTaxRequest'=>'AdjustTaxRequest',
'AdjustTaxResult'=>'AdjustTaxResult',
'CancelTaxRequest'=>'CancelTaxRequest',
'CancelTaxResult'=>'CancelTaxResult',
'CommitTaxRequest'=>'CommitTaxRequest',
'CommitTaxResult'=>'CommitTaxResult',
'GetTaxRequest'=>'GetTaxRequest',
'GetTaxResult'=>'GetTaxResult',
'GetTaxHistoryRequest'=>'GetTaxHistoryRequest',
'GetTaxHistoryResult'=>'GetTaxHistoryResult',
'PostTaxRequest'=>'PostTaxRequest',
'PostTaxResult'=>'PostTaxResult',
'ReconcileTaxHistoryRequest'=>'ReconcileTaxHistoryRequest',
'ReconcileTaxHistoryResult'=>'ReconcileTaxHistoryResult',
'TaxLine'=>'TaxLine',
'TaxDetail' => 'TaxDetail',
'ApplyPaymentRequest'=>'ApplyPaymentRequest',
'ApplyPaymentResult'=>'ApplyPaymentResult',
'BaseResult'=>'BaseResult',
'TaxOverride'=>'TaxOverride'
)
TaxServiceSoap::$servicePath = '/Tax/TaxSvc.asmx'
static

The documentation for this class was generated from the following file: