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

Public Member Functions

 __construct ($configurationName= 'Default')
 
 AddCustomer (AddCustomerRequest $addCustomerRequest)
 
 InitiateExemptCert (InitiateExemptCertRequest $initiateExemptCertRequest)
 
 GetExemptionCertificates (GetExemptionCertificatesRequest $getExemptionCertificatesRequest)
 
 Ping ($message= '')
 
 IsAuthorized (IsAuthorized $parameters)
 
- Public Member Functions inherited from AvalaraSoapClient
 __getLastRequest ()
 
 __getLastResponse ()
 
 __getLastRequestHeaders ()
 
 __getLastResponseHeaders ()
 

Static Private Attributes

static $classmap
 

Additional Inherited Members

- Protected Attributes inherited from AvalaraSoapClient
 $client
 

Constructor & Destructor Documentation

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

Member Function Documentation

AvaCertSvc::AddCustomer ( AddCustomerRequest  $addCustomerRequest)

This method adds an exempt customer record to AvaCert. This can also be done within the initiateExemptCert method. It should be used when you only wish to add the customer and are not yet ready to request a certificate. Use initiateExemptCert if you wish to both add a customer and request an exempt certificate.

$customer = new Customer();
$customer->setCompanyCode("DEFAULT");
$customer->setCustomerCode("AVALARA");
$customer->setCustomerName("Avalara, Inc.");
$customer->setAddress1("435 Ericksen Ave NE");
$customer->setCity("Bainbridge Island");
$customer->setRegion("WA");
$customer->setPostalCode("98110");
$customer->setCountry("US");
$customer->setEmail("info@avalara.com");
$customer->setPhone("206-826-4900");
$customer->setFax("206-780-5011");
$customer->setCustomerType("Bill_To");
$addCustomerRequest = new AddCustomerRequest();
$addCustomerRequest->setCustomer($customer);
$addCustomerResult= $avacertService->addCustomer($addCustomerRequest);
Parameters
AddCustomer$parameters
Returns
AddCustomerResponse
AvaCertSvc::GetExemptionCertificates ( GetExemptionCertificatesRequest  $getExemptionCertificatesRequest)

This method retrieves all certificates from vCert for a particular customer.

If only Customer.CustomerCode and Customer.CompanyCode are set, and all other properties in InitiateExemptCertRequest.Customer are empty then the InitiateExemptCert method will not attempt to create/update the customer record in vCert. It will simply initiate a request in vCert. If any additional properties on InitiateExemptCertRequest.Customer are set then the method will either create/update the customer record in vCert, and then initiate a request in vCert.

$getExemptionCertificatesRequest=new GetExemptionCertificatesRequest();
$getExemptionCertificatesRequest->setCompanyCode("Default");            
$dateTime=new DateTime();       
$getExemptionCertificatesRequest->setToDate(date_format($dateTime,"Y-m-d"));            
$dateTime->modify("-10 day");       
$getExemptionCertificatesRequest->setFromDate(date_format($dateTime,"Y-m-d"));
$getExemptionCertificatesRequest->setRegion("WA");
$getExemptionCertificatesResult = $avacertService->getExemptionCertificates($getExemptionCertificatesRequest);
Parameters
GetExemptionCertificates$parameters
Returns
GetExemptionCertificatesResponse
AvaCertSvc::InitiateExemptCert ( InitiateExemptCertRequest  $initiateExemptCertRequest)

This method initiates a request from AvaCert to the customer for an exemption certificate. The request will be sent using the designated method (email, fax, post). It creates or updates the included customer record in the process.

$customer = new Customer();
$customer->setCompanyCode("DEFAULT");
$customer->setCustomerCode("AVALARA");
$customer->setCustomerName("Avalara, Inc.");
$customer->setAddress1("435 Ericksen Ave NE");
$customer->setCity("Bainbridge Island");
$customer->setRegion("WA");
$customer->setPostalCode("98110");
$customer->setCountry("US");
$customer->setEmail("info@avalara.com");
$customer->setPhone("206-826-4900");
$customer->setFax("206-780-5011");
$customer->setCustomerType("Bill_To");
$initiateExemptCertRequest=new InitiateExemptCertRequest();
$initiateExemptCertRequest->setCustomer($customer);
$initiateExemptCertRequest->setCommunicationMode(CommunicationMode::$Email);
$initiateExemptCertRequest->setCustomMessage("Thank you!");
$initiateExemptCertResult= $avacertService->initiateExemptCert($initiateExemptCertRequest); 
Parameters
InitiateExemptCert$parameters
Returns
InitiateExemptCertResponse
AvaCertSvc::IsAuthorized ( IsAuthorized  $parameters)

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, i.e. protects against phishing.

Example:
isAuthorized("GetTax,PostTax")

Parameters
IsAuthorized$parameters
Returns
IsAuthorizedResponse
AvaCertSvc::Ping (   $message = '')

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

Parameters
Ping$parameters
Returns
PingResponse

Member Data Documentation

AvaCertSvc::$classmap
staticprivate
Initial value:
= array(
'AddCustomerRequest' => 'AddCustomerRequest',
'Customer' => 'Customer',
'ExemptionCertificate' => 'ExemptionCertificate',
'Jurisdiction' => 'Jurisdiction',
'CertificateStatus' => 'CertificateStatus',
'ReviewStatus' => 'ReviewStatus',
'CertificateUsage' => 'CertificateUsage',
'RequestType' => 'RequestType',
'AddCustomerResult' => 'AddCustomerResult',
'BaseResult' => 'BaseResult',
'SeverityLevel' => 'SeverityLevel',
'Message' => 'Message',
'Profile' => 'Profile',
'InitiateExemptCert' => 'InitiateExemptCert',
'InitiateExemptCertRequest' => 'InitiateExemptCertRequest',
'GetExemptionCertificates' => 'GetExemptionCertificates',
'GetExemptionCertificatesRequest' => 'GetExemptionCertificatesRequest',
'GetExemptionCertificatesResult' => 'GetExemptionCertificatesResult',
'BaseRequest' => 'BaseRequest',
'CommunicationMode' => 'CommunicationMode',
'InitiateExemptCertResult' => 'InitiateExemptCertResult',
'Ping' => 'Ping',
'PingResult' => 'PingResult',
'IsAuthorized' => 'IsAuthorized',
'IsAuthorizedResult' => 'IsAuthorizedResult',
)

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