Version Notes
Implemented custom customer attribute for customerCode
Implemented possability to change queue items with status failed to pending
Download this release
Release Info
Developer | Astound Commerce |
Extension | OnePica_AvaTax |
Version | 3.3.0 |
Comparing to | |
See all releases |
Code changes from version 3.2.3 to 3.3.0
- app/code/community/OnePica/AvaTax/Block/Adminhtml/Export/Queue/Grid.php +20 -1
- app/code/community/OnePica/AvaTax/Block/Widget/Grid/Column/Renderer/QueueAction.php +41 -0
- app/code/community/OnePica/AvaTax/Helper/Calculation.php +47 -0
- app/code/community/OnePica/AvaTax/Helper/Config.php +16 -0
- app/code/community/OnePica/AvaTax/Model/Config/Backend/CustomerCodeFormatAttribute.php +151 -0
- app/code/community/OnePica/AvaTax/Model/Source/Customercodeformat.php +9 -0
- app/code/community/OnePica/AvaTax/controllers/Adminhtml/AvaTax/GridController.php +40 -0
- app/code/community/OnePica/AvaTax/etc/config.xml +1 -1
- app/code/community/OnePica/AvaTax/etc/system.xml +17 -1
- lib/OnePica/AvaTax16/AddressResolution.php +0 -56
- lib/OnePica/AvaTax16/AddressResolution/PingResponse.php +0 -45
- lib/OnePica/AvaTax16/AddressResolution/ResolveSingleAddressResponse.php +0 -99
- lib/OnePica/AvaTax16/AddressResolution/TaxAuthority.php +0 -63
- lib/OnePica/AvaTax16/Calculation.php +0 -115
- lib/OnePica/AvaTax16/Calculation/ListItemResponse.php +0 -84
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary.php +0 -111
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary/TaxByType.php +0 -65
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary/TaxByType/Details.php +0 -63
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/Header.php +0 -99
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/Line.php +0 -36
- lib/OnePica/AvaTax16/Calculation/ListItemResponse/ProcessingInfo.php +0 -99
- lib/OnePica/AvaTax16/Calculation/ListResponse.php +0 -72
- lib/OnePica/AvaTax16/Config.php +0 -229
- lib/OnePica/AvaTax16/Document/Part.php +0 -211
- lib/OnePica/AvaTax16/Document/Part/Feedback.php +0 -36
- lib/OnePica/AvaTax16/Document/Part/Feedback/LatencyData.php +0 -45
- lib/OnePica/AvaTax16/Document/Part/Location.php +0 -146
- lib/OnePica/AvaTax16/Document/Part/Location/Address.php +0 -153
- lib/OnePica/AvaTax16/Document/Part/Location/LatLong.php +0 -45
- lib/OnePica/AvaTax16/Document/Request.php +0 -88
- lib/OnePica/AvaTax16/Document/Request/Header.php +0 -238
- lib/OnePica/AvaTax16/Document/Request/Line.php +0 -212
- lib/OnePica/AvaTax16/Document/Response.php +0 -112
- lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary.php +0 -93
- lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary/TaxByType.php +0 -66
- lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary/TaxByType/Details.php +0 -63
- lib/OnePica/AvaTax16/Document/Response/Header.php +0 -220
- lib/OnePica/AvaTax16/Document/Response/Line.php +0 -225
- lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax.php +0 -70
- lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax/Details.php +0 -144
- lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax/TaxByType.php +0 -47
- lib/OnePica/AvaTax16/Document/Response/ProcessingInfo.php +0 -99
- lib/OnePica/AvaTax16/Exception.php +0 -25
- lib/OnePica/AvaTax16/IO/CaseInsensitiveArray.php +0 -151
- lib/OnePica/AvaTax16/IO/Curl.php +0 -1384
- lib/OnePica/AvaTax16/ResourceAbstract.php +0 -138
- lib/OnePica/AvaTax16/TaxService.php +0 -245
- lib/OnePica/AvaTax16/Transaction.php +0 -230
- lib/OnePica/AvaTax16/Transaction/ListItemResponse.php +0 -27
- lib/OnePica/AvaTax16/Transaction/ListResponse.php +0 -72
- lib/OnePica/AvaTax16/Transaction/TransitionTransactionStateResponse.php +0 -54
- lib/OnePica/autoload.php +0 -40
- package.xml +6 -5
app/code/community/OnePica/AvaTax/Block/Adminhtml/Export/Queue/Grid.php
CHANGED
@@ -65,7 +65,7 @@ class OnePica_AvaTax_Block_Adminhtml_Export_Queue_Grid extends OnePica_AvaTax_Bl
|
|
65 |
*/
|
66 |
protected function _prepareColumns()
|
67 |
{
|
68 |
-
|
69 |
array(
|
70 |
'queue_id' => 'number',
|
71 |
'store_id' => 'number',
|
@@ -79,6 +79,25 @@ class OnePica_AvaTax_Block_Adminhtml_Export_Queue_Grid extends OnePica_AvaTax_Bl
|
|
79 |
'updated_at' => 'datetime'
|
80 |
)
|
81 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
|
84 |
/**
|
65 |
*/
|
66 |
protected function _prepareColumns()
|
67 |
{
|
68 |
+
$this->_addColumns(
|
69 |
array(
|
70 |
'queue_id' => 'number',
|
71 |
'store_id' => 'number',
|
79 |
'updated_at' => 'datetime'
|
80 |
)
|
81 |
);
|
82 |
+
|
83 |
+
$this->addColumn('actions', array(
|
84 |
+
'header' => $this->__('Actions'),
|
85 |
+
'type' => 'action',
|
86 |
+
'getter' => 'getId',
|
87 |
+
'actions' => array(array(
|
88 |
+
'caption' => $this->__('Set pending status'),
|
89 |
+
'url' => array(
|
90 |
+
'base' => '*/*/setPendingStatusForQueueItem',
|
91 |
+
),
|
92 |
+
'field' => 'queue_id',
|
93 |
+
'confirm' => $this->__('Do you really want to update queue item status to Pending?'),
|
94 |
+
)),
|
95 |
+
'filter' => false,
|
96 |
+
'sortable' => false,
|
97 |
+
'renderer' => 'avatax/widget_grid_column_renderer_queueAction'
|
98 |
+
));
|
99 |
+
|
100 |
+
return $this;
|
101 |
}
|
102 |
|
103 |
/**
|
app/code/community/OnePica/AvaTax/Block/Widget/Grid/Column/Renderer/QueueAction.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* OnePica_AvaTax
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
8 |
+
* copy of which is available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* @category OnePica
|
12 |
+
* @package OnePica_AvaTax
|
13 |
+
* @author OnePica Codemaster <codemaster@onepica.com>
|
14 |
+
* @copyright Copyright (c) 2009 One Pica, Inc.
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Queue Grid column widget for rendering action grid cells
|
20 |
+
*
|
21 |
+
* @category OnePica
|
22 |
+
* @package OnePica_AvaTax
|
23 |
+
* @author OnePica Codemaster <codemaster@onepica.com>
|
24 |
+
*/
|
25 |
+
class OnePica_AvaTax_Block_Widget_Grid_Column_Renderer_QueueAction
|
26 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
27 |
+
{
|
28 |
+
/**
|
29 |
+
* Renders column
|
30 |
+
*
|
31 |
+
* @param Varien_Object $row
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function render(Varien_Object $row)
|
35 |
+
{
|
36 |
+
if ($row->getStatus() != OnePica_AvaTax_Model_Records_Queue::QUEUE_STATUS_FAILED) {
|
37 |
+
return '';
|
38 |
+
}
|
39 |
+
return parent::render($row);
|
40 |
+
}
|
41 |
+
}
|
app/code/community/OnePica/AvaTax/Helper/Calculation.php
CHANGED
@@ -48,6 +48,11 @@ class OnePica_AvaTax_Helper_Calculation
|
|
48 |
$customerCode = $this->_getCustomerEmail($object, $customer)
|
49 |
?: $this->_getCustomerId($object);
|
50 |
break;
|
|
|
|
|
|
|
|
|
|
|
51 |
case OnePica_AvaTax_Model_Source_Customercodeformat::CUST_ID:
|
52 |
default:
|
53 |
$customerCode = $this->_getCustomerId($object);
|
@@ -104,6 +109,48 @@ class OnePica_AvaTax_Helper_Calculation
|
|
104 |
return $email;
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* Retrieve customer id
|
109 |
*
|
48 |
$customerCode = $this->_getCustomerEmail($object, $customer)
|
49 |
?: $this->_getCustomerId($object);
|
50 |
break;
|
51 |
+
case OnePica_AvaTax_Model_Source_Customercodeformat::CUST_ATTRIBUTE:
|
52 |
+
$attributeCode = $this->_getConfigHelper()->getCustomerCodeFormatAttribute($storeId);
|
53 |
+
$customerCode = $this->_getCustomerAttributeValue($object, $customer, $attributeCode)
|
54 |
+
?: $this->_getCustomerId($object);
|
55 |
+
break;
|
56 |
case OnePica_AvaTax_Model_Source_Customercodeformat::CUST_ID:
|
57 |
default:
|
58 |
$customerCode = $this->_getCustomerId($object);
|
109 |
return $email;
|
110 |
}
|
111 |
|
112 |
+
/**
|
113 |
+
* Get Customer Attribute Value
|
114 |
+
*
|
115 |
+
* @param Mage_Sales_Model_Quote_Address|Mage_Sales_Model_Order $object
|
116 |
+
* @param Mage_Customer_Model_Customer $customer
|
117 |
+
* @param string $attributeCode
|
118 |
+
* @return string|null
|
119 |
+
*/
|
120 |
+
protected function _getCustomerAttributeValue($object, $customer, $attributeCode)
|
121 |
+
{
|
122 |
+
if ($object instanceof Mage_Sales_Model_Quote_Address) {
|
123 |
+
$request = Mage::app()->getRequest();
|
124 |
+
$ctrlName = $request->getControllerName();
|
125 |
+
if (!in_array($ctrlName, array('cart'))) {
|
126 |
+
$quote = $object->getQuote();
|
127 |
+
$customer = $quote->getCustomer();
|
128 |
+
Mage::helper('core')->copyFieldset(
|
129 |
+
'checkout_onepage_quote', 'to_customer', $quote, $customer
|
130 |
+
);
|
131 |
+
|
132 |
+
// in case if order is creating via admin with new customer
|
133 |
+
if (Mage::app()->getStore()->isAdmin()) {
|
134 |
+
if (!$customer->getId()) {
|
135 |
+
$billingAddress = $quote->getBillingAddress();
|
136 |
+
Mage::helper('core')->copyFieldset(
|
137 |
+
'checkout_onepage_billing', 'to_customer',
|
138 |
+
$billingAddress,
|
139 |
+
$customer
|
140 |
+
);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
$attributeValue = null;
|
147 |
+
if ($attributeCode) {
|
148 |
+
$attributeValue = $customer->getData($attributeCode);
|
149 |
+
}
|
150 |
+
|
151 |
+
return $attributeValue;
|
152 |
+
}
|
153 |
+
|
154 |
/**
|
155 |
* Retrieve customer id
|
156 |
*
|
app/code/community/OnePica/AvaTax/Helper/Config.php
CHANGED
@@ -29,6 +29,11 @@ class OnePica_AvaTax_Helper_Config extends Mage_Core_Helper_Abstract
|
|
29 |
*/
|
30 |
const PATH_TAX_AVATAX_CUST_CODE_FORMAT = 'tax/avatax/cust_code_format';
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Path to full stop on error
|
34 |
*/
|
@@ -725,6 +730,17 @@ class OnePica_AvaTax_Helper_Config extends Mage_Core_Helper_Abstract
|
|
725 |
return (string)Mage::getStoreConfig(self::PATH_TAX_AVATAX_CUST_CODE_FORMAT, $store);
|
726 |
}
|
727 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
728 |
/**
|
729 |
* Get avatax16 address validation message
|
730 |
*
|
29 |
*/
|
30 |
const PATH_TAX_AVATAX_CUST_CODE_FORMAT = 'tax/avatax/cust_code_format';
|
31 |
|
32 |
+
/**
|
33 |
+
* Path to customer code format attribute
|
34 |
+
*/
|
35 |
+
const PATH_TAX_AVATAX_CUST_CODE_FORMAT_ATTRIBUTE = 'tax/avatax/cust_code_format_attribute';
|
36 |
+
|
37 |
/**
|
38 |
* Path to full stop on error
|
39 |
*/
|
730 |
return (string)Mage::getStoreConfig(self::PATH_TAX_AVATAX_CUST_CODE_FORMAT, $store);
|
731 |
}
|
732 |
|
733 |
+
/**
|
734 |
+
* Get customer code format attribute
|
735 |
+
*
|
736 |
+
* @param int|Mage_Core_Model_Store $store
|
737 |
+
* @return string
|
738 |
+
*/
|
739 |
+
public function getCustomerCodeFormatAttribute($store)
|
740 |
+
{
|
741 |
+
return (string)Mage::getStoreConfig(self::PATH_TAX_AVATAX_CUST_CODE_FORMAT_ATTRIBUTE, $store);
|
742 |
+
}
|
743 |
+
|
744 |
/**
|
745 |
* Get avatax16 address validation message
|
746 |
*
|
app/code/community/OnePica/AvaTax/Model/Config/Backend/CustomerCodeFormatAttribute.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* OnePica_AvaTax
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0), a
|
8 |
+
* copy of which is available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* @category OnePica
|
12 |
+
* @package OnePica_AvaTax
|
13 |
+
* @author OnePica Codemaster <codemaster@onepica.com>
|
14 |
+
* @copyright Copyright (c) 2009 One Pica, Inc.
|
15 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
16 |
+
*/
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Config Backend CustomerCodeFormatAttribute model
|
20 |
+
*
|
21 |
+
* @category OnePica
|
22 |
+
* @package OnePica_AvaTax
|
23 |
+
* @author OnePica Codemaster <codemaster@onepica.com>
|
24 |
+
*/
|
25 |
+
class OnePica_AvaTax_Model_Config_Backend_CustomerCodeFormatAttribute extends Mage_Core_Model_Config_Data
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* Save and validate attribute
|
29 |
+
*
|
30 |
+
* @return Mage_Core_Model_Abstract
|
31 |
+
*/
|
32 |
+
public function save()
|
33 |
+
{
|
34 |
+
if(!$this->_attributeExists())
|
35 |
+
{
|
36 |
+
Mage::throwException($this->_getHelper()->__("Customer Code Format Attribute doesn't exists"));
|
37 |
+
}
|
38 |
+
|
39 |
+
if(!$this->_attributeTypeIsCorrect())
|
40 |
+
{
|
41 |
+
$message = $this->_getHelper()->__("Incorrect Customer Code Format Attribute type.")
|
42 |
+
. PHP_EOL
|
43 |
+
. $this->_getHelper()->__("Please, set 'Input Type' as 'Text Field' for attribute.");
|
44 |
+
|
45 |
+
Mage::throwException($message);
|
46 |
+
}
|
47 |
+
|
48 |
+
if($this->_attributeIsVisibleOnFrontend())
|
49 |
+
{
|
50 |
+
$message = $this->_getHelper()->__("Customer Code Format Attribute field shouldn't be shown on frontend.")
|
51 |
+
. PHP_EOL
|
52 |
+
. $this->_getHelper()->__("Please, set 'Show on Frontend' as 'No' for attribute.");
|
53 |
+
|
54 |
+
Mage::throwException($message);
|
55 |
+
}
|
56 |
+
|
57 |
+
if(!$this->_attributeIsUsedInCorrectForms())
|
58 |
+
{
|
59 |
+
$message = $this->_getHelper()->__("Incorrect Customer Code Format Attribute form usage.")
|
60 |
+
. PHP_EOL
|
61 |
+
. $this->_getHelper()->__("Please, set 'Forms to Use In' as 'Customer Account Edit' or empty for attribute.");
|
62 |
+
|
63 |
+
Mage::throwException($message);
|
64 |
+
}
|
65 |
+
|
66 |
+
return parent::save();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get attribute
|
71 |
+
*
|
72 |
+
* @return Mage_Eav_Model_Entity_Attribute_Abstract
|
73 |
+
*/
|
74 |
+
protected function _getAttribute()
|
75 |
+
{
|
76 |
+
$entity = 'customer';
|
77 |
+
$code = $this->getValue();
|
78 |
+
$attr = Mage::getModel('customer/attribute')->loadByCode($entity, $code);
|
79 |
+
|
80 |
+
return $attr;
|
81 |
+
}
|
82 |
+
/**
|
83 |
+
* Get helper
|
84 |
+
*
|
85 |
+
* @return OnePica_AvaTax_Helper_Data
|
86 |
+
*/
|
87 |
+
protected function _getHelper()
|
88 |
+
{
|
89 |
+
return Mage::helper('avatax');
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Check if a attribute exists
|
95 |
+
*
|
96 |
+
* @return bool
|
97 |
+
*/
|
98 |
+
protected function _attributeExists()
|
99 |
+
{
|
100 |
+
$attr = $this->_getAttribute();
|
101 |
+
$attrExists = $attr->getId() ? true : false;
|
102 |
+
|
103 |
+
return $attrExists;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Check if a attribute type is correct
|
108 |
+
*
|
109 |
+
* @return bool
|
110 |
+
*/
|
111 |
+
protected function _attributeTypeIsCorrect()
|
112 |
+
{
|
113 |
+
$attr = $this->_getAttribute();
|
114 |
+
$attrTypeIsCorrect = ($attr->getFrontendInput() == 'text') ? true : false;
|
115 |
+
|
116 |
+
return $attrTypeIsCorrect;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Check if a attribute is visible on storefront
|
121 |
+
*
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
protected function _attributeIsVisibleOnFrontend()
|
125 |
+
{
|
126 |
+
$attr = $this->_getAttribute();
|
127 |
+
$attrIsVisibleOnFrontend = $attr->getIsVisible() ? true : false;
|
128 |
+
|
129 |
+
return $attrIsVisibleOnFrontend;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Check if a attribute is used in correct forms
|
134 |
+
*
|
135 |
+
* @return bool
|
136 |
+
*/
|
137 |
+
protected function _attributeIsUsedInCorrectForms()
|
138 |
+
{
|
139 |
+
$attr = $this->_getAttribute();
|
140 |
+
$forms = $attr->getUsedInForms();
|
141 |
+
$attrUsedFormsIsCorrect = true;
|
142 |
+
if (in_array('checkout_register', $forms)
|
143 |
+
|| in_array('customer_account_create', $forms)
|
144 |
+
|| in_array('adminhtml_checkout', $forms)
|
145 |
+
) {
|
146 |
+
$attrUsedFormsIsCorrect = false;
|
147 |
+
}
|
148 |
+
|
149 |
+
return $attrUsedFormsIsCorrect;
|
150 |
+
}
|
151 |
+
}
|
app/code/community/OnePica/AvaTax/Model/Source/Customercodeformat.php
CHANGED
@@ -39,6 +39,11 @@ class OnePica_AvaTax_Model_Source_Customercodeformat
|
|
39 |
*/
|
40 |
const CUST_EMAIL = 2;
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* Gets the list of cache methods for the admin config dropdown
|
44 |
*
|
@@ -58,6 +63,10 @@ class OnePica_AvaTax_Model_Source_Customercodeformat
|
|
58 |
array(
|
59 |
'value' => self::LEGACY,
|
60 |
'label' => 'customer_name (customer_id)'
|
|
|
|
|
|
|
|
|
61 |
)
|
62 |
);
|
63 |
}
|
39 |
*/
|
40 |
const CUST_EMAIL = 2;
|
41 |
|
42 |
+
/**
|
43 |
+
* Customer attribute
|
44 |
+
*/
|
45 |
+
const CUST_ATTRIBUTE = 3;
|
46 |
+
|
47 |
/**
|
48 |
* Gets the list of cache methods for the admin config dropdown
|
49 |
*
|
63 |
array(
|
64 |
'value' => self::LEGACY,
|
65 |
'label' => 'customer_name (customer_id)'
|
66 |
+
),
|
67 |
+
array(
|
68 |
+
'value' => self::CUST_ATTRIBUTE,
|
69 |
+
'label' => 'customer attribute'
|
70 |
)
|
71 |
);
|
72 |
}
|
app/code/community/OnePica/AvaTax/controllers/Adminhtml/AvaTax/GridController.php
CHANGED
@@ -134,4 +134,44 @@ class OnePica_AvaTax_Adminhtml_AvaTax_GridController extends Mage_Adminhtml_Cont
|
|
134 |
}
|
135 |
return $this;
|
136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
134 |
}
|
135 |
return $this;
|
136 |
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Set Pending Status For Queue item with failed status
|
140 |
+
*
|
141 |
+
* @return $this
|
142 |
+
*/
|
143 |
+
public function setPendingStatusForQueueItemAction()
|
144 |
+
{
|
145 |
+
$itemId = $this->getRequest()->getParam('queue_id');
|
146 |
+
if ($itemId) {
|
147 |
+
try {
|
148 |
+
// init model and update status
|
149 |
+
/** @var $model OnePica_AvaTax_Model_Records_Queue */
|
150 |
+
$model = Mage::getModel('avatax/records_queue');
|
151 |
+
$model->load($itemId);
|
152 |
+
if (!$model->getId()
|
153 |
+
|| $model->getStatus() != OnePica_AvaTax_Model_Records_Queue::QUEUE_STATUS_FAILED
|
154 |
+
) {
|
155 |
+
Mage::throwException($this->__('Unable to find a queue item #%s. with Failed status', $itemId));
|
156 |
+
}
|
157 |
+
|
158 |
+
$model->setStatus(OnePica_AvaTax_Model_Records_Queue::QUEUE_STATUS_PENDING);
|
159 |
+
$model->setAttempt(0);
|
160 |
+
$model->save();
|
161 |
+
|
162 |
+
// display success message
|
163 |
+
$this->_getSession()->addSuccess($this->__('Queue item #%s status has been updated.', $model->getId()));
|
164 |
+
} catch (Mage_Core_Exception $e) {
|
165 |
+
$this->_getSession()->addError($e->getMessage());
|
166 |
+
} catch (Exception $e) {
|
167 |
+
$this->_getSession()->addException($e,
|
168 |
+
$this->__('An error occurred while updating queue item status.')
|
169 |
+
);
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
$this->_redirectReferer();
|
174 |
+
|
175 |
+
return $this;
|
176 |
+
}
|
177 |
}
|
app/code/community/OnePica/AvaTax/etc/config.xml
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<config>
|
20 |
<modules>
|
21 |
<OnePica_AvaTax>
|
22 |
-
<version>3.
|
23 |
</OnePica_AvaTax>
|
24 |
</modules>
|
25 |
<global>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<OnePica_AvaTax>
|
22 |
+
<version>3.3.0.0</version>
|
23 |
</OnePica_AvaTax>
|
24 |
</modules>
|
25 |
<global>
|
app/code/community/OnePica/AvaTax/etc/system.xml
CHANGED
@@ -200,7 +200,7 @@
|
|
200 |
</title_data_mapping>
|
201 |
<cust_code_format translate="label comment">
|
202 |
<label>Customer Code Format</label>
|
203 |
-
<comment><![CDATA[Recommended: <code>customer_id</code
|
204 |
<frontend_type>select</frontend_type>
|
205 |
<source_model>avatax/source_customercodeformat</source_model>
|
206 |
<sort_order>205</sort_order>
|
@@ -208,6 +208,22 @@
|
|
208 |
<show_in_website>1</show_in_website>
|
209 |
<show_in_store>1</show_in_store>
|
210 |
</cust_code_format>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
<shipping_sku translate="label comment">
|
212 |
<label>Shipping Sku</label>
|
213 |
<comment>Required. The sku sent to denote shipping costs.</comment>
|
200 |
</title_data_mapping>
|
201 |
<cust_code_format translate="label comment">
|
202 |
<label>Customer Code Format</label>
|
203 |
+
<comment><![CDATA[Recommended: <code>customer_id</code>, Customer Code value has to be less or equal 50 symbols.]]></comment>
|
204 |
<frontend_type>select</frontend_type>
|
205 |
<source_model>avatax/source_customercodeformat</source_model>
|
206 |
<sort_order>205</sort_order>
|
208 |
<show_in_website>1</show_in_website>
|
209 |
<show_in_store>1</show_in_store>
|
210 |
</cust_code_format>
|
211 |
+
<cust_code_format_attribute translate="label comment">
|
212 |
+
<label>Customer Code Format Attribute</label>
|
213 |
+
<comment><![CDATA[Required: Code of customer attribute. Value of attribute will be sent to Avalara. Recommended: new customer attribute of type Text Field, Show on Frontend: no, Forms to Use In: Customer Account Edit or none. Attribute sample: <code>customer_erp_id</code>.]]></comment>
|
214 |
+
<frontend_type>text</frontend_type>
|
215 |
+
<backend_model>avatax/config_backend_customerCodeFormatAttribute</backend_model>
|
216 |
+
<sort_order>208</sort_order>
|
217 |
+
<validate>required-entry</validate>
|
218 |
+
<show_in_default>1</show_in_default>
|
219 |
+
<show_in_website>1</show_in_website>
|
220 |
+
<show_in_store>1</show_in_store>
|
221 |
+
<depends>
|
222 |
+
<cust_code_format>
|
223 |
+
<value>3</value>
|
224 |
+
</cust_code_format>
|
225 |
+
</depends>
|
226 |
+
</cust_code_format_attribute>
|
227 |
<shipping_sku translate="label comment">
|
228 |
<label>Shipping Sku</label>
|
229 |
<comment>Required. The sku sent to denote shipping costs.</comment>
|
lib/OnePica/AvaTax16/AddressResolution.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\AddressResolution
|
22 |
-
*/
|
23 |
-
class AddressResolution extends ResourceAbstract
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Url path for address resolution
|
27 |
-
*/
|
28 |
-
const ADDRESS_RESOLUTION_URL_PATH = '/address';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Resolve a Single Address
|
32 |
-
*
|
33 |
-
* @param \OnePica\AvaTax16\Document\Part\Location\Address $address
|
34 |
-
* @return \OnePica\AvaTax16\AddressResolution\ResolveSingleAddressResponse $result
|
35 |
-
*/
|
36 |
-
public function resolveSingleAddress($address)
|
37 |
-
{
|
38 |
-
$config = $this->getConfig();
|
39 |
-
$postUrl = $config->getBaseUrl()
|
40 |
-
. self::ADDRESS_RESOLUTION_URL_PATH
|
41 |
-
. '/account/'
|
42 |
-
. $config->getAccountId()
|
43 |
-
. '/company/'
|
44 |
-
. $config->getCompanyCode()
|
45 |
-
. '/resolve';
|
46 |
-
|
47 |
-
$postData = $address->toArray();
|
48 |
-
$requestOptions = array(
|
49 |
-
'requestType' => 'POST',
|
50 |
-
'data' => $postData,
|
51 |
-
'returnClass' => '\OnePica\AvaTax16\AddressResolution\ResolveSingleAddressResponse'
|
52 |
-
);
|
53 |
-
$result = $this->sendRequest($postUrl, $requestOptions);
|
54 |
-
return $result;
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/AddressResolution/PingResponse.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\AddressResolution;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\AddressResolution\PingResponse
|
24 |
-
*
|
25 |
-
* @method bool getHasError()
|
26 |
-
* @method setHasError(bool $value)
|
27 |
-
* @method array getErrors()
|
28 |
-
* @method setErrors(array $value)
|
29 |
-
*/
|
30 |
-
class PingResponse extends Part
|
31 |
-
{
|
32 |
-
/**
|
33 |
-
* Has error
|
34 |
-
*
|
35 |
-
* @var bool
|
36 |
-
*/
|
37 |
-
protected $hasError = false;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Errors
|
41 |
-
*
|
42 |
-
* @var array
|
43 |
-
*/
|
44 |
-
protected $errors = array();
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/AddressResolution/ResolveSingleAddressResponse.php
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\AddressResolution;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\AddressResolution\ResolveSingleAddressResponse
|
24 |
-
*
|
25 |
-
* @method bool getHasError()
|
26 |
-
* @method setHasError(bool $value)
|
27 |
-
* @method array getErrors()
|
28 |
-
* @method setErrors(array $value)
|
29 |
-
* @method \OnePica\AvaTax16\Document\Part\Location\Address getAddress()
|
30 |
-
* @method setAddress(\OnePica\AvaTax16\Document\Part\Location\Address $value)
|
31 |
-
* @method \OnePica\AvaTax16\Document\Part\Location\LatLong getCoordinates()
|
32 |
-
* @method setCoordinates(\OnePica\AvaTax16\Document\Part\Location\LatLong $value)
|
33 |
-
* @method string getResolutionQuality()
|
34 |
-
* @method setResolutionQuality(string $value)
|
35 |
-
* @method array getTaxAuthorities()
|
36 |
-
* @method setTaxAuthorities(array $value)
|
37 |
-
*/
|
38 |
-
class ResolveSingleAddressResponse extends Part
|
39 |
-
{
|
40 |
-
/**
|
41 |
-
* Has error
|
42 |
-
*
|
43 |
-
* @var bool
|
44 |
-
*/
|
45 |
-
protected $hasError = false;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Errors
|
49 |
-
*
|
50 |
-
* @var array
|
51 |
-
*/
|
52 |
-
protected $errors = array();
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Types of complex properties
|
56 |
-
*
|
57 |
-
* @var array
|
58 |
-
*/
|
59 |
-
protected $propertyComplexTypes = array(
|
60 |
-
'address' => array(
|
61 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location\Address'
|
62 |
-
),
|
63 |
-
'coordinates' => array(
|
64 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location\LatLong'
|
65 |
-
),
|
66 |
-
'taxAuthorities' => array(
|
67 |
-
'type' => '\OnePica\AvaTax16\AddressResolution\TaxAuthority',
|
68 |
-
'isArrayOf' => 'true'
|
69 |
-
),
|
70 |
-
);
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Address
|
74 |
-
*
|
75 |
-
* @var \OnePica\AvaTax16\Document\Part\Location\Address
|
76 |
-
*/
|
77 |
-
protected $address;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Coordinates
|
81 |
-
*
|
82 |
-
* @var \OnePica\AvaTax16\Document\Part\Location\LatLong
|
83 |
-
*/
|
84 |
-
protected $coordinates;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Resolution Quality
|
88 |
-
*
|
89 |
-
* @var string
|
90 |
-
*/
|
91 |
-
protected $resolutionQuality;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Tax Authorities
|
95 |
-
*
|
96 |
-
* @var array
|
97 |
-
*/
|
98 |
-
protected $taxAuthorities;
|
99 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/AddressResolution/TaxAuthority.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\AddressResolution;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\AddressResolution\TaxAuthority
|
24 |
-
*
|
25 |
-
* @method string getAvalaraId()
|
26 |
-
* @method setAvalaraId(string $value)
|
27 |
-
* @method string getJurisdictionName()
|
28 |
-
* @method setJurisdictionName(string $value)
|
29 |
-
* @method string getJurisdictionType()
|
30 |
-
* @method setJurisdictionType(string $value)
|
31 |
-
* @method string getSignatureCode()
|
32 |
-
* @method setSignatureCode(string $value)
|
33 |
-
*/
|
34 |
-
class TaxAuthority extends Part
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Avalara Id
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
protected $avalaraId;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Jurisdiction Name
|
45 |
-
*
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
protected $jurisdictionName;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Jurisdiction Type
|
52 |
-
*
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
protected $jurisdictionType;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Signature Code
|
59 |
-
*
|
60 |
-
* @var string
|
61 |
-
*/
|
62 |
-
protected $signatureCode;
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation.php
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\Calculation
|
22 |
-
*/
|
23 |
-
class Calculation extends ResourceAbstract
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Url path for calculations
|
27 |
-
*/
|
28 |
-
const CALCULATION_URL_PATH = '/calculations';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Create Calculation
|
32 |
-
*
|
33 |
-
* @param \OnePica\AvaTax16\Document\Request $documentRequest
|
34 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
35 |
-
*/
|
36 |
-
public function createCalculation($documentRequest)
|
37 |
-
{
|
38 |
-
$postUrl = $this->getConfig()->getBaseUrl() . self::CALCULATION_URL_PATH;
|
39 |
-
$postData = $documentRequest->toArray();
|
40 |
-
$requestOptions = array(
|
41 |
-
'requestType' => 'POST',
|
42 |
-
'data' => $postData,
|
43 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Response'
|
44 |
-
);
|
45 |
-
$documentResponse = $this->sendRequest($postUrl, $requestOptions);
|
46 |
-
return $documentResponse;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Get Calculation
|
51 |
-
*
|
52 |
-
* @param string $transactionType
|
53 |
-
* @param string $documentCode
|
54 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
55 |
-
*/
|
56 |
-
public function getCalculation($transactionType, $documentCode)
|
57 |
-
{
|
58 |
-
$config = $this->getConfig();
|
59 |
-
$getUrl = $config->getBaseUrl()
|
60 |
-
. self::CALCULATION_URL_PATH
|
61 |
-
. '/account/'
|
62 |
-
. $config->getAccountId()
|
63 |
-
. '/company/'
|
64 |
-
. $config->getCompanyCode()
|
65 |
-
. '/'
|
66 |
-
. $transactionType
|
67 |
-
. '/'
|
68 |
-
. $documentCode;
|
69 |
-
|
70 |
-
$requestOptions = array(
|
71 |
-
'requestType' => 'GET',
|
72 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Response'
|
73 |
-
);
|
74 |
-
$documentResponse = $this->sendRequest($getUrl, $requestOptions);
|
75 |
-
return $documentResponse;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Get List Of Calculations
|
80 |
-
*
|
81 |
-
* @param string $transactionType
|
82 |
-
* @param int $limit
|
83 |
-
* @param string $startDate
|
84 |
-
* @param string $endDate
|
85 |
-
* @param string $startCode (not implemented)
|
86 |
-
* @return \OnePica\AvaTax16\Calculation\ListResponse $calculationListResponse
|
87 |
-
*/
|
88 |
-
public function getListOfCalculations($transactionType, $limit = null, $startDate = null, $endDate = null,
|
89 |
-
$startCode = null)
|
90 |
-
{
|
91 |
-
$config = $this->getConfig();
|
92 |
-
$getUrl = $config->getBaseUrl()
|
93 |
-
. self::CALCULATION_URL_PATH
|
94 |
-
. '/account/'
|
95 |
-
. $config->getAccountId()
|
96 |
-
. '/company/'
|
97 |
-
. $config->getCompanyCode()
|
98 |
-
. '/'
|
99 |
-
. $transactionType;
|
100 |
-
$filterData = array(
|
101 |
-
'limit' => $limit,
|
102 |
-
'startDate' => $startDate,
|
103 |
-
'endDate' => $endDate,
|
104 |
-
'startCode' => $startCode,
|
105 |
-
);
|
106 |
-
|
107 |
-
$requestOptions = array(
|
108 |
-
'requestType' => 'GET',
|
109 |
-
'data' => $filterData,
|
110 |
-
'returnClass' => '\OnePica\AvaTax16\Calculation\ListResponse'
|
111 |
-
);
|
112 |
-
$calculationListResponse = $this->sendRequest($getUrl, $requestOptions);
|
113 |
-
return $calculationListResponse;
|
114 |
-
}
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse.php
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse
|
24 |
-
*
|
25 |
-
* @method \OnePica\AvaTax16\Calculation\ListItemResponse\Header getHeader()
|
26 |
-
* @method setHeader(\OnePica\AvaTax16\Calculation\ListItemResponse\Header $value)
|
27 |
-
* @method array getLines)
|
28 |
-
* @method setLines(array $value)
|
29 |
-
* @method \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary getCalculatedTaxSummary()
|
30 |
-
* @method setCalculatedTaxSummary(\OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary $value)
|
31 |
-
* @method \OnePica\AvaTax16\Calculation\ListItemResponse\ProcessingInfo getProcessingInfo()
|
32 |
-
* @method setProcessingInfo(\OnePica\AvaTax16\Calculation\ListItemResponse\ProcessingInfo $value)
|
33 |
-
*/
|
34 |
-
class ListItemResponse extends Part
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Types of complex properties
|
38 |
-
*
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
protected $propertyComplexTypes = array(
|
42 |
-
'header' => array(
|
43 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\Header'
|
44 |
-
),
|
45 |
-
'lines' => array(
|
46 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\Line',
|
47 |
-
'isArrayOf' => 'true'
|
48 |
-
),
|
49 |
-
'calculatedTaxSummary' => array(
|
50 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary'
|
51 |
-
),
|
52 |
-
'processingInfo' => array(
|
53 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\ProcessingInfo'
|
54 |
-
),
|
55 |
-
);
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Header
|
59 |
-
*
|
60 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse\Header
|
61 |
-
*/
|
62 |
-
protected $header;
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Lines
|
66 |
-
*
|
67 |
-
* @var Array
|
68 |
-
*/
|
69 |
-
protected $lines;
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Feedback
|
73 |
-
*
|
74 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary
|
75 |
-
*/
|
76 |
-
protected $calculatedTaxSummary;
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Feedback
|
80 |
-
*
|
81 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse\ProcessingInfo
|
82 |
-
*/
|
83 |
-
protected $processingInfo;
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary.php
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary
|
24 |
-
*
|
25 |
-
* @method int getNumberOfLines()
|
26 |
-
* @method setNumberOfLines(int $value)
|
27 |
-
* @method float getSubtotal()
|
28 |
-
* @method setSubtotal(float $value)
|
29 |
-
* @method float getTotalTax()
|
30 |
-
* @method setTotalTax(float $value)
|
31 |
-
* @method \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType getTaxByType()
|
32 |
-
* @method setTaxByType(\OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType $value)
|
33 |
-
* @method float getSubtotalTaxable()
|
34 |
-
* @method setSubtotalTaxable(float $value)
|
35 |
-
* @method float getSubtotalExempt()
|
36 |
-
* @method setSubtotalExempt(float $value)
|
37 |
-
* @method float getTax()
|
38 |
-
* @method setTax(float $value)
|
39 |
-
* @method float getGrandTotal()
|
40 |
-
* @method setGrandTotal(float $value)
|
41 |
-
*/
|
42 |
-
class CalculatedTaxSummary extends Part
|
43 |
-
{
|
44 |
-
/**
|
45 |
-
* Types of complex properties
|
46 |
-
*
|
47 |
-
* @var array
|
48 |
-
*/
|
49 |
-
protected $propertyComplexTypes = array(
|
50 |
-
'taxByType' => array(
|
51 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType',
|
52 |
-
'isArrayOf' => 'true'
|
53 |
-
)
|
54 |
-
);
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Number Of Lines
|
58 |
-
*
|
59 |
-
* @var int
|
60 |
-
*/
|
61 |
-
protected $numberOfLines;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Subtotal
|
65 |
-
*
|
66 |
-
* @var float
|
67 |
-
*/
|
68 |
-
protected $subtotal;
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Total Tax
|
72 |
-
*
|
73 |
-
* @var float
|
74 |
-
*/
|
75 |
-
protected $totalTax;
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Tax By Type
|
79 |
-
*
|
80 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType
|
81 |
-
*/
|
82 |
-
protected $taxByType = array();
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Subtotal Taxable
|
86 |
-
*
|
87 |
-
* @var float
|
88 |
-
*/
|
89 |
-
protected $subtotalTaxable;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Subtotal Exempt
|
93 |
-
*
|
94 |
-
* @var float
|
95 |
-
*/
|
96 |
-
protected $subtotalExempt;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Tax
|
100 |
-
*
|
101 |
-
* @var float
|
102 |
-
*/
|
103 |
-
protected $tax;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Grand Total
|
107 |
-
*
|
108 |
-
* @var float
|
109 |
-
*/
|
110 |
-
protected $grandTotal;
|
111 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary/TaxByType.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType
|
24 |
-
*
|
25 |
-
* @method float getTax()
|
26 |
-
* @method setTax(float $value)
|
27 |
-
* @method float getJurisdictions()
|
28 |
-
* @method setJurisdictions(float $value)
|
29 |
-
* @method string getComment()
|
30 |
-
* @method setComment(string $value)
|
31 |
-
*/
|
32 |
-
class TaxByType extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Types of complex properties
|
36 |
-
*
|
37 |
-
* @var array
|
38 |
-
*/
|
39 |
-
protected $propertyComplexTypes = array(
|
40 |
-
'jurisdictions' => array(
|
41 |
-
'type' => '\OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType\Details'
|
42 |
-
)
|
43 |
-
);
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Tax
|
47 |
-
*
|
48 |
-
* @var float
|
49 |
-
*/
|
50 |
-
protected $tax;
|
51 |
-
|
52 |
-
/**
|
53 |
-
* jurisdictions
|
54 |
-
*
|
55 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType\Details
|
56 |
-
*/
|
57 |
-
protected $jurisdictions;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Comment
|
61 |
-
*
|
62 |
-
* @var string
|
63 |
-
*/
|
64 |
-
protected $comment;
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/CalculatedTaxSummary/TaxByType/Details.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\CalculatedTaxSummary\TaxByType\Details
|
24 |
-
*
|
25 |
-
* @method string getJurisdictionName()
|
26 |
-
* @method setJurisdictionName(string $value)
|
27 |
-
* @method string getJurisdictionType()
|
28 |
-
* @method setJurisdictionType(string $value)
|
29 |
-
* @method float getTax()
|
30 |
-
* @method setTax(float $value)
|
31 |
-
* @method string getComment()
|
32 |
-
* @method setComment(string $value)
|
33 |
-
*/
|
34 |
-
class Details extends Part
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Jurisdiction Name
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
protected $jurisdictionName;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Jurisdiction Type
|
45 |
-
*
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
protected $jurisdictionType;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Tax
|
52 |
-
*
|
53 |
-
* @var float
|
54 |
-
*/
|
55 |
-
protected $tax ;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Comment
|
59 |
-
*
|
60 |
-
* @var string
|
61 |
-
*/
|
62 |
-
protected $comment;
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/Header.php
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\Header
|
24 |
-
*
|
25 |
-
* @method string getAccountId()
|
26 |
-
* @method setAccountId(string $value)
|
27 |
-
* @method string getCompanyCode()
|
28 |
-
* @method setCompanyCode(string $value)
|
29 |
-
* @method string getTransactionType()
|
30 |
-
* @method setTransactionType(string $value)
|
31 |
-
* @method string getDocumentCode()
|
32 |
-
* @method setDocumentCode(string $value)
|
33 |
-
* @method string getCustomerCode()
|
34 |
-
* @method setCustomerCode(string $value)
|
35 |
-
* @method string getTransactionDate()
|
36 |
-
* @method setTransactionDate(string $value)
|
37 |
-
* @method string getCurrency()
|
38 |
-
* @method setCurrency(string $value)
|
39 |
-
* @method float getTotalTaxOverrideAmount()
|
40 |
-
* @method setTotalTaxOverrideAmount(float $value)
|
41 |
-
*/
|
42 |
-
class Header extends Part
|
43 |
-
{
|
44 |
-
/**
|
45 |
-
* Account Id
|
46 |
-
*
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
protected $accountId;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Company Code
|
53 |
-
*
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
protected $companyCode;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Transaction Type
|
60 |
-
*
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
protected $transactionType;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Document Code
|
67 |
-
*
|
68 |
-
* @var string
|
69 |
-
*/
|
70 |
-
protected $documentCode;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Customer Code
|
74 |
-
*
|
75 |
-
* @var string
|
76 |
-
*/
|
77 |
-
protected $customerCode;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Transaction Date
|
81 |
-
*
|
82 |
-
* @var string
|
83 |
-
*/
|
84 |
-
protected $transactionDate;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Currency
|
88 |
-
*
|
89 |
-
* @var string
|
90 |
-
*/
|
91 |
-
protected $currency;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Total Tax Override Amount
|
95 |
-
*
|
96 |
-
* @var string
|
97 |
-
*/
|
98 |
-
protected $totalTaxOverrideAmount;
|
99 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/Line.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\Line
|
24 |
-
*
|
25 |
-
* @method string getAvalaraGoodsAndServicesModifierTypet()
|
26 |
-
* @method setAvalaraGoodsAndServicesModifierType(string $value)
|
27 |
-
*/
|
28 |
-
class Line extends Part
|
29 |
-
{
|
30 |
-
/**
|
31 |
-
* Avalara Goods And Services Modifier type
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
protected $avalaraGoodsAndServicesModifierType;
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListItemResponse/ProcessingInfo.php
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation\ListItemResponse;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListItemResponse\ProcessingInfo
|
24 |
-
*
|
25 |
-
* @method string getTransactionState()
|
26 |
-
* @method setTransactionState(string $value)
|
27 |
-
* @method string getVersionId()
|
28 |
-
* @method setVersionId(string $value)
|
29 |
-
* @method string getFormatId()
|
30 |
-
* @method setFormatId(string $value)
|
31 |
-
* @method float getDuration()
|
32 |
-
* @method setDuration(float $value)
|
33 |
-
* @method string getModifiedDate()
|
34 |
-
* @method setModifiedDate(string $value)
|
35 |
-
* @method string getBatchId()
|
36 |
-
* @method setBatchId(string $value)
|
37 |
-
* @method string getDocumentId()
|
38 |
-
* @method setDocumentId(string $value)
|
39 |
-
* @method string getMessage()
|
40 |
-
* @method setMessage(string $value)
|
41 |
-
*/
|
42 |
-
class ProcessingInfo extends Part
|
43 |
-
{
|
44 |
-
/**
|
45 |
-
* Transaction State
|
46 |
-
*
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
protected $transactionState;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Version Id
|
53 |
-
*
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
protected $versionId;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Format Id
|
60 |
-
*
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
protected $formatId;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Duration
|
67 |
-
*
|
68 |
-
* @var float
|
69 |
-
*/
|
70 |
-
protected $duration;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Modified Date
|
74 |
-
*
|
75 |
-
* @var string
|
76 |
-
*/
|
77 |
-
protected $modifiedDate;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Batch Id
|
81 |
-
*
|
82 |
-
* @var string
|
83 |
-
*/
|
84 |
-
protected $batchId;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Document Id
|
88 |
-
*
|
89 |
-
* @var string
|
90 |
-
*/
|
91 |
-
protected $documentId;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Message
|
95 |
-
*
|
96 |
-
* @var string
|
97 |
-
*/
|
98 |
-
protected $message;
|
99 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Calculation/ListResponse.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Calculation;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Calculation\ListResponse
|
24 |
-
*
|
25 |
-
* @method bool getHasError()
|
26 |
-
* @method setHasError(bool $value)
|
27 |
-
* @method array getErrors()
|
28 |
-
* @method setErrors(array $value)
|
29 |
-
* @method array getItems()
|
30 |
-
* @method setItems(array $value)
|
31 |
-
*/
|
32 |
-
class ListResponse extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Has error
|
36 |
-
*
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
protected $hasError = false;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Errors
|
43 |
-
*
|
44 |
-
* @var array
|
45 |
-
*/
|
46 |
-
protected $errors = array();
|
47 |
-
|
48 |
-
/**
|
49 |
-
* List items
|
50 |
-
*
|
51 |
-
* @var \OnePica\AvaTax16\Calculation\ListItemResponse[]
|
52 |
-
*/
|
53 |
-
protected $items;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Fill data from object
|
57 |
-
*
|
58 |
-
* @param \StdClass|array $data
|
59 |
-
* @return $this
|
60 |
-
*/
|
61 |
-
public function fillData($data)
|
62 |
-
{
|
63 |
-
$result = array();
|
64 |
-
if (is_array($data)) {
|
65 |
-
foreach ($data as $dataItem) {
|
66 |
-
$calculationListItem = new ListItemResponse();
|
67 |
-
$result[] = $calculationListItem->fillData($dataItem);
|
68 |
-
}
|
69 |
-
}
|
70 |
-
$this->setItems($result);
|
71 |
-
}
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Config.php
DELETED
@@ -1,229 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\Config
|
22 |
-
*/
|
23 |
-
class Config
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Accept header
|
27 |
-
*/
|
28 |
-
const ACCEPT_HEADER = 'application/json; document-version=1';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Content type header
|
32 |
-
*/
|
33 |
-
const CONTENT_TYPE_HEADER = 'application/json';
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Default user agent
|
37 |
-
*/
|
38 |
-
const USER_AGENT_DEFAULT = 'AvaTax16 agent';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Base url
|
42 |
-
*
|
43 |
-
* @var string
|
44 |
-
*/
|
45 |
-
protected $baseUrl;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Account id
|
49 |
-
*
|
50 |
-
* @var string
|
51 |
-
*/
|
52 |
-
protected $accountId;
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Company code
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
protected $companyCode;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Authorization header
|
63 |
-
*
|
64 |
-
* @var string
|
65 |
-
*/
|
66 |
-
protected $authorizationHeader;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* User agent
|
70 |
-
*
|
71 |
-
* @var string
|
72 |
-
*/
|
73 |
-
protected $userAgent;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Construct
|
77 |
-
*/
|
78 |
-
public function __construct()
|
79 |
-
{
|
80 |
-
// init default values
|
81 |
-
$this->setUserAgent(self::USER_AGENT_DEFAULT);
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Set base url
|
86 |
-
*
|
87 |
-
* @param string $value
|
88 |
-
* @return \OnePica\AvaTax16\Config
|
89 |
-
*/
|
90 |
-
public function setBaseUrl($value)
|
91 |
-
{
|
92 |
-
$this->baseUrl = $value;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get base url
|
97 |
-
*
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function getBaseUrl()
|
101 |
-
{
|
102 |
-
return $this->baseUrl;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Set user agent
|
107 |
-
*
|
108 |
-
* @param string $value
|
109 |
-
* @return \OnePica\AvaTax16\Config
|
110 |
-
*/
|
111 |
-
public function setUserAgent($value)
|
112 |
-
{
|
113 |
-
$this->userAgent = $value;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get user agent
|
118 |
-
*
|
119 |
-
* @return string
|
120 |
-
*/
|
121 |
-
public function getUserAgent()
|
122 |
-
{
|
123 |
-
return $this->userAgent;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Set account id
|
128 |
-
*
|
129 |
-
* @param string $value
|
130 |
-
* @return \OnePica\AvaTax16\Config
|
131 |
-
*/
|
132 |
-
public function setAccountId($value)
|
133 |
-
{
|
134 |
-
$this->accountId = $value;
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Get account id
|
139 |
-
*
|
140 |
-
* @return string
|
141 |
-
*/
|
142 |
-
public function getAccountId()
|
143 |
-
{
|
144 |
-
return $this->accountId;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Set company code
|
149 |
-
*
|
150 |
-
* @param string $value
|
151 |
-
* @return \OnePica\AvaTax16\Config
|
152 |
-
*/
|
153 |
-
public function setCompanyCode($value)
|
154 |
-
{
|
155 |
-
$this->companyCode = $value;
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Get company code
|
160 |
-
*
|
161 |
-
* @return string
|
162 |
-
*/
|
163 |
-
public function getCompanyCode()
|
164 |
-
{
|
165 |
-
return $this->companyCode;
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Set authorization header
|
170 |
-
*
|
171 |
-
* @param string $value
|
172 |
-
* @return \OnePica\AvaTax16\Config
|
173 |
-
*/
|
174 |
-
public function setAuthorizationHeader($value)
|
175 |
-
{
|
176 |
-
$this->authorizationHeader = $value;
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Get authorization header
|
181 |
-
*
|
182 |
-
* @return string
|
183 |
-
*/
|
184 |
-
public function getAuthorizationHeader()
|
185 |
-
{
|
186 |
-
return $this->authorizationHeader;
|
187 |
-
}
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Get accept header
|
191 |
-
*
|
192 |
-
* @return string
|
193 |
-
*/
|
194 |
-
public function getAcceptHeader()
|
195 |
-
{
|
196 |
-
return self::ACCEPT_HEADER;
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Get accept header
|
201 |
-
*
|
202 |
-
* @return string
|
203 |
-
*/
|
204 |
-
public function getContentTypeHeader()
|
205 |
-
{
|
206 |
-
return self::CONTENT_TYPE_HEADER;
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Get if config values are available for requests
|
211 |
-
*
|
212 |
-
* @return bool
|
213 |
-
*/
|
214 |
-
public function isValid()
|
215 |
-
{
|
216 |
-
if ($this->getBaseUrl()
|
217 |
-
&& $this->getAccountId()
|
218 |
-
&& $this->getCompanyCode()
|
219 |
-
&& $this->getAuthorizationHeader()
|
220 |
-
&& $this->getAcceptHeader()
|
221 |
-
&& $this->getContentTypeHeader()
|
222 |
-
&& $this->getUserAgent()
|
223 |
-
) {
|
224 |
-
return true;
|
225 |
-
} else {
|
226 |
-
return false;
|
227 |
-
}
|
228 |
-
}
|
229 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part.php
DELETED
@@ -1,211 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\Document\Part
|
22 |
-
*/
|
23 |
-
class Part
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Required properties
|
27 |
-
*
|
28 |
-
* @var array
|
29 |
-
*/
|
30 |
-
protected $requiredProperties = array();
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Excluded properties (will be ignored during toArray function)
|
34 |
-
*
|
35 |
-
* @var array
|
36 |
-
*/
|
37 |
-
protected $excludedProperties = array();
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Types of complex properties
|
41 |
-
*
|
42 |
-
* @var array
|
43 |
-
*/
|
44 |
-
protected $propertyComplexTypes = array();
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Properties get and set methods
|
48 |
-
*/
|
49 |
-
public function __call($name, $arguments)
|
50 |
-
{
|
51 |
-
$action = substr($name, 0, 3);
|
52 |
-
switch ($action) {
|
53 |
-
case 'get':
|
54 |
-
$property = lcfirst(substr($name, 3));
|
55 |
-
if (property_exists($this, $property)) {
|
56 |
-
return $this->{$property};
|
57 |
-
} else {
|
58 |
-
$this->throwWrongMethodErrorException($name);
|
59 |
-
}
|
60 |
-
break;
|
61 |
-
case 'set':
|
62 |
-
$property = lcfirst(substr($name, 3));
|
63 |
-
if (property_exists($this, $property)) {
|
64 |
-
$this->{$property} = $arguments[0];
|
65 |
-
} else {
|
66 |
-
$this->throwWrongMethodErrorException($name);
|
67 |
-
}
|
68 |
-
break;
|
69 |
-
default :
|
70 |
-
$this->throwWrongMethodErrorException($name);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Throw Wrong Method Error Exception
|
76 |
-
*
|
77 |
-
* @param string $methodName
|
78 |
-
* @throws \OnePica\AvaTax16\Exception
|
79 |
-
*/
|
80 |
-
protected function throwWrongMethodErrorException($methodName)
|
81 |
-
{
|
82 |
-
$trace = debug_backtrace();
|
83 |
-
$errorMessage = 'Undefined method '
|
84 |
-
. $methodName
|
85 |
-
. ' in '
|
86 |
-
. $trace[0]['file']
|
87 |
-
. ' on line '
|
88 |
-
. $trace[0]['line'];
|
89 |
-
throw new \OnePica\AvaTax16\Exception($errorMessage);
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Checks if document part is valid
|
94 |
-
*
|
95 |
-
* @return bool
|
96 |
-
*/
|
97 |
-
public function isValid()
|
98 |
-
{
|
99 |
-
foreach ($this as $key => $value) {
|
100 |
-
if (in_array($key, $this->requiredProperties) && (null === $value)) {
|
101 |
-
return false;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
return true;
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Convert object data to array
|
109 |
-
*
|
110 |
-
* @return array
|
111 |
-
* @throws \OnePica\AvaTax16\Exception
|
112 |
-
*/
|
113 |
-
public function toArray()
|
114 |
-
{
|
115 |
-
if (!$this->isValid()) {
|
116 |
-
throw new \OnePica\AvaTax16\Exception("Not valid data in " . get_class($this));
|
117 |
-
}
|
118 |
-
$result = array();
|
119 |
-
foreach ($this as $key => $value) {
|
120 |
-
if (in_array($key, $this->excludedProperties)
|
121 |
-
|| in_array($key, array('requiredProperties', 'excludedProperties', 'propertyComplexTypes'))
|
122 |
-
|| (null === $value)) {
|
123 |
-
// skip property
|
124 |
-
continue;
|
125 |
-
}
|
126 |
-
$name = $key;
|
127 |
-
$result[$name] = $this->proceedToArrayItem($value);
|
128 |
-
}
|
129 |
-
return $result;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Convert object data to array
|
134 |
-
*
|
135 |
-
* @param \OnePica\AvaTax16\Document\Part|array|string $item
|
136 |
-
* @return array|string
|
137 |
-
*/
|
138 |
-
protected function proceedToArrayItem($item)
|
139 |
-
{
|
140 |
-
$result = null;
|
141 |
-
$itemType = ($item instanceof Part) ? 'documentPart' :
|
142 |
-
((is_array($item)) ? 'array' : 'simple');
|
143 |
-
|
144 |
-
switch ($itemType) {
|
145 |
-
case 'documentPart':
|
146 |
-
$result = $item->toArray();
|
147 |
-
break;
|
148 |
-
case 'array':
|
149 |
-
foreach ($item as $key => $value) {
|
150 |
-
$result[$key] = $this->proceedToArrayItem($value);
|
151 |
-
}
|
152 |
-
break;
|
153 |
-
case 'simple':
|
154 |
-
$result = (string) $item;
|
155 |
-
break;
|
156 |
-
}
|
157 |
-
|
158 |
-
return $result;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Fill data from object
|
163 |
-
*
|
164 |
-
* @param \StdClass|array $data
|
165 |
-
* @return $this
|
166 |
-
*/
|
167 |
-
public function fillData($data)
|
168 |
-
{
|
169 |
-
foreach ($data as $key => $value) {
|
170 |
-
$propName = $key;
|
171 |
-
$method = 'set' . ucfirst($key);
|
172 |
-
if (!property_exists($this, $propName)) {
|
173 |
-
// skip unknown property received from response to prevent error
|
174 |
-
continue;
|
175 |
-
}
|
176 |
-
if (isset($this->propertyComplexTypes[$propName])) {
|
177 |
-
$propertyType = $this->propertyComplexTypes[$propName]['type'];
|
178 |
-
if (isset($this->propertyComplexTypes[$propName]['isArrayOf'])) {
|
179 |
-
$items = array();
|
180 |
-
if (count($value) > 0) {
|
181 |
-
foreach ($value as $itemKey => $itemData) {
|
182 |
-
$item = $this->createItemAndFillData($propertyType, $itemData);
|
183 |
-
$items[$itemKey] = $item;
|
184 |
-
}
|
185 |
-
}
|
186 |
-
$this->$method($items);
|
187 |
-
} else {
|
188 |
-
$item = $value ? $this->createItemAndFillData($propertyType, $value) : null;
|
189 |
-
$this->$method($item);
|
190 |
-
}
|
191 |
-
} else {
|
192 |
-
$this->$method($value);
|
193 |
-
}
|
194 |
-
}
|
195 |
-
return $this;
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Create item object and fill data in it
|
200 |
-
*
|
201 |
-
* @param string $itemClassName
|
202 |
-
* @param \StdClass|array $data
|
203 |
-
* @return object $item
|
204 |
-
*/
|
205 |
-
protected function createItemAndFillData($itemClassName, $data)
|
206 |
-
{
|
207 |
-
$item = new $itemClassName();
|
208 |
-
$item->fillData($data);
|
209 |
-
return $item;
|
210 |
-
}
|
211 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part/Feedback.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Part;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Part\Feedback
|
24 |
-
*
|
25 |
-
* @method \OnePica\AvaTax16\Document\Part\Feedback\LatencyData getLatencyData()
|
26 |
-
* @method setLatencyData(\OnePica\AvaTax16\Document\Part\Feedback\LatencyData $value)
|
27 |
-
*/
|
28 |
-
class Feedback extends Part
|
29 |
-
{
|
30 |
-
/**
|
31 |
-
* Latency Data
|
32 |
-
*
|
33 |
-
* @var \OnePica\AvaTax16\Document\Part\Feedback\LatencyData
|
34 |
-
*/
|
35 |
-
protected $latencyData;
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part/Feedback/LatencyData.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Part\Feedback;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Part\Feedback\LatencyData
|
24 |
-
*
|
25 |
-
* @method int getLatency()
|
26 |
-
* @method setLatency(int $value)
|
27 |
-
* @method string getVersionId()
|
28 |
-
* @method setVersionId(string $value)
|
29 |
-
*/
|
30 |
-
class LatencyData extends Part
|
31 |
-
{
|
32 |
-
/**
|
33 |
-
* Latency
|
34 |
-
*
|
35 |
-
* @var int
|
36 |
-
*/
|
37 |
-
protected $latency;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Version Id
|
41 |
-
*
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
protected $versionId;
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part/Location.php
DELETED
@@ -1,146 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Part;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Part\Location
|
24 |
-
*
|
25 |
-
* @method string getTaxLocationPurpose()
|
26 |
-
* @method setTaxLocationPurpose(string $value)
|
27 |
-
* @method \OnePica\AvaTax16\Document\Part\Location\LatLong getLatlong()
|
28 |
-
* @method setLatlong(\OnePica\AvaTax16\Document\Part\Location\LatLong $value)
|
29 |
-
* @method string getLocationCode()
|
30 |
-
* @method setLocationCode(string $value)
|
31 |
-
* @method string getIpAddress()
|
32 |
-
* @method setIpAddress(string $value)
|
33 |
-
* @method string getResolutionQuality()
|
34 |
-
* @method setResolutionQuality(string $value)
|
35 |
-
* @method string getAddressTaxPayerCode()
|
36 |
-
* @method setAddressTaxPayerCode(string $value)
|
37 |
-
* @method string getAddressBuyerType()
|
38 |
-
* @method setAddressBuyerType(string $value)
|
39 |
-
*/
|
40 |
-
class Location extends Part
|
41 |
-
{
|
42 |
-
/**
|
43 |
-
* Types of complex properties
|
44 |
-
*
|
45 |
-
* @var array
|
46 |
-
*/
|
47 |
-
protected $propertyComplexTypes = array(
|
48 |
-
'address' => array(
|
49 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location\Address'
|
50 |
-
),
|
51 |
-
'latlong' => array(
|
52 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location\LatLong'
|
53 |
-
),
|
54 |
-
'feedback' => array(
|
55 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Feedback'
|
56 |
-
),
|
57 |
-
);
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Tax Location Purpose
|
61 |
-
* (Required)
|
62 |
-
*
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
protected $taxLocationPurpose;
|
66 |
-
/**
|
67 |
-
* Address
|
68 |
-
*
|
69 |
-
* @var \OnePica\AvaTax16\Document\Part\Location\Address
|
70 |
-
*/
|
71 |
-
protected $address;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Latitude and longitude
|
75 |
-
*
|
76 |
-
* @var \OnePica\AvaTax16\Document\Part\Location\LatLong
|
77 |
-
*/
|
78 |
-
protected $latlong;
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Location code
|
82 |
-
* (Not currently supported)
|
83 |
-
*
|
84 |
-
* @var string
|
85 |
-
*/
|
86 |
-
protected $locationCode;
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Ip Address
|
90 |
-
* (Not currently supported)
|
91 |
-
*
|
92 |
-
* @var string
|
93 |
-
*/
|
94 |
-
protected $ipAddress;
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Resolution Quality
|
98 |
-
*
|
99 |
-
* @var string
|
100 |
-
*/
|
101 |
-
protected $resolutionQuality;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Address Tax Payer Code
|
105 |
-
* (Not currently supported)
|
106 |
-
*
|
107 |
-
* @var string
|
108 |
-
*/
|
109 |
-
protected $addressTaxPayerCode;
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Address Buyer Type
|
113 |
-
*
|
114 |
-
* @var string
|
115 |
-
*/
|
116 |
-
protected $addressBuyerType;
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Address Use Type
|
120 |
-
*
|
121 |
-
* @var string
|
122 |
-
*/
|
123 |
-
protected $addressUseType;
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Set Address
|
127 |
-
*
|
128 |
-
* @param \OnePica\AvaTax16\Document\Part\Location\Address $value
|
129 |
-
* @return $this
|
130 |
-
*/
|
131 |
-
public function setAddress($value)
|
132 |
-
{
|
133 |
-
$this->address = $value;
|
134 |
-
return $this;
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Get Address
|
139 |
-
*
|
140 |
-
* @return \OnePica\AvaTax16\Document\Part\Location\Address
|
141 |
-
*/
|
142 |
-
public function getAddress()
|
143 |
-
{
|
144 |
-
return $this->address;
|
145 |
-
}
|
146 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part/Location/Address.php
DELETED
@@ -1,153 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Part\Location;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Part\Location\Address
|
24 |
-
*
|
25 |
-
* @method string getLine1()
|
26 |
-
* @method setLine1(string $value)
|
27 |
-
* @method string getLine2()
|
28 |
-
* @method setLine2(string $value)
|
29 |
-
* @method string getLine3()
|
30 |
-
* @method setLine3(string $value)
|
31 |
-
* @method string getLatitude()
|
32 |
-
* @method setLatitude(string $value)
|
33 |
-
* @method string getCity()
|
34 |
-
* @method setCity(string $value)
|
35 |
-
* @method string getMunicipality()
|
36 |
-
* @method setMunicipality(string $value)
|
37 |
-
* @method string getTown()
|
38 |
-
* @method setTown(string $value)
|
39 |
-
* @method string getState()
|
40 |
-
* @method setState(string $value)
|
41 |
-
* @method string getProvince()
|
42 |
-
* @method setProvince(string $value)
|
43 |
-
* @method string getCountry()
|
44 |
-
* @method setCountry(string $value)
|
45 |
-
* @method string getZipcode()
|
46 |
-
* @method setZipcode(string $value)
|
47 |
-
* @method string getPostalCode()
|
48 |
-
* @method setPostalCode(string $value)
|
49 |
-
* @method string getPostcode()
|
50 |
-
* @method setPostcode(string $value)
|
51 |
-
*/
|
52 |
-
class Address extends Part
|
53 |
-
{
|
54 |
-
/**
|
55 |
-
* Required properties
|
56 |
-
*
|
57 |
-
* @var array
|
58 |
-
*/
|
59 |
-
protected $requiredProperties = array('line1');
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Line 1
|
63 |
-
* (Required)
|
64 |
-
*
|
65 |
-
* @var string
|
66 |
-
*/
|
67 |
-
protected $line1;
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Line 2
|
71 |
-
*
|
72 |
-
* @var string
|
73 |
-
*/
|
74 |
-
protected $line2;
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Line3
|
78 |
-
*
|
79 |
-
* @var string
|
80 |
-
*/
|
81 |
-
protected $line3;
|
82 |
-
|
83 |
-
/**
|
84 |
-
* City
|
85 |
-
* city, municipality, town are synonyms. Should be set only one of them
|
86 |
-
*
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
protected $city;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Municipality
|
93 |
-
* city, municipality, town are synonyms. Should be set only one of them
|
94 |
-
*
|
95 |
-
* @var string
|
96 |
-
*/
|
97 |
-
protected $municipality;
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Town
|
101 |
-
* city, municipality, town are synonyms. Should be set only one of them
|
102 |
-
*
|
103 |
-
* @var string
|
104 |
-
*/
|
105 |
-
protected $town;
|
106 |
-
|
107 |
-
/**
|
108 |
-
* State
|
109 |
-
* state, province are synonyms. Should be set only one of them
|
110 |
-
*
|
111 |
-
* @var string
|
112 |
-
*/
|
113 |
-
protected $state;
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Province
|
117 |
-
* state, province are synonyms. Should be set only one of them
|
118 |
-
*
|
119 |
-
* @var string
|
120 |
-
*/
|
121 |
-
protected $province;
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Country
|
125 |
-
*
|
126 |
-
* @var string
|
127 |
-
*/
|
128 |
-
protected $country;
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Zip Code
|
132 |
-
* zipcode, postalCode, postcode are synonyms. Should be set only one of them
|
133 |
-
*
|
134 |
-
* @var string
|
135 |
-
*/
|
136 |
-
protected $zipcode;
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Postal Code
|
140 |
-
* zipcode, postalCode, postcode are synonyms. Should be set only one of them
|
141 |
-
*
|
142 |
-
* @var string
|
143 |
-
*/
|
144 |
-
protected $postalCode;
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Post Code
|
148 |
-
* zipcode, postalCode, postcode are synonyms. Should be set only one of them
|
149 |
-
*
|
150 |
-
* @var string
|
151 |
-
*/
|
152 |
-
protected $postcode;
|
153 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Part/Location/LatLong.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Part\Location;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Part\Location\LatLong
|
24 |
-
*
|
25 |
-
* @method string getLatitude()
|
26 |
-
* @method setLatitude(string $value)
|
27 |
-
* @method string getLongitude)
|
28 |
-
* @method setLongitude(string $value)
|
29 |
-
*/
|
30 |
-
class LatLong extends Part
|
31 |
-
{
|
32 |
-
/**
|
33 |
-
* Latitude
|
34 |
-
*
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
protected $latitude;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Longitude
|
41 |
-
*
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
protected $longitude;
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Request.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class OnePica\AvaTax16\Document\Request
|
22 |
-
*
|
23 |
-
* @method bool getHasError()
|
24 |
-
* @method setHasError(bool $value)
|
25 |
-
* @method array getErrors()
|
26 |
-
* @method setErrors(array $value)
|
27 |
-
* @method \OnePica\AvaTax16\Document\Request\Header getHeader()
|
28 |
-
* @method setHeader(\OnePica\AvaTax16\Document\Request\Header $value)
|
29 |
-
* @method array getLines()
|
30 |
-
* @method setLines(array $value)
|
31 |
-
* @method \OnePica\AvaTax16\Document\Part\Feedback getFeedback()
|
32 |
-
* @method setFeedback(\OnePica\AvaTax16\Document\Part\Feedback $value)
|
33 |
-
*/
|
34 |
-
class Request extends Part
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Has error
|
38 |
-
*
|
39 |
-
* @var bool
|
40 |
-
*/
|
41 |
-
protected $hasError = false;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Errors
|
45 |
-
*
|
46 |
-
* @var array
|
47 |
-
*/
|
48 |
-
protected $errors = array();
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Types of complex properties
|
52 |
-
*
|
53 |
-
* @var array
|
54 |
-
*/
|
55 |
-
protected $propertyComplexTypes = array(
|
56 |
-
'header' => array(
|
57 |
-
'type' => '\OnePica\AvaTax16\Document\Request\Header'
|
58 |
-
),
|
59 |
-
'lines' => array(
|
60 |
-
'type' => '\OnePica\AvaTax16\Document\Request\Line',
|
61 |
-
'isArrayOf' => 'true'
|
62 |
-
),
|
63 |
-
'feedback' => array(
|
64 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Feedback'
|
65 |
-
),
|
66 |
-
);
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Header
|
70 |
-
*
|
71 |
-
* @var \OnePica\AvaTax16\Document\Request\Header
|
72 |
-
*/
|
73 |
-
protected $header;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Lines
|
77 |
-
*
|
78 |
-
* @var \OnePica\AvaTax16\Document\Request\Line[]
|
79 |
-
*/
|
80 |
-
protected $lines;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Feedback
|
84 |
-
*
|
85 |
-
* @var \OnePica\AvaTax16\Document\Part\Feedback
|
86 |
-
*/
|
87 |
-
protected $feedback;
|
88 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Request/Header.php
DELETED
@@ -1,238 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Request;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Request\Header
|
24 |
-
*
|
25 |
-
* @method string getAccountId()
|
26 |
-
* @method setAccountId(string $value)
|
27 |
-
* @method string getCompanyCode()
|
28 |
-
* @method setCompanyCode(string $value)
|
29 |
-
* @method string getTransactionType()
|
30 |
-
* @method setTransactionType(string $value)
|
31 |
-
* @method string getDocumentCode()
|
32 |
-
* @method setDocumentCode(string $value)
|
33 |
-
* @method string getCustomerCode()
|
34 |
-
* @method setCustomerCode(string $value)
|
35 |
-
* @method string getVendorCode()
|
36 |
-
* @method setVendorCode(string $value)
|
37 |
-
* @method string getTransactionDate()
|
38 |
-
* @method setTransactionDate(string $value)
|
39 |
-
* @method string getCurrency()
|
40 |
-
* @method setCurrency(string $value)
|
41 |
-
* @method float getTotalTaxOverrideAmount()
|
42 |
-
* @method setTotalTaxOverrideAmount(float $value)
|
43 |
-
* @method string getTaxCalculationDate()
|
44 |
-
* @method setTaxCalculationDate(string $value)
|
45 |
-
* @method string getDefaultAvalaraGoodsAndServicesType()
|
46 |
-
* @method setDefaultAvalaraGoodsAndServicesType(string $value)
|
47 |
-
* @method string getDefaultAvalaraGoodsAndServicesModifierType()
|
48 |
-
* @method setDefaultAvalaraGoodsAndServicesModifierType(string $value)
|
49 |
-
* @method array getDefaultLocations()
|
50 |
-
* @method setDefaultLocations(array $value)
|
51 |
-
* @method string getDefaultTaxPayerCode()
|
52 |
-
* @method setDefaultTaxPayerCode(string $value)
|
53 |
-
* @method string getDefaultBuyerType()
|
54 |
-
* @method setDefaultBuyerType(string $value)
|
55 |
-
* @method string getDefaultUseType()
|
56 |
-
* @method setDefaultUseType(string $value)
|
57 |
-
* @method string getPurchaseOrderNumber()
|
58 |
-
* @method setPurchaseOrderNumber(string $value)
|
59 |
-
* @method array getMetadata()
|
60 |
-
*/
|
61 |
-
class Header extends Part
|
62 |
-
{
|
63 |
-
/**
|
64 |
-
* Types of complex properties
|
65 |
-
*
|
66 |
-
* @var array
|
67 |
-
*/
|
68 |
-
protected $propertyComplexTypes = array(
|
69 |
-
'defaultLocations' => array(
|
70 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location',
|
71 |
-
'isArrayOf' => 'true'
|
72 |
-
),
|
73 |
-
);
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Required properties
|
77 |
-
*
|
78 |
-
* @var array
|
79 |
-
*/
|
80 |
-
protected $requiredProperties = array('accountId', 'companyCode', 'transactionType', 'documentCode',
|
81 |
-
'customerCode', 'transactionDate', 'defaultLocations');
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Account Id
|
85 |
-
* (Required)
|
86 |
-
*
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
protected $accountId;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Company Code
|
93 |
-
* (Required)
|
94 |
-
*
|
95 |
-
* @var string
|
96 |
-
*/
|
97 |
-
protected $companyCode;
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Transaction Type
|
101 |
-
* (Required)
|
102 |
-
*
|
103 |
-
* @var string
|
104 |
-
*/
|
105 |
-
protected $transactionType;
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Document Code
|
109 |
-
* (Required)
|
110 |
-
*
|
111 |
-
* @var string
|
112 |
-
*/
|
113 |
-
protected $documentCode;
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Customer Code
|
117 |
-
* (Required)
|
118 |
-
*
|
119 |
-
* @var string
|
120 |
-
*/
|
121 |
-
protected $customerCode;
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Vendor Code
|
125 |
-
* (Required)
|
126 |
-
*
|
127 |
-
* @var string
|
128 |
-
*/
|
129 |
-
protected $vendorCode;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Transaction Date
|
133 |
-
* (Required)
|
134 |
-
*
|
135 |
-
* @var string
|
136 |
-
*/
|
137 |
-
protected $transactionDate;
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Currency
|
141 |
-
* (Not currently supported)
|
142 |
-
*
|
143 |
-
* @var string
|
144 |
-
*/
|
145 |
-
protected $currency;
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Total Tax Override Amount
|
149 |
-
* (Not currently supported)
|
150 |
-
*
|
151 |
-
* @var float
|
152 |
-
*/
|
153 |
-
protected $totalTaxOverrideAmount;
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Tax Calculation Date
|
157 |
-
*
|
158 |
-
* @var string
|
159 |
-
*/
|
160 |
-
protected $taxCalculationDate;
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Default Avalara Goods And Services Type
|
164 |
-
* (Not currently supported)
|
165 |
-
*
|
166 |
-
* @var string
|
167 |
-
*/
|
168 |
-
protected $defaultAvalaraGoodsAndServicesType;
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Default Avalara Goods And Services Modifier Type
|
172 |
-
* (Not currently supported)
|
173 |
-
*
|
174 |
-
* @var string
|
175 |
-
*/
|
176 |
-
protected $defaultAvalaraGoodsAndServicesModifierType;
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Default locations
|
180 |
-
* (Required)
|
181 |
-
*
|
182 |
-
* @var \OnePica\AvaTax16\Document\Part\Location[]
|
183 |
-
*/
|
184 |
-
protected $defaultLocations;
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Default Tax Payer Code
|
188 |
-
* (Not currently supported)
|
189 |
-
*
|
190 |
-
* @var string
|
191 |
-
*/
|
192 |
-
protected $defaultTaxPayerCode;
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Default Buyer Type
|
196 |
-
*
|
197 |
-
* @var string
|
198 |
-
*/
|
199 |
-
protected $defaultBuyerType;
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Default Use Type
|
203 |
-
*
|
204 |
-
* @var string
|
205 |
-
*/
|
206 |
-
protected $defaultUseType;
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Purchase Order Number
|
210 |
-
*
|
211 |
-
* @var string
|
212 |
-
*/
|
213 |
-
protected $purchaseOrderNumber;
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Metadata
|
217 |
-
*
|
218 |
-
* @var array
|
219 |
-
*/
|
220 |
-
protected $metadata;
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Set Metadata
|
224 |
-
*
|
225 |
-
* @param array|\StdClass $value
|
226 |
-
* @return $this
|
227 |
-
*/
|
228 |
-
public function setMetadata($value)
|
229 |
-
{
|
230 |
-
if ($value instanceof \StdClass) {
|
231 |
-
// convert object data to array
|
232 |
-
// it is used during filling data from response
|
233 |
-
$this->metadata = (array) $value;
|
234 |
-
} else {
|
235 |
-
$this->metadata = $value;
|
236 |
-
}
|
237 |
-
}
|
238 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Request/Line.php
DELETED
@@ -1,212 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Request;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Request\Line
|
24 |
-
*
|
25 |
-
* @method string getLineCode()
|
26 |
-
* @method setLineCode(string $value)
|
27 |
-
* @method string getItemCode()
|
28 |
-
* @method setItemCode(string $value)
|
29 |
-
* @method string getAvalaraGoodsAndServicesType()
|
30 |
-
* @method setAvalaraGoodsAndServicesType(string $value)
|
31 |
-
* @method string getAvalaraGoodsAndServicesModifierType()
|
32 |
-
* @method setAvalaraGoodsAndServicesModifierType(string $value)
|
33 |
-
* @method float getNumberOfItems()
|
34 |
-
* @method setNumberOfItems(float $value)
|
35 |
-
* @method float getLineAmount()
|
36 |
-
* @method setLineAmount(float $value)
|
37 |
-
* @method bool getDiscounted()
|
38 |
-
* @method setDiscounted(bool $value)
|
39 |
-
* @method string getItemDescription()
|
40 |
-
* @method setItemDescription(string $value)
|
41 |
-
* @method string getUnitOfMeasure()
|
42 |
-
* @method setUnitOfMeasure(string $value)
|
43 |
-
* @method array getLocations()
|
44 |
-
* @method setLocations(array $value)
|
45 |
-
* @method string getTaxPayerCode()
|
46 |
-
* @method setTaxPayerCode(string $value)
|
47 |
-
* @method string getBuyerType()
|
48 |
-
* @method setBuyerType(string $value)
|
49 |
-
* @method string getUseType()
|
50 |
-
* @method setUseType(string $value)
|
51 |
-
* @method float getTaxOverrideAmount()
|
52 |
-
* @method setTaxOverrideAmount(float $value)
|
53 |
-
* @method bool getTaxIncluded()
|
54 |
-
* @method setTaxIncluded(bool $value)
|
55 |
-
* @method array getMetadata()
|
56 |
-
*/
|
57 |
-
class Line extends Part
|
58 |
-
{
|
59 |
-
/**
|
60 |
-
* Required properties
|
61 |
-
*
|
62 |
-
* @var array
|
63 |
-
*/
|
64 |
-
protected $requiredProperties = array('lineCode', 'lineAmount');
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Types of complex properties
|
68 |
-
*
|
69 |
-
* @var array
|
70 |
-
*/
|
71 |
-
protected $propertyComplexTypes = array(
|
72 |
-
'locations' => array(
|
73 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location',
|
74 |
-
'isArrayOf' => 'true'
|
75 |
-
),
|
76 |
-
);
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Line Code
|
80 |
-
* (Required)
|
81 |
-
*
|
82 |
-
* @var string
|
83 |
-
*/
|
84 |
-
protected $lineCode;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Item code
|
88 |
-
*
|
89 |
-
* @var string
|
90 |
-
*/
|
91 |
-
protected $itemCode;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Avalara Goods And Services Type
|
95 |
-
*
|
96 |
-
* @var string
|
97 |
-
*/
|
98 |
-
protected $avalaraGoodsAndServicesType;
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Avalara Goods And Services Modifier Type
|
102 |
-
*
|
103 |
-
* @var string
|
104 |
-
*/
|
105 |
-
protected $avalaraGoodsAndServicesModifierType;
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Number Of Items
|
109 |
-
*
|
110 |
-
* @var float
|
111 |
-
*/
|
112 |
-
protected $numberOfItems;
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Line Amount (The total cost of this line. In its simplest form lineAmount = unit price * numberOfItems)
|
116 |
-
* (Required)
|
117 |
-
*
|
118 |
-
* @var float
|
119 |
-
*/
|
120 |
-
protected $lineAmount;
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Discounted
|
124 |
-
*
|
125 |
-
* @var bool
|
126 |
-
*/
|
127 |
-
protected $discounted;
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Item Description
|
131 |
-
*
|
132 |
-
* @var string
|
133 |
-
*/
|
134 |
-
protected $itemDescription;
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Unit Of Measure
|
138 |
-
* (Not currently supported)
|
139 |
-
*
|
140 |
-
* @var string
|
141 |
-
*/
|
142 |
-
protected $unitOfMeasure;
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Locations
|
146 |
-
*
|
147 |
-
* @var \OnePica\AvaTax16\Document\Part\Location[]
|
148 |
-
*/
|
149 |
-
protected $locations;
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Tax Payer Code
|
153 |
-
* (Not currently supported)
|
154 |
-
*
|
155 |
-
* @var string
|
156 |
-
*/
|
157 |
-
protected $taxPayerCode;
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Buyer Type
|
161 |
-
*
|
162 |
-
* @var string
|
163 |
-
*/
|
164 |
-
protected $buyerType;
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Use Type
|
168 |
-
*
|
169 |
-
* @var string
|
170 |
-
*/
|
171 |
-
protected $useType;
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Tax Override Amount
|
175 |
-
* (Not currently supported)
|
176 |
-
*
|
177 |
-
* @var float
|
178 |
-
*/
|
179 |
-
protected $taxOverrideAmount;
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Tax Included
|
183 |
-
* (Not currently supported)
|
184 |
-
*
|
185 |
-
* @var bool
|
186 |
-
*/
|
187 |
-
protected $taxIncluded;
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Tax Included
|
191 |
-
*
|
192 |
-
* @var array
|
193 |
-
*/
|
194 |
-
protected $metadata;
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Set Metadata
|
198 |
-
*
|
199 |
-
* @param array|\StdClass $value
|
200 |
-
* @return $this
|
201 |
-
*/
|
202 |
-
public function setMetadata($value)
|
203 |
-
{
|
204 |
-
if ($value instanceof \StdClass) {
|
205 |
-
// convert object data to array
|
206 |
-
// it is used during filling data from response
|
207 |
-
$this->metadata = (array) $value;
|
208 |
-
} else {
|
209 |
-
$this->metadata = $value;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response.php
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\Document\Response
|
22 |
-
*
|
23 |
-
* @method bool getHasError()
|
24 |
-
* @method setHasError(bool $value)
|
25 |
-
* @method array getErrors()
|
26 |
-
* @method setErrors(array $value)
|
27 |
-
* @method \OnePica\AvaTax16\Document\Response\Header getHeader()
|
28 |
-
* @method setHeader(\OnePica\AvaTax16\Document\Response\Header $value)
|
29 |
-
* @method array getLines()
|
30 |
-
* @method setLines(array $value)
|
31 |
-
* @method \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary getCalculatedTaxSummary()
|
32 |
-
* @method setCalculatedTaxSummary(\OnePica\AvaTax16\Document\Response\CalculatedTaxSummary $value)
|
33 |
-
* @method \OnePica\AvaTax16\Document\Part\Feedback getFeedback()
|
34 |
-
* @method setFeedback(\OnePica\AvaTax16\Document\Part\Feedback $value)
|
35 |
-
* @method \OnePica\AvaTax16\Document\Response\ProcessingInfo getProcessingInfo()
|
36 |
-
* @method setProcessingInfo(\OnePica\AvaTax16\Document\Response\ProcessingInfo $value)
|
37 |
-
*/
|
38 |
-
class Response extends Part
|
39 |
-
{
|
40 |
-
/**
|
41 |
-
* Has error
|
42 |
-
*
|
43 |
-
* @var bool
|
44 |
-
*/
|
45 |
-
protected $hasError = false;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Errors
|
49 |
-
*
|
50 |
-
* @var array
|
51 |
-
*/
|
52 |
-
protected $errors = array();
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Types of complex properties
|
56 |
-
*
|
57 |
-
* @var array
|
58 |
-
*/
|
59 |
-
protected $propertyComplexTypes = array(
|
60 |
-
'header' => array(
|
61 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Header'
|
62 |
-
),
|
63 |
-
'lines' => array(
|
64 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Line',
|
65 |
-
'isArrayOf' => 'true'
|
66 |
-
),
|
67 |
-
'calculatedTaxSummary' => array(
|
68 |
-
'type' => '\OnePica\AvaTax16\Document\Response\CalculatedTaxSummary'
|
69 |
-
),
|
70 |
-
'feedback' => array(
|
71 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Feedback'
|
72 |
-
),
|
73 |
-
'processingInfo' => array(
|
74 |
-
'type' => '\OnePica\AvaTax16\Document\Response\ProcessingInfo'
|
75 |
-
),
|
76 |
-
);
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Header
|
80 |
-
*
|
81 |
-
* @var \OnePica\AvaTax16\Document\Response\Header
|
82 |
-
*/
|
83 |
-
protected $header;
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Lines
|
87 |
-
*
|
88 |
-
* @var \OnePica\AvaTax16\Document\Response\Line[]
|
89 |
-
*/
|
90 |
-
protected $lines = array();
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Calculated Tax Summary
|
94 |
-
*
|
95 |
-
* @var \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary
|
96 |
-
*/
|
97 |
-
protected $calculatedTaxSummary;
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Feedback
|
101 |
-
*
|
102 |
-
* @var \OnePica\AvaTax16\Document\Part\Feedback
|
103 |
-
*/
|
104 |
-
protected $feedback;
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Processing Info
|
108 |
-
*
|
109 |
-
* @var \OnePica\AvaTax16\Document\Response\ProcessingInfo
|
110 |
-
*/
|
111 |
-
protected $processingInfo;
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary.php
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary
|
24 |
-
*
|
25 |
-
* @method int getNumberOfLines()
|
26 |
-
* @method setNumberOfLines(int $value)
|
27 |
-
* @method float getSubtotal()
|
28 |
-
* @method setSubtotal(float $value)
|
29 |
-
* @method float getTotalTax()
|
30 |
-
* @method setTotalTax(float $value)
|
31 |
-
* @method array getTaxByType()
|
32 |
-
* @method setTaxByType(array $value)
|
33 |
-
* @method float getTax()
|
34 |
-
* @method setTax(float $value)
|
35 |
-
* @method float getGrandTotal()
|
36 |
-
* @method setGrandTotal(float $value)
|
37 |
-
*/
|
38 |
-
class CalculatedTaxSummary extends Part
|
39 |
-
{
|
40 |
-
/**
|
41 |
-
* Types of complex properties
|
42 |
-
*
|
43 |
-
* @var array
|
44 |
-
*/
|
45 |
-
protected $propertyComplexTypes = array(
|
46 |
-
'taxByType' => array(
|
47 |
-
'type' => '\OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType',
|
48 |
-
'isArrayOf' => 'true'
|
49 |
-
)
|
50 |
-
);
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Number Of Lines
|
54 |
-
*
|
55 |
-
* @var int
|
56 |
-
*/
|
57 |
-
protected $numberOfLines;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Subtotal
|
61 |
-
*
|
62 |
-
* @var float
|
63 |
-
*/
|
64 |
-
protected $subtotal;
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Total Tax
|
68 |
-
*
|
69 |
-
* @var float
|
70 |
-
*/
|
71 |
-
protected $totalTax;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Tax By Type
|
75 |
-
*
|
76 |
-
* @var \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType[]
|
77 |
-
*/
|
78 |
-
protected $taxByType = array();
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Tax
|
82 |
-
*
|
83 |
-
* @var float
|
84 |
-
*/
|
85 |
-
protected $tax;
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Grand Total
|
89 |
-
*
|
90 |
-
* @var float
|
91 |
-
*/
|
92 |
-
protected $grandTotal;
|
93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary/TaxByType.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response\CalculatedTaxSummary;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType
|
24 |
-
*
|
25 |
-
* @method float getTax()
|
26 |
-
* @method setTax(float $value)
|
27 |
-
* @method array getJurisdictions()
|
28 |
-
* @method setJurisdictions(array $value)
|
29 |
-
* @method string getComment()
|
30 |
-
* @method setComment(string $value)
|
31 |
-
*/
|
32 |
-
class TaxByType extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Types of complex properties
|
36 |
-
*
|
37 |
-
* @var array
|
38 |
-
*/
|
39 |
-
protected $propertyComplexTypes = array(
|
40 |
-
'jurisdictions' => array(
|
41 |
-
'type' => '\OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType\Details',
|
42 |
-
'isArrayOf' => true
|
43 |
-
)
|
44 |
-
);
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Tax
|
48 |
-
*
|
49 |
-
* @var float
|
50 |
-
*/
|
51 |
-
protected $tax;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* jurisdictions
|
55 |
-
*
|
56 |
-
* @var \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType\Details[]
|
57 |
-
*/
|
58 |
-
protected $jurisdictions;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Comment
|
62 |
-
*
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
protected $comment;
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/CalculatedTaxSummary/TaxByType/Details.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\CalculatedTaxSummary\TaxByType\Details
|
24 |
-
*
|
25 |
-
* @method string getJurisdictionName()
|
26 |
-
* @method setJurisdictionName(string $value)
|
27 |
-
* @method string getJurisdictionType()
|
28 |
-
* @method setJurisdictionType(string $value)
|
29 |
-
* @method float getTax()
|
30 |
-
* @method setTax(float $value)
|
31 |
-
* @method string getComment()
|
32 |
-
* @method setComment(string $value)
|
33 |
-
*/
|
34 |
-
class Details extends Part
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Jurisdiction Name
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
protected $jurisdictionName;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Jurisdiction Type
|
45 |
-
*
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
protected $jurisdictionType;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Tax
|
52 |
-
*
|
53 |
-
* @var float
|
54 |
-
*/
|
55 |
-
protected $tax;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Comment
|
59 |
-
*
|
60 |
-
* @var string
|
61 |
-
*/
|
62 |
-
protected $comment;
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/Header.php
DELETED
@@ -1,220 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\Header
|
24 |
-
*
|
25 |
-
* @method string getAccountId()
|
26 |
-
* @method setAccountId(string $value)
|
27 |
-
* @method string getCompanyCode()
|
28 |
-
* @method setCompanyCode(string $value)
|
29 |
-
* @method string getTransactionType()
|
30 |
-
* @method setTransactionType(string $value)
|
31 |
-
* @method string getDocumentCode()
|
32 |
-
* @method setDocumentCode(string $value)
|
33 |
-
* @method string getCustomerCode()
|
34 |
-
* @method setCustomerCode(string $value)
|
35 |
-
* @method string getVendorCode()
|
36 |
-
* @method setVendorCode(string $value)
|
37 |
-
* @method string getTransactionDate()
|
38 |
-
* @method setTransactionDate(string $value)
|
39 |
-
* @method string getCurrency()
|
40 |
-
* @method setCurrency(string $value)
|
41 |
-
* @method float getTotalTaxOverrideAmount()
|
42 |
-
* @method setTotalTaxOverrideAmount(float $value)
|
43 |
-
* @method string getTaxCalculationDate()
|
44 |
-
* @method setTaxCalculationDate(string $value)
|
45 |
-
* @method string getDefaultAvalaraGoodsAndServicesModifierType()
|
46 |
-
* @method setDefaultAvalaraGoodsAndServicesModifierType(string $value)
|
47 |
-
* @method array getDefaultLocations()
|
48 |
-
* @method setDefaultLocations(array $value)
|
49 |
-
* @method string getDefaultTaxPayerCode()
|
50 |
-
* @method setDefaultTaxPayerCode(string $value)
|
51 |
-
* @method string getDefaultBuyerType()
|
52 |
-
* @method setDefaultBuyerType(string $value)
|
53 |
-
* @method string getDefaultUseType()
|
54 |
-
* @method setDefaultUseType(string $value)
|
55 |
-
* @method string getPurchaseOrderNumber()
|
56 |
-
* @method setPurchaseOrderNumber(string $value)
|
57 |
-
* @method array getMetadata()
|
58 |
-
*/
|
59 |
-
class Header extends Part
|
60 |
-
{
|
61 |
-
/**
|
62 |
-
* Types of complex properties
|
63 |
-
*
|
64 |
-
* @var array
|
65 |
-
*/
|
66 |
-
protected $propertyComplexTypes = array(
|
67 |
-
'defaultLocations' => array(
|
68 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location',
|
69 |
-
'isArrayOf' => 'true'
|
70 |
-
),
|
71 |
-
);
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Account Id
|
75 |
-
* (Required)
|
76 |
-
*
|
77 |
-
* @var string
|
78 |
-
*/
|
79 |
-
protected $accountId;
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Company Code
|
83 |
-
* (Required)
|
84 |
-
*
|
85 |
-
* @var string
|
86 |
-
*/
|
87 |
-
protected $companyCode;
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Transaction Type
|
91 |
-
* (Required)
|
92 |
-
*
|
93 |
-
* @var string
|
94 |
-
*/
|
95 |
-
protected $transactionType;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Document Code
|
99 |
-
* (Required)
|
100 |
-
*
|
101 |
-
* @var string
|
102 |
-
*/
|
103 |
-
protected $documentCode;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Customer Code
|
107 |
-
* (Required)
|
108 |
-
*
|
109 |
-
* @var string
|
110 |
-
*/
|
111 |
-
protected $customerCode;
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Vendor Code
|
115 |
-
* (Required)
|
116 |
-
*
|
117 |
-
* @var string
|
118 |
-
*/
|
119 |
-
protected $vendorCode;
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Transaction Date
|
123 |
-
* (Required)
|
124 |
-
*
|
125 |
-
* @var string
|
126 |
-
*/
|
127 |
-
protected $transactionDate;
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Currency
|
131 |
-
* (Not currently supported)
|
132 |
-
*
|
133 |
-
* @var string
|
134 |
-
*/
|
135 |
-
protected $currency;
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Total Tax Override Amount
|
139 |
-
* (Not currently supported)
|
140 |
-
*
|
141 |
-
* @var float
|
142 |
-
*/
|
143 |
-
protected $totalTaxOverrideAmount;
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Tax Calculation Date
|
147 |
-
*
|
148 |
-
* @var string
|
149 |
-
*/
|
150 |
-
protected $taxCalculationDate;
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Default Avalara Goods And Services Modifier Type
|
154 |
-
* (Not currently supported)
|
155 |
-
*
|
156 |
-
* @var string
|
157 |
-
*/
|
158 |
-
protected $defaultAvalaraGoodsAndServicesModifierType;
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Default locations
|
162 |
-
* (Required)
|
163 |
-
*
|
164 |
-
* @var \OnePica\AvaTax16\Document\Part\Location[]
|
165 |
-
*/
|
166 |
-
protected $defaultLocations;
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Default Tax Payer Code
|
170 |
-
* (Not currently supported)
|
171 |
-
*
|
172 |
-
* @var string
|
173 |
-
*/
|
174 |
-
protected $defaultTaxPayerCode;
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Default Buyer Type
|
178 |
-
*
|
179 |
-
* @var string
|
180 |
-
*/
|
181 |
-
protected $defaultBuyerType;
|
182 |
-
|
183 |
-
/**
|
184 |
-
* Default Use Type
|
185 |
-
*
|
186 |
-
* @var string
|
187 |
-
*/
|
188 |
-
protected $defaultUseType;
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Purchase Order Number
|
192 |
-
*
|
193 |
-
* @var string
|
194 |
-
*/
|
195 |
-
protected $purchaseOrderNumber;
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Metadata
|
199 |
-
*
|
200 |
-
* @var array
|
201 |
-
*/
|
202 |
-
protected $metadata;
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Set Metadata
|
206 |
-
*
|
207 |
-
* @param array|\StdClass $value
|
208 |
-
* @return $this
|
209 |
-
*/
|
210 |
-
public function setMetadata($value)
|
211 |
-
{
|
212 |
-
if ($value instanceof \StdClass) {
|
213 |
-
// convert object data to array
|
214 |
-
// it is used during filling data from response
|
215 |
-
$this->metadata = (array) $value;
|
216 |
-
} else {
|
217 |
-
$this->metadata = $value;
|
218 |
-
}
|
219 |
-
}
|
220 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/Line.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\Line
|
24 |
-
*
|
25 |
-
* @method string getLineCode()
|
26 |
-
* @method setLineCode(string $value)
|
27 |
-
* @method string getItemCode()
|
28 |
-
* @method setItemCode(string $value)
|
29 |
-
* @method string getAvalaraGoodsAndServicesType()
|
30 |
-
* @method setAvalaraGoodsAndServicesType(string $value)
|
31 |
-
* @method string getAvalaraGoodsAndServicesModifierType()
|
32 |
-
* @method setAvalaraGoodsAndServicesModifierType(string $value)
|
33 |
-
* @method float getNumberOfItems()
|
34 |
-
* @method setNumberOfItems(float $value)
|
35 |
-
* @method float getLineAmount()
|
36 |
-
* @method setLineAmount(float $value)
|
37 |
-
* @method string getItemDescription()
|
38 |
-
* @method setItemDescription(string $value)
|
39 |
-
* @method string getUnitOfMeasure()
|
40 |
-
* @method setUnitOfMeasure(string $value)
|
41 |
-
* @method array getLocations()
|
42 |
-
* @method setLocations(array $value)
|
43 |
-
* @method string getTaxPayerCode()
|
44 |
-
* @method setTaxPayerCode(string $value)
|
45 |
-
* @method string getBuyerType()
|
46 |
-
* @method setBuyerType(string $value)
|
47 |
-
* @method string getUseType()
|
48 |
-
* @method setUseType(string $value)
|
49 |
-
* @method string getLineAttributes()
|
50 |
-
* @method setLineAttributes(string $value)
|
51 |
-
* @method float getTaxOverrideAmount()
|
52 |
-
* @method setTaxOverrideAmount(float $value)
|
53 |
-
* @method bool getTaxIncluded()
|
54 |
-
* @method setTaxIncluded(bool $value)
|
55 |
-
* @method array getMetadata()
|
56 |
-
* @method \OnePica\AvaTax16\Document\Response\Line\CalculatedTax getCalculatedTax()
|
57 |
-
* @method setCalculatedTax(\OnePica\AvaTax16\Document\Response\Line\CalculatedTax $value)
|
58 |
-
*/
|
59 |
-
class Line extends Part
|
60 |
-
{
|
61 |
-
/**
|
62 |
-
* Required properties
|
63 |
-
*
|
64 |
-
* @var array
|
65 |
-
*/
|
66 |
-
protected $requiredProperties = array('lineCode', 'lineAmount');
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Types of complex properties
|
70 |
-
*
|
71 |
-
* @var array
|
72 |
-
*/
|
73 |
-
protected $propertyComplexTypes = array(
|
74 |
-
'locations' => array(
|
75 |
-
'type' => '\OnePica\AvaTax16\Document\Part\Location',
|
76 |
-
'isArrayOf' => 'true'
|
77 |
-
),
|
78 |
-
'calculatedTax' => array(
|
79 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Line\CalculatedTax',
|
80 |
-
),
|
81 |
-
);
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Line Code
|
85 |
-
* (Required)
|
86 |
-
*
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
protected $lineCode;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Item code
|
93 |
-
*
|
94 |
-
* @var string
|
95 |
-
*/
|
96 |
-
protected $itemCode;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Avalara Goods And Services Type
|
100 |
-
*
|
101 |
-
* @var string
|
102 |
-
*/
|
103 |
-
protected $avalaraGoodsAndServicesType;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Avalara Goods And Services Modifier Type
|
107 |
-
*
|
108 |
-
* @var string
|
109 |
-
*/
|
110 |
-
protected $avalaraGoodsAndServicesModifierType;
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Number Of Items
|
114 |
-
*
|
115 |
-
* @var float
|
116 |
-
*/
|
117 |
-
protected $numberOfItems;
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Line Amount
|
121 |
-
*
|
122 |
-
* @var float
|
123 |
-
*/
|
124 |
-
protected $lineAmount;
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Item Description
|
128 |
-
*
|
129 |
-
* @var string
|
130 |
-
*/
|
131 |
-
protected $itemDescription;
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Unit Of Measure
|
135 |
-
* (Not currently supported)
|
136 |
-
*
|
137 |
-
* @var string
|
138 |
-
*/
|
139 |
-
protected $unitOfMeasure;
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Locations
|
143 |
-
*
|
144 |
-
* @var \OnePica\AvaTax16\Document\Part\Location[]
|
145 |
-
*/
|
146 |
-
protected $locations;
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Tax Payer Code
|
150 |
-
* (Not currently supported)
|
151 |
-
*
|
152 |
-
* @var string
|
153 |
-
*/
|
154 |
-
protected $taxPayerCode;
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Buyer Type
|
158 |
-
*
|
159 |
-
* @var string
|
160 |
-
*/
|
161 |
-
protected $buyerType;
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Use Type
|
165 |
-
*
|
166 |
-
* @var string
|
167 |
-
*/
|
168 |
-
protected $useType;
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Line Attributes
|
172 |
-
* (Not currently supported)
|
173 |
-
*
|
174 |
-
* @var string
|
175 |
-
*/
|
176 |
-
protected $lineAttributes;
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Tax Override Amount
|
180 |
-
* (Not currently supported)
|
181 |
-
*
|
182 |
-
* @var float
|
183 |
-
*/
|
184 |
-
protected $taxOverrideAmount;
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Tax Included
|
188 |
-
* (Not currently supported)
|
189 |
-
*
|
190 |
-
* @var bool
|
191 |
-
*/
|
192 |
-
protected $taxIncluded;
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Tax Included
|
196 |
-
*
|
197 |
-
* @var array
|
198 |
-
*/
|
199 |
-
protected $metadata;
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Calculated Tax
|
203 |
-
* (Only response)
|
204 |
-
*
|
205 |
-
* @var \OnePica\AvaTax16\Document\Response\Line\CalculatedTax
|
206 |
-
*/
|
207 |
-
protected $calculatedTax;
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Set Metadata
|
211 |
-
*
|
212 |
-
* @param array|\StdClass $value
|
213 |
-
* @return $this
|
214 |
-
*/
|
215 |
-
public function setMetadata($value)
|
216 |
-
{
|
217 |
-
if ($value instanceof \StdClass) {
|
218 |
-
// convert object data to array
|
219 |
-
// it is used during filling data from response
|
220 |
-
$this->metadata = (array) $value;
|
221 |
-
} else {
|
222 |
-
$this->metadata = $value;
|
223 |
-
}
|
224 |
-
}
|
225 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax.php
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response\Line;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\Line\CalculatedTax
|
24 |
-
*
|
25 |
-
* @method array getTaxByType()
|
26 |
-
* @method setTaxByType(array $value)
|
27 |
-
* @method float getTax()
|
28 |
-
* @method setTax(float $value)
|
29 |
-
* @method array getDetails()
|
30 |
-
* @method setDetails(array $value)
|
31 |
-
*/
|
32 |
-
class CalculatedTax extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Types of complex properties
|
36 |
-
*
|
37 |
-
* @var array
|
38 |
-
*/
|
39 |
-
protected $propertyComplexTypes = array(
|
40 |
-
'taxByType' => array(
|
41 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Line\CalculatedTax\TaxByType',
|
42 |
-
'isArrayOf' => 'true'
|
43 |
-
),
|
44 |
-
'details' => array(
|
45 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Line\CalculatedTax\Details',
|
46 |
-
'isArrayOf' => 'true'
|
47 |
-
)
|
48 |
-
);
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Tax By Type
|
52 |
-
*
|
53 |
-
* @var \OnePica\AvaTax16\Document\Response\Line\CalculatedTax\TaxByType[]
|
54 |
-
*/
|
55 |
-
protected $taxByType;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Tax
|
59 |
-
*
|
60 |
-
* @var float
|
61 |
-
*/
|
62 |
-
protected $tax;
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Details
|
66 |
-
*
|
67 |
-
* @var \OnePica\AvaTax16\Document\Response\Line\CalculatedTax\Details[]
|
68 |
-
*/
|
69 |
-
protected $details;
|
70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax/Details.php
DELETED
@@ -1,144 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response\Line\CalculatedTax;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\Line\CalculatedTax\Details
|
24 |
-
*
|
25 |
-
* @method string getJurisdictionName()
|
26 |
-
* @method setJurisdictionName(string $value)
|
27 |
-
* @method string getJurisdictionType()
|
28 |
-
* @method setJurisdictionType(string $value)
|
29 |
-
* @method string getTaxType()
|
30 |
-
* @method setTaxType(string $value)
|
31 |
-
* @method string getRateType()
|
32 |
-
* @method setRateType(string $value)
|
33 |
-
* @method string getScenario()
|
34 |
-
* @method setScenario(string $value)
|
35 |
-
* @method float getSubtotalTaxable()
|
36 |
-
* @method setSubtotalTaxable(float $value)
|
37 |
-
* @method float getSubtotalExempt()
|
38 |
-
* @method setSubtotalExempt(float $value)
|
39 |
-
* @method float getRate()
|
40 |
-
* @method setRate(float $value)
|
41 |
-
* @method float getTax()
|
42 |
-
* @method setTax(float $value)
|
43 |
-
* @method bool getExempt()
|
44 |
-
* @method setExempt(bool $value)
|
45 |
-
* @method string getExemptionReason()
|
46 |
-
* @method setExemptionReason(string $value)
|
47 |
-
* @method array getSignificantLocations()
|
48 |
-
* @method setSignificantLocations(array $value)
|
49 |
-
* @method string getComment()
|
50 |
-
* @method setComment(string $value)
|
51 |
-
*/
|
52 |
-
class Details extends Part
|
53 |
-
{
|
54 |
-
/**
|
55 |
-
* Jurisdiction Name
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
protected $jurisdictionName;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Jurisdiction Type
|
63 |
-
*
|
64 |
-
* @var string
|
65 |
-
*/
|
66 |
-
protected $jurisdictionType;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Tax Type
|
70 |
-
*
|
71 |
-
* @var string
|
72 |
-
*/
|
73 |
-
protected $taxType;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Rate Type
|
77 |
-
*
|
78 |
-
* @var string
|
79 |
-
*/
|
80 |
-
protected $rateType;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Scenario
|
84 |
-
*
|
85 |
-
* @var string
|
86 |
-
*/
|
87 |
-
protected $scenario;
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Subtotal Taxable
|
91 |
-
*
|
92 |
-
* @var float
|
93 |
-
*/
|
94 |
-
protected $subtotalTaxable;
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Subtotal Exempt
|
98 |
-
*
|
99 |
-
* @var float
|
100 |
-
*/
|
101 |
-
protected $subtotalExempt;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Rate
|
105 |
-
*
|
106 |
-
* @var float
|
107 |
-
*/
|
108 |
-
protected $rate;
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Tax
|
112 |
-
*
|
113 |
-
* @var float
|
114 |
-
*/
|
115 |
-
protected $tax;
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Exempt
|
119 |
-
*
|
120 |
-
* @var bool
|
121 |
-
*/
|
122 |
-
protected $exempt;
|
123 |
-
|
124 |
-
/**
|
125 |
-
* ExemptionReason
|
126 |
-
*
|
127 |
-
* @var string
|
128 |
-
*/
|
129 |
-
protected $exemptionReason;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Significant Locations
|
133 |
-
*
|
134 |
-
* @var string[]
|
135 |
-
*/
|
136 |
-
protected $significantLocations;
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Comment
|
140 |
-
*
|
141 |
-
* @var string
|
142 |
-
*/
|
143 |
-
protected $comment;
|
144 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/Line/CalculatedTax/TaxByType.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response\Line\CalculatedTax;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
/**
|
22 |
-
* Class \OnePica\AvaTax16\Document\Response\Line\CalculatedTax\TaxByType
|
23 |
-
*
|
24 |
-
* @method float getTax()
|
25 |
-
* @method setTax(float $value)
|
26 |
-
*/
|
27 |
-
class TaxByType extends Part
|
28 |
-
{
|
29 |
-
/**
|
30 |
-
* Types of complex properties
|
31 |
-
*
|
32 |
-
* @var array
|
33 |
-
*/
|
34 |
-
protected $propertyComplexTypes = array(
|
35 |
-
'jurisdictions' => array(
|
36 |
-
'type' => '\OnePica\AvaTax16\Document\Response\Line\CalculatedTax\TaxByType\Details',
|
37 |
-
'isArrayOf' => true
|
38 |
-
)
|
39 |
-
);
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Tax
|
43 |
-
*
|
44 |
-
* @var float
|
45 |
-
*/
|
46 |
-
protected $tax;
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Document/Response/ProcessingInfo.php
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Document\Response;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Document\Response\ProcessingInfo
|
24 |
-
*
|
25 |
-
* @method string getTransactionState()
|
26 |
-
* @method setTransactionState(string $value)
|
27 |
-
* @method string getVersionId()
|
28 |
-
* @method setVersionId(string $value)
|
29 |
-
* @method string getFormatId()
|
30 |
-
* @method setFormatId(string $value)
|
31 |
-
* @method float getDuration()
|
32 |
-
* @method setDuration(float $value)
|
33 |
-
* @method string getModifiedDate()
|
34 |
-
* @method setModifiedDate(string $value)
|
35 |
-
* @method string getBatchId()
|
36 |
-
* @method setBatchId(string $value)
|
37 |
-
* @method string getDocumentId()
|
38 |
-
* @method setDocumentId(string $value)
|
39 |
-
* @method string getMessage()
|
40 |
-
* @method setMessage(string $value)
|
41 |
-
*/
|
42 |
-
class ProcessingInfo extends Part
|
43 |
-
{
|
44 |
-
/**
|
45 |
-
* Transaction State
|
46 |
-
*
|
47 |
-
* @var string
|
48 |
-
*/
|
49 |
-
protected $transactionState;
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Version Id
|
53 |
-
*
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
protected $versionId;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Format Id
|
60 |
-
*
|
61 |
-
* @var string
|
62 |
-
*/
|
63 |
-
protected $formatId;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Duration
|
67 |
-
*
|
68 |
-
* @var float
|
69 |
-
*/
|
70 |
-
protected $duration;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Modified Date
|
74 |
-
*
|
75 |
-
* @var string
|
76 |
-
*/
|
77 |
-
protected $modifiedDate;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Batch Id
|
81 |
-
*
|
82 |
-
* @var string
|
83 |
-
*/
|
84 |
-
protected $batchId;
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Document Id
|
88 |
-
*
|
89 |
-
* @var string
|
90 |
-
*/
|
91 |
-
protected $documentId;
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Message
|
95 |
-
*
|
96 |
-
* @var string
|
97 |
-
*/
|
98 |
-
protected $message;
|
99 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Exception.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\IO\Exception
|
22 |
-
*/
|
23 |
-
class Exception extends \Exception
|
24 |
-
{
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/IO/CaseInsensitiveArray.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\IO;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\IO\CaseInsensitiveArray
|
22 |
-
*/
|
23 |
-
class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Container
|
27 |
-
*
|
28 |
-
* @var array
|
29 |
-
*/
|
30 |
-
protected $container = array();
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Offset Set
|
34 |
-
*
|
35 |
-
* @param string $offset
|
36 |
-
* @param mixed $value
|
37 |
-
* @return $this
|
38 |
-
*/
|
39 |
-
public function offsetSet($offset, $value)
|
40 |
-
{
|
41 |
-
if ($offset === null) {
|
42 |
-
$this->container[] = $value;
|
43 |
-
} else {
|
44 |
-
$index = array_search(strtolower($offset), array_keys(array_change_key_case($this->container, CASE_LOWER)));
|
45 |
-
if (!($index === false)) {
|
46 |
-
$keys = array_keys($this->container);
|
47 |
-
unset($this->container[$keys[$index]]);
|
48 |
-
}
|
49 |
-
$this->container[$offset] = $value;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Offset Exists
|
55 |
-
*
|
56 |
-
* @param string $offset
|
57 |
-
* @return bool
|
58 |
-
*/
|
59 |
-
public function offsetExists($offset)
|
60 |
-
{
|
61 |
-
return array_key_exists(strtolower($offset), array_change_key_case($this->container, CASE_LOWER));
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Offset Unset
|
66 |
-
*
|
67 |
-
* @param string $offset
|
68 |
-
* @return $this
|
69 |
-
*/
|
70 |
-
public function offsetUnset($offset)
|
71 |
-
{
|
72 |
-
unset($this->container[$offset]);
|
73 |
-
}
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Offset Get
|
77 |
-
*
|
78 |
-
* @param string $offset
|
79 |
-
* @return object|null
|
80 |
-
*/
|
81 |
-
public function offsetGet($offset)
|
82 |
-
{
|
83 |
-
$index = array_search(strtolower($offset), array_keys(array_change_key_case($this->container, CASE_LOWER)));
|
84 |
-
if ($index === false) {
|
85 |
-
return null;
|
86 |
-
}
|
87 |
-
|
88 |
-
$values = array_values($this->container);
|
89 |
-
return $values[$index];
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Count
|
94 |
-
*
|
95 |
-
* @return int
|
96 |
-
*/
|
97 |
-
public function count()
|
98 |
-
{
|
99 |
-
return count($this->container);
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Current
|
104 |
-
*
|
105 |
-
* @return mixed
|
106 |
-
*/
|
107 |
-
public function current()
|
108 |
-
{
|
109 |
-
return current($this->container);
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Next
|
114 |
-
*
|
115 |
-
* @return mixed
|
116 |
-
*/
|
117 |
-
public function next()
|
118 |
-
{
|
119 |
-
return next($this->container);
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Key
|
124 |
-
*
|
125 |
-
* @return mixed
|
126 |
-
*/
|
127 |
-
public function key()
|
128 |
-
{
|
129 |
-
return key($this->container);
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Valid
|
134 |
-
*
|
135 |
-
* @return bool
|
136 |
-
*/
|
137 |
-
public function valid()
|
138 |
-
{
|
139 |
-
return !($this->current() === false);
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Rewind
|
144 |
-
*
|
145 |
-
* @return mixed
|
146 |
-
*/
|
147 |
-
public function rewind()
|
148 |
-
{
|
149 |
-
reset($this->container);
|
150 |
-
}
|
151 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/IO/Curl.php
DELETED
@@ -1,1384 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\IO;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Class \OnePica\AvaTax16\IO\Curl
|
22 |
-
*/
|
23 |
-
class Curl
|
24 |
-
{
|
25 |
-
/**
|
26 |
-
* Version
|
27 |
-
*/
|
28 |
-
const VERSION = '1.0.0';
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Default timeout
|
32 |
-
*/
|
33 |
-
const DEFAULT_TIMEOUT = 30;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* cUrl resource.
|
37 |
-
*
|
38 |
-
* @var resource
|
39 |
-
*/
|
40 |
-
protected $curl;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Id
|
44 |
-
*
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
protected $id = null;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Error
|
51 |
-
*
|
52 |
-
* @var bool
|
53 |
-
*/
|
54 |
-
protected $error = false;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Error code
|
58 |
-
*
|
59 |
-
* @var int
|
60 |
-
*/
|
61 |
-
protected $errorCode = 0;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Error message
|
65 |
-
*
|
66 |
-
* @var string
|
67 |
-
*/
|
68 |
-
protected $errorMessage = null;
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Curl error
|
72 |
-
*
|
73 |
-
* @var bool
|
74 |
-
*/
|
75 |
-
protected $curlError = false;
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Curl error code
|
79 |
-
*
|
80 |
-
* @var int
|
81 |
-
*/
|
82 |
-
protected $curlErrorCode = 0;
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Curl error message
|
86 |
-
*
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
protected $curlErrorMessage = null;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Http error
|
93 |
-
*
|
94 |
-
* @var bool
|
95 |
-
*/
|
96 |
-
protected $httpError = false;
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Http status code
|
100 |
-
*
|
101 |
-
* @var int
|
102 |
-
*/
|
103 |
-
protected $httpStatusCode = 0;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Http error message
|
107 |
-
*
|
108 |
-
* @var string
|
109 |
-
*/
|
110 |
-
protected $httpErrorMessage = null;
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Base url
|
114 |
-
*
|
115 |
-
* @var string
|
116 |
-
*/
|
117 |
-
protected $baseUrl = null;
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Url
|
121 |
-
*
|
122 |
-
* @var string
|
123 |
-
*/
|
124 |
-
protected $url = null;
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Request headers
|
128 |
-
*
|
129 |
-
* @var array
|
130 |
-
*/
|
131 |
-
protected $requestHeaders = null;
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Response headers
|
135 |
-
*
|
136 |
-
* @var array
|
137 |
-
*/
|
138 |
-
protected $responseHeaders = null;
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Raw response headers
|
142 |
-
*
|
143 |
-
* @var string
|
144 |
-
*/
|
145 |
-
protected $rawResponseHeaders = '';
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Response
|
149 |
-
*
|
150 |
-
* @var mixed
|
151 |
-
*/
|
152 |
-
protected $response = null;
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Raw response
|
156 |
-
*
|
157 |
-
* @var string
|
158 |
-
*/
|
159 |
-
protected $rawResponse = null;
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Before send function
|
163 |
-
*
|
164 |
-
* @var string
|
165 |
-
*/
|
166 |
-
protected $beforeSendFunction = null;
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Download complete function
|
170 |
-
*
|
171 |
-
* @var string
|
172 |
-
*/
|
173 |
-
protected $downloadCompleteFunction = null;
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Success function
|
177 |
-
*
|
178 |
-
* @var string
|
179 |
-
*/
|
180 |
-
protected $successFunction = null;
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Error function
|
184 |
-
*
|
185 |
-
* @var string
|
186 |
-
*/
|
187 |
-
protected $errorFunction = null;
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Complete function
|
191 |
-
*
|
192 |
-
* @var string
|
193 |
-
*/
|
194 |
-
protected $completeFunction = null;
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Cookies
|
198 |
-
*
|
199 |
-
* @var array
|
200 |
-
*/
|
201 |
-
protected $cookies = array();
|
202 |
-
|
203 |
-
/**
|
204 |
-
* Response cookies
|
205 |
-
*
|
206 |
-
* @var array
|
207 |
-
*/
|
208 |
-
protected $responseCookies = array();
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Headers
|
212 |
-
*
|
213 |
-
* @var array
|
214 |
-
*/
|
215 |
-
protected $headers = array();
|
216 |
-
|
217 |
-
/**
|
218 |
-
* Options
|
219 |
-
*
|
220 |
-
* @var array
|
221 |
-
*/
|
222 |
-
protected $options = array();
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Options
|
226 |
-
*
|
227 |
-
* @var function
|
228 |
-
*/
|
229 |
-
protected $jsonDecoder = null;
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Json pattern
|
233 |
-
*
|
234 |
-
* @var string
|
235 |
-
*/
|
236 |
-
protected $jsonPattern = '/^(?:application|text)\/(?:[a-z]+(?:[\.-][0-9a-z]+){0,}[\+\.]|x-)?json(?:-[a-z]+)?/i';
|
237 |
-
|
238 |
-
/**
|
239 |
-
* XML pattern
|
240 |
-
*
|
241 |
-
* @var string
|
242 |
-
*/
|
243 |
-
protected $xmlPattern = '~^(?:text/|application/(?:atom\+|rss\+)?)xml~i';
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Construct
|
247 |
-
*
|
248 |
-
* @access public
|
249 |
-
* @param $base_url
|
250 |
-
* @throws \ErrorException
|
251 |
-
*/
|
252 |
-
public function __construct($base_url = null)
|
253 |
-
{
|
254 |
-
if (!extension_loaded('curl')) {
|
255 |
-
throw new \ErrorException('cURL library is not loaded');
|
256 |
-
}
|
257 |
-
|
258 |
-
$this->curl = curl_init();
|
259 |
-
$this->id = 1;
|
260 |
-
$this->setDefaultUserAgent();
|
261 |
-
$this->setDefaultJsonDecoder();
|
262 |
-
$this->setDefaultTimeout();
|
263 |
-
$this->setOpt(CURLINFO_HEADER_OUT, true);
|
264 |
-
$this->setOpt(CURLOPT_HEADERFUNCTION, array($this, 'headerCallback'));
|
265 |
-
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
266 |
-
$this->setOpt(CURLOPT_SSL_VERIFYPEER, false);
|
267 |
-
$this->headers = new CaseInsensitiveArray();
|
268 |
-
$this->setURL($base_url);
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Build Post Data
|
273 |
-
*
|
274 |
-
* @access public
|
275 |
-
* @param $data
|
276 |
-
*
|
277 |
-
* @return array|string
|
278 |
-
*/
|
279 |
-
public function buildPostData($data)
|
280 |
-
{
|
281 |
-
if (is_array($data)) {
|
282 |
-
if (self::is_array_multidim($data)) {
|
283 |
-
if (isset($this->headers['Content-Type']) &&
|
284 |
-
preg_match($this->jsonPattern, $this->headers['Content-Type'])) {
|
285 |
-
$json_str = json_encode($data);
|
286 |
-
if (!($json_str === false)) {
|
287 |
-
$data = $json_str;
|
288 |
-
}
|
289 |
-
} else {
|
290 |
-
$data = self::http_build_multi_query($data);
|
291 |
-
}
|
292 |
-
} else {
|
293 |
-
$binary_data = false;
|
294 |
-
foreach ($data as $key => $value) {
|
295 |
-
// Fix "Notice: Array to string conversion" when $value in
|
296 |
-
// curl_setopt($ch, CURLOPT_POSTFIELDS, $value) is an array
|
297 |
-
// that contains an empty array.
|
298 |
-
if (is_array($value) && empty($value)) {
|
299 |
-
$data[$key] = '';
|
300 |
-
// Fix "curl_setopt(): The usage of the @filename API for
|
301 |
-
// file uploading is deprecated. Please use the CURLFile
|
302 |
-
// class instead".
|
303 |
-
} elseif (is_string($value) && strpos($value, '@') === 0) {
|
304 |
-
$binary_data = true;
|
305 |
-
if (class_exists('CURLFile')) {
|
306 |
-
$data[$key] = new \CURLFile(substr($value, 1));
|
307 |
-
}
|
308 |
-
} elseif ($value instanceof \CURLFile) {
|
309 |
-
$binary_data = true;
|
310 |
-
}
|
311 |
-
}
|
312 |
-
|
313 |
-
if (!$binary_data) {
|
314 |
-
if (isset($this->headers['Content-Type']) &&
|
315 |
-
preg_match($this->jsonPattern, $this->headers['Content-Type'])) {
|
316 |
-
$json_str = json_encode($data);
|
317 |
-
if (!($json_str === false)) {
|
318 |
-
$data = $json_str;
|
319 |
-
}
|
320 |
-
} else {
|
321 |
-
$data = http_build_query($data, '', '&');
|
322 |
-
}
|
323 |
-
}
|
324 |
-
}
|
325 |
-
}
|
326 |
-
|
327 |
-
return $data;
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Call
|
332 |
-
*
|
333 |
-
* @access public
|
334 |
-
*/
|
335 |
-
public function call()
|
336 |
-
{
|
337 |
-
$args = func_get_args();
|
338 |
-
$function = array_shift($args);
|
339 |
-
if (is_callable($function)) {
|
340 |
-
array_unshift($args, $this);
|
341 |
-
call_user_func_array($function, $args);
|
342 |
-
}
|
343 |
-
}
|
344 |
-
|
345 |
-
/**
|
346 |
-
* Close
|
347 |
-
*
|
348 |
-
* @access public
|
349 |
-
*/
|
350 |
-
public function close()
|
351 |
-
{
|
352 |
-
if (is_resource($this->curl)) {
|
353 |
-
curl_close($this->curl);
|
354 |
-
}
|
355 |
-
$this->options = null;
|
356 |
-
$this->jsonDecoder = null;
|
357 |
-
}
|
358 |
-
|
359 |
-
/**
|
360 |
-
* Complete
|
361 |
-
*
|
362 |
-
* @access public
|
363 |
-
* @param $callback
|
364 |
-
*/
|
365 |
-
public function complete($callback)
|
366 |
-
{
|
367 |
-
$this->completeFunction = $callback;
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Progress
|
372 |
-
*
|
373 |
-
* @access public
|
374 |
-
* @param $callback
|
375 |
-
*/
|
376 |
-
public function progress($callback)
|
377 |
-
{
|
378 |
-
$this->setOpt(CURLOPT_PROGRESSFUNCTION, $callback);
|
379 |
-
$this->setOpt(CURLOPT_NOPROGRESS, false);
|
380 |
-
}
|
381 |
-
|
382 |
-
/**
|
383 |
-
* Delete
|
384 |
-
*
|
385 |
-
* @access public
|
386 |
-
* @param $url
|
387 |
-
* @param $query_parameters
|
388 |
-
* @param $data
|
389 |
-
*
|
390 |
-
* @return string
|
391 |
-
*/
|
392 |
-
public function delete($url, $query_parameters = array(), $data = array())
|
393 |
-
{
|
394 |
-
if (is_array($url)) {
|
395 |
-
$data = $query_parameters;
|
396 |
-
$query_parameters = $url;
|
397 |
-
$url = $this->baseUrl;
|
398 |
-
}
|
399 |
-
|
400 |
-
$this->setURL($url, $query_parameters);
|
401 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'DELETE');
|
402 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
403 |
-
return $this->exec();
|
404 |
-
}
|
405 |
-
|
406 |
-
/**
|
407 |
-
* Download Complete
|
408 |
-
*
|
409 |
-
* @access public
|
410 |
-
* @param $fh
|
411 |
-
*/
|
412 |
-
public function downloadComplete($fh)
|
413 |
-
{
|
414 |
-
if (!$this->error && $this->downloadCompleteFunction) {
|
415 |
-
rewind($fh);
|
416 |
-
$this->call($this->downloadCompleteFunction, $fh);
|
417 |
-
$this->downloadCompleteFunction = null;
|
418 |
-
}
|
419 |
-
|
420 |
-
if (is_resource($fh)) {
|
421 |
-
fclose($fh);
|
422 |
-
}
|
423 |
-
|
424 |
-
// Fix "PHP Notice: Use of undefined constant STDOUT" when reading the
|
425 |
-
// PHP script from stdin. Using null causes "Warning: curl_setopt():
|
426 |
-
// supplied argument is not a valid File-Handle resource".
|
427 |
-
if (!defined('STDOUT')) {
|
428 |
-
define('STDOUT', fopen('php://stdout', 'w'));
|
429 |
-
}
|
430 |
-
|
431 |
-
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
|
432 |
-
// resource has gone away, resetting to default".
|
433 |
-
$this->setOpt(CURLOPT_FILE, STDOUT);
|
434 |
-
|
435 |
-
// Reset CURLOPT_RETURNTRANSFER to tell cURL to return subsequent
|
436 |
-
// responses as the return value of curl_exec(). Without this,
|
437 |
-
// curl_exec() will revert to returning boolean values.
|
438 |
-
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
|
439 |
-
}
|
440 |
-
|
441 |
-
/**
|
442 |
-
* Download
|
443 |
-
*
|
444 |
-
* @access public
|
445 |
-
* @param $url
|
446 |
-
* @param $mixed_filename
|
447 |
-
*
|
448 |
-
* @return boolean
|
449 |
-
*/
|
450 |
-
public function download($url, $mixed_filename)
|
451 |
-
{
|
452 |
-
if (is_callable($mixed_filename)) {
|
453 |
-
$this->downloadCompleteFunction = $mixed_filename;
|
454 |
-
$fh = tmpfile();
|
455 |
-
} else {
|
456 |
-
$filename = $mixed_filename;
|
457 |
-
$fh = fopen($filename, 'wb');
|
458 |
-
}
|
459 |
-
|
460 |
-
$this->setOpt(CURLOPT_FILE, $fh);
|
461 |
-
$this->get($url);
|
462 |
-
$this->downloadComplete($fh);
|
463 |
-
|
464 |
-
return !$this->error;
|
465 |
-
}
|
466 |
-
|
467 |
-
/**
|
468 |
-
* Error
|
469 |
-
*
|
470 |
-
* @access public
|
471 |
-
* @param $callback
|
472 |
-
*/
|
473 |
-
public function error($callback)
|
474 |
-
{
|
475 |
-
$this->errorFunction = $callback;
|
476 |
-
}
|
477 |
-
|
478 |
-
/**
|
479 |
-
* Exec
|
480 |
-
*
|
481 |
-
* @access public
|
482 |
-
* @param $ch
|
483 |
-
*
|
484 |
-
* @return string
|
485 |
-
*/
|
486 |
-
public function exec($ch = null)
|
487 |
-
{
|
488 |
-
$this->responseCookies = array();
|
489 |
-
if (!($ch === null)) {
|
490 |
-
$this->rawResponse = curl_multi_getcontent($ch);
|
491 |
-
} else {
|
492 |
-
$this->call($this->beforeSendFunction);
|
493 |
-
$this->rawResponse = curl_exec($this->curl);
|
494 |
-
$this->curlErrorCode = curl_errno($this->curl);
|
495 |
-
}
|
496 |
-
$this->curlErrorMessage = curl_error($this->curl);
|
497 |
-
$this->curlError = !($this->curlErrorCode === 0);
|
498 |
-
$this->httpStatusCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
|
499 |
-
$this->httpError = in_array(floor($this->httpStatusCode / 100), array(4, 5));
|
500 |
-
$this->error = $this->curlError || $this->httpError;
|
501 |
-
$this->errorCode = $this->error ? ($this->curlError ? $this->curlErrorCode : $this->httpStatusCode) : 0;
|
502 |
-
|
503 |
-
// NOTE: CURLINFO_HEADER_OUT set to true is required for requestHeaders
|
504 |
-
// to not be empty (e.g. $curl->setOpt(CURLINFO_HEADER_OUT, true);).
|
505 |
-
if ($this->getOpt(CURLINFO_HEADER_OUT) === true) {
|
506 |
-
$this->requestHeaders = $this->parseRequestHeaders(curl_getinfo($this->curl, CURLINFO_HEADER_OUT));
|
507 |
-
}
|
508 |
-
$this->responseHeaders = $this->parseResponseHeaders($this->rawResponseHeaders);
|
509 |
-
list($this->response, $this->rawResponse) = $this->parseResponse($this->responseHeaders, $this->rawResponse);
|
510 |
-
|
511 |
-
$this->httpErrorMessage = '';
|
512 |
-
if ($this->error) {
|
513 |
-
if (isset($this->responseHeaders['Status-Line'])) {
|
514 |
-
$this->httpErrorMessage = $this->responseHeaders['Status-Line'];
|
515 |
-
}
|
516 |
-
}
|
517 |
-
$this->errorMessage = $this->curlError ? $this->curlErrorMessage : $this->httpErrorMessage;
|
518 |
-
|
519 |
-
if (!$this->error) {
|
520 |
-
$this->call($this->successFunction);
|
521 |
-
} else {
|
522 |
-
$this->call($this->errorFunction);
|
523 |
-
}
|
524 |
-
|
525 |
-
$this->call($this->completeFunction);
|
526 |
-
|
527 |
-
return $this->response;
|
528 |
-
}
|
529 |
-
|
530 |
-
/**
|
531 |
-
* Get
|
532 |
-
*
|
533 |
-
* @access public
|
534 |
-
* @param $url
|
535 |
-
* @param $data
|
536 |
-
*
|
537 |
-
* @return string
|
538 |
-
*/
|
539 |
-
public function get($url, $data = array())
|
540 |
-
{
|
541 |
-
if (is_array($url)) {
|
542 |
-
$data = $url;
|
543 |
-
$url = $this->baseUrl;
|
544 |
-
}
|
545 |
-
$this->setURL($url, $data);
|
546 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
|
547 |
-
$this->setOpt(CURLOPT_HTTPGET, true);
|
548 |
-
return $this->exec();
|
549 |
-
}
|
550 |
-
|
551 |
-
/**
|
552 |
-
* Get Opt
|
553 |
-
*
|
554 |
-
* @access public
|
555 |
-
* @param $option
|
556 |
-
*
|
557 |
-
* @return mixed
|
558 |
-
*/
|
559 |
-
public function getOpt($option)
|
560 |
-
{
|
561 |
-
return $this->options[$option];
|
562 |
-
}
|
563 |
-
|
564 |
-
/**
|
565 |
-
* Head
|
566 |
-
*
|
567 |
-
* @access public
|
568 |
-
* @param $url
|
569 |
-
* @param $data
|
570 |
-
*
|
571 |
-
* @return string
|
572 |
-
*/
|
573 |
-
public function head($url, $data = array())
|
574 |
-
{
|
575 |
-
if (is_array($url)) {
|
576 |
-
$data = $url;
|
577 |
-
$url = $this->baseUrl;
|
578 |
-
}
|
579 |
-
$this->setURL($url, $data);
|
580 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'HEAD');
|
581 |
-
$this->setOpt(CURLOPT_NOBODY, true);
|
582 |
-
return $this->exec();
|
583 |
-
}
|
584 |
-
|
585 |
-
/**
|
586 |
-
* Header Callback
|
587 |
-
*
|
588 |
-
* @access public
|
589 |
-
* @param $ch
|
590 |
-
* @param $header
|
591 |
-
*
|
592 |
-
* @return integer
|
593 |
-
*/
|
594 |
-
public function headerCallback($ch, $header)
|
595 |
-
{
|
596 |
-
if (preg_match('/^Set-Cookie:\s*([^=]+)=([^;]+)/mi', $header, $cookie) == 1) {
|
597 |
-
$this->responseCookies[$cookie[1]] = $cookie[2];
|
598 |
-
}
|
599 |
-
$this->rawResponseHeaders .= $header;
|
600 |
-
return strlen($header);
|
601 |
-
}
|
602 |
-
|
603 |
-
/**
|
604 |
-
* Options
|
605 |
-
*
|
606 |
-
* @access public
|
607 |
-
* @param $url
|
608 |
-
* @param $data
|
609 |
-
*
|
610 |
-
* @return string
|
611 |
-
*/
|
612 |
-
public function options($url, $data = array())
|
613 |
-
{
|
614 |
-
if (is_array($url)) {
|
615 |
-
$data = $url;
|
616 |
-
$url = $this->baseUrl;
|
617 |
-
}
|
618 |
-
$this->setURL($url, $data);
|
619 |
-
$this->unsetHeader('Content-Length');
|
620 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'OPTIONS');
|
621 |
-
return $this->exec();
|
622 |
-
}
|
623 |
-
|
624 |
-
/**
|
625 |
-
* Patch
|
626 |
-
*
|
627 |
-
* @access public
|
628 |
-
* @param $url
|
629 |
-
* @param $data
|
630 |
-
*
|
631 |
-
* @return string
|
632 |
-
*/
|
633 |
-
public function patch($url, $data = array())
|
634 |
-
{
|
635 |
-
if (is_array($url)) {
|
636 |
-
$data = $url;
|
637 |
-
$url = $this->baseUrl;
|
638 |
-
}
|
639 |
-
|
640 |
-
if (is_array($data) && empty($data)) {
|
641 |
-
$this->unsetHeader('Content-Length');
|
642 |
-
}
|
643 |
-
|
644 |
-
$this->setURL($url);
|
645 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
|
646 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
647 |
-
return $this->exec();
|
648 |
-
}
|
649 |
-
|
650 |
-
/**
|
651 |
-
* Post
|
652 |
-
*
|
653 |
-
* @access public
|
654 |
-
* @param $url
|
655 |
-
* @param $data
|
656 |
-
*
|
657 |
-
* @return string
|
658 |
-
*/
|
659 |
-
public function post($url, $data = array())
|
660 |
-
{
|
661 |
-
if (is_array($url)) {
|
662 |
-
$data = $url;
|
663 |
-
$url = $this->baseUrl;
|
664 |
-
}
|
665 |
-
|
666 |
-
$this->setURL($url);
|
667 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'POST');
|
668 |
-
$this->setOpt(CURLOPT_POST, true);
|
669 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
|
670 |
-
return $this->exec();
|
671 |
-
}
|
672 |
-
|
673 |
-
/**
|
674 |
-
* Put
|
675 |
-
*
|
676 |
-
* @access public
|
677 |
-
* @param $url
|
678 |
-
* @param $data
|
679 |
-
*
|
680 |
-
* @return string
|
681 |
-
*/
|
682 |
-
public function put($url, $data = array())
|
683 |
-
{
|
684 |
-
if (is_array($url)) {
|
685 |
-
$data = $url;
|
686 |
-
$url = $this->baseUrl;
|
687 |
-
}
|
688 |
-
$this->setURL($url);
|
689 |
-
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
|
690 |
-
$put_data = $this->buildPostData($data);
|
691 |
-
if (empty($this->options[CURLOPT_INFILE]) && empty($this->options[CURLOPT_INFILESIZE])) {
|
692 |
-
$this->setHeader('Content-Length', strlen($put_data));
|
693 |
-
}
|
694 |
-
$this->setOpt(CURLOPT_POSTFIELDS, $put_data);
|
695 |
-
return $this->exec();
|
696 |
-
}
|
697 |
-
|
698 |
-
/**
|
699 |
-
* Set Basic Authentication
|
700 |
-
*
|
701 |
-
* @access public
|
702 |
-
* @param $username
|
703 |
-
* @param $password
|
704 |
-
*/
|
705 |
-
public function setBasicAuthentication($username, $password = '')
|
706 |
-
{
|
707 |
-
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
708 |
-
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
709 |
-
}
|
710 |
-
|
711 |
-
/**
|
712 |
-
* Set Digest Authentication
|
713 |
-
*
|
714 |
-
* @access public
|
715 |
-
* @param $username
|
716 |
-
* @param $password
|
717 |
-
*/
|
718 |
-
public function setDigestAuthentication($username, $password = '')
|
719 |
-
{
|
720 |
-
$this->setOpt(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
721 |
-
$this->setOpt(CURLOPT_USERPWD, $username . ':' . $password);
|
722 |
-
}
|
723 |
-
|
724 |
-
/**
|
725 |
-
* Set Cookie
|
726 |
-
*
|
727 |
-
* @access public
|
728 |
-
* @param $key
|
729 |
-
* @param $value
|
730 |
-
*/
|
731 |
-
public function setCookie($key, $value)
|
732 |
-
{
|
733 |
-
$this->cookies[$key] = $value;
|
734 |
-
$this->setOpt(CURLOPT_COOKIE, str_replace(' ', '%20', urldecode(http_build_query($this->cookies, '', '; '))));
|
735 |
-
}
|
736 |
-
|
737 |
-
/**
|
738 |
-
* Get cookie.
|
739 |
-
*
|
740 |
-
* @access public
|
741 |
-
* @param $key
|
742 |
-
*/
|
743 |
-
public function getCookie($key)
|
744 |
-
{
|
745 |
-
return $this->getResponseCookie($key);
|
746 |
-
}
|
747 |
-
|
748 |
-
/**
|
749 |
-
* Get response cookie.
|
750 |
-
*
|
751 |
-
* @access public
|
752 |
-
* @param $key
|
753 |
-
*/
|
754 |
-
public function getResponseCookie($key)
|
755 |
-
{
|
756 |
-
return isset($this->responseCookies[$key]) ? $this->responseCookies[$key] : null;
|
757 |
-
}
|
758 |
-
|
759 |
-
/**
|
760 |
-
* Set Port
|
761 |
-
*
|
762 |
-
* @access public
|
763 |
-
* @param $port
|
764 |
-
*/
|
765 |
-
public function setPort($port)
|
766 |
-
{
|
767 |
-
$this->setOpt(CURLOPT_PORT, intval($port));
|
768 |
-
}
|
769 |
-
|
770 |
-
/**
|
771 |
-
* Set Connect Timeout
|
772 |
-
*
|
773 |
-
* @access public
|
774 |
-
* @param $seconds
|
775 |
-
*/
|
776 |
-
public function setConnectTimeout($seconds)
|
777 |
-
{
|
778 |
-
$this->setOpt(CURLOPT_CONNECTTIMEOUT, $seconds);
|
779 |
-
}
|
780 |
-
|
781 |
-
/**
|
782 |
-
* Set Cookie File
|
783 |
-
*
|
784 |
-
* @access public
|
785 |
-
* @param $cookie_file
|
786 |
-
*/
|
787 |
-
public function setCookieFile($cookie_file)
|
788 |
-
{
|
789 |
-
$this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
|
790 |
-
}
|
791 |
-
|
792 |
-
/**
|
793 |
-
* Set Cookie Jar
|
794 |
-
*
|
795 |
-
* @access public
|
796 |
-
* @param $cookie_jar
|
797 |
-
*/
|
798 |
-
public function setCookieJar($cookie_jar)
|
799 |
-
{
|
800 |
-
$this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
|
801 |
-
}
|
802 |
-
|
803 |
-
/**
|
804 |
-
* Set Default JSON Decoder
|
805 |
-
*
|
806 |
-
* @access public
|
807 |
-
*/
|
808 |
-
public function setDefaultJsonDecoder()
|
809 |
-
{
|
810 |
-
$this->jsonDecoder = function($response) {
|
811 |
-
$json_obj = json_decode($response, false);
|
812 |
-
if (!($json_obj === null)) {
|
813 |
-
$response = $json_obj;
|
814 |
-
}
|
815 |
-
return $response;
|
816 |
-
};
|
817 |
-
}
|
818 |
-
|
819 |
-
/**
|
820 |
-
* Set Default Timeout
|
821 |
-
*
|
822 |
-
* @access public
|
823 |
-
*/
|
824 |
-
public function setDefaultTimeout()
|
825 |
-
{
|
826 |
-
$this->setTimeout(self::DEFAULT_TIMEOUT);
|
827 |
-
}
|
828 |
-
|
829 |
-
/**
|
830 |
-
* Set Default User Agent
|
831 |
-
*
|
832 |
-
* @access public
|
833 |
-
*/
|
834 |
-
public function setDefaultUserAgent()
|
835 |
-
{
|
836 |
-
$user_agent = 'PHP-Curl-Class/' . self::VERSION;
|
837 |
-
$user_agent .= ' PHP/' . PHP_VERSION;
|
838 |
-
$curl_version = curl_version();
|
839 |
-
$user_agent .= ' curl/' . $curl_version['version'];
|
840 |
-
$this->setUserAgent($user_agent);
|
841 |
-
}
|
842 |
-
|
843 |
-
/**
|
844 |
-
* Set Header
|
845 |
-
*
|
846 |
-
* @access public
|
847 |
-
* @param $key
|
848 |
-
* @param $value
|
849 |
-
*
|
850 |
-
* @return string
|
851 |
-
*/
|
852 |
-
public function setHeader($key, $value)
|
853 |
-
{
|
854 |
-
$this->headers[$key] = $value;
|
855 |
-
$headers = array();
|
856 |
-
foreach ($this->headers as $key => $value) {
|
857 |
-
$headers[] = $key . ': ' . $value;
|
858 |
-
}
|
859 |
-
$this->setOpt(CURLOPT_HTTPHEADER, $headers);
|
860 |
-
}
|
861 |
-
|
862 |
-
/**
|
863 |
-
* Set JSON Decoder
|
864 |
-
*
|
865 |
-
* @access public
|
866 |
-
* @param $function
|
867 |
-
*/
|
868 |
-
public function setJsonDecoder($function)
|
869 |
-
{
|
870 |
-
if (is_callable($function)) {
|
871 |
-
$this->jsonDecoder = $function;
|
872 |
-
}
|
873 |
-
}
|
874 |
-
|
875 |
-
/**
|
876 |
-
* Set Opt
|
877 |
-
*
|
878 |
-
* @access public
|
879 |
-
* @param $option
|
880 |
-
* @param $value
|
881 |
-
*
|
882 |
-
* @return boolean
|
883 |
-
*/
|
884 |
-
public function setOpt($option, $value)
|
885 |
-
{
|
886 |
-
$required_options = array(
|
887 |
-
CURLOPT_RETURNTRANSFER => 'CURLOPT_RETURNTRANSFER',
|
888 |
-
);
|
889 |
-
|
890 |
-
if (in_array($option, array_keys($required_options), true) && !($value === true)) {
|
891 |
-
trigger_error($required_options[$option] . ' is a required option', E_USER_WARNING);
|
892 |
-
}
|
893 |
-
|
894 |
-
$this->options[$option] = $value;
|
895 |
-
return curl_setopt($this->curl, $option, $value);
|
896 |
-
}
|
897 |
-
|
898 |
-
/**
|
899 |
-
* Set Referer
|
900 |
-
*
|
901 |
-
* @access public
|
902 |
-
* @param $referer
|
903 |
-
*/
|
904 |
-
public function setReferer($referer)
|
905 |
-
{
|
906 |
-
$this->setReferrer($referer);
|
907 |
-
}
|
908 |
-
|
909 |
-
/**
|
910 |
-
* Set Referrer
|
911 |
-
*
|
912 |
-
* @access public
|
913 |
-
* @param $referrer
|
914 |
-
*/
|
915 |
-
public function setReferrer($referrer)
|
916 |
-
{
|
917 |
-
$this->setOpt(CURLOPT_REFERER, $referrer);
|
918 |
-
}
|
919 |
-
|
920 |
-
/**
|
921 |
-
* Set Timeout
|
922 |
-
*
|
923 |
-
* @access public
|
924 |
-
* @param $seconds
|
925 |
-
*/
|
926 |
-
public function setTimeout($seconds)
|
927 |
-
{
|
928 |
-
$this->setOpt(CURLOPT_TIMEOUT, $seconds);
|
929 |
-
}
|
930 |
-
|
931 |
-
/**
|
932 |
-
* Set Url
|
933 |
-
*
|
934 |
-
* @access public
|
935 |
-
* @param $url
|
936 |
-
* @param $data
|
937 |
-
*/
|
938 |
-
public function setURL($url, $data = array())
|
939 |
-
{
|
940 |
-
$this->baseUrl = $url;
|
941 |
-
$this->url = $this->buildURL($url, $data);
|
942 |
-
$this->setOpt(CURLOPT_URL, $this->url);
|
943 |
-
}
|
944 |
-
|
945 |
-
/**
|
946 |
-
* Set User Agent
|
947 |
-
*
|
948 |
-
* @access public
|
949 |
-
* @param $user_agent
|
950 |
-
*/
|
951 |
-
public function setUserAgent($user_agent)
|
952 |
-
{
|
953 |
-
$this->setOpt(CURLOPT_USERAGENT, $user_agent);
|
954 |
-
}
|
955 |
-
|
956 |
-
/**
|
957 |
-
* Success
|
958 |
-
*
|
959 |
-
* @access public
|
960 |
-
* @param $callback
|
961 |
-
*/
|
962 |
-
public function success($callback)
|
963 |
-
{
|
964 |
-
$this->successFunction = $callback;
|
965 |
-
}
|
966 |
-
|
967 |
-
/**
|
968 |
-
* Unset Header
|
969 |
-
*
|
970 |
-
* @access public
|
971 |
-
* @param $key
|
972 |
-
*/
|
973 |
-
public function unsetHeader($key)
|
974 |
-
{
|
975 |
-
$this->setHeader($key, '');
|
976 |
-
unset($this->headers[$key]);
|
977 |
-
}
|
978 |
-
|
979 |
-
/**
|
980 |
-
* Verbose
|
981 |
-
*
|
982 |
-
* @access public
|
983 |
-
* @param $on
|
984 |
-
*/
|
985 |
-
public function verbose($on = true)
|
986 |
-
{
|
987 |
-
$this->setOpt(CURLOPT_VERBOSE, $on);
|
988 |
-
}
|
989 |
-
|
990 |
-
/**
|
991 |
-
* Destruct
|
992 |
-
*
|
993 |
-
* @access public
|
994 |
-
*/
|
995 |
-
public function __destruct()
|
996 |
-
{
|
997 |
-
$this->close();
|
998 |
-
}
|
999 |
-
|
1000 |
-
/**
|
1001 |
-
* Build Url
|
1002 |
-
*
|
1003 |
-
* @access protected
|
1004 |
-
* @param $url
|
1005 |
-
* @param $data
|
1006 |
-
*
|
1007 |
-
* @return string
|
1008 |
-
*/
|
1009 |
-
protected function buildURL($url, $data = array())
|
1010 |
-
{
|
1011 |
-
return $url . (empty($data) ? '' : '?' . http_build_query($data));
|
1012 |
-
}
|
1013 |
-
|
1014 |
-
/**
|
1015 |
-
* Parse Headers
|
1016 |
-
*
|
1017 |
-
* @access protected
|
1018 |
-
* @param $raw_headers
|
1019 |
-
*
|
1020 |
-
* @return array
|
1021 |
-
*/
|
1022 |
-
protected function parseHeaders($raw_headers)
|
1023 |
-
{
|
1024 |
-
$raw_headers = preg_split('/\r\n/', $raw_headers, null, PREG_SPLIT_NO_EMPTY);
|
1025 |
-
$http_headers = new CaseInsensitiveArray();
|
1026 |
-
|
1027 |
-
$raw_headers_count = count($raw_headers);
|
1028 |
-
for ($i = 1; $i < $raw_headers_count; $i++) {
|
1029 |
-
list($key, $value) = explode(':', $raw_headers[$i], 2);
|
1030 |
-
$key = trim($key);
|
1031 |
-
$value = trim($value);
|
1032 |
-
// Use isset() as array_key_exists() and ArrayAccess are not compatible.
|
1033 |
-
if (isset($http_headers[$key])) {
|
1034 |
-
$http_headers[$key] .= ',' . $value;
|
1035 |
-
} else {
|
1036 |
-
$http_headers[$key] = $value;
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
return array(isset($raw_headers['0']) ? $raw_headers['0'] : '', $http_headers);
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
/**
|
1044 |
-
* Parse Request Headers
|
1045 |
-
*
|
1046 |
-
* @access protected
|
1047 |
-
* @param $raw_headers
|
1048 |
-
*
|
1049 |
-
* @return array
|
1050 |
-
*/
|
1051 |
-
protected function parseRequestHeaders($raw_headers)
|
1052 |
-
{
|
1053 |
-
$request_headers = new CaseInsensitiveArray();
|
1054 |
-
list($first_line, $headers) = $this->parseHeaders($raw_headers);
|
1055 |
-
$request_headers['Request-Line'] = $first_line;
|
1056 |
-
foreach ($headers as $key => $value) {
|
1057 |
-
$request_headers[$key] = $value;
|
1058 |
-
}
|
1059 |
-
return $request_headers;
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
/**
|
1063 |
-
* Parse Response
|
1064 |
-
*
|
1065 |
-
* @access protected
|
1066 |
-
* @param $response_headers
|
1067 |
-
* @param $raw_response
|
1068 |
-
*
|
1069 |
-
* @return array
|
1070 |
-
*/
|
1071 |
-
protected function parseResponse($response_headers, $raw_response)
|
1072 |
-
{
|
1073 |
-
$response = $raw_response;
|
1074 |
-
if (isset($response_headers['Content-Type'])) {
|
1075 |
-
if (preg_match($this->jsonPattern, $response_headers['Content-Type'])) {
|
1076 |
-
$json_decoder = $this->jsonDecoder;
|
1077 |
-
if (is_callable($json_decoder)) {
|
1078 |
-
$response = $json_decoder($response);
|
1079 |
-
}
|
1080 |
-
} elseif (preg_match($this->xmlPattern, $response_headers['Content-Type'])) {
|
1081 |
-
$xml_obj = @simplexml_load_string($response);
|
1082 |
-
if (!($xml_obj === false)) {
|
1083 |
-
$response = $xml_obj;
|
1084 |
-
}
|
1085 |
-
}
|
1086 |
-
}
|
1087 |
-
|
1088 |
-
return array($response, $raw_response);
|
1089 |
-
}
|
1090 |
-
|
1091 |
-
/**
|
1092 |
-
* Parse Response Headers
|
1093 |
-
*
|
1094 |
-
* @access protected
|
1095 |
-
* @param $raw_response_headers
|
1096 |
-
*
|
1097 |
-
* @return array
|
1098 |
-
*/
|
1099 |
-
protected function parseResponseHeaders($raw_response_headers)
|
1100 |
-
{
|
1101 |
-
$response_header_array = explode("\r\n\r\n", $raw_response_headers);
|
1102 |
-
$response_header = '';
|
1103 |
-
for ($i = count($response_header_array) - 1; $i >= 0; $i--) {
|
1104 |
-
if (stripos($response_header_array[$i], 'HTTP/') === 0) {
|
1105 |
-
$response_header = $response_header_array[$i];
|
1106 |
-
break;
|
1107 |
-
}
|
1108 |
-
}
|
1109 |
-
|
1110 |
-
$response_headers = new CaseInsensitiveArray();
|
1111 |
-
list($first_line, $headers) = $this->parseHeaders($response_header);
|
1112 |
-
$response_headers['Status-Line'] = $first_line;
|
1113 |
-
foreach ($headers as $key => $value) {
|
1114 |
-
$response_headers[$key] = $value;
|
1115 |
-
}
|
1116 |
-
return $response_headers;
|
1117 |
-
}
|
1118 |
-
|
1119 |
-
/**
|
1120 |
-
* Http Build Multi Query
|
1121 |
-
*
|
1122 |
-
* @access public
|
1123 |
-
* @param $data
|
1124 |
-
* @param $key
|
1125 |
-
*
|
1126 |
-
* @return string
|
1127 |
-
*/
|
1128 |
-
public static function http_build_multi_query($data, $key = null)
|
1129 |
-
{
|
1130 |
-
$query = array();
|
1131 |
-
|
1132 |
-
if (empty($data)) {
|
1133 |
-
return $key . '=';
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
$is_array_assoc = self::is_array_assoc($data);
|
1137 |
-
|
1138 |
-
foreach ($data as $k => $value) {
|
1139 |
-
if (is_string($value) || is_numeric($value)) {
|
1140 |
-
$brackets = $is_array_assoc ? '[' . $k . ']' : '[]';
|
1141 |
-
$query[] = urlencode($key === null ? $k : $key . $brackets) . '=' . rawurlencode($value);
|
1142 |
-
} elseif (is_array($value)) {
|
1143 |
-
$nested = $key === null ? $k : $key . '[' . $k . ']';
|
1144 |
-
$query[] = self::http_build_multi_query($value, $nested);
|
1145 |
-
}
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
return implode('&', $query);
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
/**
|
1152 |
-
* Is Array Assoc
|
1153 |
-
*
|
1154 |
-
* @access public
|
1155 |
-
* @param $array
|
1156 |
-
*
|
1157 |
-
* @return boolean
|
1158 |
-
*/
|
1159 |
-
public static function is_array_assoc($array)
|
1160 |
-
{
|
1161 |
-
return (bool)count(array_filter(array_keys($array), 'is_string'));
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
/**
|
1165 |
-
* Is Array Multidim
|
1166 |
-
*
|
1167 |
-
* @access public
|
1168 |
-
* @param $array
|
1169 |
-
*
|
1170 |
-
* @return boolean
|
1171 |
-
*/
|
1172 |
-
public static function is_array_multidim($array)
|
1173 |
-
{
|
1174 |
-
if (!is_array($array)) {
|
1175 |
-
return false;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
return (bool)count(array_filter($array, 'is_array'));
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
/**
|
1182 |
-
* Get Error
|
1183 |
-
*
|
1184 |
-
* @return bool
|
1185 |
-
*/
|
1186 |
-
public function getError()
|
1187 |
-
{
|
1188 |
-
return $this->error;
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
/**
|
1192 |
-
* Get Error Code
|
1193 |
-
*
|
1194 |
-
* @return int
|
1195 |
-
*/
|
1196 |
-
public function getErrorCode()
|
1197 |
-
{
|
1198 |
-
return $this->errorCode;
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
/**
|
1202 |
-
* Get Error Message
|
1203 |
-
*
|
1204 |
-
* @return string
|
1205 |
-
*/
|
1206 |
-
public function getErrorMessage()
|
1207 |
-
{
|
1208 |
-
return $this->errorMessage;
|
1209 |
-
}
|
1210 |
-
|
1211 |
-
/**
|
1212 |
-
* Get Curl Error
|
1213 |
-
*
|
1214 |
-
* @return bool
|
1215 |
-
*/
|
1216 |
-
public function getCurlError()
|
1217 |
-
{
|
1218 |
-
return $this->curlError;
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
/**
|
1222 |
-
* Get Curl Error Code
|
1223 |
-
*
|
1224 |
-
* @return int
|
1225 |
-
*/
|
1226 |
-
public function getCurlErrorCode()
|
1227 |
-
{
|
1228 |
-
return $this->curlErrorCode;
|
1229 |
-
}
|
1230 |
-
|
1231 |
-
/**
|
1232 |
-
* Get Curl Error Message
|
1233 |
-
*
|
1234 |
-
* @return string
|
1235 |
-
*/
|
1236 |
-
public function getCurlErrorMessage()
|
1237 |
-
{
|
1238 |
-
return $this->curlErrorMessage;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
/**
|
1242 |
-
* Get Http Error
|
1243 |
-
*
|
1244 |
-
* @return bool
|
1245 |
-
*/
|
1246 |
-
public function getHttpError()
|
1247 |
-
{
|
1248 |
-
return $this->httpError;
|
1249 |
-
}
|
1250 |
-
|
1251 |
-
/**
|
1252 |
-
* Get http Status Code
|
1253 |
-
*
|
1254 |
-
* @return int
|
1255 |
-
*/
|
1256 |
-
public function getHttpStatusCode()
|
1257 |
-
{
|
1258 |
-
return $this->httpStatusCode;
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
/**
|
1262 |
-
* Get Http Error Message
|
1263 |
-
*
|
1264 |
-
* @return string
|
1265 |
-
*/
|
1266 |
-
public function getHttpErrorMessage()
|
1267 |
-
{
|
1268 |
-
return $this->httpErrorMessage;
|
1269 |
-
}
|
1270 |
-
|
1271 |
-
/**
|
1272 |
-
* Get Base Url
|
1273 |
-
*
|
1274 |
-
* @return string
|
1275 |
-
*/
|
1276 |
-
public function getBaseUrl()
|
1277 |
-
{
|
1278 |
-
return $this->baseUrl;
|
1279 |
-
}
|
1280 |
-
|
1281 |
-
/**
|
1282 |
-
* Get Url
|
1283 |
-
*
|
1284 |
-
* @return string
|
1285 |
-
*/
|
1286 |
-
public function getUrl()
|
1287 |
-
{
|
1288 |
-
return $this->url;
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
/**
|
1292 |
-
* Get Request Headers
|
1293 |
-
*
|
1294 |
-
* @return array
|
1295 |
-
*/
|
1296 |
-
public function getRequestHeaders()
|
1297 |
-
{
|
1298 |
-
return $this->requestHeaders;
|
1299 |
-
}
|
1300 |
-
|
1301 |
-
/**
|
1302 |
-
* Get Response Headers
|
1303 |
-
*
|
1304 |
-
* @return array
|
1305 |
-
*/
|
1306 |
-
public function getResponseHeaders()
|
1307 |
-
{
|
1308 |
-
return $this->responseHeaders;
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
/**
|
1312 |
-
* Get Raw Response Headers
|
1313 |
-
*
|
1314 |
-
* @return string
|
1315 |
-
*/
|
1316 |
-
public function getRawResponseHeaders()
|
1317 |
-
{
|
1318 |
-
return $this->rawResponseHeaders;
|
1319 |
-
}
|
1320 |
-
|
1321 |
-
/**
|
1322 |
-
* Get Response
|
1323 |
-
*
|
1324 |
-
* @return mixed
|
1325 |
-
*/
|
1326 |
-
public function getResponse()
|
1327 |
-
{
|
1328 |
-
return $this->response;
|
1329 |
-
}
|
1330 |
-
|
1331 |
-
/**
|
1332 |
-
* Get Raw Response
|
1333 |
-
*
|
1334 |
-
* @return string
|
1335 |
-
*/
|
1336 |
-
public function getRawResponse()
|
1337 |
-
{
|
1338 |
-
return $this->rawResponse;
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
/**
|
1342 |
-
* Get Before Send Function
|
1343 |
-
*
|
1344 |
-
* @return string
|
1345 |
-
*/
|
1346 |
-
public function getBeforeSendFunction()
|
1347 |
-
{
|
1348 |
-
return $this->beforeSendFunction;
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
/**
|
1352 |
-
* Set Before Send Function
|
1353 |
-
*
|
1354 |
-
* @param string $function
|
1355 |
-
* @return $this
|
1356 |
-
*/
|
1357 |
-
public function setBeforeSendFunction($function)
|
1358 |
-
{
|
1359 |
-
$this->beforeSendFunction = $function;
|
1360 |
-
return $this;
|
1361 |
-
}
|
1362 |
-
|
1363 |
-
/**
|
1364 |
-
* Get Download Complete Function
|
1365 |
-
*
|
1366 |
-
* @return string
|
1367 |
-
*/
|
1368 |
-
public function getDownloadCompleteFunction()
|
1369 |
-
{
|
1370 |
-
return $this->downloadCompleteFunction;
|
1371 |
-
}
|
1372 |
-
|
1373 |
-
/**
|
1374 |
-
* Get Download Complete Function
|
1375 |
-
*
|
1376 |
-
* @param string $function
|
1377 |
-
* @return $this
|
1378 |
-
*/
|
1379 |
-
public function setDownloadCompleteFunction($function)
|
1380 |
-
{
|
1381 |
-
$this->downloadCompleteFunction = $function;
|
1382 |
-
return $this;
|
1383 |
-
}
|
1384 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/ResourceAbstract.php
DELETED
@@ -1,138 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\IO\Curl;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Abstract class \OnePica\AvaTax16\ResourceAbstract
|
24 |
-
*/
|
25 |
-
abstract class ResourceAbstract
|
26 |
-
{
|
27 |
-
/**
|
28 |
-
* Config
|
29 |
-
*
|
30 |
-
* @var \OnePica\AvaTax16\Config
|
31 |
-
*/
|
32 |
-
protected $config;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Construct
|
36 |
-
*
|
37 |
-
* @param \OnePica\AvaTax16\Config $config
|
38 |
-
*/
|
39 |
-
public function __construct($config)
|
40 |
-
{
|
41 |
-
$this->config = $config;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get config
|
46 |
-
*
|
47 |
-
* @return \OnePica\AvaTax16\Config
|
48 |
-
*/
|
49 |
-
public function getConfig()
|
50 |
-
{
|
51 |
-
return $this->config;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Get Curl Object with headers from config
|
56 |
-
*
|
57 |
-
* @return \OnePica\AvaTax16\IO\Curl
|
58 |
-
*/
|
59 |
-
protected function getCurlObjectWithHeaders()
|
60 |
-
{
|
61 |
-
$curl = new Curl();
|
62 |
-
$config = $this->getConfig();
|
63 |
-
$curl->setHeader('Authorization', $config->getAuthorizationHeader());
|
64 |
-
$curl->setHeader('Accept', $config->getAcceptHeader());
|
65 |
-
$curl->setHeader('Content-Type', $config->getContentTypeHeader());
|
66 |
-
$curl->setHeader('User-Agent', $config->getUserAgent());
|
67 |
-
|
68 |
-
return $curl;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Set Error Data To Response If Exists
|
73 |
-
*
|
74 |
-
* @param \OnePica\AvaTax16\Document\Part $response
|
75 |
-
* @param Curl $curl
|
76 |
-
* @return $this
|
77 |
-
*/
|
78 |
-
protected function setErrorDataToResponseIfExists($response, $curl)
|
79 |
-
{
|
80 |
-
if ($curl->getError()) {
|
81 |
-
$response->setHasError(true);
|
82 |
-
$errors = array();
|
83 |
-
$responseData = $curl->getResponse();
|
84 |
-
if ($responseData instanceof \stdClass) {
|
85 |
-
if (isset($responseData->errors) && count($responseData->errors)) {
|
86 |
-
foreach ($responseData->errors as $value) {
|
87 |
-
if (is_array($value)) {
|
88 |
-
$errors[] = implode(' ', $value);
|
89 |
-
} else {
|
90 |
-
$errors[] = $value;
|
91 |
-
}
|
92 |
-
}
|
93 |
-
}
|
94 |
-
if (isset($responseData->message)) {
|
95 |
-
$errors['message'] = $responseData->message;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
$response->setErrors($errors);
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Send Request To Service And Get Response Object
|
104 |
-
*
|
105 |
-
* @param string $url
|
106 |
-
* @param array $options
|
107 |
-
* @return mixed $result
|
108 |
-
*/
|
109 |
-
protected function sendRequest($url, $options = array())
|
110 |
-
{
|
111 |
-
$requestType = (isset($options['requestType'])) ? $options['requestType'] : 'GET';
|
112 |
-
$data = (isset($options['data'])) ? $options['data'] : null;
|
113 |
-
$returnClass = (isset($options['returnClass'])) ? $options['returnClass'] : null;
|
114 |
-
$curl = $this->getCurlObjectWithHeaders();
|
115 |
-
$result = null;
|
116 |
-
switch ($requestType) {
|
117 |
-
case 'GET':
|
118 |
-
$curl->get($url, $data);
|
119 |
-
break;
|
120 |
-
case 'POST':
|
121 |
-
$curl->post($url, $data);
|
122 |
-
break;
|
123 |
-
}
|
124 |
-
if (isset($returnClass)) {
|
125 |
-
$responseObject = new $returnClass();
|
126 |
-
$this->setErrorDataToResponseIfExists($responseObject, $curl);
|
127 |
-
if (!$responseObject->getHasError()) {
|
128 |
-
$responseData = $curl->getResponse();
|
129 |
-
$responseObject->fillData($responseData);
|
130 |
-
}
|
131 |
-
$result = $responseObject;
|
132 |
-
} else {
|
133 |
-
$result = $curl->getResponse();
|
134 |
-
}
|
135 |
-
|
136 |
-
return $result;
|
137 |
-
}
|
138 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/TaxService.php
DELETED
@@ -1,245 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part\Location\Address;
|
21 |
-
use OnePica\AvaTax16\AddressResolution\PingResponse;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Class \OnePica\AvaTax16\TaxService
|
25 |
-
*/
|
26 |
-
class TaxService extends ResourceAbstract
|
27 |
-
{
|
28 |
-
/**
|
29 |
-
* Construct
|
30 |
-
*
|
31 |
-
* @param \OnePica\AvaTax16\Config $config
|
32 |
-
* @throws \OnePica\AvaTax16\Exception
|
33 |
-
*/
|
34 |
-
public function __construct($config)
|
35 |
-
{
|
36 |
-
if (!$config->isValid()) {
|
37 |
-
throw new Exception("Not valid data in config!");
|
38 |
-
}
|
39 |
-
$this->config = $config;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Create Transaction
|
44 |
-
*
|
45 |
-
* @param string $type
|
46 |
-
* @return mixed $taxResource
|
47 |
-
*/
|
48 |
-
protected function getTaxResource($type)
|
49 |
-
{
|
50 |
-
$config = $this->getConfig();
|
51 |
-
$taxResource = null;
|
52 |
-
switch ($type) {
|
53 |
-
case 'calculation':
|
54 |
-
$taxResource = new Calculation($config);
|
55 |
-
break;
|
56 |
-
case 'transaction':
|
57 |
-
$taxResource = new Transaction($config);
|
58 |
-
break;
|
59 |
-
case 'addressResolution':
|
60 |
-
$taxResource = new AddressResolution($config);
|
61 |
-
break;
|
62 |
-
}
|
63 |
-
return $taxResource;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Create Transaction
|
68 |
-
*
|
69 |
-
* @param \OnePica\AvaTax16\Document\Request $documentRequest
|
70 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
71 |
-
*/
|
72 |
-
public function createCalculation($documentRequest)
|
73 |
-
{
|
74 |
-
$calculationResource = $this->getTaxResource('calculation');
|
75 |
-
$documentResponse = $calculationResource->createCalculation($documentRequest);
|
76 |
-
return $documentResponse;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Get Calculation
|
81 |
-
*
|
82 |
-
* @param string $transactionType
|
83 |
-
* @param string $documentCode
|
84 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
85 |
-
*/
|
86 |
-
public function getCalculation($transactionType, $documentCode)
|
87 |
-
{
|
88 |
-
$calculationResource = $this->getTaxResource('calculation');
|
89 |
-
$documentResponse = $calculationResource->getCalculation($transactionType, $documentCode);
|
90 |
-
return $documentResponse;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Get List Of Calculations
|
95 |
-
*
|
96 |
-
* @param string $transactionType
|
97 |
-
* @param int $limit
|
98 |
-
* @param string $startDate
|
99 |
-
* @param string $endDate
|
100 |
-
* @param string $startCode (not implemented)
|
101 |
-
* @return \OnePica\AvaTax16\Calculation\ListResponse $calculationListResponse
|
102 |
-
*/
|
103 |
-
public function getListOfCalculations($transactionType, $limit = null, $startDate = null, $endDate = null,
|
104 |
-
$startCode = null)
|
105 |
-
{
|
106 |
-
$calculationResource = $this->getTaxResource('calculation');
|
107 |
-
$calculationListResponse = $calculationResource->getListOfCalculations(
|
108 |
-
$transactionType, $limit, $startDate, $endDate, $startCode
|
109 |
-
);
|
110 |
-
return $calculationListResponse;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Create Transaction
|
115 |
-
*
|
116 |
-
* @param \OnePica\AvaTax16\Document\Request $documentRequest
|
117 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
118 |
-
*/
|
119 |
-
public function createTransaction($documentRequest)
|
120 |
-
{
|
121 |
-
$transactionResource = $this->getTaxResource('transaction');
|
122 |
-
$documentResponse = $transactionResource->createTransaction($documentRequest);
|
123 |
-
return $documentResponse;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Create Transaction from Calculation
|
128 |
-
*
|
129 |
-
* @param string $transactionType
|
130 |
-
* @param string $documentCode
|
131 |
-
* @param bool $recalculate
|
132 |
-
* @param string $comment
|
133 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
134 |
-
*/
|
135 |
-
public function createTransactionFromCalculation($transactionType, $documentCode, $recalculate = null,
|
136 |
-
$comment = null)
|
137 |
-
{
|
138 |
-
$transactionResource = $this->getTaxResource('transaction');
|
139 |
-
$documentResponse = $transactionResource->createTransactionFromCalculation(
|
140 |
-
$transactionType, $documentCode, $recalculate, $comment
|
141 |
-
);
|
142 |
-
return $documentResponse;
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Get Transaction
|
147 |
-
*
|
148 |
-
* @param string $transactionType
|
149 |
-
* @param string $documentCode
|
150 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
151 |
-
*/
|
152 |
-
public function getTransaction($transactionType, $documentCode)
|
153 |
-
{
|
154 |
-
$transactionResource = $this->getTaxResource('transaction');
|
155 |
-
$documentResponse = $transactionResource->getTransaction($transactionType, $documentCode);
|
156 |
-
return $documentResponse;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Get List Of Transactions
|
161 |
-
*
|
162 |
-
* @param string $transactionType
|
163 |
-
* @param int $limit
|
164 |
-
* @param string $startDate
|
165 |
-
* @param string $endDate
|
166 |
-
* @param string $startCode (not implemented)
|
167 |
-
* @return \OnePica\AvaTax16\Transaction\ListResponse $transactionListResponse
|
168 |
-
*/
|
169 |
-
public function getListOfTransactions($transactionType, $limit = null, $startDate = null, $endDate = null,
|
170 |
-
$startCode = null)
|
171 |
-
{
|
172 |
-
$transactionResource = $this->getTaxResource('transaction');
|
173 |
-
$transactionListResponse = $transactionResource->getListOfTransactions(
|
174 |
-
$transactionType, $limit, $startDate, $endDate, $startCode
|
175 |
-
);
|
176 |
-
return $transactionListResponse;
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Get Transaction Input
|
181 |
-
*
|
182 |
-
* @param string $transactionType
|
183 |
-
* @param string $documentCode
|
184 |
-
* @return \OnePica\AvaTax16\Document\Request $transactionInput
|
185 |
-
*/
|
186 |
-
public function getTransactionInput($transactionType, $documentCode)
|
187 |
-
{
|
188 |
-
$transactionResource = $this->getTaxResource('transaction');
|
189 |
-
$transactionInput = $transactionResource->getTransactionInput($transactionType, $documentCode);
|
190 |
-
return $transactionInput;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Transition Transaction State
|
195 |
-
*
|
196 |
-
* @param string $transactionType
|
197 |
-
* @param string $documentCode
|
198 |
-
* @param string $type
|
199 |
-
* @param string $comment
|
200 |
-
* @return \OnePica\AvaTax16\Transaction\TransitionTransactionStateResponse $transitionTransactionStateResponse
|
201 |
-
*/
|
202 |
-
public function transitionTransactionState($transactionType, $documentCode, $type, $comment)
|
203 |
-
{
|
204 |
-
$transactionResource = $this->getTaxResource('transaction');
|
205 |
-
$transitionTransactionStateResponse = $transactionResource->transitionTransactionState(
|
206 |
-
$transactionType, $documentCode, $type, $comment
|
207 |
-
);
|
208 |
-
return $transitionTransactionStateResponse;
|
209 |
-
}
|
210 |
-
|
211 |
-
/**
|
212 |
-
* Resolve a Single Address
|
213 |
-
*
|
214 |
-
* @param \OnePica\AvaTax16\Document\Part\Location\Address $address
|
215 |
-
* @return \OnePica\AvaTax16\AddressResolution\ResolveSingleAddressResponse $resolvedAddressResponse
|
216 |
-
*/
|
217 |
-
public function resolveSingleAddress($address)
|
218 |
-
{
|
219 |
-
$addressResolutionResource = $this->getTaxResource('addressResolution');
|
220 |
-
$resolvedAddressResponse = $addressResolutionResource->resolveSingleAddress($address);
|
221 |
-
return $resolvedAddressResponse;
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Ping
|
226 |
-
* Is used to test if service is available
|
227 |
-
*
|
228 |
-
* @return \OnePica\AvaTax16\AddressResolution\PingResponse $pingResponse
|
229 |
-
*/
|
230 |
-
public function ping()
|
231 |
-
{
|
232 |
-
// set some predefined address to ping API service
|
233 |
-
$address = new Address();
|
234 |
-
$address->setLine1('Avenue');
|
235 |
-
$address->setZipcode('10022');
|
236 |
-
$address->setCountry('USA');
|
237 |
-
$addressResolutionResource = $this->getTaxResource('addressResolution');
|
238 |
-
$resolvedAddress = $addressResolutionResource->resolveSingleAddress($address);
|
239 |
-
// set data to response object
|
240 |
-
$pingResponse = new PingResponse();
|
241 |
-
$pingResponse->setHasError($resolvedAddress->getHasError());
|
242 |
-
$pingResponse->setErrors($resolvedAddress->getErrors());
|
243 |
-
return $pingResponse;
|
244 |
-
}
|
245 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Transaction.php
DELETED
@@ -1,230 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Transaction\TransitionTransactionStateResponse;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Transaction
|
24 |
-
*/
|
25 |
-
class Transaction extends ResourceAbstract
|
26 |
-
{
|
27 |
-
/**
|
28 |
-
* Url path for calculations
|
29 |
-
*/
|
30 |
-
const CALCULATION_URL_PATH = '/calculations';
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Url path for transactions
|
34 |
-
*/
|
35 |
-
const TRANSACTION_URL_PATH = '/transactions';
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Create Transaction
|
39 |
-
*
|
40 |
-
* @param \OnePica\AvaTax16\Document\Request $documentRequest
|
41 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
42 |
-
*/
|
43 |
-
public function createTransaction($documentRequest)
|
44 |
-
{
|
45 |
-
$postUrl = $this->getConfig()->getBaseUrl() . self::TRANSACTION_URL_PATH;
|
46 |
-
$postData = $documentRequest->toArray();
|
47 |
-
$requestOptions = array(
|
48 |
-
'requestType' => 'POST',
|
49 |
-
'data' => $postData,
|
50 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Response'
|
51 |
-
);
|
52 |
-
$documentResponse = $this->sendRequest($postUrl, $requestOptions);
|
53 |
-
return $documentResponse;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Create Transaction from Calculation
|
58 |
-
*
|
59 |
-
* @param string $transactionType
|
60 |
-
* @param string $documentCode
|
61 |
-
* @param bool $recalculate
|
62 |
-
* @param string $comment
|
63 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
64 |
-
*/
|
65 |
-
public function createTransactionFromCalculation($transactionType, $documentCode, $recalculate = null,
|
66 |
-
$comment = null)
|
67 |
-
{
|
68 |
-
$config = $this->getConfig();
|
69 |
-
$postUrl = $config->getBaseUrl()
|
70 |
-
. self::CALCULATION_URL_PATH
|
71 |
-
. '/account/'
|
72 |
-
. $config->getAccountId()
|
73 |
-
. '/company/'
|
74 |
-
. $config->getCompanyCode()
|
75 |
-
. '/'
|
76 |
-
. $transactionType
|
77 |
-
. '/'
|
78 |
-
. $documentCode
|
79 |
-
. self::TRANSACTION_URL_PATH;
|
80 |
-
|
81 |
-
$postData = array(
|
82 |
-
'recalculate' => $recalculate,
|
83 |
-
'documentCode' => $documentCode,
|
84 |
-
'comment' => $comment
|
85 |
-
);
|
86 |
-
|
87 |
-
$requestOptions = array(
|
88 |
-
'requestType' => 'POST',
|
89 |
-
'data' => $postData,
|
90 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Response'
|
91 |
-
);
|
92 |
-
$documentResponse = $this->sendRequest($postUrl, $requestOptions);
|
93 |
-
return $documentResponse;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Get Transaction
|
98 |
-
*
|
99 |
-
* @param string $transactionType
|
100 |
-
* @param string $documentCode
|
101 |
-
* @return \OnePica\AvaTax16\Document\Response $documentResponse
|
102 |
-
*/
|
103 |
-
public function getTransaction($transactionType, $documentCode)
|
104 |
-
{
|
105 |
-
$config = $this->getConfig();
|
106 |
-
$getUrl = $config->getBaseUrl()
|
107 |
-
. self::TRANSACTION_URL_PATH
|
108 |
-
. '/account/'
|
109 |
-
. $config->getAccountId()
|
110 |
-
. '/company/'
|
111 |
-
. $config->getCompanyCode()
|
112 |
-
. '/'
|
113 |
-
. $transactionType
|
114 |
-
. '/'
|
115 |
-
. $documentCode;
|
116 |
-
|
117 |
-
$requestOptions = array(
|
118 |
-
'requestType' => 'GET',
|
119 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Response'
|
120 |
-
);
|
121 |
-
$documentResponse = $this->sendRequest($getUrl, $requestOptions);
|
122 |
-
return $documentResponse;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Get List Of Transactions
|
127 |
-
*
|
128 |
-
* @param string $transactionType
|
129 |
-
* @param int $limit
|
130 |
-
* @param string $startDate
|
131 |
-
* @param string $endDate
|
132 |
-
* @param string $startCode (not implemented)
|
133 |
-
* @return \OnePica\AvaTax16\Transaction\ListResponse $transactionListResponse
|
134 |
-
*/
|
135 |
-
public function getListOfTransactions($transactionType, $limit = null, $startDate = null, $endDate = null,
|
136 |
-
$startCode = null)
|
137 |
-
{
|
138 |
-
$config = $this->getConfig();
|
139 |
-
$getUrl = $config->getBaseUrl()
|
140 |
-
. self::TRANSACTION_URL_PATH
|
141 |
-
. '/account/'
|
142 |
-
. $config->getAccountId()
|
143 |
-
. '/company/'
|
144 |
-
. $config->getCompanyCode()
|
145 |
-
. '/'
|
146 |
-
. $transactionType;
|
147 |
-
|
148 |
-
$filterData = array(
|
149 |
-
'limit' => $limit,
|
150 |
-
'startDate' => $startDate,
|
151 |
-
'endDate' => $endDate,
|
152 |
-
'startCode' => $startCode,
|
153 |
-
);
|
154 |
-
|
155 |
-
$requestOptions = array(
|
156 |
-
'requestType' => 'GET',
|
157 |
-
'data' => $filterData,
|
158 |
-
'returnClass' => '\OnePica\AvaTax16\Transaction\ListResponse'
|
159 |
-
);
|
160 |
-
$transactionListResponse = $this->sendRequest($getUrl, $requestOptions);
|
161 |
-
return $transactionListResponse;
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Get Transaction Input
|
166 |
-
*
|
167 |
-
* @param string $transactionType
|
168 |
-
* @param string $documentCode
|
169 |
-
* @return \OnePica\AvaTax16\Document\Request $transactionInput
|
170 |
-
*/
|
171 |
-
public function getTransactionInput($transactionType, $documentCode)
|
172 |
-
{
|
173 |
-
$config = $this->getConfig();
|
174 |
-
$getUrl = $config->getBaseUrl()
|
175 |
-
. self::TRANSACTION_URL_PATH
|
176 |
-
. '/account/'
|
177 |
-
. $config->getAccountId()
|
178 |
-
. '/company/'
|
179 |
-
. $config->getCompanyCode()
|
180 |
-
. '/'
|
181 |
-
. $transactionType
|
182 |
-
. '/'
|
183 |
-
. $documentCode
|
184 |
-
. '/source';
|
185 |
-
|
186 |
-
$requestOptions = array(
|
187 |
-
'requestType' => 'GET',
|
188 |
-
'returnClass' => '\OnePica\AvaTax16\Document\Request'
|
189 |
-
);
|
190 |
-
$transactionInput = $this->sendRequest($getUrl, $requestOptions);
|
191 |
-
return $transactionInput;
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Transition Transaction State
|
196 |
-
*
|
197 |
-
* @param string $transactionType
|
198 |
-
* @param string $documentCode
|
199 |
-
* @param string $type
|
200 |
-
* @param string $comment
|
201 |
-
* @return \OnePica\AvaTax16\Transaction\TransitionTransactionStateResponse $transitionTransactionStateResponse
|
202 |
-
*/
|
203 |
-
public function transitionTransactionState($transactionType, $documentCode, $type, $comment)
|
204 |
-
{
|
205 |
-
$config = $this->getConfig();
|
206 |
-
$postUrl = $config->getBaseUrl()
|
207 |
-
. self::TRANSACTION_URL_PATH
|
208 |
-
. '/account/'
|
209 |
-
. $config->getAccountId()
|
210 |
-
. '/company/'
|
211 |
-
. $config->getCompanyCode()
|
212 |
-
. '/'
|
213 |
-
. $transactionType
|
214 |
-
. '/'
|
215 |
-
. $documentCode
|
216 |
-
. '/stateTransitions';
|
217 |
-
|
218 |
-
$postData = array(
|
219 |
-
'type' => $type,
|
220 |
-
'comment' => $comment
|
221 |
-
);
|
222 |
-
|
223 |
-
$curl = $this->getCurlObjectWithHeaders();
|
224 |
-
$curl->post($postUrl, $postData);
|
225 |
-
$transitionTransactionStateResponse = new TransitionTransactionStateResponse();
|
226 |
-
$this->setErrorDataToResponseIfExists($transitionTransactionStateResponse, $curl);
|
227 |
-
$transitionTransactionStateResponse->setHttpStatus($curl->getHttpStatusCode());
|
228 |
-
return $transitionTransactionStateResponse;
|
229 |
-
}
|
230 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Transaction/ListItemResponse.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Transaction;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Calculation\ListItemResponse as CalculationListItemResponse;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Transaction\ListItemResponse
|
24 |
-
*/
|
25 |
-
class ListItemResponse extends CalculationListItemResponse
|
26 |
-
{
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Transaction/ListResponse.php
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Transaction;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Transaction\ListResponse
|
24 |
-
*
|
25 |
-
* @method bool getHasError()
|
26 |
-
* @method setHasError(bool $value)
|
27 |
-
* @method array getErrors()
|
28 |
-
* @method setErrors(array $value)
|
29 |
-
* @method array getItems()
|
30 |
-
* @method setItems(array $value)
|
31 |
-
*/
|
32 |
-
class ListResponse extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Has error
|
36 |
-
*
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
protected $hasError = false;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Errors
|
43 |
-
*
|
44 |
-
* @var array
|
45 |
-
*/
|
46 |
-
protected $errors = array();
|
47 |
-
|
48 |
-
/**
|
49 |
-
* List items
|
50 |
-
*
|
51 |
-
* @var \OnePica\AvaTax16\Transaction\ListItemResponse[]
|
52 |
-
*/
|
53 |
-
protected $items;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Fill data from object
|
57 |
-
*
|
58 |
-
* @param \StdClass|array $data
|
59 |
-
* @return $this
|
60 |
-
*/
|
61 |
-
public function fillData($data)
|
62 |
-
{
|
63 |
-
$result = array();
|
64 |
-
if (is_array($data)) {
|
65 |
-
foreach ($data as $dataItem) {
|
66 |
-
$calculationListItem = new ListItemResponse();
|
67 |
-
$result[] = $calculationListItem->fillData($dataItem);
|
68 |
-
}
|
69 |
-
}
|
70 |
-
$this->setItems($result);
|
71 |
-
}
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/AvaTax16/Transaction/TransitionTransactionStateResponse.php
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
namespace OnePica\AvaTax16\Transaction;
|
19 |
-
|
20 |
-
use OnePica\AvaTax16\Document\Part;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Class \OnePica\AvaTax16\Transaction\TransitionTransactionStateResponse
|
24 |
-
*
|
25 |
-
* @method bool getHasError()
|
26 |
-
* @method setHasError(bool $value)
|
27 |
-
* @method array getErrors()
|
28 |
-
* @method setErrors(array $value)
|
29 |
-
* @method int getHttpStatus()
|
30 |
-
* @method setHttpStatus(int $value)
|
31 |
-
*/
|
32 |
-
class TransitionTransactionStateResponse extends Part
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Has error
|
36 |
-
*
|
37 |
-
* @var bool
|
38 |
-
*/
|
39 |
-
protected $hasError = false;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Errors
|
43 |
-
*
|
44 |
-
* @var array
|
45 |
-
*/
|
46 |
-
protected $errors = array();
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Http Status (code)
|
50 |
-
*
|
51 |
-
* @var int
|
52 |
-
*/
|
53 |
-
protected $httpStatus;
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/OnePica/autoload.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* OnePica
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
-
* that is bundled with this package in the file LICENSE.txt.
|
7 |
-
* It is also available through the world-wide-web at this URL:
|
8 |
-
* http://opensource.org/licenses/osl-3.0.php
|
9 |
-
* If you did not receive a copy of the license and are unable to
|
10 |
-
* obtain it through the world-wide-web, please send an email
|
11 |
-
* to codemaster@onepica.com so we can send you a copy immediately.
|
12 |
-
*
|
13 |
-
* @category OnePica
|
14 |
-
* @package OnePica_AvaTax16
|
15 |
-
* @copyright Copyright (c) 2016 One Pica, Inc. (http://www.onepica.com)
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Register autoload function
|
21 |
-
*/
|
22 |
-
spl_autoload_register(
|
23 |
-
/**
|
24 |
-
* Defines class loading search path
|
25 |
-
*
|
26 |
-
* @param string $className
|
27 |
-
*/
|
28 |
-
function ($className) {
|
29 |
-
$classPath = explode('\\', $className);
|
30 |
-
if ($classPath[0] != 'OnePica') {
|
31 |
-
return;
|
32 |
-
}
|
33 |
-
// Drop 'OnePica'
|
34 |
-
$classPath = array_slice($classPath, 1);
|
35 |
-
$filePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $classPath) . '.php';
|
36 |
-
if (file_exists($filePath)) {
|
37 |
-
require_once($filePath);
|
38 |
-
}
|
39 |
-
}
|
40 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OnePica_AvaTax</name>
|
4 |
-
<version>3.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -18,11 +18,12 @@ Released as a commercial extension, this software will not work unless you have
|
|
18 |

|
19 |

|
20 |
At One Pica (www.onepica.com), we strive to build increasingly scalable and flexible enterprise systems for all of our clients, large and small. We want to give back to this community both to promote its success and as a sign of our gratitude. Please feel free to contact us on ways we can improve this extension or extend on this framework.</description>
|
21 |
-
<notes>
|
|
|
22 |
<authors><author><name>Rostyslav Redko</name><user>marketing</user><email>avalara@onepica.com</email></author></authors>
|
23 |
-
<date>2016-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magecommunity"><dir name="OnePica"><dir name="AvaTax"><dir name="Block"><dir name="Adminhtml"><dir name="Export"><dir name="Abstract"><file name="Grid.php" hash="5f96ca490c5f7bd3fac23e30b00336e5"/></dir><dir name="Log"><file name="Grid.php" hash="3a87a71f7f51b3247a0717f0b3f8abf0"/><file name="View.php" hash="097d82a3e2b1a8820d335a63f212451b"/></dir><dir name="Queue"><file name="Grid.php" hash="1ef8ba9bf3e0870ea6dc50bb202a0b91"/></dir></dir><dir name="Notification"><file name="Toolbar.php" hash="26f7e382432289c3ff07647141cf9324"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Export.php" hash="3e019b9551b95c71f4cfd67a14d62a27"/></dir></dir></dir></dir><dir name="Tax"><dir name="Class"><dir name="Edit"><file name="Form.php" hash="0e78c592366ee2746f3891cf91a388d3"/></dir><file name="Grid.php" hash="d731eb160457b8a22cfcd28682a1c485"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="a0bdc5f63955148cf7e755c8803e01de"/></dir></dir></dir></dir></dir><file name="Exception.php" hash="fc752f8da808a402baae2425c4072d22"/><dir name="Helper"><file name="Address.php" hash="1ec273c34d78731b51e7097dfe20ccfb"/><file name="Calculation.php" hash="3a3bcbd4a33a061700c495a14afd8b3a"/><file name="Config.php" hash="b7a48f682638fca9b53e2db1460e45f4"/><file name="Data.php" hash="447fc46dcdc7ff5b97ed69125845f8a3"/><file name="Errors.php" hash="1fc34a932db296ecd1617a4e50e150d7"/><file name="Lib.php" hash="ce05e31b4aba7ba84bfc016df8c2a559"/><file name="RequestFilter.php" hash="6806cce9e1ff8ed7b821c4501ee15499"/><dir name="Tax"><file name="Data.php" hash="ce4688b06cabe61ac43993fc77a175ca"/></dir></dir><dir name="Model"><dir name="Action"><file name="Abstract.php" hash="de2bc126be0cfe69ffe6af60a8307d16"/><file name="Calculator.php" hash="3d189195c43305879bd351334a8811e9"/><file name="Creditmemo.php" hash="23639271a8fad749a3ee3a13fc8b0b27"/><file name="Invoice.php" hash="20458660bda4a277c0677b1406feb481"/><file name="Ping.php" hash="7e08308fff72493e0cb75b9244551de6"/><file name="Validator.php" hash="f31065c2e6c9c339c538c3326bbef776"/></dir><dir name="Admin"><file name="Session.php" hash="e3dc3353c7eebf4e17c22ea4039585c5"/></dir><dir name="Adminhtml"><file name="Config.php" hash="d1db594cea4853cafc049f324da7457b"/><dir name="Sales"><dir name="Order"><file name="Create.php" hash="2a1b42b629b8da1373e11860c4a2c8c0"/></dir></dir></dir><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="840c8b87acd97646572bba9bb3b8f5ea"/><file name="Sql.php" hash="0e9bedb400f411785311f78ebbf676da"/></dir><dir name="Entity"><file name="Abstract.php" hash="d38a2293452c31e92f81bf5be59c3e1c"/><file name="Log.php" hash="7788a9f5bfa13e39d98c9a9ac72508e2"/><file name="Queue.php" hash="14a97c283aa74f97982ab71160017aa3"/></dir></dir><file name="Export.php" hash="b94613b678b413d6268b07d314ba122e"/><dir name="Observer"><file name="Abstract.php" hash="4cef8e34c047b97e34ab08b0c937082c"/><file name="AdminSystemConfigChangedSectionTax.php" hash="d2d68bef7a9ef50be4c58b4498f81cb1"/><file name="CheckoutSubmitAllAfter.php" hash="4ee09c54a9098b568dac726964d782c0"/><file name="CheckoutTypeMultishippingCreateOrdersSingle.php" hash="eeaffffddd4e2ce387325dfb58381a77"/><file name="CleanLog.php" hash="4043bb0a3df982b756bfb1dfab5d56de"/><file name="ControllerActionLayoutGenerateXmlBefore.php" hash="d533cdc23c1749c87bccdb1e8fd7f947"/><file name="ControllerActionLayoutLoadBefore.php" hash="d2308911f499841ba9c449045b3e4220"/><file name="ControllerActionPostdispatchCheckoutOnepageSaveShippingMethod.php" hash="0b600e585f4b008e457995676019c2b4"/><file name="ControllerActionPredispatchAdminhtmlSalesOrderCreateLoadBlock.php" hash="07ef318adffde6bba762da8300e17324"/><file name="ControllerActionPredispatchCheckoutCartEstimatePost.php" hash="2b2cce8f619488fd795a027b80d20d2a"/><file name="ControllerActionPredispatchCheckoutMultishippingIndex.php" hash="d6d7a1d0272c51f3ec4cacbce8574da3"/><file name="ControllerActionPredispatchCheckoutOnepageIndex.php" hash="01c4280273e34a2f82ed6764792f3568"/><file name="ControllerActionPredispatchCustomerAddressFormPost.php" hash="2fbb23b935a8ebd6c8db63d8f56768ea"/><file name="LoadAvaTaxExternalLib.php" hash="0b10ed2f15ef8202362f4828fad15262"/><file name="MultishippingSetShippingItems.php" hash="b39fa0fb0579f5143d34f159048f39c3"/><file name="ProcessQueue.php" hash="35375793d039f6848e7b2af05e0eef41"/><file name="SalesModelServiceQuoteSubmitAfter.php" hash="6499cfe8e1c9176b12af58c0bce331eb"/><file name="SalesModelServiceQuoteSubmitBefore.php" hash="4e67278a1c20a969f8709237f817b6e0"/><file name="SalesOrderCreditmemoRefund.php" hash="3e9049e39b53ec06b8aa1ab274d1e00d"/><file name="SalesOrderCreditmemoSaveAfter.php" hash="a01af2f4a66912383b772be42fddbdea"/><file name="SalesOrderInvoicePay.php" hash="ac7884c312f986d123912f01346b031a"/><file name="SalesOrderInvoiceSaveAfter.php" hash="00279b77e0a3bbac120b9248d6f9223d"/><file name="SalesQuoteCollectTotalsBefore.php" hash="c0ae978e4895cec8a1b4c1ec2a3a5522"/></dir><dir name="Records"><file name="Log.php" hash="58e639c307610488a609c3aa39c38514"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="29db8163f4dda862ff822ddffd04554d"/></dir><file name="Log.php" hash="d6fb7997768b7e0f1b39363fd4de5917"/><dir name="Queue"><file name="Collection.php" hash="11bba1561c81f39695f091b94bd81560"/></dir><file name="Queue.php" hash="12ba62949dab080c6dc6ae7fcbbf4838"/></dir><dir name="Queue"><file name="Process.php" hash="2183d01eeaf07f14da0f319c1bbe5e5f"/></dir><file name="Queue.php" hash="2906b0c99e686f2e85169cbd49c8af2e"/></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Tax.php" hash="680493de15a25919bf5ddff14b8a01fb"/></dir></dir><file name="Address.php" hash="7a9717d123bba20ce14144b80d1da5da"/></dir></dir><dir name="Service"><dir name="Abstract"><file name="Config.php" hash="2b5ebe4312f82b0c13b03db2c261964f"/><file name="Tools.php" hash="0cb22ec9975f1a0a5b7b0eddf2d5111a"/></dir><file name="Abstract.php" hash="29cee53a912adeb0f682bc931972823d"/><dir name="Avatax"><file name="Abstract.php" hash="629fc49a518505a87f1548c3b29ef666"/><file name="Address.php" hash="5f6d2257e4132a436dff7cc0cc08eb67"/><file name="Config.php" hash="25198070b781c8ce632b4f3d3c3b21e0"/><file name="Estimate.php" hash="45667dd249513244eb054866457b16db"/><file name="Invoice.php" hash="9a20d14ea740751e09e2caa43dc1e22a"/><file name="Ping.php" hash="8dd09babe7e8b206564544b2ace9a661"/><file name="Tax.php" hash="3002e239f7f5a84f3377d288861cf4d2"/></dir><file name="Avatax.php" hash="b6fa49f95a3ab05546bd597689a14ed7"/><dir name="Avatax16"><file name="Abstract.php" hash="36c45dd983b7663019e7c928a7171b93"/><file name="Address.php" hash="8c09fc2da465ad3f0ac4d843ff61a793"/><file name="Config.php" hash="c38ca34431669793d6ee2a9e88d98b19"/><file name="Estimate.php" hash="7926340261d560429ff2dd42ce7c2c83"/><file name="Invoice.php" hash="a2ad0470dbae31d0d93af803dcb23524"/><file name="Ping.php" hash="8278e36dc22b1712b9d1c090ca6fead6"/><file name="Tax.php" hash="84e70803c77a23baaed89de4f2d4ea35"/></dir><file name="Avatax16.php" hash="cd3743c413edb08904781900c0064eaf"/><dir name="Exception"><file name="Address.php" hash="2519f1a2b302db97337c933d99a6d116"/><file name="Commitfailure.php" hash="7f0c5a5bf9242651d2542336d0b4cb96"/><file name="Unbalanced.php" hash="43595e010b314e8a91dd0fef4fad96c2"/></dir><dir name="Result"><file name="Address.php" hash="7a711e27f7f5e478a8a290a1880586f6"/><file name="AddressValidate.php" hash="62d14d7f4147b83001ef7f64726276c1"/><file name="Creditmemo.php" hash="8b1ac1eda1a522c70bca574b938c6359"/><file name="Invoice.php" hash="83f157b7fd24e5e6c0b51f6a162ee316"/></dir></dir><file name="Service.php" hash="7fda34c9ce1db70ae9757561d505a5b7"/><file name="Session.php" hash="429142089e75418a702e70edc56374cf"/><dir name="Source"><file name="Actions.php" hash="b5392f0820f15c3159e76ea67148992a"/><file name="Addressvalidation.php" hash="c8430082f4ae4c22c533e586e5652506"/><dir name="Avatax"><file name="Actions.php" hash="c72aa0df9013c6d5c5fddc0c4b4027b0"/><file name="Logtype.php" hash="0bdc9563eeaa30b7c4ae301a79613375"/><file name="Url.php" hash="cff45c6a590360711867112533b068d8"/></dir><dir name="Avatax16"><file name="Actions.php" hash="86b7d4067faad9478f9b61101d0fd6ae"/><file name="Buyertype.php" hash="6b029a7bbacc0eda36ed4fbb6f6e467b"/><file name="Logtype.php" hash="4e3447c8b79faf0ca20e66d9a66d29df"/><file name="Url.php" hash="ef6524ae8f04b9cc63f0f6e8ba4e63ea"/><file name="Usetype.php" hash="107c03d384fb6a8b990e4c16f49fab87"/></dir><file name="Customercodeformat.php" hash="cfcfcbaa27ed29add072324816da0c9d"/><file name="Error.php" hash="7f5495a2f295ded2d0a30f2f7108d009"/><file name="Fieldlist.php" hash="18987603d4d58130959a8ac76716ed08"/><file name="Logmode.php" hash="24d61da578a3b4adb896fea7d4d4d8ec"/><file name="Logtype.php" hash="4ec82151f66b1e265b803aca998bafb5"/><file name="Onerrorfrontend.php" hash="ef4154ae563d8157c1083f20e0adf563"/><dir name="Regionfilter"><file name="List.php" hash="d73ebe7197a2c6cfa45d52775d6f0977"/><file name="Mode.php" hash="2216d28bf9adba614025538cc62a49b6"/></dir><file name="Url.php" hash="794ec57a2b350931f70e95eb6677c253"/></dir><dir name="Tax"><file name="Calculation.php" hash="8b3ad0ace3967a13364d1475e286b70c"/><file name="Config.php" hash="f30f3801f7d94760121042a6dd85e383"/></dir><dir name="Total"><dir name="Quote"><dir name="Tax"><file name="Giftwrapping.php" hash="7b264455ac9084a751468ef6dbc36fe5"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="AvaTax"><file name="ExportController.php" hash="ead5ebea03db8f885d0ec6114dcb185c"/><file name="GridController.php" hash="5c7e822890a6feaec2db348e6c5a19e1"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="aca07ae89478c72fd1d2d41228c28b8e"/><file name="config.xml" hash="cd27e467dc1090c3545dbf13a5358891"/><file name="system-avatax16-disabled.xml" hash="b24027def3daab9000047bf7fee41c4f"/><file name="system-avatax16.xml" hash="b5a9543409521633ceec2af4d9c5d1b7"/><file name="system-disabled.xml" hash="bf89784beaef115a1408bd6fa9547b6a"/><file name="system.xml" hash="13b1bba1ba4a910d1d52a67224637ca0"/></dir><dir name="sql"><dir name="avatax_records_setup"><file name="mysql4-data-upgrade-2.2.0-2.2.1.php" hash="260d1c57754ebadba00d8ccdbb0ec996"/><file name="mysql4-install-0.1.0.php" hash="3d16899179b36bfde69609a99a2faae6"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="94d0cf2fc0e9bbe2de2829198ce3026f"/><file name="mysql4-upgrade-1.0.1-2.0.0.php" hash="905d7519328cdb1c46bba4221288c41c"/><file name="mysql4-upgrade-2.5.0.0-2.5.0.1.php" hash="4b439957397049bbe01d458fd7cfe0a2"/><file name="mysql4-upgrade-3.0.0.1-3.0.0.2.php" hash="46caa743f17221575b4a639b262a9275"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OnePica_AvaTax.xml" hash="07fd9423811b4dc084060d6131b889d7"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="onepica"><file name="avatax.xml" hash="de338ca651fcce096d089b2bbbcc1374"/></dir></dir><dir name="template"><dir name="onepica"><dir name="avatax"><dir name="log"><file name="view.phtml" hash="df14eee805bbedd484cf500dbf2335ed"/></dir><dir name="notification"><file name="toolbar.phtml" hash="fd368e043843df76ec3a74290b87dc3e"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="onepica"><file name="avatax.xml" hash="38c6ce2165f6ccfd6641eb1487faad39"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="en_US"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="es_ES"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="fr_FR"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="nl_NL"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="pt_BR"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="zh_CN"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir></target><target name="magelib"><dir name="AvaTax"><file name="AvaTax.php" hash="4d841acee4dab29ff39317cea6858e0d"/><dir name="classes"><file name="ATConfig.class.php" hash="4bc7673d3d65e38a2d80b1884e27f301"/><file name="ATObject.class.php" hash="83359fd7639c98449836dc11d08c899d"/><file name="AccountServiceSoap.class.php" hash="7049f00dfb40529e2cf7447f0cd5461e"/><file name="Address.class.php" hash="68bf4fe1306a60e672b7345a0dc7fcc6"/><file name="AddressServiceSoap.class.php" hash="c59bf4a586da207611f7bace4f08c880"/><file name="AddressType.class.php" hash="62c9ff3c533aaf5ad1fd4de95702be40"/><file name="AdjustTaxRequest.class.php" hash="47dbfa8044ca893bf214d8e71ab4864e"/><file name="AdjustTaxResult.class.php" hash="cf63aa5b7c3b52b3ec86695c4cdf0fcc"/><file name="ApplyPaymentRequest.class.php" hash="69d69dff63cbd284d8aea62247142692"/><file name="ApplyPaymentResult.class.php" hash="0e37bda0f1221c2ed2432717a2d8cc08"/><dir name="AvaCert2Svc"><file name="AvaCert2Soap.class.php" hash="0567793d9e4e496b45c3e8a0459f944a"/><file name="Certificate.class.php" hash="dd3f0dd2a2b03c97552f9dbd5c6463ba"/><file name="CertificateGetRequest.class.php" hash="4c11fd111cab99fa4dbc2c2250e0f3ad"/><file name="CertificateGetResult.class.php" hash="6a95a06e71bd13839c6142bba08bfba5"/><file name="CertificateImageGetRequest.class.php" hash="32f61011abe3d1c74ea7fc209e3e4224"/><file name="CertificateImageGetResult.class.php" hash="beda0f1fd54951b84b7dd77ead92bda3"/><file name="CertificateJurisdiction.class.php" hash="e666d572fb34d17fcd91127a50616195"/><file name="CertificateRequest.class.php" hash="7b76dc3675e507975ae6cf01abfa6059"/><file name="CertificateRequestGetRequest.class.php" hash="0cf2fafae88f795a754d75291947cb56"/><file name="CertificateRequestGetResult.class.php" hash="eceffe3acec787506649669b1b5edcf7"/><file name="CertificateRequestInitiateRequest.class.php" hash="148a5c4c881c885be863f403582b4974"/><file name="CertificateRequestInitiateResult.class.php" hash="a7a55cb398cd2fb9f0e11b8c6b09498d"/><file name="CertificateRequestStage.class.php" hash="92dec7da28f83f1a419d9573e6cec1fa"/><file name="CertificateRequestStatus.class.php" hash="a5d5c1629ce4f5ee0c18a8924204ca22"/><file name="CertificateStatus.class.php" hash="6ae43ab57ae9df37d07ac4203270c25e"/><file name="CertificateUsage.class.php" hash="bad34570daa7679b267f1288bf0a371f"/><file name="CommunicationMode.class.php" hash="71d2743c1d2afffe11d2903e89ff9c0e"/><file name="Customer.class.php" hash="e9f13f38f75cb4e1b845c55e6f26a5ab"/><file name="CustomerSaveRequest.class.php" hash="58ff71b04bb3a308b7f0199c6fae1e56"/><file name="CustomerSaveResult.class.php" hash="98cf79bdb7c0558963670b21e66b7d85"/><file name="FormatType.class.php" hash="714d183d3d365a07ef606d1211c732b0"/><file name="RequestType.class.php" hash="6144c2731baaf67400ea34e50440c1df"/><file name="ReviewStatus.class.php" hash="0dd208ecbf6b45196f51f304b1d48b03"/></dir><file name="AvalaraSoapClient.class.php" hash="dd605cefabb4396ef1b46b6d23b439b5"/><file name="BaseResult.class.php" hash="b672ec2ce2c6b5cf5cce7ce733aff482"/><dir name="BatchSvc"><file name="AuditMessage.class.php" hash="798d8169506357af02e6912b4bca9148"/><file name="AvaTaxBatchSvc.php" hash="8d65fd4a02cd4fc1104aa9c24b35e4fb"/><file name="BaseResult.class.php" hash="727ef623b821e95a73cf6d1eda891379"/><file name="Batch.class.php" hash="c028822bcf2a4f1fae6fc7dca76f247a"/><file name="BatchDelete.class.php" hash="0bcff09309ccad969d65c2d27fa63dda"/><file name="BatchDeleteResponse.class.php" hash="46afd464673459efb54ccaf509d37eef"/><file name="BatchFetch.class.php" hash="74f96ecc3c2df87271d60c4c969e43f8"/><file name="BatchFetchResponse.class.php" hash="b2acf63deea2c0fd374f80745b60fef5"/><file name="BatchFetchResult.class.php" hash="83d8de067f4bd59acafe4cd065f90163"/><file name="BatchFile.class.php" hash="65cee20383c8040fac1d4c45bbe757dd"/><file name="BatchFileDelete.class.php" hash="01d0bc10cb0ada43a9a00ca0efffef17"/><file name="BatchFileDeleteResponse.class.php" hash="b4e7881d26b7071303650973144f418b"/><file name="BatchFileFetch.class.php" hash="c5e91b8073fb756545d0f74803fdf3d6"/><file name="BatchFileFetchResponse.class.php" hash="c37ce819a975cdae5e7a82432b4b2334"/><file name="BatchFileFetchResult.class.php" hash="6bc54523d34356a83cdc4ecd2f696ea5"/><file name="BatchFileSave.class.php" hash="8434b0ffdd1fba4991535248ee3d618e"/><file name="BatchFileSaveResponse.class.php" hash="d52f79b42467b59f2177359f8a73cd3a"/><file name="BatchFileSaveResult.class.php" hash="19d3a2f20ccc42e80759b280842cf03c"/><file name="BatchProcess.class.php" hash="44d9efe13d01fce15bd444e5729b320c"/><file name="BatchProcessRequest.class.php" hash="04684b987c6d77319cc6881941091de9"/><file name="BatchProcessResponse.class.php" hash="c22b08c125eefc4006495c55984ed91e"/><file name="BatchProcessResult.class.php" hash="f9cac2270aafae49fc0892ea729c3713"/><file name="BatchSave.class.php" hash="d3a397348b905d49a0c91be780f3ec04"/><file name="BatchSaveResponse.class.php" hash="4c3088b85590fd697b5686aa1dddd89e"/><file name="BatchSaveResult.class.php" hash="7ea7fe3dc7d580711f6b52d991c43dce"/><file name="BatchSvc.class.php" hash="fa903f70b06d1e3b86384f2b6fb60616"/><file name="DeleteRequest.class.php" hash="43f945ef1e59ef02494df6df6ec3d1b6"/><file name="DeleteResult.class.php" hash="f7d64582f1182ae0337d6d84a5f60e8d"/><file name="FetchRequest.class.php" hash="7271317a8909672261ea0e00867e810b"/><file name="FilterRequest.class.php" hash="3c1eaec68f84531931a3cd6143533576"/><file name="FilterResult.class.php" hash="f4c0eeac0153b735ec589fcff7accd86"/><file name="IsAuthorized.class.php" hash="8339a2b249d954efaaf64f10665976fc"/><file name="IsAuthorizedResponse.class.php" hash="613c91f36370dc38ca07b83a29f2a45f"/><file name="IsAuthorizedResult.class.php" hash="65f9665508a5e7f33e4aee2835a9806e"/><file name="Message.class.php" hash="576327c8d9cd74bd96d9ccd62a2daa5b"/><file name="Ping.class.php" hash="3a2246f5557a5279fa260c65b36a9b44"/><file name="PingResponse.class.php" hash="b9f5e8b43382ee605d93768db8af1805"/><file name="PingResult.class.php" hash="2e05acfe74aad28003ad7d8ed102c3c6"/><file name="Profile.class.php" hash="a16a4819018dd8510ddab8feb9ee0f7e"/><file name="SeverityLevel.class.php" hash="5736530f3b5fd0cd932c783418563647"/></dir><file name="BoundaryLevel.class.php" hash="e9c2f2e3173e44fa8351f2a6dbb578fe"/><file name="CancelCode.class.php" hash="fd0b8ad2865e8fcf622b1faafc677527"/><file name="CancelTaxRequest.class.php" hash="08a114e32ec9eda9268ec337f79cb86f"/><file name="CancelTaxResult.class.php" hash="687be65bab85e6c6e8f99764c0475d9b"/><file name="CommitTaxRequest.class.php" hash="66ef55bc094d233b75e36b029995aed7"/><file name="CommitTaxResult.class.php" hash="ef90276817207e63e4e96ea518618f50"/><file name="DetailLevel.class.php" hash="2439f7137a4f9f52e28a6b321c4bcf16"/><file name="DocStatus.class.php" hash="9e3384a0f2ace05fa67fe05eba295fcd"/><file name="DocumentType.class.php" hash="0578e29121cb747e1e80a269eedd4b5a"/><file name="DynamicSoapClient.class.php" hash="5bb36f2d4db3955ae059488eb9511ca9"/><file name="Enum.class.php" hash="d3ff4c898aff49f3c425042433826257"/><file name="GetTaxHistoryRequest.class.php" hash="3ed4c54de1e015f476ce7aa58c802468"/><file name="GetTaxHistoryResult.class.php" hash="7e8209e1f64df52b538927312b1bd934"/><file name="GetTaxRequest.class.php" hash="7267cb5676ecbcbbb0b73c587b082b57"/><file name="GetTaxResult.class.php" hash="7e2b7415a018fd76b62ab49637833533"/><file name="IsAuthorizedResult.class.php" hash="58164457677a61e93309f788fe61dc0c"/><file name="JurisdictionType.class.php" hash="a345fe5db379af87a6f7ec833ff86586"/><file name="Line.class.php" hash="7fefbd0230ee2fe8a8e6468abf338b80"/><file name="Message.class.php" hash="073be6cbcccacf2d1d55a04c045eab63"/><file name="PingResult.class.php" hash="18f88589588f08b619488c926cf5547c"/><file name="PostTaxRequest.class.php" hash="be8ea4ee2fddb10b62cb1be7e38179e3"/><file name="PostTaxResult.class.php" hash="bf2ee0b1293301ee00ac9b8b8390e780"/><file name="ReconcileTaxHistoryRequest.class.php" hash="41f2cfe04495612a9c293b1bc19220ce"/><file name="ReconcileTaxHistoryResult.class.php" hash="dd20684e0e017f56c98e29297180a0d7"/><file name="SearchTaxHistoryResult.class.php" hash="e3171e00482f7c2c0ed9753ffd05cd14"/><file name="ServiceMode.class.php" hash="0c66b3e25f4466461cebf32735e207e0"/><file name="SeverityLevel.class.php" hash="68fc81e651fe7f01c81b43b0d28ff0dc"/><file name="TaxDetail.class.php" hash="56065f8ea68505152b23e41238b80dfb"/><file name="TaxLine.class.php" hash="05376f01ad9a14f438ad0f1d5d423b61"/><file name="TaxOverride.class.php" hash="94d28efa3cdf58a87ba45a313ce93fc7"/><file name="TaxOverrideType.class.php" hash="d23f90c9ac639954c8fcee57ba763b21"/><file name="TaxRequest.class.php" hash="7339016da0c3cbe51843767987e7fbed"/><file name="TaxServiceSoap.class.php" hash="bc7e4eb0e66dd1bd956e19e0da337171"/><file name="TaxType.class.php" hash="ee87ecc8721076f0cda67fe1cc5b0db7"/><file name="TextCase.class.php" hash="8fb2eccc49eacdc1a4f5624c0716a750"/><file name="ValidAddress.class.php" hash="2f8eebcd379208198cd38632f1e34b0a"/><file name="ValidateRequest.class.php" hash="98faedd50b2f4ea7ffb9d53ab1ca116c"/><file name="ValidateResult.class.php" hash="23de6a26defed9324ddcdcedfd2228bf"/><dir name="wsdl"><file name="Account.wsdl" hash="1635751a852ff5c036e4522381101680"/><file name="Address.wsdl" hash="0650cb8f516bec67e57eb7fa05ee6433"/><file name="AvaCert2Svc.wsdl" hash="9ca666be9851884f3e7fc9e28dc08f4a"/><file name="AvaCertSvc.wsdl" hash="7fb2b12cfe320462cf094225454f0d6c"/><file name="BatchSvc.wsdl" hash="639d2913500639145d95ee8e1166e08f"/><file name="Tax.wsdl" hash="76e1ff6c041d12da77a4632f376422ed"/></dir></dir><file name="functions.php" hash="57734d162b59cbc65933d25bf3950270"/></dir><dir name="OnePica"><dir name="AvaTax16"><dir name="AddressResolution"><file name="PingResponse.php" hash="73f035170b3fb2f2303653844d3f6b81"/><file name="ResolveSingleAddressResponse.php" hash="ed0976dc43e85bf18b265ac8fc7e2d4c"/><file name="TaxAuthority.php" hash="619e31874cfda8986720e94adcfbd8f4"/></dir><file name="AddressResolution.php" hash="3b398405387bc9b4a0c7883a1972a307"/><dir name="Calculation"><dir name="ListItemResponse"><dir name="CalculatedTaxSummary"><dir name="TaxByType"><file name="Details.php" hash="831aeafef333d3dcaabcd15078040de5"/></dir><file name="TaxByType.php" hash="b062bad211363fd17a988d32934a4e8f"/></dir><file name="CalculatedTaxSummary.php" hash="b12b78a8b334f558f4606a4460fd0639"/><file name="Header.php" hash="d59a553c91083727059af1d622fb46d9"/><file name="Line.php" hash="e4f025fed9c713040e25b3f5c4ada936"/><file name="ProcessingInfo.php" hash="96c5e66f6a1f65ccb9ceb382f1ba3993"/></dir><file name="ListItemResponse.php" hash="7f39a379433f944686e2391a2e44a226"/><file name="ListResponse.php" hash="7e9ecdd7acab4685c5cb4d416ad81dde"/></dir><file name="Calculation.php" hash="7e9b351755676a9aa75f7c06a41c1424"/><file name="Config.php" hash="36f6fdb01fd971760a171316144fd461"/><dir name="Document"><dir name="Part"><dir name="Feedback"><file name="LatencyData.php" hash="0295f43209017929b9c6ff6223e01d2b"/></dir><file name="Feedback.php" hash="40a0014f1841c32346648ff64a3a5380"/><dir name="Location"><file name="Address.php" hash="f7f7885366aab408f8f4b1556c68f244"/><file name="LatLong.php" hash="f146759ae37f44ab90f89f5caec7a27d"/></dir><file name="Location.php" hash="a3d811387c97eed65fc36d5413eb2026"/></dir><file name="Part.php" hash="26cc047abd30b891d5baaab2232bea4c"/><dir name="Request"><file name="Header.php" hash="a2f1f0f9e6e9dfd49d0ab9c5b7e0211a"/><file name="Line.php" hash="04d282e9fe8664f0e583e2d0009d0d6d"/></dir><file name="Request.php" hash="d397cea51071a9dee0684da25315e36d"/><dir name="Response"><dir name="CalculatedTaxSummary"><dir name="TaxByType"><file name="Details.php" hash="d8492812287542935be8f085282ec88d"/></dir><file name="TaxByType.php" hash="f0a2f375cf590b87a21ceba6680d07cc"/></dir><file name="CalculatedTaxSummary.php" hash="c2d9ae6142c5aa6f42445eb053dc4aaa"/><file name="Header.php" hash="1dc15ca01877b770386d931c1cd190d3"/><dir name="Line"><dir name="CalculatedTax"><file name="Details.php" hash="61bf6d08bb30810fb766e102aae9ce06"/><file name="TaxByType.php" hash="bc89074b210dd6d90da2f477184f5bfe"/></dir><file name="CalculatedTax.php" hash="3e31527423d45052f34ac723c5c96916"/></dir><file name="Line.php" hash="6c5793d08cad8ed168d440ba8f2ccfa3"/><file name="ProcessingInfo.php" hash="3f5364a445ec054b93d74d1f2711e008"/></dir><file name="Response.php" hash="31832930dbb407f67bfa7387fea62084"/></dir><file name="Exception.php" hash="667fd0125f682cd30285dbef1c96729f"/><dir name="IO"><file name="CaseInsensitiveArray.php" hash="5571dca95bbf848a5f9486f738858324"/><file name="Curl.php" hash="ba10290f1de032ce2653161161626c01"/></dir><file name="ResourceAbstract.php" hash="641ade4b2a28aa342fc1070154f7ac22"/><file name="TaxService.php" hash="89906a6e7b29e010213f51e971440341"/><dir name="Transaction"><file name="ListItemResponse.php" hash="ba3b3099ca84f60c1bb4cb20ec7be665"/><file name="ListResponse.php" hash="860b86f6c937ad9171cc30390eec0c28"/><file name="TransitionTransactionStateResponse.php" hash="5e7478e0db1ca655c9c8516d536240d0"/></dir><file name="Transaction.php" hash="b498543d584fc5c458015113e61f614d"/></dir><file name="autoload.php" hash="0817cd303e31b20b5d8881e2824df0cc"/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.3</min><max>6.0.0</max></php><extension><name>Core</name><min/><max/></extension><extension><name>curl</name><min/><max/></extension><extension><name>soap</name><min/><max/></extension></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OnePica_AvaTax</name>
|
4 |
+
<version>3.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
18 |

|
19 |

|
20 |
At One Pica (www.onepica.com), we strive to build increasingly scalable and flexible enterprise systems for all of our clients, large and small. We want to give back to this community both to promote its success and as a sign of our gratitude. Please feel free to contact us on ways we can improve this extension or extend on this framework.</description>
|
21 |
+
<notes>Implemented custom customer attribute for customerCode
|
22 |
+
Implemented possability to change queue items with status failed to pending</notes>
|
23 |
<authors><author><name>Rostyslav Redko</name><user>marketing</user><email>avalara@onepica.com</email></author></authors>
|
24 |
+
<date>2016-09-09</date>
|
25 |
+
<time>09:45:34</time>
|
26 |
+
<contents><target name="magecommunity"><dir name="OnePica"><dir name="AvaTax"><dir name="Block"><dir name="Adminhtml"><dir name="Export"><dir name="Abstract"><file name="Grid.php" hash="5f96ca490c5f7bd3fac23e30b00336e5"/></dir><dir name="Log"><file name="Grid.php" hash="3a87a71f7f51b3247a0717f0b3f8abf0"/><file name="View.php" hash="097d82a3e2b1a8820d335a63f212451b"/></dir><dir name="Queue"><file name="Grid.php" hash="de0f2c029cdc363fb0fe8200505e1824"/></dir></dir><dir name="Notification"><file name="Toolbar.php" hash="26f7e382432289c3ff07647141cf9324"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Export.php" hash="3e019b9551b95c71f4cfd67a14d62a27"/></dir></dir></dir></dir><dir name="Tax"><dir name="Class"><dir name="Edit"><file name="Form.php" hash="0e78c592366ee2746f3891cf91a388d3"/></dir><file name="Grid.php" hash="d731eb160457b8a22cfcd28682a1c485"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="a0bdc5f63955148cf7e755c8803e01de"/></dir></dir></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="QueueAction.php" hash="69b1820f086c567512a5882ebc8e561d"/></dir></dir></dir></dir></dir><file name="Exception.php" hash="fc752f8da808a402baae2425c4072d22"/><dir name="Helper"><file name="Address.php" hash="1ec273c34d78731b51e7097dfe20ccfb"/><file name="Calculation.php" hash="17b4a371ee3a8c86cf5479f2ce8a485c"/><file name="Config.php" hash="1eab288b2ea30d1b06c7f1ec561493b0"/><file name="Data.php" hash="447fc46dcdc7ff5b97ed69125845f8a3"/><file name="Errors.php" hash="1fc34a932db296ecd1617a4e50e150d7"/><file name="Lib.php" hash="ce05e31b4aba7ba84bfc016df8c2a559"/><file name="RequestFilter.php" hash="6806cce9e1ff8ed7b821c4501ee15499"/><dir name="Tax"><file name="Data.php" hash="ce4688b06cabe61ac43993fc77a175ca"/></dir></dir><dir name="Model"><dir name="Action"><file name="Abstract.php" hash="de2bc126be0cfe69ffe6af60a8307d16"/><file name="Calculator.php" hash="3d189195c43305879bd351334a8811e9"/><file name="Creditmemo.php" hash="23639271a8fad749a3ee3a13fc8b0b27"/><file name="Invoice.php" hash="20458660bda4a277c0677b1406feb481"/><file name="Ping.php" hash="7e08308fff72493e0cb75b9244551de6"/><file name="Validator.php" hash="f31065c2e6c9c339c538c3326bbef776"/></dir><dir name="Admin"><file name="Session.php" hash="e3dc3353c7eebf4e17c22ea4039585c5"/></dir><dir name="Adminhtml"><file name="Config.php" hash="d1db594cea4853cafc049f324da7457b"/><dir name="Sales"><dir name="Order"><file name="Create.php" hash="2a1b42b629b8da1373e11860c4a2c8c0"/></dir></dir></dir><dir name="Config"><dir name="Backend"><file name="CustomerCodeFormatAttribute.php" hash="db5dd9825eb114f84c0c1a1f7609f8fb"/></dir></dir><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="840c8b87acd97646572bba9bb3b8f5ea"/><file name="Sql.php" hash="0e9bedb400f411785311f78ebbf676da"/></dir><dir name="Entity"><file name="Abstract.php" hash="d38a2293452c31e92f81bf5be59c3e1c"/><file name="Log.php" hash="7788a9f5bfa13e39d98c9a9ac72508e2"/><file name="Queue.php" hash="14a97c283aa74f97982ab71160017aa3"/></dir></dir><file name="Export.php" hash="b94613b678b413d6268b07d314ba122e"/><dir name="Observer"><file name="Abstract.php" hash="4cef8e34c047b97e34ab08b0c937082c"/><file name="AdminSystemConfigChangedSectionTax.php" hash="d2d68bef7a9ef50be4c58b4498f81cb1"/><file name="CheckoutSubmitAllAfter.php" hash="4ee09c54a9098b568dac726964d782c0"/><file name="CheckoutTypeMultishippingCreateOrdersSingle.php" hash="eeaffffddd4e2ce387325dfb58381a77"/><file name="CleanLog.php" hash="4043bb0a3df982b756bfb1dfab5d56de"/><file name="ControllerActionLayoutGenerateXmlBefore.php" hash="d533cdc23c1749c87bccdb1e8fd7f947"/><file name="ControllerActionLayoutLoadBefore.php" hash="d2308911f499841ba9c449045b3e4220"/><file name="ControllerActionPostdispatchCheckoutOnepageSaveShippingMethod.php" hash="0b600e585f4b008e457995676019c2b4"/><file name="ControllerActionPredispatchAdminhtmlSalesOrderCreateLoadBlock.php" hash="07ef318adffde6bba762da8300e17324"/><file name="ControllerActionPredispatchCheckoutCartEstimatePost.php" hash="2b2cce8f619488fd795a027b80d20d2a"/><file name="ControllerActionPredispatchCheckoutMultishippingIndex.php" hash="d6d7a1d0272c51f3ec4cacbce8574da3"/><file name="ControllerActionPredispatchCheckoutOnepageIndex.php" hash="01c4280273e34a2f82ed6764792f3568"/><file name="ControllerActionPredispatchCustomerAddressFormPost.php" hash="2fbb23b935a8ebd6c8db63d8f56768ea"/><file name="LoadAvaTaxExternalLib.php" hash="0b10ed2f15ef8202362f4828fad15262"/><file name="MultishippingSetShippingItems.php" hash="b39fa0fb0579f5143d34f159048f39c3"/><file name="ProcessQueue.php" hash="35375793d039f6848e7b2af05e0eef41"/><file name="SalesModelServiceQuoteSubmitAfter.php" hash="6499cfe8e1c9176b12af58c0bce331eb"/><file name="SalesModelServiceQuoteSubmitBefore.php" hash="4e67278a1c20a969f8709237f817b6e0"/><file name="SalesOrderCreditmemoRefund.php" hash="3e9049e39b53ec06b8aa1ab274d1e00d"/><file name="SalesOrderCreditmemoSaveAfter.php" hash="a01af2f4a66912383b772be42fddbdea"/><file name="SalesOrderInvoicePay.php" hash="ac7884c312f986d123912f01346b031a"/><file name="SalesOrderInvoiceSaveAfter.php" hash="00279b77e0a3bbac120b9248d6f9223d"/><file name="SalesQuoteCollectTotalsBefore.php" hash="c0ae978e4895cec8a1b4c1ec2a3a5522"/></dir><dir name="Records"><file name="Log.php" hash="58e639c307610488a609c3aa39c38514"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="29db8163f4dda862ff822ddffd04554d"/></dir><file name="Log.php" hash="d6fb7997768b7e0f1b39363fd4de5917"/><dir name="Queue"><file name="Collection.php" hash="11bba1561c81f39695f091b94bd81560"/></dir><file name="Queue.php" hash="12ba62949dab080c6dc6ae7fcbbf4838"/></dir><dir name="Queue"><file name="Process.php" hash="2183d01eeaf07f14da0f319c1bbe5e5f"/></dir><file name="Queue.php" hash="2906b0c99e686f2e85169cbd49c8af2e"/></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Tax.php" hash="680493de15a25919bf5ddff14b8a01fb"/></dir></dir><file name="Address.php" hash="7a9717d123bba20ce14144b80d1da5da"/></dir></dir><dir name="Service"><dir name="Abstract"><file name="Config.php" hash="2b5ebe4312f82b0c13b03db2c261964f"/><file name="Tools.php" hash="0cb22ec9975f1a0a5b7b0eddf2d5111a"/></dir><file name="Abstract.php" hash="29cee53a912adeb0f682bc931972823d"/><dir name="Avatax"><file name="Abstract.php" hash="629fc49a518505a87f1548c3b29ef666"/><file name="Address.php" hash="5f6d2257e4132a436dff7cc0cc08eb67"/><file name="Config.php" hash="25198070b781c8ce632b4f3d3c3b21e0"/><file name="Estimate.php" hash="45667dd249513244eb054866457b16db"/><file name="Invoice.php" hash="9a20d14ea740751e09e2caa43dc1e22a"/><file name="Ping.php" hash="8dd09babe7e8b206564544b2ace9a661"/><file name="Tax.php" hash="3002e239f7f5a84f3377d288861cf4d2"/></dir><file name="Avatax.php" hash="b6fa49f95a3ab05546bd597689a14ed7"/><dir name="Avatax16"><file name="Abstract.php" hash="36c45dd983b7663019e7c928a7171b93"/><file name="Address.php" hash="8c09fc2da465ad3f0ac4d843ff61a793"/><file name="Config.php" hash="c38ca34431669793d6ee2a9e88d98b19"/><file name="Estimate.php" hash="7926340261d560429ff2dd42ce7c2c83"/><file name="Invoice.php" hash="a2ad0470dbae31d0d93af803dcb23524"/><file name="Ping.php" hash="8278e36dc22b1712b9d1c090ca6fead6"/><file name="Tax.php" hash="84e70803c77a23baaed89de4f2d4ea35"/></dir><file name="Avatax16.php" hash="cd3743c413edb08904781900c0064eaf"/><dir name="Exception"><file name="Address.php" hash="2519f1a2b302db97337c933d99a6d116"/><file name="Commitfailure.php" hash="7f0c5a5bf9242651d2542336d0b4cb96"/><file name="Unbalanced.php" hash="43595e010b314e8a91dd0fef4fad96c2"/></dir><dir name="Result"><file name="Address.php" hash="7a711e27f7f5e478a8a290a1880586f6"/><file name="AddressValidate.php" hash="62d14d7f4147b83001ef7f64726276c1"/><file name="Creditmemo.php" hash="8b1ac1eda1a522c70bca574b938c6359"/><file name="Invoice.php" hash="83f157b7fd24e5e6c0b51f6a162ee316"/></dir></dir><file name="Service.php" hash="7fda34c9ce1db70ae9757561d505a5b7"/><file name="Session.php" hash="429142089e75418a702e70edc56374cf"/><dir name="Source"><file name="Actions.php" hash="b5392f0820f15c3159e76ea67148992a"/><file name="Addressvalidation.php" hash="c8430082f4ae4c22c533e586e5652506"/><dir name="Avatax"><file name="Actions.php" hash="c72aa0df9013c6d5c5fddc0c4b4027b0"/><file name="Logtype.php" hash="0bdc9563eeaa30b7c4ae301a79613375"/><file name="Url.php" hash="cff45c6a590360711867112533b068d8"/></dir><dir name="Avatax16"><file name="Actions.php" hash="86b7d4067faad9478f9b61101d0fd6ae"/><file name="Buyertype.php" hash="6b029a7bbacc0eda36ed4fbb6f6e467b"/><file name="Logtype.php" hash="4e3447c8b79faf0ca20e66d9a66d29df"/><file name="Url.php" hash="ef6524ae8f04b9cc63f0f6e8ba4e63ea"/><file name="Usetype.php" hash="107c03d384fb6a8b990e4c16f49fab87"/></dir><file name="Customercodeformat.php" hash="887c5653afc300c6a3b41b5c8462f84b"/><file name="Error.php" hash="7f5495a2f295ded2d0a30f2f7108d009"/><file name="Fieldlist.php" hash="18987603d4d58130959a8ac76716ed08"/><file name="Logmode.php" hash="24d61da578a3b4adb896fea7d4d4d8ec"/><file name="Logtype.php" hash="4ec82151f66b1e265b803aca998bafb5"/><file name="Onerrorfrontend.php" hash="ef4154ae563d8157c1083f20e0adf563"/><dir name="Regionfilter"><file name="List.php" hash="d73ebe7197a2c6cfa45d52775d6f0977"/><file name="Mode.php" hash="2216d28bf9adba614025538cc62a49b6"/></dir><file name="Url.php" hash="794ec57a2b350931f70e95eb6677c253"/></dir><dir name="Tax"><file name="Calculation.php" hash="8b3ad0ace3967a13364d1475e286b70c"/><file name="Config.php" hash="f30f3801f7d94760121042a6dd85e383"/></dir><dir name="Total"><dir name="Quote"><dir name="Tax"><file name="Giftwrapping.php" hash="7b264455ac9084a751468ef6dbc36fe5"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="AvaTax"><file name="ExportController.php" hash="ead5ebea03db8f885d0ec6114dcb185c"/><file name="GridController.php" hash="f8787bfc9d82c55e0a416643c3dc378b"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="aca07ae89478c72fd1d2d41228c28b8e"/><file name="config.xml" hash="a40eae9605a32ae90fdbf7683351b363"/><file name="system-avatax16-disabled.xml" hash="b24027def3daab9000047bf7fee41c4f"/><file name="system-avatax16.xml" hash="b5a9543409521633ceec2af4d9c5d1b7"/><file name="system-disabled.xml" hash="bf89784beaef115a1408bd6fa9547b6a"/><file name="system.xml" hash="7d392023488703b72455d8d3b3fdd894"/></dir><dir name="sql"><dir name="avatax_records_setup"><file name="mysql4-data-upgrade-2.2.0-2.2.1.php" hash="260d1c57754ebadba00d8ccdbb0ec996"/><file name="mysql4-install-0.1.0.php" hash="3d16899179b36bfde69609a99a2faae6"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="94d0cf2fc0e9bbe2de2829198ce3026f"/><file name="mysql4-upgrade-1.0.1-2.0.0.php" hash="905d7519328cdb1c46bba4221288c41c"/><file name="mysql4-upgrade-2.5.0.0-2.5.0.1.php" hash="4b439957397049bbe01d458fd7cfe0a2"/><file name="mysql4-upgrade-3.0.0.1-3.0.0.2.php" hash="46caa743f17221575b4a639b262a9275"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="OnePica_AvaTax.xml" hash="07fd9423811b4dc084060d6131b889d7"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="onepica"><file name="avatax.xml" hash="de338ca651fcce096d089b2bbbcc1374"/></dir></dir><dir name="template"><dir name="onepica"><dir name="avatax"><dir name="log"><file name="view.phtml" hash="df14eee805bbedd484cf500dbf2335ed"/></dir><dir name="notification"><file name="toolbar.phtml" hash="fd368e043843df76ec3a74290b87dc3e"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="onepica"><file name="avatax.xml" hash="38c6ce2165f6ccfd6641eb1487faad39"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="en_US"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="es_ES"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="fr_FR"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="nl_NL"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="pt_BR"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir><dir name="zh_CN"><file name="OnePica_AvaTax.csv" hash="43d2dee74aee6f15abd471a65b4f407c"/></dir></target><target name="magelib"><dir name="AvaTax"><file name="AvaTax.php" hash="4d841acee4dab29ff39317cea6858e0d"/><dir name="classes"><file name="ATConfig.class.php" hash="4bc7673d3d65e38a2d80b1884e27f301"/><file name="ATObject.class.php" hash="83359fd7639c98449836dc11d08c899d"/><file name="AccountServiceSoap.class.php" hash="7049f00dfb40529e2cf7447f0cd5461e"/><file name="Address.class.php" hash="68bf4fe1306a60e672b7345a0dc7fcc6"/><file name="AddressServiceSoap.class.php" hash="c59bf4a586da207611f7bace4f08c880"/><file name="AddressType.class.php" hash="62c9ff3c533aaf5ad1fd4de95702be40"/><file name="AdjustTaxRequest.class.php" hash="47dbfa8044ca893bf214d8e71ab4864e"/><file name="AdjustTaxResult.class.php" hash="cf63aa5b7c3b52b3ec86695c4cdf0fcc"/><file name="ApplyPaymentRequest.class.php" hash="69d69dff63cbd284d8aea62247142692"/><file name="ApplyPaymentResult.class.php" hash="0e37bda0f1221c2ed2432717a2d8cc08"/><dir name="AvaCert2Svc"><file name="AvaCert2Soap.class.php" hash="0567793d9e4e496b45c3e8a0459f944a"/><file name="Certificate.class.php" hash="dd3f0dd2a2b03c97552f9dbd5c6463ba"/><file name="CertificateGetRequest.class.php" hash="4c11fd111cab99fa4dbc2c2250e0f3ad"/><file name="CertificateGetResult.class.php" hash="6a95a06e71bd13839c6142bba08bfba5"/><file name="CertificateImageGetRequest.class.php" hash="32f61011abe3d1c74ea7fc209e3e4224"/><file name="CertificateImageGetResult.class.php" hash="beda0f1fd54951b84b7dd77ead92bda3"/><file name="CertificateJurisdiction.class.php" hash="e666d572fb34d17fcd91127a50616195"/><file name="CertificateRequest.class.php" hash="7b76dc3675e507975ae6cf01abfa6059"/><file name="CertificateRequestGetRequest.class.php" hash="0cf2fafae88f795a754d75291947cb56"/><file name="CertificateRequestGetResult.class.php" hash="eceffe3acec787506649669b1b5edcf7"/><file name="CertificateRequestInitiateRequest.class.php" hash="148a5c4c881c885be863f403582b4974"/><file name="CertificateRequestInitiateResult.class.php" hash="a7a55cb398cd2fb9f0e11b8c6b09498d"/><file name="CertificateRequestStage.class.php" hash="92dec7da28f83f1a419d9573e6cec1fa"/><file name="CertificateRequestStatus.class.php" hash="a5d5c1629ce4f5ee0c18a8924204ca22"/><file name="CertificateStatus.class.php" hash="6ae43ab57ae9df37d07ac4203270c25e"/><file name="CertificateUsage.class.php" hash="bad34570daa7679b267f1288bf0a371f"/><file name="CommunicationMode.class.php" hash="71d2743c1d2afffe11d2903e89ff9c0e"/><file name="Customer.class.php" hash="e9f13f38f75cb4e1b845c55e6f26a5ab"/><file name="CustomerSaveRequest.class.php" hash="58ff71b04bb3a308b7f0199c6fae1e56"/><file name="CustomerSaveResult.class.php" hash="98cf79bdb7c0558963670b21e66b7d85"/><file name="FormatType.class.php" hash="714d183d3d365a07ef606d1211c732b0"/><file name="RequestType.class.php" hash="6144c2731baaf67400ea34e50440c1df"/><file name="ReviewStatus.class.php" hash="0dd208ecbf6b45196f51f304b1d48b03"/></dir><file name="AvalaraSoapClient.class.php" hash="dd605cefabb4396ef1b46b6d23b439b5"/><file name="BaseResult.class.php" hash="b672ec2ce2c6b5cf5cce7ce733aff482"/><dir name="BatchSvc"><file name="AuditMessage.class.php" hash="798d8169506357af02e6912b4bca9148"/><file name="AvaTaxBatchSvc.php" hash="8d65fd4a02cd4fc1104aa9c24b35e4fb"/><file name="BaseResult.class.php" hash="727ef623b821e95a73cf6d1eda891379"/><file name="Batch.class.php" hash="c028822bcf2a4f1fae6fc7dca76f247a"/><file name="BatchDelete.class.php" hash="0bcff09309ccad969d65c2d27fa63dda"/><file name="BatchDeleteResponse.class.php" hash="46afd464673459efb54ccaf509d37eef"/><file name="BatchFetch.class.php" hash="74f96ecc3c2df87271d60c4c969e43f8"/><file name="BatchFetchResponse.class.php" hash="b2acf63deea2c0fd374f80745b60fef5"/><file name="BatchFetchResult.class.php" hash="83d8de067f4bd59acafe4cd065f90163"/><file name="BatchFile.class.php" hash="65cee20383c8040fac1d4c45bbe757dd"/><file name="BatchFileDelete.class.php" hash="01d0bc10cb0ada43a9a00ca0efffef17"/><file name="BatchFileDeleteResponse.class.php" hash="b4e7881d26b7071303650973144f418b"/><file name="BatchFileFetch.class.php" hash="c5e91b8073fb756545d0f74803fdf3d6"/><file name="BatchFileFetchResponse.class.php" hash="c37ce819a975cdae5e7a82432b4b2334"/><file name="BatchFileFetchResult.class.php" hash="6bc54523d34356a83cdc4ecd2f696ea5"/><file name="BatchFileSave.class.php" hash="8434b0ffdd1fba4991535248ee3d618e"/><file name="BatchFileSaveResponse.class.php" hash="d52f79b42467b59f2177359f8a73cd3a"/><file name="BatchFileSaveResult.class.php" hash="19d3a2f20ccc42e80759b280842cf03c"/><file name="BatchProcess.class.php" hash="44d9efe13d01fce15bd444e5729b320c"/><file name="BatchProcessRequest.class.php" hash="04684b987c6d77319cc6881941091de9"/><file name="BatchProcessResponse.class.php" hash="c22b08c125eefc4006495c55984ed91e"/><file name="BatchProcessResult.class.php" hash="f9cac2270aafae49fc0892ea729c3713"/><file name="BatchSave.class.php" hash="d3a397348b905d49a0c91be780f3ec04"/><file name="BatchSaveResponse.class.php" hash="4c3088b85590fd697b5686aa1dddd89e"/><file name="BatchSaveResult.class.php" hash="7ea7fe3dc7d580711f6b52d991c43dce"/><file name="BatchSvc.class.php" hash="fa903f70b06d1e3b86384f2b6fb60616"/><file name="DeleteRequest.class.php" hash="43f945ef1e59ef02494df6df6ec3d1b6"/><file name="DeleteResult.class.php" hash="f7d64582f1182ae0337d6d84a5f60e8d"/><file name="FetchRequest.class.php" hash="7271317a8909672261ea0e00867e810b"/><file name="FilterRequest.class.php" hash="3c1eaec68f84531931a3cd6143533576"/><file name="FilterResult.class.php" hash="f4c0eeac0153b735ec589fcff7accd86"/><file name="IsAuthorized.class.php" hash="8339a2b249d954efaaf64f10665976fc"/><file name="IsAuthorizedResponse.class.php" hash="613c91f36370dc38ca07b83a29f2a45f"/><file name="IsAuthorizedResult.class.php" hash="65f9665508a5e7f33e4aee2835a9806e"/><file name="Message.class.php" hash="576327c8d9cd74bd96d9ccd62a2daa5b"/><file name="Ping.class.php" hash="3a2246f5557a5279fa260c65b36a9b44"/><file name="PingResponse.class.php" hash="b9f5e8b43382ee605d93768db8af1805"/><file name="PingResult.class.php" hash="2e05acfe74aad28003ad7d8ed102c3c6"/><file name="Profile.class.php" hash="a16a4819018dd8510ddab8feb9ee0f7e"/><file name="SeverityLevel.class.php" hash="5736530f3b5fd0cd932c783418563647"/></dir><file name="BoundaryLevel.class.php" hash="e9c2f2e3173e44fa8351f2a6dbb578fe"/><file name="CancelCode.class.php" hash="fd0b8ad2865e8fcf622b1faafc677527"/><file name="CancelTaxRequest.class.php" hash="08a114e32ec9eda9268ec337f79cb86f"/><file name="CancelTaxResult.class.php" hash="687be65bab85e6c6e8f99764c0475d9b"/><file name="CommitTaxRequest.class.php" hash="66ef55bc094d233b75e36b029995aed7"/><file name="CommitTaxResult.class.php" hash="ef90276817207e63e4e96ea518618f50"/><file name="DetailLevel.class.php" hash="2439f7137a4f9f52e28a6b321c4bcf16"/><file name="DocStatus.class.php" hash="9e3384a0f2ace05fa67fe05eba295fcd"/><file name="DocumentType.class.php" hash="0578e29121cb747e1e80a269eedd4b5a"/><file name="DynamicSoapClient.class.php" hash="5bb36f2d4db3955ae059488eb9511ca9"/><file name="Enum.class.php" hash="d3ff4c898aff49f3c425042433826257"/><file name="GetTaxHistoryRequest.class.php" hash="3ed4c54de1e015f476ce7aa58c802468"/><file name="GetTaxHistoryResult.class.php" hash="7e8209e1f64df52b538927312b1bd934"/><file name="GetTaxRequest.class.php" hash="7267cb5676ecbcbbb0b73c587b082b57"/><file name="GetTaxResult.class.php" hash="7e2b7415a018fd76b62ab49637833533"/><file name="IsAuthorizedResult.class.php" hash="58164457677a61e93309f788fe61dc0c"/><file name="JurisdictionType.class.php" hash="a345fe5db379af87a6f7ec833ff86586"/><file name="Line.class.php" hash="7fefbd0230ee2fe8a8e6468abf338b80"/><file name="Message.class.php" hash="073be6cbcccacf2d1d55a04c045eab63"/><file name="PingResult.class.php" hash="18f88589588f08b619488c926cf5547c"/><file name="PostTaxRequest.class.php" hash="be8ea4ee2fddb10b62cb1be7e38179e3"/><file name="PostTaxResult.class.php" hash="bf2ee0b1293301ee00ac9b8b8390e780"/><file name="ReconcileTaxHistoryRequest.class.php" hash="41f2cfe04495612a9c293b1bc19220ce"/><file name="ReconcileTaxHistoryResult.class.php" hash="dd20684e0e017f56c98e29297180a0d7"/><file name="SearchTaxHistoryResult.class.php" hash="e3171e00482f7c2c0ed9753ffd05cd14"/><file name="ServiceMode.class.php" hash="0c66b3e25f4466461cebf32735e207e0"/><file name="SeverityLevel.class.php" hash="68fc81e651fe7f01c81b43b0d28ff0dc"/><file name="TaxDetail.class.php" hash="56065f8ea68505152b23e41238b80dfb"/><file name="TaxLine.class.php" hash="05376f01ad9a14f438ad0f1d5d423b61"/><file name="TaxOverride.class.php" hash="94d28efa3cdf58a87ba45a313ce93fc7"/><file name="TaxOverrideType.class.php" hash="d23f90c9ac639954c8fcee57ba763b21"/><file name="TaxRequest.class.php" hash="7339016da0c3cbe51843767987e7fbed"/><file name="TaxServiceSoap.class.php" hash="bc7e4eb0e66dd1bd956e19e0da337171"/><file name="TaxType.class.php" hash="ee87ecc8721076f0cda67fe1cc5b0db7"/><file name="TextCase.class.php" hash="8fb2eccc49eacdc1a4f5624c0716a750"/><file name="ValidAddress.class.php" hash="2f8eebcd379208198cd38632f1e34b0a"/><file name="ValidateRequest.class.php" hash="98faedd50b2f4ea7ffb9d53ab1ca116c"/><file name="ValidateResult.class.php" hash="23de6a26defed9324ddcdcedfd2228bf"/><dir name="wsdl"><file name="Account.wsdl" hash="1635751a852ff5c036e4522381101680"/><file name="Address.wsdl" hash="0650cb8f516bec67e57eb7fa05ee6433"/><file name="AvaCert2Svc.wsdl" hash="9ca666be9851884f3e7fc9e28dc08f4a"/><file name="AvaCertSvc.wsdl" hash="7fb2b12cfe320462cf094225454f0d6c"/><file name="BatchSvc.wsdl" hash="639d2913500639145d95ee8e1166e08f"/><file name="Tax.wsdl" hash="76e1ff6c041d12da77a4632f376422ed"/></dir></dir><file name="functions.php" hash="57734d162b59cbc65933d25bf3950270"/></dir></target></contents>
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>5.2.3</min><max>6.0.0</max></php><extension><name>Core</name><min/><max/></extension><extension><name>curl</name><min/><max/></extension><extension><name>soap</name><min/><max/></extension></required></dependencies>
|
29 |
</package>
|