Nektria_ReCS - Version 1.0.6

Version Notes

Improvements in the widget.

Download this release

Release Info

Developer Digio Soluciones Digitales
Extension Nektria_ReCS
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.5 to 1.0.6

Files changed (83) hide show
  1. app/code/community/Nektria/Nektria/ReCS/Block/Config.php +26 -0
  2. app/code/community/Nektria/Nektria/ReCS/Block/Registration.php +63 -0
  3. app/code/community/Nektria/Nektria/ReCS/Block/Testsdk.php +42 -0
  4. app/code/community/Nektria/Nektria/ReCS/Helper/Data.php +285 -0
  5. app/code/community/Nektria/Nektria/ReCS/Model/Carrier.php +261 -0
  6. app/code/community/Nektria/Nektria/ReCS/Model/Lastmile.php +11 -0
  7. app/code/community/Nektria/Nektria/ReCS/Model/Observer.php +150 -0
  8. app/code/community/Nektria/Nektria/ReCS/Model/Paymentmethods.php +9 -0
  9. app/code/community/Nektria/Nektria/ReCS/Model/Resource/Lastmile.php +12 -0
  10. app/code/community/Nektria/Nektria/ReCS/Model/Resource/Lastmile/Collection.php +12 -0
  11. app/code/community/Nektria/Nektria/ReCS/Model/Sales/Order.php +13 -0
  12. app/code/community/Nektria/Nektria/ReCS/controllers/SdkController.php +14 -0
  13. app/code/community/Nektria/Nektria/ReCS/etc/config.xml +184 -0
  14. app/code/community/Nektria/Nektria/ReCS/etc/system.xml +170 -0
  15. app/code/community/Nektria/Nektria/ReCS/lib/Nektria.php +591 -0
  16. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/.editorconfig +9 -0
  17. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/.gitignore +6 -0
  18. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/CHANGELOG.md +209 -0
  19. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/LICENSE.md +141 -0
  20. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/README.md +673 -0
  21. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/composer.json +44 -0
  22. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Address.php +377 -0
  23. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Client.php +223 -0
  24. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Description.php +13 -0
  25. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Exceptions/ApiClientException.php +9 -0
  26. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Exceptions/ApiResponseException.php +34 -0
  27. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Price.php +29 -0
  28. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Product.php +289 -0
  29. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/BackendAccessRequest.php +35 -0
  30. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/BaseRequest.php +128 -0
  31. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ClassicAvailabilityRequest.php +53 -0
  32. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ClassicConfirmationRequest.php +28 -0
  33. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/CoverageRequest.php +44 -0
  34. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/KeepAliveRequest.php +38 -0
  35. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileAvailabilityRequest.php +76 -0
  36. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileBestPriceRequest.php +39 -0
  37. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileConfirmationRequest.php +36 -0
  38. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileValidationRequest.php +37 -0
  39. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/RegistrationAccessRequest.php +45 -0
  40. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/SandboxApiKeyRequest.php +43 -0
  41. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ServiceCreationRequest.php +49 -0
  42. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ShowShippingRequest.php +36 -0
  43. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/TestRequest.php +21 -0
  44. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/getAssetsRequest.php +38 -0
  45. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/BackendAccessResponse.php +33 -0
  46. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/BaseResponse.php +24 -0
  47. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ClassicAvailabilityResponse.php +52 -0
  48. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ClassicConfirmationResponse.php +32 -0
  49. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/CoverageResponse.php +36 -0
  50. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileAvailabilityResponse.php +164 -0
  51. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileBestPriceResponse.php +49 -0
  52. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileConfirmationResponse.php +37 -0
  53. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/NullResponse.php +8 -0
  54. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/RegistrationAccessResponse.php +33 -0
  55. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ResponseBodyWrapper.php +76 -0
  56. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/SandboxApiKeyResponse.php +36 -0
  57. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ServiceCreationResponse.php +56 -0
  58. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ShowShippingResponse.php +116 -0
  59. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/TransitAvailabilityResponse.php +8 -0
  60. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/TransitConfirmationResponse.php +8 -0
  61. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/getAssetsResponse.php +45 -0
  62. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/ShowShippingHelper.php +63 -0
  63. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/TimeWindow.php +59 -0
  64. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/TimeWindowPrice.php +42 -0
  65. app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/services/services.json +292 -0
  66. app/code/community/Nektria/Nektria/ReCS/sql/nektria_recs_setup/install-1.0.0.php +36 -0
  67. app/code/community/Nektria/Nektria/ReCS/sql/nektria_recs_setup/install-1.0.1.php +45 -0
  68. app/code/community/Nektria/ReCS/Helper/Data.php +1 -1
  69. app/code/community/Nektria/ReCS/Model/Carrier.php +2 -1
  70. app/code/community/Nektria/ReCS/Model/Observer.php +1 -1
  71. app/code/community/Nektria/ReCS/controllers/TestController.php +0 -11
  72. app/code/community/Nektria/ReCS/lib/Nektria/CHANGELOG.md +9 -1
  73. app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/CoverageRequest.php +1 -2
  74. app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/LastMileBestPriceRequest.php +1 -1
  75. app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/SandboxApiKeyRequest.php +1 -1
  76. app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/ServiceCreationRequest.php +19 -3
  77. app/code/community/Nektria/ReCS/lib/Nektria/src/services/services.json +18 -6
  78. app/code/community/Nektria/ReCS/lib/Nektria/test.php +0 -210
  79. app/design/frontend/base/default/template/recs/email/lastmile.phtml +2 -2
  80. app/design/frontend/base/default/template/recs/shipping_method/available.phtml +76 -23
  81. app/design/frontend/base/default/template/recs/totals/lastmile.phtml +2 -2
  82. app/locale/es_ES/Nektria_Translations.csv +3 -1
  83. package.xml +6 -6
app/code/community/Nektria/Nektria/ReCS/Block/Config.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
4
+ /**
5
+ * Sets the config button in the extension setup
6
+ */
7
+ class Nektria_Recs_Block_Config extends Mage_Adminhtml_Block_System_Config_Form_Field
8
+ {
9
+
10
+ /**
11
+ * Returns html part of the setting
12
+ *
13
+ * @param Varien_Data_Form_Element_Abstract $element
14
+ * @return string
15
+ */
16
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
17
+ {
18
+ $this->setElement($element);
19
+ $recs = new NektriaSdk();
20
+
21
+ $url = $recs->getBackendUrl();
22
+
23
+ $html = '<input onclick="window.open(\''.$url.'\', \'\', \'location=no,menubar=no,toolbar=no,width=600,height=400\');" type="button" value="'.$this->__('Nektria Configuration').'" class="button" />';
24
+ return $html;
25
+ }
26
+ }
app/code/community/Nektria/Nektria/ReCS/Block/Registration.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Sets the block for registration button in the ReCS setup
5
+ */
6
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
7
+
8
+ class Nektria_Recs_Block_Registration extends Mage_Adminhtml_Block_System_Config_Form_Field
9
+ {
10
+
11
+ /**
12
+ * Returns html part of the setting
13
+ *
14
+ * @param Varien_Data_Form_Element_Abstract $element
15
+ * @return string
16
+ */
17
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
18
+ {
19
+ $this->setElement($element);
20
+ $recs = new NektriaSdk();
21
+
22
+ $url = $recs->getRegistrationUrl();
23
+ $nektria_signup = $this->__('Nektria Signup');
24
+ $html = <<<EOT
25
+ <script type="text/javascript">
26
+ function nektria_registration_onload(){
27
+ jQuery.noConflict();
28
+ jQuery("#carriers_nektria_recs_apikey").change(function(){
29
+ if (this.value != ''){
30
+ jQuery("#row_carriers_nektria_recs_registration").hide();
31
+ }else{
32
+ jQuery("#row_carriers_nektria_recs_registration").show();
33
+ }
34
+ });
35
+
36
+ jQuery(window).on("message", function(e){
37
+ var data = e.originalEvent.data;
38
+
39
+ if (typeof(data.code) != "undefined" && data.code == "recs"){
40
+ jQuery("#carriers_nektria_recs_apikey").val(data.apikey);
41
+ window.registrationpopup.close();
42
+ }
43
+ });
44
+ }
45
+
46
+ if(typeof(jQuery)== "undefined"){
47
+ var script = document.createElement("script");
48
+ script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js";
49
+ script.onload = nektria_registration_onload;
50
+ document.getElementsByTagName('head')[0].appendChild(script);
51
+ }else{
52
+ jQuery(document).ready(nektria_registration_onload);
53
+ }
54
+
55
+
56
+
57
+ </script>
58
+ <input onclick="window.registrationpopup = window.open('$url', '', 'location=no,menubar=no,toolbar=no,width=600,height=400');" type="button" value="$nektria_signup" class="button" />
59
+ EOT;
60
+
61
+ return $html;
62
+ }
63
+ }
app/code/community/Nektria/Nektria/ReCS/Block/Testsdk.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Set the block to test configuration in the extension method setup
4
+ */
5
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
6
+
7
+ class Nektria_Recs_Block_Testsdk extends Mage_Adminhtml_Block_System_Config_Form_Field
8
+ {
9
+
10
+ /**
11
+ * Returns html part of the setting
12
+ *
13
+ * @param Varien_Data_Form_Element_Abstract $element
14
+ * @return string
15
+ */
16
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
17
+ {
18
+ $this->setElement($element);
19
+ $recs = new NektriaSdk();
20
+
21
+ $errorCode = NULL;
22
+ $working = $recs->testRequest($errorCode);
23
+ $errorString = '';
24
+
25
+ //detect only auth error by now
26
+ switch ($errorCode) {
27
+ case 401:
28
+ $errorString = $this->__('error connecting to the service, check it the API Key');
29
+ break;
30
+ default:
31
+ $errorString = $this->__('error connecting to the service');
32
+ break;
33
+ }
34
+
35
+ $html = '<span style=\'font-size: 0.9em;\'>'.
36
+ ((Mage::helper('nektria')->getConfig('sandbox') || Mage::helper('nektria')->checkDemoFlag() )?$this->__('Testing environment'):$this->__('Production environment')).': '.
37
+ (($working)?$this->__('service configured correctly'):$errorString).
38
+ '</span>'.
39
+ ((Mage::helper('nektria')->checkDemoFlag())?'<p style=\'font-size: 0.9em; font-weight: bold;\'>'.$this->__('Your site is in demo mode, ReCS is blocked in sandbox mode').'</p>':'');
40
+ return $html;
41
+ }
42
+ }
app/code/community/Nektria/Nektria/ReCS/Helper/Data.php ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
4
+
5
+ class Nektria_ReCS_Helper_Data extends Mage_Core_Helper_Abstract
6
+ {
7
+ const CONFIG_KEY = 'carriers/nektria_recs';
8
+ const CARRIER = 'nektria_recs';
9
+ const ASSETS_VERSION = 1;
10
+ const CONNECT_TIMEOUT = 1.5;
11
+ const TIMEOUT = 2;
12
+
13
+ /**
14
+ * Return checkout config value by key and store
15
+ *
16
+ * @param string $key
17
+ * @return variant|null
18
+ */
19
+ public function getConfig($key='', $store = null)
20
+ {
21
+ if( !isset ( $this->_configs) ){
22
+ $this->_configs = Mage::getStoreConfig(self::CONFIG_KEY, $store);
23
+ }
24
+ return (isset($this->_configs[$key])?$this->_configs[$key] : NULL );
25
+ }
26
+
27
+ public function getReCSMethods(){
28
+ return array(
29
+ 'lastmile' => $this->__('Elige día y hora'),
30
+ 'classic' => $this->__('RECS: Servicio Estándar')
31
+ );
32
+ }
33
+
34
+ /**
35
+ * Get configured parameters of the service from backend
36
+ * @param array $params of configuration
37
+ * @return array Merged params with defaults
38
+ */
39
+ public function getServiceParams($params){
40
+ $recs = new NektriaSdk();
41
+
42
+ $return = array_merge( array(
43
+ 'APIKEY' => self::getConfig('apikey'),
44
+ 'environment'=>'production',
45
+ 'timeout' => self::TIMEOUT,
46
+ 'connect_timeout' => self::CONNECT_TIMEOUT
47
+ ), $params );
48
+
49
+ //if demo or sandbox then get SandboxKey
50
+ if (self::getConfig('sandbox') || self::checkDemoFlag()){
51
+ $return['APIKEY'] = $recs->getSandboxApiKey();
52
+ $return['environment'] = 'sandbox';
53
+ }
54
+
55
+ return $return;
56
+ }
57
+
58
+ /**
59
+ * Get carrier name
60
+ * @return string
61
+ */
62
+ public function getCode(){
63
+ return self::CARRIER;
64
+ }
65
+
66
+ /**
67
+ * Get the number of assets version
68
+ * @return int the version
69
+ */
70
+ public function getAssetsVersion(){
71
+ return self::ASSETS_VERSION;
72
+ }
73
+
74
+ /**
75
+ * Get if the extension is active and get an apikey from config
76
+ * @return bool
77
+ */
78
+ public function getEnabled(){
79
+ return (Mage::helper('nektria')->getConfig('active') && ! is_null(Mage::helper('nektria')->getConfig('apikey')) );
80
+ }
81
+
82
+ /**
83
+ * Get if LightCheckout is installed and enabled
84
+ * @return bool
85
+ */
86
+ public function getGomageLightCheckoutEnabled(){
87
+ return Mage::getStoreConfig('gomage_checkout/general/enabled');
88
+ }
89
+
90
+ /**
91
+ * Get the last timeWindow selection for Last Mile used in template view
92
+ * @return JSON Stringify
93
+ */
94
+ public function getLastSelection(){
95
+ return Mage::getSingleton('checkout/session')->getNektriaUserSelection(FALSE);
96
+ }
97
+
98
+ /**
99
+ * Get if nektria last mile shipping method is selected
100
+ * @return bool
101
+ */
102
+ public function getLastMileSelected(){
103
+ $shipping_method = self::getShippingMethod();
104
+
105
+ //Switch with method type
106
+ if ($shipping_method == 'nektria_recs_lastmile'){
107
+ return TRUE;
108
+ }else{
109
+ return FALSE;
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Returns the last Mile selected Price
115
+ * @return string price with currency code
116
+ */
117
+ public function getLastMileSelectedPrice(){
118
+ if ( self::getLastMileSelected() ){
119
+ $selectedPrice = Mage::helper('core')->jsonDecode(self::getLastSelection());
120
+ return Mage::helper('core')->currency( $selectedPrice['total_price'] );
121
+ }else{
122
+ return '';
123
+ }
124
+ }
125
+
126
+ /**
127
+ * Get the selected shipping method
128
+ * @return bool
129
+ */
130
+ public function getShippingMethod(){
131
+ $quote = $checkout = Mage::getSingleton('checkout/session')->getQuote();
132
+ $address = $quote->getShippingAddress();
133
+ return $address->getShippingMethod();
134
+ }
135
+
136
+ /**
137
+ * Get the selected payment method
138
+ * @return string code of the method
139
+ */
140
+ public function getPaymentMethod(){
141
+ $quote = $checkout = Mage::getSingleton('checkout/session')->getQuote();
142
+ return $quote->getPayment()->getMethodInstance()->getCode();
143
+ }
144
+
145
+ /**
146
+ * Get direct payment methods from magento usetting offline methods
147
+ * @return array of payment methods
148
+ */
149
+ public function getDirectPaymentMethods(){
150
+ $methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);
151
+ unset($methods['offline']);
152
+ return $methods;
153
+ }
154
+
155
+ /**
156
+ * Returns the list of offline payment methods names
157
+ * @return array of names
158
+ */
159
+ public function getOfflinePaymentMethods(){
160
+ $methods = Mage::helper('payment')->getPaymentMethodList(TRUE, TRUE, TRUE);
161
+ $methods = array_keys( $methods['offline']['value'] );
162
+
163
+ return $methods;
164
+ }
165
+
166
+ /**
167
+ * Get backend disabled by the admin payment methods
168
+ * @return array
169
+ */
170
+ public function getDisabledPaymentMethods(){
171
+ $paymentsallow = self::getConfig('paymentsallow');
172
+ //convert variable to array
173
+ $paymentsallow = ($paymentsallow)?explode( ',', $paymentsallow ) : array();
174
+
175
+ //returns selected direct payment methods and all offline payment methods
176
+ return array_merge( $paymentsallow, self::getOfflinePaymentMethods() );
177
+ }
178
+
179
+ /**
180
+ * Check if the payment method selected allow Nektria Last Mile
181
+ * @param string $method Payment method
182
+ * @return bool if allow this method for last mile
183
+ */
184
+ public function checkAllowPaymentMethod($method){
185
+ if ( in_array( $method, self::getDisabledPaymentMethods() ) ){
186
+ return FALSE;
187
+ }else{
188
+ return TRUE;
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Write html template with the Last Mile Selection
194
+ * @return string html
195
+ */
196
+ public function htmlLastMileSelection(){
197
+ $template = Mage::app()->getLayout()->createBlock('core/template')
198
+ ->setTemplate('recs/totals/lastmile.phtml');
199
+ return $template->toHtml();
200
+ }
201
+
202
+ /**
203
+ * Write html template with the Last Mile Selection
204
+ * @return string html
205
+ */
206
+ public function htmlAdminLastMileSelection($order){
207
+ $template = Mage::app()->getLayout()->createBlock('core/template')
208
+ ->setData('order', $order)
209
+ ->setTemplate('recs/sales/order/view/lastmile.phtml');
210
+ return $template->toHtml();
211
+ }
212
+
213
+ /**
214
+ * Returns if array1 is different to array2
215
+ * @param array $array1
216
+ * @param array $array2
217
+ * @return bool
218
+ */
219
+ public function checkChanges($array1, $array2){
220
+ $original = count($array1);
221
+ if ($original !== count($array2)){
222
+ return TRUE;
223
+ }
224
+
225
+ $result = count(array_intersect($array1, $array2));
226
+
227
+ if( $original == $result){
228
+ return FALSE;
229
+ }else{
230
+ return TRUE;
231
+ }
232
+ }
233
+
234
+ /**
235
+ * Helper function for translations
236
+ * @param string $string Traslate to string
237
+ * @return string translation
238
+ */
239
+ public function _($string){
240
+ return self::__($string);
241
+ }
242
+
243
+ /**
244
+ * Returns the session timeout in seconds
245
+ * @param int store id
246
+ * @return int seconds
247
+ */
248
+ public function getSessionTimeout($store = NULL){
249
+ return Mage::getStoreConfig( 'web/cookie/cookie_lifetime' , $store);
250
+
251
+ }
252
+
253
+ public function checkDemoFlag(){
254
+ $sTestDefault = Mage::getStoreConfig('design/head/demonotice');
255
+
256
+ if ($sTestDefault){
257
+ return TRUE;
258
+ }else{
259
+ return FALSE;
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Log into file var exporting
265
+ * @param var $object
266
+ * @param string $title The title of the log section
267
+ * @param string $file the name of the log file
268
+ * @return void
269
+ */
270
+ public function log($object, $title = NULL, $file = NULL){
271
+ if ($title){
272
+ Mage::log('----------------------'.$title.'--------------------------', null, $file);
273
+ }
274
+ Mage::log(var_export($object, TRUE), null, $file);
275
+ }
276
+
277
+ /**
278
+ * Gets the currency symbol associated to a Currency Code
279
+ * @return string currency symbol
280
+ */
281
+ public function getCurrencySymbol(){
282
+ $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
283
+ return Mage::app()->getLocale()->currency( $currency_code )->getSymbol();
284
+ }
285
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Carrier.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
4
+
5
+ class Nektria_ReCS_Model_Carrier extends Mage_Shipping_Model_Carrier_Abstract implements Mage_Shipping_Model_Carrier_Interface {
6
+ protected $logfile = 'shipping_nektria.log';
7
+ protected $apikey;
8
+
9
+ public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
10
+ //check if carrier is enabled
11
+ if (! Mage::helper('nektria')->getEnabled() ) {
12
+ return FALSE;
13
+ }
14
+
15
+ //if it's called before returns cached
16
+ if (isset($GLOBALS['lastCollectRates'])){
17
+ return $GLOBALS['lastCollectRates'];
18
+ }
19
+
20
+ $this->apikey = Mage::helper('nektria')->getConfig('apikey');
21
+ $this->log($this->apikey, 'apikey');
22
+
23
+ $result = Mage::getModel('shipping/rate_result');
24
+
25
+ //Check availability
26
+
27
+ //Preparing the products array
28
+ $products = array();
29
+
30
+ $cart = Mage::getModel('checkout/cart')->getQuote();
31
+
32
+ foreach ($cart->getAllVisibleItems() as $item) {
33
+ $producto = array (
34
+ "name" => $item->getProduct()->getName(),
35
+ "reference" => $item->getProduct()->getSku(),
36
+ "quantity" => $item->getQty(),
37
+ "weight_kg" => $item->getProduct()->getWeight()
38
+ );
39
+ $products[] = $producto;
40
+ }
41
+
42
+ $this->log($products, 'Product list for Nektria');
43
+
44
+ //Preparing shipping address data from Magento
45
+ $checkout = Mage::getSingleton('checkout/session')->getQuote();
46
+
47
+ $shippingAddress = array (
48
+ "postal_code" => $checkout->getShippingAddress()->getPostcode(),
49
+ "street_type" => "",
50
+ "street_name" => $checkout->getShippingAddress()->getStreet(1),
51
+ "street_number" => $checkout->getShippingAddress()->getStreet(2),
52
+ "city" => $checkout->getShippingAddress()->getCity(),
53
+ "country_code" => $checkout->getShippingAddress()->getCountry()
54
+ );
55
+
56
+ $this->log($shippingAddress, 'Shipping Address sent to Nektria');
57
+
58
+ //Preparing buyer data
59
+ //If it's a registered user get user data
60
+ if (Mage::getSingleton('customer/session')->isLoggedIn()) {
61
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
62
+
63
+ $user = array (
64
+ "name" => $customer->getFirstname(),
65
+ "surname" => $customer->getLastname(),
66
+ "email" => $customer->getEmail(),
67
+ "phone" => $checkout->getBillingAddress()->getTelephone()
68
+ );
69
+
70
+ $this->log($user, 'User data sent to Nektria');
71
+ }
72
+
73
+ //On the other hand, get user data from billing input
74
+ else {
75
+ $user = array (
76
+ "name" => $checkout->getBillingAddress()->getFirstname(),
77
+ "surname" => $checkout->getBillingAddress()->getLastname(),
78
+ "email" => $checkout->getBillingAddress()->getEmail(),
79
+ "phone" => $checkout->getBillingAddress()->getTelephone()
80
+ );
81
+ $this->log($user, 'User data for Nektria');
82
+ }
83
+
84
+ $recs = new NektriaSdk();
85
+
86
+ //If the country is not available for Nektria, returns empty array
87
+ if (! $recs->checkCoveredCountry($shippingAddress['country_code']) ){
88
+ return array();
89
+ }
90
+
91
+ //check Nektria Country availability
92
+ $recs->getCoveredCountries();
93
+
94
+ $serviceId = $recs->getServiceId();
95
+ $service_type = $recs->getServiceType();
96
+ $lastPostalCode = $recs->getLastPostalCode();
97
+ $lastShippingAddress = $recs->getLastShippingAddress();
98
+
99
+ $this->log($serviceId,'The service ID');
100
+ $this->log($service_type,'The service type');
101
+ $this->log($lastPostalCode,'The lastPostalCode');
102
+
103
+ $serviceParams = array(
104
+ 'services' => ['last-mile', 'classic'],
105
+ 'shopper' => $user,
106
+ 'destination_address' => $shippingAddress,
107
+ 'products' => $products
108
+ );
109
+
110
+ //check if we have a serviceId, and postal Code and Country code
111
+ //hasn't been changed in other case renew serviceId
112
+ $addressChanged = Mage::helper('nektria')->checkChanges($shippingAddress, $lastShippingAddress);
113
+
114
+ if ($serviceId && !$addressChanged){
115
+ $this->log(TRUE, 'Inside to KeepAliveRequest');
116
+
117
+ $working_service = $recs->keepAlive();
118
+
119
+ if ( ! $working_service && $recs->getLastError()->getCode()==400){
120
+ //If we have problems with keepAlive, and serviceId is timeout renew serviceId
121
+ $working_service = $recs->createService( $serviceParams );
122
+ //set Error if costumer doesn't refresh shipping
123
+ $recs->validateSecurity(TRUE);
124
+ }
125
+ }else{
126
+ $this->log(array( $shippingAddress, $lastShippingAddress ), 'No session serviceID, create service');
127
+
128
+ //cleans recs session cache
129
+ $recs->clean();
130
+ //create a new service
131
+ $working_service = $recs->createService( $serviceParams );
132
+ }
133
+
134
+ //checks first if the nektria service is working in serviceCreation and serviceType after
135
+ $this->log($working_service, 'Working Service' );
136
+ $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
137
+
138
+ if ($working_service && $shippingAddress['postal_code']=='' && Mage::helper('nektria')->getConfig('lastmiledefault')){
139
+ //If it's first call and only have country, and no postal code then lastmile by default
140
+ $response = $recs->lastMileBestPriceRequest(array(
141
+ 'destination_address' => $shippingAddress,
142
+ 'products' => $products
143
+ ));
144
+ if ($currency_code === $response['currency_code']){
145
+ $result->append($this->_getLastMile($response['best_price']));
146
+ }
147
+ }else{
148
+ //if web get postal code, then normal process
149
+ if ($working_service && $recs->getServiceType() == 'classic'){
150
+ // Availability - Classic
151
+ if ($addressChanged || ! $shippingAddress['postal_code']){
152
+ //gets request
153
+ $response = $recs->classicAvailabilityRequest();
154
+
155
+ if($response->isAvailable() && ( $currency_code === $response->getPrice()->getCurrency())){
156
+ $result->append($this->_getClassic($response->getPrice()->getAmount() ));
157
+ }
158
+ }else{
159
+ //gets the cached response
160
+ $response = $recs->getAvailabilityRequest('classic');
161
+
162
+ if( $response && $response['available'] && ($currency_code === $response['currency_code'] )){
163
+ $result->append($this->_getClassic($response['price'] ));
164
+ }
165
+ }
166
+ }else if($working_service && $recs->getServiceType() !== 'unavailable' ){
167
+ // Availability - Last Mile
168
+ if (!$addressChanged){
169
+ //gets the cached response
170
+ $response = $recs->getAvailabilityRequest('lastmile');
171
+
172
+ if( $response && $response['available'] && ($currency_code === $response['currency_code'] )){
173
+ $lastUserSelection = $recs->getUserSelection();
174
+
175
+ if(!$lastUserSelection){
176
+ $result->append($this->_getLastMile( $response['price'] ));
177
+ }else{
178
+ $selectedPrice = Mage::helper('core')->jsonDecode($lastUserSelection);
179
+ $result->append($this->_getLastMile($selectedPrice['total_price']));
180
+ }
181
+ }
182
+ }else{
183
+ //gets new request
184
+ $response = $recs->lastMileAvailabilityRequest();
185
+ $this->log($response->isAvailable(), 'LastMileAvailabilityRequest availability');
186
+ if($response->isAvailable() && ( $currency_code === $response->getBestPrice()->getCurrency()) )
187
+ {
188
+ $lastUserSelection = $recs->getUserSelection();
189
+
190
+ if(!$lastUserSelection){
191
+ $result->append($this->_getLastMile( $response->getBestPrice()->getAmount() ));
192
+ }else{
193
+ $selectedPrice = Mage::helper('core')->jsonDecode($lastUserSelection);
194
+ $result->append($this->_getLastMile($selectedPrice['total_price']));
195
+ }
196
+ }
197
+ }
198
+ }
199
+
200
+ }
201
+
202
+
203
+
204
+
205
+ if ( $working_service )
206
+ $recs->assetsRequest();
207
+
208
+ //saves in globals as cache in one request
209
+ $GLOBALS['lastCollectRates'] = $result;
210
+ return $result;
211
+ }
212
+
213
+ protected function _getLastMile($lm_best_price)
214
+ {
215
+ $this->log($lm_best_price, 'Nektria lastmile best price');
216
+
217
+ $rate = Mage::getModel('shipping/rate_result_method');
218
+ /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
219
+
220
+ $rate->setCarrier(Mage::helper('nektria')->getCode());
221
+ $rate->setCarrierTitle($this->getConfigData('title'));
222
+
223
+ $methods = $this->getAllowedMethods();
224
+
225
+ $rate->setMethod('lastmile');
226
+ $rate->setMethodTitle($methods['lastmile']);
227
+
228
+ //Set the best price
229
+ $rate->setPrice($lm_best_price);
230
+
231
+ return $rate;
232
+ }
233
+
234
+ protected function _getClassic($c_price)
235
+ {
236
+ $rate = Mage::getModel('shipping/rate_result_method');
237
+ /* @var $rate Mage_Shipping_Model_Rate_Result_Method */
238
+ $rate->setCarrier(Mage::helper('nektria')->getCode());
239
+ $rate->setCarrierTitle($this->getConfigData('title'));
240
+
241
+ $methods = $this->getAllowedMethods();
242
+
243
+ $rate->setMethod('classic');
244
+ $rate->setMethodTitle($methods['classic']);
245
+
246
+ $rate->setPrice($c_price);
247
+
248
+ return $rate;
249
+ }
250
+
251
+ public function getAllowedMethods() {
252
+ return Mage::helper('nektria')->getReCSMethods();
253
+ }
254
+
255
+
256
+ private function log($obj, $msg=''){
257
+ if (! Mage::getStoreConfig('dev/log/active'))
258
+ return FALSE;
259
+ Mage::helper('nektria')->log($obj, $msg, $this->logfile);
260
+ }
261
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Lastmile.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ class Nektria_ReCS_Model_Lastmile extends Mage_Core_Model_Abstract
7
+ {
8
+ protected function _construct(){
9
+ $this->_init( 'nektria_recs/lastmile' );
10
+ }
11
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Observer.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once (Mage::getModuleDir('', 'Nektria_ReCS') . DS . 'lib' . DS .'Nektria.php');
4
+
5
+ class Nektria_ReCS_Model_Observer
6
+ {
7
+ protected $_code = 'nektria_recs';
8
+ private static $logfile = 'shipping_nektria_events.log';
9
+
10
+ /**
11
+ * This method save in session the user selection. Magento refresh shipping rates in each step.
12
+ * @param [type] $observer event parameter
13
+ */
14
+ public function checkout_controller_onepage_save_shipping_method($observer){
15
+ $this->log('Inside OnePage Save Shipping', 'SaveShipping method');
16
+ //check if carrier is enabled
17
+ if (! Mage::helper('nektria')->getEnabled() ) {
18
+ return false;
19
+ }
20
+ $this->savelog = Mage::getStoreConfig('debug/options/enable');
21
+
22
+ //get Quote from session and rescue shipping method
23
+ $quote = $checkout = Mage::getSingleton('checkout/session')->getQuote();
24
+ $address = $quote->getShippingAddress();
25
+ $shipping_method = $address->getShippingMethod();
26
+
27
+ //Switch with method type
28
+
29
+ $recs = new NektriaSdk();
30
+
31
+ if ($shipping_method == 'nektria_recs_lastmile'){
32
+ //get nektria lastmile selecction
33
+ $request = $observer->getRequest();
34
+ $pickup = $request->getParam('nektria_selection',false);
35
+
36
+ //save in session the user selection
37
+ //If not saved yet then save, ignore in other case
38
+ if ( (! $detectSel = $recs->getUserSelection() ) || ($pickup !== '{}' && $pickup !== $detectSel ) ){
39
+ self::log($pickup, 'Saving the new nektria shipping selection');
40
+ $recs->setUserSelection( $pickup );
41
+ }
42
+
43
+
44
+ $recs->validateSecurity(FALSE);
45
+
46
+ }else if($shipping_method == 'nektria_recs_classic'){
47
+ $recs->validateSecurity(FALSE);
48
+ }
49
+ //nothing with other shipping methods...
50
+ }
51
+
52
+ /**
53
+ * Saves the shipment to nektria and clean session data
54
+ * @param variant $observer Event paramenters
55
+ */
56
+ public function checkout_submit_all_after($observer){
57
+ //check if carrier is enabled
58
+ if (! Mage::helper('nektria')->getEnabled() ) {
59
+ return false;
60
+ }
61
+
62
+ //get shipping method
63
+ $shipping_method = Mage::helper('nektria')->getShippingMethod();
64
+
65
+ //Gets current order id
66
+ $order = $observer->getEvent()->getOrder();
67
+ $order_id = $order->getIncrementId();
68
+
69
+ $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderNektria(false);
70
+
71
+ //checks if the order has been processed one time
72
+ if (!$lastOrderId || $order_id != $lastOrderId){
73
+ $apikey = Mage::helper('nektria')->getConfig('apikey');
74
+ $recs = new NektriaSdk();
75
+
76
+ if ($shipping_method == 'nektria_recs_lastmile'){
77
+ //Saves user selection into database
78
+ $lastmile_db = Mage::getModel('nektria_recs/lastmile');
79
+ $lastmile_db->setOrderId( $order_id );
80
+ $lastmile_db->setUserSelection( $recs->getUserSelection() );
81
+ $lastmile_db->save();
82
+
83
+ //If selected method and carrier is nektria and lastmile
84
+ $recs->saveLastMile($order_id);
85
+
86
+ }else if ($shipping_method == 'nektria_recs_classic'){
87
+ //If selected method and carrier is nektria and classic
88
+
89
+ $recs->saveClassic($order_id);
90
+ }
91
+ //Save last order id because this event is called 2 times
92
+ Mage::getSingleton('checkout/session')->setLastOrderNektria( $order_id );
93
+ $recs->clean();
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Checks if the shipping has been changed for security
99
+ * @param Variant $observer Event param
100
+ */
101
+ public function sales_order_place_before($observer){
102
+ //check if carrier is enabled
103
+ if (! Mage::helper('nektria')->getEnabled() ) {
104
+ return false;
105
+ }
106
+ //if validate security stops the payment process
107
+ $recs = new NektriaSdk();
108
+ //Check errors
109
+ if (Mage::helper('nektria')->getLastMileSelected() && $recs->validateSecurity())
110
+ Mage::throwException(Mage::helper('nektria')->__('Shipping method choices have timed out, please select your delivery windows again'));
111
+
112
+ //Forbidden offline payment methods
113
+ if (Mage::helper('nektria')->getLastMileSelected() && ! Mage::helper('nektria')->checkAllowPaymentMethod( Mage::helper('nektria')->getPaymentMethod() ) )
114
+ Mage::throwException(Mage::helper('nektria')->__('Last Mile shipping method is not compatible with the selected payment method'));
115
+
116
+ //Check last validation lastmile before payment
117
+ if (Mage::helper('nektria')->getLastMileSelected() && !$recs->validateLastMile())
118
+ Mage::throwException(Mage::helper('nektria')->__('An error has ocurred during Last Mile Shipping Method validation. Please change your selection'));
119
+ }
120
+
121
+ /**
122
+ * Cleans session data
123
+ * @param variant $observer Event paramenters
124
+ */
125
+ public function checkout_quote_destroy($observer){
126
+ //check if carrier is enabled
127
+ if (! Mage::helper('nektria')->getEnabled() ) {
128
+ return false;
129
+ }
130
+ //remove sessions variables from nektria shipping
131
+ $recs = new NektriaSdk();
132
+ $recs->clean();
133
+ }
134
+
135
+
136
+ /* ************************************************************************************** */
137
+ static function log($obj, $msg=''){
138
+ if (! Mage::getStoreConfig('dev/log/active'))
139
+ return FALSE;
140
+ Mage::helper('nektria')->log($obj, $msg, self::$logfile);
141
+ }
142
+
143
+ /** Logging events debugger */
144
+ public function controller_action_predispatch($observer) {
145
+ self::log(
146
+ 'event', //$observer ,
147
+ $observer->getEvent ()->getControllerAction ()->getFullActionName ()
148
+ );
149
+ }
150
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Paymentmethods.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Nektria_ReCS_Model_Paymentmethods
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return Mage::helper('nektria')->getDirectPaymentMethods();
8
+ }
9
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Resource/Lastmile.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ class Nektria_ReCS_Model_Resource_Lastmile extends Mage_Core_Model_Resource_Db_Abstract
7
+ {
8
+ // Initialize connection and define main table and primary key
9
+ protected function _construct(){
10
+ $this->_init( 'nektria_recs/lastmile', 'lastmile_id' );
11
+ }
12
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Resource/Lastmile/Collection.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ class Nektria_ReCS_Model_Resource_Lastmile_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
7
+ {
8
+ // Initialize connection and define main table and primary key
9
+ protected function _construct(){
10
+ $this->_init( 'nektria_recs/lastmile' );
11
+ }
12
+ }
app/code/community/Nektria/Nektria/ReCS/Model/Sales/Order.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Nektria_ReCS_Model_Sales_Order extends Mage_Sales_Model_Order{
3
+ public function getShippingDescription(){
4
+ $desc = parent::getShippingDescription();
5
+ // Mage::helper('nektria')->log($userSelection, 'userSelection', 'test.log');
6
+ // Mage::helper('nektria')->log($this->getIncrementId(), 'getIncrementId', 'test.log');
7
+ // Mage::helper('nektria')->log($json, 'json', 'test.log');
8
+ // Mage::helper('nektria')->log(Mage::getSingleton('checkout/session')->getNektriaUserSelection(FALSE), 'json from Session', 'test.log');
9
+ $lastmile = Mage::app()->getLayout()->createBlock('core/template')->setTemplate('recs/email/lastmile.phtml');
10
+
11
+ return $lastmile->toHtml().$desc;
12
+ }
13
+ }
app/code/community/Nektria/Nektria/ReCS/controllers/SdkController.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Not used actually, prepared for AJAX test button, used on save instead
5
+ */
6
+ class Nektria_ReCS_SdkController extends Mage_Core_Controller_Front_Action
7
+ {
8
+ public function indexAction(){
9
+ echo Mage::helper('core')->jsonEncode(array('stat'=>'OK', 'action'=>'index'));
10
+ }
11
+ public function testAction(){
12
+ echo Mage::helper('core')->jsonEncode(array('stat'=>'OK', 'action'=>'test'));
13
+ }
14
+ }
app/code/community/Nektria/Nektria/ReCS/etc/config.xml ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8" standalone="no"?>
2
+ <config>
3
+ <modules>
4
+ <Nektria_ReCS>
5
+ <version>1.0.3</version>
6
+ </Nektria_ReCS>
7
+ </modules>
8
+
9
+ <frontend>
10
+ <routers>
11
+ <recs>
12
+ <use>standard</use>
13
+ <args>
14
+ <module>Nektria_ReCS</module>
15
+ <frontName>recs</frontName>
16
+ </args>
17
+ </recs>
18
+ </routers>
19
+ <layout>
20
+ <updates>
21
+ <recs>
22
+ <file>recs.xml</file>
23
+ </recs>
24
+ </updates>
25
+ </layout>
26
+ <translate>
27
+ <modules>
28
+ <nektria_recs>
29
+ <files>
30
+ <default>Nektria_Translations.csv</default>
31
+ </files>
32
+ </nektria_recs>
33
+ </modules>
34
+ </translate>
35
+ </frontend>
36
+
37
+ <adminhtml>
38
+ <translate>
39
+ <modules>
40
+ <translations>
41
+ <files>
42
+ <default>Nektria_Translations.csv</default>
43
+ </files>
44
+ </translations>
45
+ </modules>
46
+ </translate>
47
+ <layout>
48
+ <updates>
49
+ <recs>
50
+ <file>recs.xml</file>
51
+ </recs>
52
+ </updates>
53
+ </layout>
54
+ </adminhtml>
55
+
56
+ <global>
57
+ <blocks>
58
+ <nektria_recs>
59
+ <class>Nektria_ReCS_Block</class>
60
+ </nektria_recs>
61
+ </blocks>
62
+ <helpers>
63
+ <nektria>
64
+ <class>Nektria_ReCS_Helper</class>
65
+ </nektria>
66
+ </helpers>
67
+ <models>
68
+ <nektria_recs>
69
+ <class>Nektria_ReCS_Model</class>
70
+ <resourceModel>nektria_recs_resource</resourceModel>
71
+ </nektria_recs>
72
+ <nektria_recs_resource>
73
+ <class>Nektria_ReCS_Model_Resource</class>
74
+ <entities>
75
+ <lastmile>
76
+ <table>nektria_recs_lastmile</table>
77
+ </lastmile>
78
+ </entities>
79
+ </nektria_recs_resource>
80
+ <sales>
81
+ <rewrite>
82
+ <order>Nektria_ReCS_Model_Sales_Order</order>
83
+ </rewrite>
84
+ </sales>
85
+ </models>
86
+
87
+ <resources>
88
+ <nektria_recs_setup>
89
+ <setup>
90
+ <module>Nektria_ReCS</module>
91
+ </setup>
92
+ <connection>
93
+ <use>core_setup</use>
94
+ </connection>
95
+ </nektria_recs_setup>
96
+ <nektria_recs_read>
97
+ <connection>
98
+ <use>core_read</use>
99
+ </connection>
100
+ </nektria_recs_read>
101
+ <nektria_recs_write>
102
+ <connection>
103
+ <use>core_write</use>
104
+ </connection>
105
+ </nektria_recs_write>
106
+
107
+ </resources>
108
+
109
+ <events>
110
+ <checkout_controller_onepage_save_shipping_method>
111
+ <observers>
112
+ <nektria_recs_shipping>
113
+ <type>singleton</type>
114
+ <class>Nektria_ReCS_Model_Observer</class>
115
+ <method>checkout_controller_onepage_save_shipping_method</method>
116
+ </nektria_recs_shipping>
117
+ </observers>
118
+ </checkout_controller_onepage_save_shipping_method>
119
+ <checkout_submit_all_after>
120
+ <observers>
121
+ <nektria_recs_shipping>
122
+ <type>singleton</type>
123
+ <class>Nektria_ReCS_Model_Observer</class>
124
+ <method>checkout_submit_all_after</method>
125
+ </nektria_recs_shipping>
126
+ </observers>
127
+ </checkout_submit_all_after>
128
+ <checkout_quote_destroy>
129
+ <observers>
130
+ <nektria_recs_shipping>
131
+ <type>singleton</type>
132
+ <class>Nektria_ReCS_Model_Observer</class>
133
+ <method>checkout_quote_destroy</method>
134
+ </nektria_recs_shipping>
135
+ </observers>
136
+ </checkout_quote_destroy>
137
+ <sales_order_place_before>
138
+ <observers>
139
+ <nektria_recs_shipping>
140
+ <type>singleton</type>
141
+ <class>Nektria_ReCS_Model_Observer</class>
142
+ <method>sales_order_place_before</method>
143
+ </nektria_recs_shipping>
144
+ </observers>
145
+ </sales_order_place_before>
146
+ <gomage_checkout_save_quote_before>
147
+ <observers>
148
+ <nektria_recs_shipping>
149
+ <type>singleton</type>
150
+ <class>Nektria_ReCS_Model_Observer</class>
151
+ <method>sales_order_place_before</method>
152
+ </nektria_recs_shipping>
153
+ </observers>
154
+ </gomage_checkout_save_quote_before>
155
+ <!-- Logging all events
156
+ <controller_action_predispatch>
157
+ <observers>
158
+ <nektria_recs_observer_log>
159
+ <type>singleton</type>
160
+ <class>Nektria_ReCS_Model_Observer</class>
161
+ <method>controller_action_predispatch</method>
162
+ </nektria_recs_observer_log>
163
+ </observers>
164
+ </controller_action_predispatch>
165
+ -->
166
+ </events>
167
+ </global>
168
+
169
+ <default>
170
+ <carriers>
171
+ <nektria_recs>
172
+ <active>1</active>
173
+ <model>nektria_recs/carrier</model>
174
+ <title>Recs by Nektria</title>
175
+ <sort_order>1</sort_order>
176
+ <sallowspecific>0</sallowspecific>
177
+ <!-- default demo apikey -->
178
+ <apikey></apikey>
179
+ <sandbox>1</sandbox>
180
+ <lastmiledefault>1</lastmiledefault>
181
+ </nektria_recs>
182
+ </carriers>
183
+ </default>
184
+ </config>
app/code/community/Nektria/Nektria/ReCS/etc/system.xml ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <carriers translate="label" module="shipping">
5
+ <groups>
6
+ <nektria_recs translate="label">
7
+ <label>Nektria</label>
8
+ <frontend_type>text</frontend_type>
9
+ <sort_order>2</sort_order>
10
+ <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
+ <fields>
14
+ <!--
15
+ The following fields are available
16
+ to modify in the admin panel.
17
+ The values are saved in the
18
+ database.
19
+
20
+ This shipping carrier abstract checks
21
+ this value to determine whether
22
+ the carrier should be shown.
23
+ -->
24
+ <active translate="label">
25
+ <label>Enabled</label>
26
+ <frontend_type>select</frontend_type>
27
+ <source_model>adminhtml/system_config_source_yesno</source_model>
28
+ <sort_order>1</sort_order>
29
+ <show_in_default>1</show_in_default>
30
+ <show_in_website>1</show_in_website>
31
+ <show_in_store>0</show_in_store>
32
+ </active>
33
+ <!--
34
+ This value can be used to specify a
35
+ custom title for our method.
36
+ -->
37
+ <title translate="label">
38
+ <label>Custom title</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>2</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <can_be_empty>0</can_be_empty>
45
+ </title>
46
+
47
+ <registration translate="label">
48
+ <label>Sign up and get your API Key</label>
49
+ <frontend_class>nektria_registration</frontend_class>
50
+ <frontend_model>nektria_recs/registration</frontend_model>
51
+ <sort_order>3</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ </registration>
55
+
56
+ <apikey translate="label">
57
+ <label>API Key</label>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>4</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </apikey>
64
+
65
+ <testsdk translate="label">
66
+ <label>Service status</label>
67
+ <frontend_class>nektria_testsdk</frontend_class>
68
+ <frontend_model>nektria_recs/testsdk</frontend_model>
69
+ <sort_order>5</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>1</show_in_store>
73
+ </testsdk>
74
+
75
+ <sandbox translate="label">
76
+ <label>Testing environment</label>
77
+ <frontend_type>select</frontend_type>
78
+ <source_model>adminhtml/system_config_source_yesno</source_model>
79
+ <sort_order>6</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>0</show_in_store>
83
+ </sandbox>
84
+
85
+ <paymentsallow translate="label">
86
+ <label>Disable LastMile for these payment methods</label>
87
+ <frontend_type>multiselect</frontend_type>
88
+ <sort_order>7</sort_order>
89
+ <source_model>nektria_recs/paymentmethods</source_model>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>1</show_in_website>
92
+ <show_in_store>0</show_in_store>
93
+ <can_be_empty>0</can_be_empty>
94
+ </paymentsallow>
95
+
96
+ <backendconf translate="label">
97
+ <label>Open Nektria ReCS backend configuration</label>
98
+ <frontend_class>nektria_config</frontend_class>
99
+ <frontend_model>nektria_recs/config</frontend_model>
100
+ <sort_order>8</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ </backendconf>
104
+
105
+ <lastmiledefault translate="label">
106
+ <label>Display ReCS: LastMile by default</label>
107
+ <frontend_type>select</frontend_type>
108
+ <source_model>adminhtml/system_config_source_yesno</source_model>
109
+ <sort_order>9</sort_order>
110
+ <show_in_default>1</show_in_default>
111
+ <show_in_website>1</show_in_website>
112
+ <show_in_store>0</show_in_store>
113
+ </lastmiledefault>
114
+
115
+ <!--
116
+ The sort order is used in Magento
117
+ to determine what order the carrier
118
+ will appear in relative to the
119
+ other carriers available.
120
+
121
+ <sort_order translate="label">
122
+ <label>Sort Order</label>
123
+ <frontend_type>text</frontend_type>
124
+ <sort_order>100</sort_order>
125
+ <show_in_default>1</show_in_default>
126
+ <show_in_website>1</show_in_website>
127
+ <show_in_store>0</show_in_store>
128
+ </sort_order>
129
+
130
+ This value is used to specify whether
131
+ the carrier is available only for
132
+ specific countries or all countries
133
+ available in the current Magento
134
+ installation.
135
+
136
+ <sallowspecific translate="label">
137
+ <label>Countries for which to apply the shipping method</label>
138
+ <frontend_type>select</frontend_type>
139
+ <sort_order>90</sort_order>
140
+ <frontend_class>shipping-applicable-country</frontend_class>
141
+ <source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
142
+ <show_in_default>1</show_in_default>
143
+ <show_in_website>1</show_in_website>
144
+ <show_in_store>0</show_in_store>
145
+ </sallowspecific>
146
+ -->
147
+ <!--
148
+ If 'specific countries' is chosen
149
+ in the previous option, then this field
150
+ allows the administrator to specify
151
+ which specific countries this carrier
152
+ should be available for.
153
+
154
+ <specificcountry translate="label">
155
+ <label>Ship to Specific Countries</label>
156
+ <frontend_type>multiselect</frontend_type>
157
+ <sort_order>91</sort_order>
158
+ <source_model>adminhtml/system_config_source_country</source_model>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>0</show_in_store>
162
+ <can_be_empty>1</can_be_empty>
163
+ </specificcountry>
164
+ -->
165
+ </fields>
166
+ </nektria_recs>
167
+ </groups>
168
+ </carriers>
169
+ </sections>
170
+ </config>
app/code/community/Nektria/Nektria/ReCS/lib/Nektria.php ADDED
@@ -0,0 +1,591 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once('Nektria/vendor/autoload.php');
4
+
5
+ class NektriaExtensionException extends Exception{
6
+ public function getError(){
7
+ return FALSE;
8
+ }
9
+ }
10
+
11
+ class NektriaSdk{
12
+ protected $id = NULL;
13
+ protected $logfile = 'nektria.sdk.log';
14
+ protected $lastError = NULL;
15
+ protected $lastPrice = NULL;
16
+ protected $assets = NULL;
17
+
18
+ protected $options = array(
19
+ 'APIKEY' => '', //Sandbox key
20
+ 'secure' => true,
21
+ 'environment'=> 'sandbox'
22
+ );
23
+ protected $lastResponse = NULL;
24
+
25
+ function __construct(){}
26
+
27
+ public function setOptions(array $options){
28
+ $this->options = array_merge($this->options, $options);
29
+
30
+ if ($this->options['environment'] == 'sandbox'){
31
+ $this->options['APIKEY'] = $this->getSandboxApiKey();
32
+ }
33
+ $this->log($this->options,'setOptions');
34
+ return TRUE;
35
+ }
36
+
37
+ /**
38
+ * Gets call options of the service
39
+ * @return array The options saved
40
+ */
41
+ public function getOptions(){
42
+ $lastServiceId = Mage::getSingleton('checkout/session')->getNektriaServiceNumber();
43
+ if ($lastServiceId)
44
+ $this->id = $lastServiceId;
45
+
46
+ $this->options = array_merge(
47
+ $this->options ,
48
+ Mage::helper('nektria')->getServiceParams(array())
49
+ );
50
+
51
+ $this->log(array('options'=>$this->options ,'id'=>$this->id),'getOptions and id');
52
+
53
+ if (! is_null($this->id))
54
+ return array_merge($this->options, array('id'=>$this->id));
55
+ else
56
+ return $this->options;
57
+ }
58
+
59
+ /**
60
+ * Cleans Nektria session variables
61
+ * @return void
62
+ */
63
+ public function clean(){
64
+ $this->log(FALSE, 'Called Clean Method');
65
+ //remove sessions variables from nektria shipping
66
+ Mage::getSingleton('checkout/session')->unsNektriaUserSelection();
67
+ Mage::getSingleton('checkout/session')->unsNektriaServiceNumber();
68
+ Mage::getSingleton('checkout/session')->unsNektriaServiceType();
69
+ Mage::getSingleton('checkout/session')->unsNektriaLastPostalCode();
70
+ Mage::getSingleton('checkout/session')->unsNektriaLastCountryCode();
71
+ Mage::getSingleton('checkout/session')->unsClassicPrice();
72
+ Mage::getSingleton('checkout/session')->unsPriceMatrix();
73
+ Mage::getSingleton('checkout/session')->unsNektriaSecurityError();
74
+ Mage::getSingleton('checkout/session')->unsOldLastmileRequest();
75
+ Mage::getSingleton('checkout/session')->unsOldClassicRequest();
76
+ Mage::getSingleton('checkout/session')->unsCoveredCountries();
77
+ Mage::getSingleton('checkout/session')->unsNektriaBackendUrl();
78
+ Mage::getSingleton('checkout/session')->unsNektriaRegistrationUrl();
79
+ Mage::getSingleton('checkout/session')->unsNektriaLastShippingAddress();
80
+
81
+ $this->id=NULL;
82
+ $this->lastResponse=NULL;
83
+ $this->lastError=NULL;
84
+ $this->lastPrice=NULL;
85
+ $this->assets=NULL;
86
+ }
87
+
88
+ public function getLastShippingAddress(){
89
+ $return = Mage::getSingleton('checkout/session')->getNektriaLastShippingAddress(FALSE);
90
+
91
+ if(!$return){
92
+ return array();
93
+ }else{
94
+ return unserialize($return);
95
+ }
96
+ }
97
+
98
+ /**
99
+ * Sets user LastMile Selection in the session
100
+ * @param string JSON stringify
101
+ */
102
+ public function setUserSelection($pickup){
103
+ $this->log($pickup,'setUserSelection');
104
+ //ignore default value
105
+ if($pickup && $pickup != '{}')
106
+ Mage::getSingleton('checkout/session')->setNektriaUserSelection($pickup);
107
+ }
108
+
109
+ /**
110
+ * Returns LastMile user selection from the session
111
+ * @return string JSON Stringify
112
+ */
113
+ public function getUserSelection(){
114
+ $userSelection = Mage::getSingleton('checkout/session')->getNektriaUserSelection(FALSE);
115
+ $this->log($userSelection, 'getUserSelection');
116
+ return (string) $userSelection;
117
+ }
118
+
119
+ /**
120
+ * Get the last response of the API Call
121
+ * @return Variant the last response
122
+ */
123
+ public function getLastResponse(){
124
+ return $this->lastResponse;
125
+ }
126
+
127
+ /**
128
+ * Get the ServiceID saved in the session
129
+ * @return int ServiceID
130
+ */
131
+ public function getServiceId(){
132
+ return ($this->id)?
133
+ $this->id :
134
+ Mage::getSingleton('checkout/session')->getNektriaServiceNumber(FALSE);
135
+ }
136
+
137
+ /**
138
+ * Get the serviceType returned "classic|last-mile"
139
+ * @return string ServiceType
140
+ */
141
+ public function getServiceType(){
142
+ return Mage::getSingleton('checkout/session')->getNektriaServiceType(FALSE);
143
+ }
144
+
145
+ /**
146
+ * Get the Postal Code from the session
147
+ * @return string PostalCode
148
+ */
149
+ public function getLastPostalCode(){
150
+ return Mage::getSingleton('checkout/session')->getNektriaLastPostalCode(FALSE);
151
+ }
152
+
153
+ /**
154
+ * Get the Country code from the session
155
+ * @return string Country Code
156
+ */
157
+ public function getLastCountryCode(){
158
+ return Mage::getSingleton('checkout/session')->getNektriaLastCountryCode(FALSE);
159
+ }
160
+
161
+ /**
162
+ * get the LastError generated
163
+ * @return Exception error
164
+ */
165
+ public function getLastError(){
166
+ return $this->lastError;
167
+ }
168
+
169
+ /**
170
+ * Get the priceMatrix of LastMile execution
171
+ * @return object PriceMatix
172
+ */
173
+ public function getPriceMatrix(){
174
+ return Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE);
175
+ }
176
+
177
+ /**
178
+ * Get the lastPrice returned from Classic or LastMile availability
179
+ * @return float Price
180
+ */
181
+ public function getLastPrice(){
182
+ return $this->lastPrice;
183
+ }
184
+
185
+ /**
186
+ * Check or set security checks
187
+ */
188
+ public function validateSecurity($setValue = NULL){
189
+ if ($setValue){
190
+ Mage::getSingleton('checkout/session')->setNektriaSecurityError( $setValue );
191
+ }else if(is_null($setValue)){
192
+ return Mage::getSingleton('checkout/session')->getNektriaSecurityError(FALSE);
193
+ }else{
194
+ Mage::getSingleton('checkout/session')->unsNektriaSecurityError();
195
+ }
196
+ }
197
+
198
+ /* ------------------------------------------------- API CALLS -------------------------------------------------------- */
199
+
200
+ /**
201
+ * Call to ServiceCreationRequest and saves values in sesion
202
+ * @param array $nektriaParams User and shipping data
203
+ * @return bool true or false if success
204
+ */
205
+ public function createService(array $nektriaParams){
206
+ //Add cookie session
207
+ $nektriaParams['session_timeout'] = Mage::helper('nektria')->getSessionTimeout();
208
+ //Add current currency code
209
+ $nektriaParams['currency_code'] = Mage::app()->getStore()->getCurrentCurrencyCode();
210
+
211
+ //Send the request of service Nektria SDK
212
+ $this->log($nektriaParams,'User and Shipping Address for createService');
213
+ $sr = new Nektria\Recs\MerchantApi\Requests\ServiceCreationRequest($this->getOptions());
214
+
215
+ try{
216
+ $this->lastResponse = $sr->execute($nektriaParams);
217
+ $this->log($this->lastResponse, 'createService response');
218
+ }catch(Exception $e){
219
+ $this->lastError = $e;
220
+ $this->log($e->getCode().$e->getMessage(), 'createService ERROR');
221
+ return FALSE;
222
+ }
223
+
224
+ //Saving service_id in the session
225
+ $this->id = $this->lastResponse->getServiceNumber();
226
+ Mage::getSingleton('checkout/session')->setNektriaLastShippingAddress( serialize( $nektriaParams['destination_address'] ));
227
+ Mage::getSingleton('checkout/session')->setNektriaServiceNumber($this->id);
228
+ Mage::getSingleton('checkout/session')->setNektriaServiceType( $this->lastResponse->getServiceType() );
229
+ Mage::getSingleton('checkout/session')->setNektriaLastPostalCode($nektriaParams['destination_address']['postal_code']);
230
+ Mage::getSingleton('checkout/session')->setNektriaLastCountryCode($nektriaParams['destination_address']['country_code']);
231
+
232
+ return TRUE;
233
+ }
234
+
235
+ /**
236
+ * Remains nektria session alive
237
+ * @return bool true or false if success
238
+ */
239
+ public function keepAlive(){
240
+ $lastKeepAlive = Mage::getSingleton('checkout/session')->getLastKeepAlive(FALSE);
241
+
242
+ //if last KeepAlive was more than five minutes then callit
243
+ if($lastKeepAlive && ( (time() - (int)$lastKeepAlive) < (60*5) )){
244
+ return TRUE;
245
+ }
246
+
247
+ try{
248
+ $kar = new Nektria\Recs\MerchantApi\Requests\KeepAliveRequest($this->getOptions());
249
+ $this->lastResponse = $kar->execute();
250
+ $this->log($this->lastResponse, 'keepAlive');
251
+ }catch(Exception $e){
252
+ $this->lastError = $e;
253
+ $this->log($e->getCode().$e->getMessage(), 'keepAlive ERROR');
254
+ return FALSE;
255
+ }
256
+
257
+ $this->keepAliveCalled = TRUE;
258
+ Mage::getSingleton('checkout/session')->setLastKeepAlive(time());
259
+ return TRUE;
260
+ }
261
+
262
+ /**
263
+ * Call to LastMile availability
264
+ * @return object Response from the method
265
+ */
266
+ public function lastMileAvailabilityRequest(){
267
+ try{
268
+ $lmar = new Nektria\Recs\MerchantApi\Requests\LastMileAvailabilityRequest($this->getOptions());
269
+ $this->lastResponse = $lmar->execute(array("service_type" => $this->getServiceType() ));
270
+ $this->log($this->lastResponse, 'lastMileAvailabilityRequest');
271
+ }catch(Exception $e){
272
+ $this->lastError = $e;
273
+ $this->log($e->getCode().$e->getMessage(), 'lastMileAvailabilityRequest ERROR');
274
+ return FALSE;
275
+ }
276
+ $lastPriceMatrix = Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE);
277
+ if (! $lastPriceMatrix){
278
+ Mage::getSingleton('checkout/session')->setPriceMatrix($this->lastResponse->getPriceMatrix());
279
+ }
280
+ $this->lastPrice = $this->lastResponse->getBestPrice()->getAmount();
281
+
282
+ $this->setAvailabilityRequest('lastmile', array(
283
+ 'available'=>$this->lastResponse->isAvailable(),
284
+ 'price'=>$this->lastPrice,
285
+ 'currency_code'=>$this->lastResponse->getBestPrice()->getCurrency(),
286
+ 'priceMatrix'=>Mage::getSingleton('checkout/session')->getPriceMatrix(FALSE)
287
+ ) );
288
+
289
+ return $this->lastResponse;
290
+ }
291
+
292
+ public function lastMileBestPriceRequest($params){
293
+ try{
294
+ $scr = new Nektria\Recs\MerchantApi\Requests\LastMileBestPriceRequest($this->getOptions());
295
+
296
+ $this->lastResponse = $scr->execute($params);
297
+ $this->log($this->lastResponse, 'lastMileBestPriceRequest');
298
+ }catch(Exception $e){
299
+ $this->lastError = $e;
300
+ $this->log($e->getCode().$e->getMessage(), 'lastMileAvailabilityRequest ERROR');
301
+ return FALSE;
302
+ }
303
+
304
+ return array(
305
+ 'best_price' => $this->lastResponse->getBestPrice(),
306
+ 'currency_code' => $this->lastResponse->getBestPriceCurrency(),
307
+ 'best_price_currency' => $this->lastResponse->getBestPriceCurrency()
308
+ );
309
+ }
310
+
311
+ /**
312
+ * Save the lastMileAvailability or classicAvailability Request stored from session
313
+ * @param string classic | lastmile
314
+ * @return void
315
+ */
316
+ public function setAvailabilityRequest($type, $values){
317
+ $method = 'setOld'.ucwords( $type).'Request';
318
+ Mage::getSingleton('checkout/session')->$method(serialize($values));
319
+ }
320
+
321
+ /**
322
+ * Get the lastMileAvailability or classicAvailability Request stored from session
323
+ * @param string classic | lastmile
324
+ * @return associative array
325
+ */
326
+ public function getAvailabilityRequest($type){
327
+ $response = array();
328
+
329
+ $method = 'getOld'.ucwords( $type).'Request';
330
+ $response = Mage::getSingleton('checkout/session')->$method(FALSE);
331
+
332
+ return ($response)?unserialize($response):FALSE;
333
+ }
334
+
335
+ /**
336
+ * Calls to Classic availability
337
+ * @return object Response from the method
338
+ */
339
+ public function classicAvailabilityRequest(){
340
+ try{
341
+ $lmar = new Nektria\Recs\MerchantApi\Requests\ClassicAvailabilityRequest($this->getOptions());
342
+ $this->lastResponse = $lmar->execute(array("service_type" => $this->getServiceType() ));
343
+ $this->log($this->getServiceType(), 'classicAvailabilityRequest type');
344
+ $this->log($this->lastResponse, 'classicAvailabilityRequest');
345
+ }catch(Exception $e){
346
+ $this->lastError = $e;
347
+ $this->log($e->getCode().$e->getMessage(), 'classicAvailabilityRequest ERROR');
348
+ return FALSE;
349
+ }
350
+ $this->lastPrice = $this->lastResponse->getPrice()->getAmount();
351
+ Mage::getSingleton('checkout/session')->setClassicPrice($this->lastResponse->getPrice());
352
+
353
+ $this->setAvailabilityRequest('classic', array(
354
+ 'available'=>$this->lastResponse->isAvailable(),
355
+ 'currency_code'=>$this->lastResponse->getPrice()->getCurrency(),
356
+ 'price'=>$this->lastPrice
357
+ ));
358
+ return $this->lastResponse;
359
+ }
360
+
361
+ /**
362
+ * Sends Validation and Confirmation for LastMile
363
+ * @param int $order_id
364
+ * @return bool true or false if success
365
+ */
366
+ public function saveLastMile($order_id){
367
+ $this->log($order_id, 'Order ID for saveLastMile');
368
+
369
+ try{
370
+ $lmcr = new Nektria\Recs\MerchantApi\Requests\LastMileConfirmationRequest($this->getOptions());
371
+ $this->lastResponse = $lmcr->execute(array(
372
+ "order_number" => $order_id
373
+ ));
374
+ }catch(Exception $e){
375
+ $this->lastError = $e;
376
+ $this->log($e->getCode().$e->getMessage(), 'LastMileConfirmationRequest ERROR');
377
+ return FALSE;
378
+ }
379
+
380
+ $this->log($this->lastResponse, 'saveLastMile');
381
+ return TRUE;
382
+ }
383
+
384
+ public function validateLastMile(){
385
+ $userSelection = $this->getUserSelection();
386
+ $this->log($userSelection, 'UserSelection for validateLastMile');
387
+ try{
388
+ $lmvr = new Nektria\Recs\MerchantApi\Requests\LastMileValidationRequest($this->getOptions());
389
+ $this->lastResponse = $lmvr->execute($userSelection);
390
+ }catch(Exception $e){
391
+ $this->lastError = $e;
392
+ $this->log($e->getCode().$e->getMessage(), 'LastMileValidationRequest ERROR');
393
+ return FALSE;
394
+ }
395
+
396
+ $this->log($this->lastResponse, 'validateLastMile');
397
+ return TRUE;
398
+ }
399
+
400
+ /**
401
+ * Sends Classic Confirmation
402
+ * @param int $order_id
403
+ * @return bool true or false if success
404
+ */
405
+ public function saveClassic($order_id){
406
+ $this->log($order_id, 'Order ID for saveClassic');
407
+ try{
408
+ $ccr = new Nektria\Recs\MerchantApi\Requests\ClassicConfirmationRequest($this->getOptions());
409
+ $this->lastResponse = $ccr->execute(array("order_number" => $order_id));
410
+ }catch(Exception $e){
411
+ $this->lastError = $e;
412
+ $this->log($e->getCode().$e->getMessage(), 'saveClassic ERROR');
413
+ return FALSE;
414
+ }
415
+
416
+ $this->log($this->lastResponse, 'saveClassic');
417
+ return TRUE;
418
+ }
419
+
420
+ /**
421
+ * get Nektria Assets and save in session
422
+ * @return bool check if error
423
+ */
424
+ public function assetsRequest(){
425
+ //ObjectCache
426
+ if ( Mage::getSingleton('checkout/session')->getNektriaJs(FALSE) ){
427
+ return TRUE;
428
+ }
429
+
430
+ try{
431
+ $ar = new Nektria\Recs\MerchantApi\Requests\getAssetsRequest( $this->getOptions() );
432
+ $params = array(
433
+ 'version' => Mage::helper('nektria')->getAssetsVersion(),
434
+ 'language' => Mage::app()->getLocale()->getLocaleCode()
435
+ );
436
+ $this->lastResponse = $ar->execute( $params );
437
+ }catch(Exception $e){
438
+ $this->lastError = $e;
439
+ $this->log($e->getCode().$e->getMessage(), 'assetsRequest ERROR');
440
+ return FALSE;
441
+ }
442
+
443
+ $this->log(array($this->lastResponse), 'getAssetsRequest response');
444
+
445
+ Mage::getSingleton('checkout/session')->setNektriaJs( $this->lastResponse->getJsUrl() );
446
+ Mage::getSingleton('checkout/session')->setNektriaCss( $this->lastResponse->getCssUrl() );
447
+ Mage::getSingleton('checkout/session')->setNektriaHtml( $this->lastResponse->getHtmlUrl() );
448
+
449
+ return TRUE;
450
+ }
451
+
452
+ /**
453
+ * Get the list of covered countries for Nektria
454
+ * @return array list of ISO 3166 2 letters codes
455
+ */
456
+ public function getCoveredCountries(){
457
+ if ($return_value = Mage::getSingleton('checkout/session')->getCoveredCountries( FALSE ) ){
458
+ return $return_value;
459
+ }
460
+
461
+ try{
462
+ $cr = new Nektria\Recs\MerchantApi\Requests\CoverageRequest( $this->getOptions() );
463
+ $this->lastResponse = $cr->execute();
464
+ }catch(Exception $e){
465
+ $this->lastError = $e;
466
+ $this->log($e->getCode().$e->getMessage(), 'getCoveredCountries ERROR');
467
+ return FALSE;
468
+ }
469
+
470
+ $response = $this->lastResponse->getCoveredCountries();
471
+ $this->log($response, 'getCoveredCountries response');
472
+ Mage::getSingleton('checkout/session')->setCoveredCountries( $response );
473
+
474
+ return $response;
475
+ }
476
+
477
+ /**
478
+ * Check if the country code is available for Nektria
479
+ * @param string ISO 3166 2 letters codes
480
+ * @return bool
481
+ */
482
+ public function checkCoveredCountry($country_code){
483
+ $coveredCountries = $this->getCoveredCountries();
484
+
485
+ if ($coveredCountries && in_array($country_code, $coveredCountries)){
486
+ return TRUE;
487
+ }else{
488
+ return FALSE;
489
+ }
490
+ }
491
+
492
+
493
+ /**
494
+ * Get the popup Nektria Backend Configuration
495
+ * @return string url
496
+ */
497
+ public function getBackendUrl(){
498
+ if ($return_value = Mage::getSingleton('checkout/session')->getNektriaBackendUrl( FALSE ) ){
499
+ return $return_value;
500
+ }
501
+
502
+ try{
503
+ $cr = new Nektria\Recs\MerchantApi\Requests\BackendAccessRequest( $this->getOptions() );
504
+ $this->lastResponse = $cr->execute();
505
+ }catch(Exception $e){
506
+ $this->lastError = $e;
507
+ $this->log($e->getCode().$e->getMessage(), 'getBackendUrl ERROR');
508
+ return FALSE;
509
+ }
510
+
511
+ $response = $this->lastResponse->getBackendUrl();
512
+ $this->log($response, 'getBackendUrl response');
513
+ Mage::getSingleton('checkout/session')->setNektriaBackendUrl( $response );
514
+
515
+ return $response;
516
+ }
517
+
518
+ /**
519
+ * Get the url for Registration popup
520
+ * @return string url
521
+ */
522
+ public function getRegistrationUrl(){
523
+ if ($return_value = Mage::getSingleton('checkout/session')->getNektriaRegistrationUrl( FALSE ) ){
524
+ return $return_value;
525
+ }
526
+
527
+ try{
528
+ $cr = new Nektria\Recs\MerchantApi\Requests\RegistrationAccessRequest( );
529
+ $this->lastResponse = $cr->execute();
530
+ }catch(Exception $e){
531
+ $this->lastError = $e;
532
+ $this->log($e->getCode().$e->getMessage(), 'getRegistrationUrl ERROR');
533
+ return FALSE;
534
+ }
535
+
536
+ $response = $this->lastResponse->getRegistrationUrl();
537
+ $this->log($response, 'getRegistrationUrl response');
538
+ Mage::getSingleton('checkout/session')->setNektriaRegistrationUrl( $response );
539
+
540
+ return $response;
541
+ }
542
+
543
+ /**
544
+ * Get an static API Key for Sandbox
545
+ * @return string apikey
546
+ */
547
+ function getSandboxApiKey(){
548
+ try{
549
+ $rar = new Nektria\Recs\MerchantApi\Requests\SandboxApiKeyRequest();
550
+ $response = $rar->execute();
551
+ $api_key = $response->getApiKey();
552
+ }catch(Exception $e){
553
+ $this->lastError = $e;
554
+ $this->log($e->getCode().$e->getMessage(), 'getSandboxApiKey ERROR');
555
+ return FALSE;
556
+ }
557
+
558
+ return $api_key;
559
+ }
560
+
561
+ /**
562
+ * Check the API Key with the service
563
+ */
564
+ function testRequest(&$returnCode = NULL){
565
+ try {
566
+ $request = new Nektria\Recs\MerchantApi\Requests\TestRequest( $this->getOptions() );
567
+ $response = $request->execute();
568
+ } catch (Exception $e) {
569
+ $this->lastError = $e;
570
+ $this->log($e->getCode().$e->getMessage(), 'testRequest ERROR');
571
+ $returnCode = $e->getCode();
572
+ return FALSE;
573
+ }
574
+
575
+ return TRUE;
576
+ }
577
+
578
+ /* ---------------------------------------------------------- HELPER ----------------------------------------------------------- */
579
+
580
+ /**
581
+ * Helper method for logging, only if dev log is active
582
+ * @param $obj Object to pass to logging file
583
+ * @param string $msg "Indentificated text"
584
+ */
585
+ private function log($obj, $msg=''){
586
+ if (! Mage::getStoreConfig('dev/log/active'))
587
+ return FALSE;
588
+ Mage::log('----------------------'.$msg.'--------------------------', null, $this->logfile);
589
+ Mage::log(var_export($obj, TRUE), null, $this->logfile);
590
+ }
591
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/.editorconfig ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ # top-most EditorConfig file
2
+ root = true
3
+
4
+ [*]
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ indent_style = tab
8
+ indent_size = 4
9
+ trim_trailing_whitespace = true
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/.gitignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ composer.lock
2
+ .buildpath
3
+ .idea
4
+ .project
5
+ .settings
6
+ vendor
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/CHANGELOG.md ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ Note that the SDK calls files that are provided by a service that is under development. Thus, changes in the service may be reflected in the pages using the SDK when no actual change have been performed.
4
+ This project adheres to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## Unreleased
7
+ ### To Add
8
+ - Asset version number is managed in the getAssetsRequest - we need this to make sure that changes in the API do not break existing implementations.
9
+ => pending implementation from the API side.
10
+ - Manage multi language configuration.
11
+ - The getAssetsResponse::getJsUrl function should take a $locale variable to return a file corresponding to the user environment language.
12
+ - Find and include language specific initializations for used languages (es, ca, en)
13
+ - setup javascript included file to read query string and display dates in specified language.
14
+ - change repo name to recs-merchant-sdk-php & update composer.json accordingly.
15
+
16
+ ### To Fix
17
+ - Work with a tag an not a helper to display html. Full html should be initialized via javascript.
18
+
19
+ ## [1.1.17] - 2016-01-12
20
+ ### Added
21
+ - Added "session_timeout" and "currency_code" fields in ServiceRequest so that they are passed in the API call.
22
+
23
+ ## [1.1.16] - 2016-01-05
24
+ ### Fix
25
+ - Removed obsolete test file
26
+ - Removed call to static "class" method, which is not compatible with php 5.4
27
+
28
+ ## [1.1.15] - 2015-12-16
29
+ ### Added
30
+ - SandboxApiKey Request, LastMileBestPrice Request and CoverageRequest now get values from API calls.
31
+
32
+ ## [1.1.14] - 2015-12-10
33
+ ### Added
34
+ - SandboxApiKey Request and Response to retrieve a test api key
35
+
36
+ ## [1.1.13] - 2015-11-27
37
+ ### Fix
38
+ - in LastMileBestPriceResponse, modified getBestPriceCurrency method to return currency code, and not currency sign. Added other method to get the sign.
39
+
40
+ ## [1.1.12] - 2015-11-27
41
+ ### Fix
42
+ - Set staging environment to herokuapp.com domain instead of nektria.com
43
+ - Refactored Client class
44
+ ### Added
45
+ - Removed secure parameter - all requests to staging and prod go over https.
46
+
47
+ ## [1.1.11] - 2015-11-27
48
+ ### Added
49
+ - Added currency_code parameter in the service creation request.
50
+
51
+ ## [1.1.10] - 2015-11-24
52
+ ### Added
53
+ - Added session_timeout parameter in the service creation request.
54
+
55
+
56
+ ## [1.1.9] - 2015-11-23
57
+ ### Fix
58
+ - Removed composer.lock from the project
59
+
60
+ ## [1.1.8] - 2015-11-23
61
+ ### Added
62
+ - New parameters for language and version in assets retrieval process. To start with, version should be '1' and language should be 'es_ES'.
63
+
64
+ ## [1.1.7] - 2015-11-20
65
+ ### Added
66
+ - API calls timeout
67
+ - options to control these timeouts
68
+
69
+ ## [1.1.6] - 2015-11-19
70
+ ### Fix
71
+ - getRegistrationUrl is not asking for API key anymore.
72
+
73
+ ## [1.1.5] - 2015-11-18
74
+ ### Fix
75
+ - set APIKEY compulsory parameter to empty value for getRegistrationUrl (where no api key is needed).
76
+
77
+ ## [1.1.4] - 2015-11-12
78
+ ### Fix
79
+ - tipo en LastMileBestPriceRequest
80
+
81
+ ## [1.1.3] - 2015-11-11
82
+ ### Added
83
+ - Registration Access Request
84
+
85
+ ## [1.1.2] - 2015-11-10
86
+ ### Added
87
+ - README: Explained how registration link request will work.
88
+
89
+ ## [1.1.1] - 2015-11-09
90
+ ### Added
91
+ - Functionality: Set up lastMileBestPriceRequest and LastMileBestPriceResponse
92
+ - README:
93
+ - use of lastMileBestPriceRequest description
94
+ - widget javascript function to update calendar with previously selected timeslots.
95
+
96
+ ### Fixed
97
+ - README: layout for correct pdf display
98
+
99
+ ## [1.1] - 2015-10-23
100
+ ### Added
101
+ - Set production to point to production environment.
102
+
103
+ ## [1.0.2.alpha] - 2015-10-23
104
+ ### Added
105
+ - Backend Access for eCommerce Advanced Configuration is now available.
106
+
107
+ ## [1.0.1.alpha] - 2015-10-22
108
+ ### Added
109
+ - README: details about how to get list of operating countries and how to setup backend access for advanced configuration.
110
+ - Set up objects to return list of operating countries (hardcoded).
111
+
112
+ ## [1.0.alpha] - 2015-10-08
113
+ ### Added
114
+ - Exception dealing with api responses, providing all information we get from the server.
115
+
116
+
117
+ ## [0.9.3] - 2015-10-07
118
+ ### Fixed
119
+ - Validation Request execute method now accepts both plain json string and array format as parameters. Readme suggests plain json string should be used.
120
+
121
+ ## [0.9.2] - 2015-10-07
122
+ ### Fixed
123
+ - Fixed missing use statement for exceptions in Response Body Wrapper.
124
+
125
+ ## [0.9.1] - 2015-10-07
126
+ ### Fixed
127
+ - Fixed Guzzle throwing own exceptions. Now all exceptions thrown by the SDK are children of Nektria\Recs\MerchantApi\Exceptions\ApiClientException
128
+
129
+ ## [0.9] - 2015-10-06
130
+ ### Added
131
+ - Show Shipping Request Helper provides methods to show localized windows and status information.
132
+
133
+ ## ? - ?
134
+ ### Fixed
135
+ - Submit button (Confirmar)
136
+
137
+ ## [0.8] - 2015-09-23
138
+ ### Added
139
+ - Show Shipping Request.
140
+
141
+ ## [0.7.6] - 2015-09-25
142
+ ### Changed
143
+ - Updating readme to reflect changes with javascript callback function.
144
+ - Added checkup of basket shipping price on server side.
145
+
146
+ ## [0.7.5] - 2015-09-15
147
+ ### Added
148
+ - Configuration parameters for environments and secure urls
149
+
150
+
151
+ ## [0.7.4] - 2015-09-15
152
+ ### Added
153
+ - Last Mile Confirmation Response now deals with response content.
154
+
155
+ ## [0.7.3] - 2015-09-15
156
+ ### Fixed
157
+ - proof read README.md
158
+
159
+ ## [0.7.2] - 2015-09-15
160
+ ### Fixed
161
+ - order_number in the confirmation messages is taken into account for when the order is created (last mile).
162
+
163
+ ## [0.7.1] - 2015-09-15
164
+ ### Fixed
165
+ - changed service url for nektria recs api staging url.
166
+ - Last mile availability response data is returned by javascript method call.
167
+ - Ids are Initialized in the array. Data provided by previous method call is injected.
168
+ - get order_number in the confirmation message
169
+ - typo in ClassicAvailabilityRequest (missing new).
170
+
171
+ ### Added
172
+ - modal displays information about terms and conditions and FAQs.
173
+ - unselect all button works.
174
+
175
+ ## [0.7] - 2015-09-15
176
+ ### Added
177
+ - getPriceMatrix built with response from the availability request (used to be dummy data).
178
+ - Time Windows chosen by the shopper is returned by the getUserCalendarSelection method.
179
+ - Availabilities submitted to the addOnloadInit method are displayed in the calendar.
180
+ - Calendar appear without prices for shopper preselection, and after clicking "ver precios de envio" it appears with the prices. Both selections are stored and returned later.
181
+
182
+ ### Fixed
183
+ - fixed wrong index in ServiceCreationResponse
184
+
185
+ ## [0.6.1] - 2015-09-15
186
+ ### Changed
187
+
188
+ - order_number is no more compulsory in service request
189
+
190
+ ## [0.6] - 2015-09-04
191
+ ### Changed
192
+ - updated README.md to reflect new format in js asset: function calls prefixed by recs_ have been replaced by method calls of the object nektria_recs without prefix. Example: recs_showTimeWindowArea is now recs_nektria.showTimeWindowArea().
193
+ - nektria_recs.getTotalPrice() has been added and documented in the README.md, step 8).
194
+ - created CHANGELOG.md
195
+
196
+ ## [0.2] - 2015-09-03
197
+ ### Changed
198
+ - API side: all css styles now are prefixed with the id of the div containing the widget: rec-timewindow.
199
+ - recs_getTotalPrice() (now nektria_recs.getTotalPrice()) function in the javascript asset provided by the API is now returning the actual total price. On the other hand, it has been documented in the README.md
200
+ - updated test.php so that it works fine with newly released API.
201
+
202
+ ## [0.1] - 2015-08-22
203
+ ### Added
204
+ - first release
205
+
206
+
207
+ [0.1]: https://bitbucket.org/nektria/merchant-api-client/commits/1e0b69613401a2e58dde192c0fd94ef4fa5bb2ae
208
+ [0.2]: https://bitbucket.org/nektria/merchant-api-client/commits/27fb81a76df2ce2d77fff94248909769d91c9dae
209
+ [0.3]: #
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/LICENSE.md ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Apache License
2
+ Version 2.0, January 2004
3
+
4
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5
+
6
+ ## 1. Definitions.
7
+
8
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1
9
+ through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the
12
+ License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled
15
+ by, or are under common control with that entity. For the purposes of this definition, "control" means
16
+ (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract
17
+ or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
18
+ ownership of such entity.
19
+
20
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
21
+
22
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software
23
+ source code, documentation source, and configuration files.
24
+
25
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form,
26
+ including but not limited to compiled object code, generated documentation, and conversions to other media
27
+ types.
28
+
29
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License,
30
+ as indicated by a copyright notice that is included in or attached to the work (an example is provided in the
31
+ Appendix below).
32
+
33
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from)
34
+ the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent,
35
+ as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not
36
+ include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work
37
+ and Derivative Works thereof.
38
+
39
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any
40
+ modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to
41
+ Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to
42
+ submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of
43
+ electronic, verbal, or written communication sent to the Licensor or its representatives, including but not
44
+ limited to communication on electronic mailing lists, source code control systems, and issue tracking systems
45
+ that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but
46
+ excluding communication that is conspicuously marked or otherwise designated in writing by the copyright
47
+ owner as "Not a Contribution."
48
+
49
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been
50
+ received by Licensor and subsequently incorporated within the Work.
51
+
52
+ ## 2. Grant of Copyright License.
53
+
54
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,
55
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
56
+ Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such
57
+ Derivative Works in Source or Object form.
58
+
59
+ ## 3. Grant of Patent License.
60
+
61
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,
62
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent
63
+ license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such
64
+ license applies only to those patent claims licensable by such Contributor that are necessarily infringed by
65
+ their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such
66
+ Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim
67
+ or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work
68
+ constitutes direct or contributory patent infringement, then any patent licenses granted to You under this
69
+ License for that Work shall terminate as of the date such litigation is filed.
70
+
71
+ ## 4. Redistribution.
72
+
73
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without
74
+ modifications, and in Source or Object form, provided that You meet the following conditions:
75
+
76
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
77
+
78
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
79
+
80
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent,
81
+ trademark, and attribution notices from the Source form of the Work, excluding those notices that do
82
+ not pertain to any part of the Derivative Works; and
83
+
84
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that
85
+ You distribute must include a readable copy of the attribution notices contained within such NOTICE
86
+ file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one
87
+ of the following places: within a NOTICE text file distributed as part of the Derivative Works; within
88
+ the Source form or documentation, if provided along with the Derivative Works; or, within a display
89
+ generated by the Derivative Works, if and wherever such third-party notices normally appear. The
90
+ contents of the NOTICE file are for informational purposes only and do not modify the License. You may
91
+ add Your own attribution notices within Derivative Works that You distribute, alongside or as an
92
+ addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be
93
+ construed as modifying the License.
94
+
95
+ You may add Your own copyright statement to Your modifications and may provide additional or different license
96
+ terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative
97
+ Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the
98
+ conditions stated in this License.
99
+
100
+ ## 5. Submission of Contributions.
101
+
102
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by
103
+ You to the Licensor shall be under the terms and conditions of this License, without any additional terms or
104
+ conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate
105
+ license agreement you may have executed with Licensor regarding such Contributions.
106
+
107
+ ## 6. Trademarks.
108
+
109
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of
110
+ the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
111
+ reproducing the content of the NOTICE file.
112
+
113
+ ## 7. Disclaimer of Warranty.
114
+
115
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor
116
+ provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
117
+ or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
118
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
119
+ appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of
120
+ permissions under this License.
121
+
122
+ ## 8. Limitation of Liability.
123
+
124
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless
125
+ required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any
126
+ Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential
127
+ damages of any character arising as a result of this License or out of the use or inability to use the Work
128
+ (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or
129
+ any and all other commercial damages or losses), even if such Contributor has been advised of the possibility
130
+ of such damages.
131
+
132
+ ## 9. Accepting Warranty or Additional Liability.
133
+
134
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for,
135
+ acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this
136
+ License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole
137
+ responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold
138
+ each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason
139
+ of your accepting any such warranty or additional liability.
140
+
141
+ END OF TERMS AND CONDITIONS
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/README.md ADDED
@@ -0,0 +1,673 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##Merchant API Client Library for PHP
2
+
3
+ This is a Software Development Kit for Merchants that want to use Nektria Responsive eCommerce Shipping Services. After explaining the basics of the API, we provide the full integration workflow that needs to be followed to propose Nektria Delivery Service to the eCommerce shoppers.
4
+
5
+
6
+ ## Test and Configuration
7
+
8
+ A test request is made available to verify the connection to the SDK for a given API key. All requests implement the exectute method which will throw an ApiClientException if the API returns an error response (status code 4xx and 5xx).
9
+
10
+ ### Create and Run a Test Request
11
+
12
+ ```
13
+ $request = new Nektria\Recs\MerchantApi\Requests\TestRequest([
14
+ 'APIKEY' => 'dGVzdDp0ZXN0'
15
+ ]);
16
+
17
+ // Execute the 'test' method to check the connection with the API
18
+ try {
19
+ $response = $request->execute();
20
+ } catch (ApiClientException $e) {
21
+ echo "There was an error connecting with the API : ".$e->getMessage();
22
+ }
23
+
24
+ ```
25
+
26
+ ### Debug mode
27
+
28
+ example
29
+
30
+ ```
31
+ $recsClient = new Nektria\Recs\MerchantApi\Client([
32
+ 'debug' => true
33
+ ]);
34
+ ```
35
+ Default value is false.
36
+
37
+ ### Environment and Sandbox
38
+
39
+
40
+ All requests are run against the live environment. In order to make requests that will not result in real orders, you can use the sandbox service using the following parameter:
41
+
42
+ ```
43
+ $recsClient = new Nektria\Recs\MerchantApi\Client([
44
+ 'environment' => 'sandbox'
45
+ ]);
46
+ ```
47
+ Default value is 'production'.
48
+
49
+ ### Request Timeouts
50
+
51
+ The `timeout` and `connect\_timeout` options set the maximum time API requests will wait for the connection or the reply.
52
+ The default values are 3 seconds for connection, and 5 seconds for a reply.
53
+
54
+ ```
55
+ $recsClient = new Nektria\Recs\MerchantApi\Client([
56
+ 'timeout' => 2.25,
57
+ 'connect_timeout' => 1.5
58
+ ]);
59
+ ```
60
+
61
+ ### More Request and Response examples
62
+
63
+ Here is a service creation request run against the sandbox with debug information.
64
+
65
+ ```
66
+ $sr = new Nektria\Recs\MerchantApi\Requests\ServiceCreationRequest([
67
+ 'APIKEY' => 'dGVzdDp0ZXN0',
68
+ 'environment' => 'sandbox',
69
+ 'debug' => true
70
+ ]);
71
+
72
+ $response = $sr->execute([
73
+ "session_timeout" => 600,
74
+ "currency_code" => "EUR",
75
+ "shopper" => [
76
+ "name" => "Roberto",
77
+ "surname" => "Rodríguez",
78
+ "email" => "roberto.rodriguez@gmail.com",
79
+ "phone" => "83486923409"
80
+ ],
81
+ "destination_address" => [
82
+ "postal_code" => "08022",
83
+ "street_name" => "Urquinaona",
84
+ "street_number" => "5",
85
+ "city" => "Barcelona",
86
+ "country_code" => "ES"
87
+ ],
88
+ "products" => [
89
+ [
90
+ "name" => "T-shirt Monashee",
91
+ "reference" => "PQR48-D",
92
+ "quantity" => 1,
93
+ "weight_kg" => 0.5
94
+ ],
95
+ [
96
+ "name" => "Jeans Lemon pie",
97
+ "reference" => "WDV48-D",
98
+ "quantity" => 2,
99
+ "weight_kg" => 0.5
100
+ ]
101
+ ]
102
+ ]);
103
+ ```
104
+
105
+ or a last mile availability request run in production
106
+
107
+ ```
108
+ $lmar = new Nektria\Recs\MerchantApi\Requests\LastMileAvailabilityRequest([
109
+ 'APIKEY' => 'dGVzdDp0ZXN0',
110
+ 'id' => '1234'
111
+ ]);
112
+
113
+ $request_body_params = array("service_type" => "last-mile-only");
114
+ $response = $lmar->execute($request_body_params);
115
+ ```
116
+
117
+ ### Exceptions
118
+
119
+ All SDK exceptions are children of the base exception Nektria\Recs\MerchantApi\Exceptions\ApiClientException.
120
+
121
+ Any request that receives an error response when executed (http status code 4xx or 5xx) throws a Nektria\Recs\MerchantApi\Exceptions\ApiResponseException. This exception provides the following methods:
122
+
123
+ - exact http status code: __getCode__ method
124
+ - api specific error code: __getApiErrorCode__ method.
125
+ - error message: __getMessage__ method
126
+ - (sometimes) details about the error: __getApiMessageBody__ method.
127
+
128
+ Here comes a list of API specific error codes, along with the corresponding http error code:
129
+
130
+ - \#1. Formato de mensaje incorrecto. (HTTP 400 Bad Request)
131
+ - \#2. ContentType no válido. (HTTP 415 Unsupported Media Type)
132
+ - \#3. Falta cuerpo del mensaje. (HTTP 400 Bad Request)
133
+ - \#4. El usuario o la contraseña no son correctos. (HTTP 401 Unauthorized)
134
+ - \#5. No puede acceder a este recurso. (HTTP 403 Forbidden)
135
+ - \#6. El método que se quiere aplicar a este recurso ha expirado (http 400 Bad Request)
136
+ - \#7. El formato o los datos de la petición son incorrectos. (HTTP 422 Unprocesable Entity)
137
+ - \#20. Código de moneda incorrecto (HTTP 422 Unprocesable Entity)
138
+ - \#21. Código de moneda no soportado (HTTP 422 Unprocesable Entity)
139
+ - \#22. Código de país incorrecto (HTTP 422 Unprocesable Entity)
140
+ - \#23. Código de país no soportado (HTTP 422 Unprocesable Entity)
141
+ - \#24. Código Postal incorrecto (HTTP 422 Unprocesable Entity)
142
+ - \#25. Ventana horaria incorrecta (HTTP 422 Unprocesable Entity)
143
+
144
+ ## Workflow for merchant modules
145
+
146
+ Here follows a list of steps to integrate the module with a user checkout process.
147
+
148
+ ### Initialize carriers availabilities
149
+
150
+ 0) Find price to be displayed for the last mile option (whenever we need to display this price before we know shopper's address)
151
+ 1) Setup the service, get service number and service type (_HOOK\_GATHER\_CARRIERS_)<br/>
152
+ 2) Hook the classic delivery carrier module<br/>
153
+ 3) Hook the last mile delivery carrier module
154
+
155
+ ```
156
+ // 0) Last Mile Price
157
+ $scr = new Nektria\Recs\MerchantApi\Requests\LastMileBestPriceRequest([
158
+ 'APIKEY' => 'dGVzdDp0ZXN0'
159
+ ]);
160
+
161
+ $response = $scr->execute([
162
+ "destination_address" => $basket->getShopperAddress(),
163
+ "products" => $basket->getProductsDetails()
164
+ ]);
165
+
166
+ $best_price = $response->getPrice();
167
+ ```
168
+ ...
169
+
170
+ ```
171
+ // 1) Service Setup
172
+ $scr = new Nektria\Recs\MerchantApi\Requests\ServiceCreationRequest([
173
+ 'APIKEY' => 'dGVzdDp0ZXN0'
174
+ ]);
175
+
176
+ $response = $scr->execute([
177
+ "session_timeout" => 600,
178
+ "currency_code" => "EUR",
179
+ "shopper" => $basket->getShopperDetails(),
180
+ "destination_address" => $basket->getShopperAddress(),
181
+ "products" => $basket->getProductsDetails()
182
+ ]);
183
+
184
+ $id = $response->getServiceNumber();
185
+ $service_type = $response->getServiceType();
186
+ ```
187
+ ...
188
+
189
+ ```
190
+ // 2) Classic carrier hook
191
+ $car = new Nektria\Recs\MerchantApi\Requests\ClassicAvailabilityRequest([
192
+ 'APIKEY' => 'dGVzdDp0ZXN0',
193
+ 'id' => $id
194
+ ]);
195
+
196
+ $response = $car->execute(array(
197
+ "service_type" => $service_type
198
+ ));
199
+
200
+ if($response->isAvailable())
201
+ your_display_classic_carrier($response->getPrice());
202
+ ```
203
+ ...
204
+
205
+ ```
206
+
207
+ // 3) Last Mile carrier hook
208
+ $lmar = new Nektria\Recs\MerchantApi\Requests\LastMileAvailabilityRequest([
209
+ 'APIKEY' => 'dGVzdDp0ZXN0',
210
+ 'id' => $id
211
+ ]);
212
+
213
+ $response = $lmar->execute(array(
214
+ "service_type" => $service_type
215
+ ));
216
+
217
+ if($response->isAvailable())
218
+ {
219
+ your_display_last_mile_carrier($response->getBestPrice());
220
+ $price_matrix = $response->getPriceMatrix();
221
+ your_store_string_into_session($price_matrix);
222
+ }
223
+
224
+ ```
225
+
226
+ ### Initialize last mile widget
227
+
228
+ This needs to be done only if the last mile availability request has returned some availability. There is no harm if it is always done, however, since it will stay hidden.
229
+
230
+ 4) Get the list of resources (_HOOK\_SHOW\_LM\_CARRIER_), specifying language settings and version number. At the moment, the only version version we manage is '1', and the only
231
+ language is 'es_ES'.<br/>
232
+ 5) Place the resources in the layout
233
+
234
+ - a) js
235
+ - b) css
236
+ - c) html
237
+
238
+ 6) Setup javascript to manage widget information:
239
+
240
+ - a) Setup the selection of last mile carrier to trigger the javascript method `nektria_recs.showTimeWindowArea()`<br/>
241
+ - b) Setup the unselection of last mile carrier to trigger the javascript method `nektria_recs.hideTimeWindowArea()`<br/>
242
+ - c) Setup callback function:
243
+
244
+ ***It performs the following tasks***
245
+
246
+ * Update shopping cart with transportation information provided
247
+ * Update total cost corresponding to selected option
248
+
249
+ ***And takes two parameters***
250
+
251
+ * @param string `user_calendar_selection` json that needs to be stored and passed to last mile validation request
252
+ * @param float `total_price` price of the selected transportation option
253
+
254
+ - d) Once the widget html has been loaded, call javascript method that initializes available windows `nektria_recs.initTimeWindowPrices(<?php echo $price_matrix; ?>, callback_function);`
255
+
256
+ The Controller could go like this
257
+
258
+ ```
259
+ // 4) After carriers are loaded, get resources
260
+ $ar = new Nektria\Recs\MerchantApi\Requests\getAssetsRequest([
261
+ 'APIKEY' => 'dGVzdDp0ZXN0',
262
+ 'id' => $id,
263
+ ]);
264
+
265
+ $response = $ar->execute(array('version' => 1, 'language' => 'es_ES'));
266
+ $css_url = $response->getCssUrl();
267
+ $js_url = $response->getJsUrl();
268
+ $html_url = $response->getHtmlUrl();
269
+ ```
270
+
271
+ Here is how it may look like in the Template
272
+
273
+ ```
274
+ <head>
275
+ ....
276
+ <!-- 5a) place js -->
277
+ <script src="<?php print $js_url; ?>"></script>
278
+ <!-- 5b) place css -->
279
+ <link rel="stylesheet" href="<?php print $css_url; ?>" />
280
+
281
+ <!-- 6c) Create callback function -->
282
+ <script>
283
+ your_cbfunction_8473028 = function(user_calendar_selection, total_price)
284
+ {
285
+ // Add to the basket: user_calendar_selection;
286
+ (...)
287
+ // update_total_price
288
+ (...)
289
+ }
290
+ </script>
291
+ ```
292
+ ....
293
+
294
+ ```
295
+ </head>
296
+ <body>
297
+
298
+ <li>
299
+ <!-- 6a) show price grid when last mile selected -->
300
+ <input name="shipping_method" type="radio" value="nektria" id="s_method_matrixrate_matrixrate_10046" class="radio validate-one-required-by-name" onclick="nektria_recs.showTimeWindowArea()">
301
+ <label for="s_method_matrixrate_matrixrate_10046">ReCS <span class="price">8,16 €</span> </label>
302
+ </li>
303
+ <li>
304
+ <!-- 6b) hide price grid when last mile selected -->
305
+ <input name="shipping_method" type="radio" value="nacex" id="s_method_matrixrate_matrixrate_10041" class="radio" onclick="nektria_recs.hideTimeWindowArea()">
306
+ <label for="s_method_matrixrate_matrixrate_10041">NACEX <span class="price">8,12 €</span> </label>
307
+ </li>
308
+ ```
309
+ ....
310
+
311
+ ```
312
+ <!-- 5c) place html -->
313
+ <?php print file_get_contents($html_url); ?>
314
+ ....
315
+ </body>
316
+
317
+ ```
318
+ ....
319
+
320
+ ```
321
+ <!-- 6d) Init widget -->
322
+
323
+ <script type="text/javascript">
324
+ nektria_recs.initTimeWindowPrices(<?php print $price_matrix; ?>, your_cbfunction_8473028);
325
+ </script>
326
+
327
+ ```
328
+
329
+ 7) If the page is being reloaded and a selection was done previously, call the `nektria_recs.updateSelectedWindows(user_calendar_selection)` method to
330
+ make sure the calendar appears with correctly selected cells. The parameter `user_calendar_selection` is the one that was passed by the widget to the callback function.
331
+
332
+ ### If classic carrier is chosen by the shopper
333
+
334
+ 8) Confirm Classic Carrier after the user has made the payment (_HOOK\_ORDER\_CONFIRMED_).
335
+
336
+ ```
337
+ // 8) Order Confirmed hook
338
+ $ccr = new Nektria\Recs\MerchantApi\Requests\ClassicConfirmationRequest([
339
+ 'APIKEY' => 'dGVzdDp0ZXN0',
340
+ 'id' => $id
341
+ ]);
342
+
343
+ $response = $ccr->execute(array("order_number" => $basket->getOrderNumber()));
344
+ ```
345
+
346
+ __And your are done !__
347
+
348
+ ### If last mile carrier is chosen by the shopper
349
+
350
+ 8) !! Make sure the price provided in the user selection for the API matches the price in the shopper basket
351
+ 9) Validate last mile request with information retrieved from final selection.<br/>
352
+ 10) Just before the payment, refresh the shipping order. (_HOOK\_PRE\_PAYMENT_)<br/>
353
+ 11) After the payment, confirm the shipping order. (_HOOK\_ORDER\_CONFRIMED_)
354
+
355
+
356
+ ```
357
+ // 8) Check basket shipping price matches the one provided to the API
358
+ $user_selection = your_get_user_calendar_selection_from_the_basket();
359
+ $a = json_decode($user_selection ,true);
360
+ $shipping_price = $a["total_price"];
361
+ basket_shipping_price = your_pickup_basket_shipping_price();
362
+ if($shipping_price != $basket_shipping_price)
363
+ throw new BookingException("Price mismatch - the price in the basket is incorrect");
364
+
365
+ // 9) When carrier is chosen, validate the shipping order
366
+ $lmvr = new Nektria\Recs\MerchantApi\Requests\LastMileValidationRequest([
367
+ 'APIKEY' => 'dGVzdDp0ZXN0',
368
+ 'id' => $id
369
+ ]);
370
+
371
+ $response = $lmvr->execute($user_selection);
372
+ ```
373
+ ...
374
+
375
+ ```
376
+ // 10) Before payment, make sure shipping order does not expire
377
+ $kar = new Nektria\Recs\MerchantApi\Requests\KeepAliveRequest([
378
+ 'APIKEY' => 'dGVzdDp0ZXN0',
379
+ 'id' => $id
380
+ ]);
381
+
382
+ $response = $kar->execute();
383
+ ```
384
+ ...
385
+
386
+ ```
387
+ // 11) When order is confirmed, confirm shipping
388
+ $lmcr = new Nektria\Recs\MerchantApi\Requests\LastMileConfirmationRequest([
389
+ 'APIKEY' => 'dGVzdDp0ZXN0',
390
+ 'id' => $id
391
+ ]);
392
+
393
+ $response = $lmcr->execute(array(
394
+ "order_number" => $basket->getOrderNumber()
395
+ ));
396
+ ```
397
+
398
+ __And your are done !__
399
+
400
+ ## eCommerce Backend
401
+
402
+ ### Configuration
403
+
404
+ In the eCommerce config panel, we will see the following options:
405
+
406
+ - api key, plus registration button if no API Key is available
407
+ - sandbox mode
408
+
409
+ If the API key is left empty, when we are using the Sandbox mode, a default key is assigned automatically by the SDK. In
410
+ that way, the shipping module can be used to perform tests out of the box, with no need to go through the registration
411
+ process. On the other hand, a requests makes it possible to retrieve a valid API Key for testing purposes. This is done
412
+ via the SandboxApiKeyRequest, which goes as follow:
413
+
414
+ ```
415
+ // Module configuration controller
416
+ $rar = new Nektria\Recs\MerchantApi\Requests\SandboxApiKeyRequest(
417
+ // no API key is needed
418
+ );
419
+
420
+ $response = $rar->execute();
421
+
422
+ $api_key = $response->getApiKey();
423
+ ```
424
+
425
+ ### Registration link
426
+
427
+ The registration link must be made available next to the api key field: with a label "Sing up or Log In", the link will
428
+ open a full window popup to a page where the user will be able to create an account. If he is already registered, he will
429
+ be able to access a control panel with his credentials.
430
+
431
+ ```
432
+ // Module configuration controller
433
+ $rar = new Nektria\Recs\MerchantApi\Requests\RegistrationAccessRequest(
434
+ // no API key is needed
435
+ );
436
+
437
+ $response = $rar->execute();
438
+
439
+ $url = $response->getRegistrationUrl();
440
+ ```
441
+
442
+ then in the view we may have something like this (new tab trick version)
443
+
444
+ ```
445
+ <!-- Module configuration view -->
446
+ <script type="text/javascript">
447
+ function OpenInNewTab(url) {
448
+ var win = window.open(url, '_blank');
449
+ win.focus();
450
+ }
451
+ </script>
452
+ <div onclick='OpenInNewTab("<?php echo $url ?>");'>Sign up or Log In</div>
453
+ ```
454
+
455
+ ### Advanced Configuration
456
+
457
+ Advanced configuration options are made available on a specific webpage. This url will be retrieved calling the getBackendUrl
458
+ method of a BackendAccessResponse object. It will be made available to the merchant ideally via an iframe in a modal window,
459
+ though a simple popup would cover the needs. This url will have a timeout, ideally bigger than the session timeout of
460
+ Magento backend.
461
+
462
+ ```
463
+ // Module configuration controller
464
+ $br = new Nektria\Recs\MerchantApi\Requests\BackendAccessRequest([
465
+ 'APIKEY' => 'dGVzdDp0ZXN0'
466
+ ]);
467
+
468
+ $response = $br->execute();
469
+
470
+ $url = $response->getBackendUrl();
471
+ ```
472
+
473
+ then in the view we may have something like this (popup version)
474
+
475
+ ```
476
+ <!-- Module configuration view -->
477
+ <a href="<?php echo $url ?>" target="_blank" onClick="window.open(this.href, this.target, 'width=800,height=600'); return false;">
478
+ Advanced Configuration
479
+ onboiarding&co cs</a>
480
+ ```
481
+
482
+ ### Shipping information
483
+
484
+ Information about a given shipping can be displayed using the ShowShippingRequest object, which will generate a ShowShippingResponse. The ShowShippingHelper provides methods to display this response in the backend.
485
+ Note: if a shipping has no last mile, then nothing should be shown.
486
+
487
+ ```
488
+ // Show Shipping Controller
489
+ $ccr = new Nektria\Recs\MerchantApi\Requests\ShowShippingRequest([
490
+ 'APIKEY' => 'dGVzdDp0ZXN0',
491
+ 'id' => $id
492
+ ]);
493
+
494
+ $response = $ccr->execute();
495
+ $recs_shipping_info = new Nektria\Recs\MerchantApi\ShowShippingHelper($response, $locale);
496
+ ```
497
+
498
+ ```
499
+ // Show Shipping View
500
+ <? if($recs_shipping_info->hasLastMile())
501
+ {
502
+ echo "Estado del envío: ".$recs_shipping_info->getStatus()."<br/>";
503
+ echo "Franjas horarias de entrega: "
504
+ foreach($recs_shipping_info->getDeliveryWindows() as $window)
505
+ echo $window."<br/>";
506
+ }
507
+ ]);
508
+
509
+ $response = $ccr->execute();
510
+ ```
511
+
512
+ ### List of countries where we have operations
513
+
514
+ You can get a list of the countries where we have operations. This will come as a list of ISO 3166 2 letters codes when
515
+ running the getCoveredCountries method of the CoverageResponse object, obtained as follow
516
+
517
+ ```
518
+ // Module configuration controller
519
+ $cr = new Nektria\Recs\MerchantApi\Requests\CoverageRequest([
520
+ 'APIKEY' => 'dGVzdDp0ZXN0'
521
+ ]);
522
+
523
+ $response = $cr->execute();
524
+
525
+ $countries = $response->getCoveredCountries();
526
+ ```
527
+
528
+ ## Data Formats used in the requests
529
+
530
+
531
+ ### Addresses
532
+
533
+ The addresses will be used to identify where to deliver the products. They are structured as follow:
534
+
535
+ - postal_code
536
+ - Type: String
537
+ - Required: Yes
538
+ - Description: postal code
539
+ - street_type
540
+ - Type: String
541
+ - Required: No
542
+ - Description: street type (street, place, etc.)
543
+ - street_name
544
+ - Type: String
545
+ - Required: Yes
546
+ - Description: street name.
547
+ - street_number
548
+ - Type: Integer
549
+ - Required: No
550
+ - Description: street number
551
+ - floor
552
+ - Type: String
553
+ - Required: No
554
+ - Description: floor
555
+ - door
556
+ - Type: String
557
+ - Required: No
558
+ - Description: door
559
+ - city
560
+ - Type: String
561
+ - Required: Yes
562
+ - Description: city name
563
+ - province
564
+ - Type: String
565
+ - Required: No
566
+ - Description: province
567
+ - country_code
568
+ - Type: CountryCode
569
+ - Required: Yes
570
+ - Description: 2 letter ISO3166 code of the country.
571
+
572
+ ### Shoppers
573
+
574
+ Shopper information is used to identify the shopper and provides contact information.
575
+
576
+ - name
577
+ - Type: String
578
+ - Required: Yes
579
+ - Description: name
580
+ - surname
581
+ - Type: String
582
+ - Required: Yes
583
+ - Description: surnames.
584
+ - email
585
+ - Type: String
586
+ - Required: Yes
587
+ - Description: email
588
+ - phone
589
+ - Type: String
590
+ - Required: No
591
+ - Description: phone number
592
+
593
+ ### Products
594
+
595
+ Products are identified by their type, their availability, price and size.
596
+
597
+ - name
598
+ - Type: String
599
+ - Required: Yes
600
+ - Description: product name
601
+ - reference
602
+ - Type: String
603
+ - Required: Yes
604
+ - Description: product reference in eCommerce.
605
+ - quantity
606
+ - Type: Integer
607
+ - Required: Yes
608
+ - Description: number of products of this type in the basket
609
+ - Size
610
+ - Type: SizeType
611
+ - Required: No
612
+ - Description: product size
613
+ - weight_kg
614
+ - Type: Float
615
+ - Required: No
616
+ - Description: peso de un producto en kg - origin_information
617
+ - price
618
+ - Type: Price (float with 2 decimal digits maximum)
619
+ - Required: No
620
+ - Description: price of one product.
621
+ - currency_code
622
+ - Type: Currency Code
623
+ - Required: No
624
+ - Description: currency code as defined in ISO4217. For now, we will only accept transactions in euros ("EUR")
625
+
626
+ ### Size
627
+
628
+ Product Size is defined as follow:
629
+
630
+ - height_cm
631
+ - Type: Integer
632
+ - Required: Yes
633
+ - Description: height in cm
634
+ - width_cm
635
+ - Type: Integer
636
+ - Required: Yes
637
+ - Description: width in cm
638
+ - depth_cm
639
+ - Type: Integer
640
+ - Required: Yes
641
+ - Description: depth in cm
642
+
643
+
644
+ ## Appendix - Under the hood
645
+
646
+ All the following method calls are used in the Nektria\Recs\MerchantApi\Requests\BaseRequest class. All SDK requests inherit from BaseRequest, and use transparently these methods, transmitting all the parameters that are passed in the constructor.
647
+
648
+ ### Create the ReCS API client
649
+
650
+ ```
651
+ <?php
652
+ // Require the Composer autoloader.
653
+ require 'vendor/autoload.php';
654
+
655
+ // Instantiate an ReCS client using your API KEY.
656
+ $recsClient = new Nektria\Recs\MerchantApi\Client([
657
+ 'APIKEY' => 'my-own-api-key'
658
+ ]);
659
+ ```
660
+
661
+ ### Run a configured request
662
+
663
+ For example, the test request.
664
+
665
+ ```
666
+ <?php
667
+ // Execute the 'test' method to check the connection with the API
668
+ try {
669
+ $recsClient->test();
670
+ } catch (Exception $e) {
671
+ echo "There was an error connecting with the API : ".$e->getMessage();
672
+ }
673
+ ```
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/composer.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name" : "nektria/recs-sdk-php",
3
+ "homepage" : "http://www.recshipping.com",
4
+ "description" : "Nektria Responsive eCommerce Shipping (ReCS) SDK for PHP",
5
+ "keywords" : [
6
+ "recs",
7
+ "nektria",
8
+ "sdk",
9
+ "shipping",
10
+ "lastmile",
11
+ "carrier",
12
+ "ecommerce",
13
+ "magento"
14
+ ],
15
+ "type" : "library",
16
+ "license" : "Apache-2.0",
17
+ "authors" : [{
18
+ "name" : "Nektria",
19
+ "homepage" : "http://www.nektria.com/"
20
+ }
21
+ ],
22
+ "require" : {
23
+ "php" : ">=5.4",
24
+ "guzzlehttp/guzzle" : "5.3",
25
+ "guzzlehttp/guzzle-services" : "0.5.*",
26
+ "guzzlehttp/log-subscriber" : "~1.0"
27
+ },
28
+ "require-dev" : {
29
+ "phpunit/phpunit" : "4.*"
30
+ },
31
+ "suggest" : {
32
+ "ext-curl" : "To send requests using cURL"
33
+ },
34
+ "autoload" : {
35
+ "psr-4" : {
36
+ "Nektria\\Recs\\MerchantApi\\" : "src/"
37
+ }
38
+ },
39
+ "autoload-dev" : {
40
+ "psr-4" : {
41
+ "Nektria\\Recs\\MerchantApi\\Test\\" : "tests/"
42
+ }
43
+ }
44
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Address.php ADDED
@@ -0,0 +1,377 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ /**
6
+ * Address
7
+ *
8
+ */
9
+ class Address
10
+ {
11
+ /**
12
+ * @var string
13
+ */
14
+ private $streetType;
15
+
16
+ /**
17
+ * @var string
18
+ */
19
+ private $streetName;
20
+
21
+ /**
22
+ * @var string
23
+ */
24
+ private $streetNumber;
25
+
26
+ /**
27
+ * @var string
28
+ */
29
+ private $stairBuilding;
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ private $floor;
35
+
36
+ /**
37
+ * @var string
38
+ */
39
+ private $door;
40
+
41
+ /**
42
+ * @var string
43
+ */
44
+ private $city;
45
+
46
+ /**
47
+ * @var string
48
+ */
49
+ private $province;
50
+
51
+ /**
52
+ * @var string
53
+ */
54
+ private $country_code;
55
+
56
+ /**
57
+ * @var string
58
+ */
59
+ private $postalCode;
60
+
61
+ /**
62
+ * Build this Location from a array
63
+ * @param array $params
64
+ */
65
+ public function __construct(array $params = null)
66
+ {
67
+ if(is_null($params)) return;
68
+
69
+ foreach(array("postal_code", "street_name", "city", "country_code") as $key)
70
+ if(! array_key_exists($key, $params))
71
+ throw new \Exception("key $key is compulsory in Address constructor.");
72
+
73
+ $this->setPostalCode($params["postal_code"])
74
+ ->setStreetType($params["street_type"])
75
+ ->setStreetName($params["street_name"])
76
+ ->setCity($params["city"])
77
+ ->setCountryCode($params["country_code"]);
78
+
79
+ if(array_key_exists("street_type", $params))
80
+ $this->setStreetType($params["street_type"]);
81
+ if(array_key_exists("street_number", $params))
82
+ $this->setStreetNumber($params["street_number"]);
83
+ if(array_key_exists("floor", $params))
84
+ $this->setFloor($params["floor"]);
85
+ if(array_key_exists("door", $params))
86
+ $this->setDoor($params["door"]);
87
+ }
88
+
89
+ public function asArray()
90
+ {
91
+ $result = array(
92
+ "postal_code" => $this->getPostalCode(),
93
+ "street_type" => $this->getStreetType(),
94
+ "street_name" => $this->getStreetName(),
95
+ "city" => $this->getCity(),
96
+ "country_code" => $this->getCountryCode()
97
+ );
98
+
99
+ if($this->hasStreetNumber())
100
+ $result["street_number"] = $this->getStreetNumber();
101
+
102
+ if($this->hasFloor())
103
+ $result["floor"] = $this->getFloor();
104
+
105
+ if($this->hasDoor())
106
+ $result["door"] = $this->getDoor();
107
+
108
+ return $result;
109
+ }
110
+
111
+ /**
112
+ * Set streetName
113
+ *
114
+ * @param string $streetName
115
+ * @return Address
116
+ */
117
+ public function setStreetName($streetName)
118
+ {
119
+ $this->streetName = $streetName;
120
+
121
+ return $this;
122
+ }
123
+
124
+ public function hasStreetName()
125
+ {
126
+ return ! is_null($this->streetName);
127
+ }
128
+
129
+ /**
130
+ * Get streetName
131
+ *
132
+ * @return string
133
+ */
134
+ public function getStreetName()
135
+ {
136
+ return $this->streetName;
137
+ }
138
+
139
+ /**
140
+ * Set streetType
141
+ *
142
+ * @param string $streetType
143
+ * @return Address
144
+ */
145
+ public function setStreetType($streetType)
146
+ {
147
+ $this->streetType = $streetType;
148
+
149
+ return $this;
150
+ }
151
+
152
+ public function hasStreetType()
153
+ {
154
+ return ! is_null($this->streetType);
155
+ }
156
+
157
+ /**
158
+ * Get streetType
159
+ *
160
+ * @return string
161
+ */
162
+ public function getStreetType()
163
+ {
164
+ return $this->streetType;
165
+ }
166
+
167
+ /**
168
+ * Set streetNumber
169
+ *
170
+ * @param string $streetNumber
171
+ * @return Address
172
+ */
173
+ public function setStreetNumber($streetNumber)
174
+ {
175
+ $this->streetNumber = $streetNumber;
176
+
177
+ return $this;
178
+ }
179
+
180
+ /**
181
+ * Get streetNumber
182
+ *
183
+ * @return string
184
+ */
185
+ public function getStreetNumber()
186
+ {
187
+ return $this->streetNumber;
188
+ }
189
+
190
+ private function hasStreetNumber(){ return ! is_null($this->streetNumber); }
191
+
192
+ /**
193
+ * Set stairBuilding
194
+ *
195
+ * @param string $stairBuilding
196
+ * @return Address
197
+ */
198
+ public function setStairBuilding($stairBuilding)
199
+ {
200
+ $this->stairBuilding = $stairBuilding;
201
+
202
+ return $this;
203
+ }
204
+
205
+ /**
206
+ * Get stairBuilding
207
+ *
208
+ * @return string
209
+ */
210
+ public function getStairBuilding()
211
+ {
212
+ return $this->stairBuilding;
213
+ }
214
+
215
+ public function hasStairBuilding(){ return ! $this->stairBuilding == ""; }
216
+ /**
217
+ * Set floor
218
+ *
219
+ * @param string $floor
220
+ * @return Address
221
+ */
222
+ public function setFloor($floor)
223
+ {
224
+ $this->floor = $floor;
225
+
226
+ return $this;
227
+ }
228
+
229
+ /**
230
+ * Get floor
231
+ *
232
+ * @return string
233
+ */
234
+ public function getFloor()
235
+ {
236
+ return $this->floor;
237
+ }
238
+
239
+ private function hasFloor(){ return ! is_null($this->floor); }
240
+
241
+ /**
242
+ * Set door
243
+ *
244
+ * @param string $door
245
+ * @return Address
246
+ */
247
+ public function setDoor($door)
248
+ {
249
+ $this->door = $door;
250
+
251
+ return $this;
252
+ }
253
+
254
+ /**
255
+ * Get door
256
+ *
257
+ * @return string
258
+ */
259
+ public function getDoor()
260
+ {
261
+ return $this->door;
262
+ }
263
+
264
+ private function hasDoor(){ return ! is_null($this->door); }
265
+
266
+ /**
267
+ * Set city
268
+ *
269
+ * @param string $city
270
+ * @return Address
271
+ */
272
+ public function setCity($city)
273
+ {
274
+ $this->city = $city;
275
+
276
+ return $this;
277
+ }
278
+
279
+ /**
280
+ * Get city
281
+ *
282
+ * @return string
283
+ */
284
+ public function getCity()
285
+ {
286
+ return $this->city;
287
+ }
288
+
289
+ public function hasCity()
290
+ {
291
+ return ! is_null($this->city);
292
+ }
293
+
294
+ /**
295
+ * Set province
296
+ *
297
+ * @param string $province
298
+ * @return Address
299
+ */
300
+ public function setProvince($province)
301
+ {
302
+ $this->province = $province;
303
+
304
+ return $this;
305
+ }
306
+
307
+ /**
308
+ * Get province
309
+ *
310
+ * @return string
311
+ */
312
+ public function getProvince()
313
+ {
314
+ return $this->province;
315
+ }
316
+
317
+ public function hasProvince()
318
+ {
319
+ return ! is_null($this->province);
320
+ }
321
+
322
+ /**
323
+ * Set country_code
324
+ *
325
+ * @param string $country_code
326
+ * @return Address
327
+ */
328
+ public function setCountryCode($country_code)
329
+ {
330
+ $this->country_code = $country_code;
331
+
332
+ return $this;
333
+ }
334
+
335
+ /**
336
+ * Get country_code
337
+ *
338
+ * @return string
339
+ */
340
+ public function getCountryCode()
341
+ {
342
+ return $this->country_code;
343
+ }
344
+
345
+ public function hasCountryCode()
346
+ {
347
+ return ! is_null($this->country_code);
348
+ }
349
+
350
+ /**
351
+ * Set postalCode
352
+ *
353
+ * @param string $postalCode
354
+ * @return Address
355
+ */
356
+ public function setPostalCode($postalCode)
357
+ {
358
+ $this->postalCode = $postalCode;
359
+
360
+ return $this;
361
+ }
362
+
363
+ /**
364
+ * Get postalCode
365
+ *
366
+ * @return string
367
+ */
368
+ public function getPostalCode()
369
+ {
370
+ return $this->postalCode;
371
+ }
372
+
373
+ public function hasPostalCode()
374
+ {
375
+ return ! is_null($this->postalCode);
376
+ }
377
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Client.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use GuzzleHttp\Subscriber\Log\LogSubscriber;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+
8
+ class Client
9
+ {
10
+ private $api_key;
11
+ private $debug=false;
12
+ private $secure=true;
13
+ private $environment="production";
14
+
15
+ /**
16
+ * Settings for base client
17
+ * timeout - request timeout in seconds, default is 5 seconds
18
+ * connect_timeout - connection timeout in seconds, default is 3 seconds
19
+ * exceptions - always set to false (cannot be edited)
20
+ * other ? we would need to specify this manually in initBaseClientSettings
21
+ *
22
+ * @var array
23
+ */
24
+ private $base_client_settings = ['timeout' => 5, 'connect_timeout' => 3, 'exceptions' => false];
25
+
26
+ /**
27
+ * Default settings for service description
28
+ * @var array
29
+ */
30
+ private $service_description_default_settings = [];
31
+
32
+ /**
33
+ * Guzzle service description
34
+ * @var \Nektria\Recs\MerchantApi\Description
35
+ */
36
+ private $serviceDescription;
37
+
38
+ /**
39
+ * Guzzle base client
40
+ * @var \GuzzleHttp\Client
41
+ */
42
+ private $baseClient;
43
+
44
+ /**
45
+ * Api client services
46
+ * @var \GuzzleHttp\Command\Guzzle\GuzzleClient
47
+ */
48
+ private $serviceClient;
49
+
50
+ /**
51
+ * Config settings - for client, among others...
52
+ * APIKEY - compulsory
53
+ * debug - optional, default value false
54
+ * secure - optional, default value no
55
+ * environment - optional, default value production
56
+ * timeout - request timeout in seconds, default is 5 seconds
57
+ * connect_timeout - connection timeout in seconds, default is 3 seconds
58
+ *
59
+ * @param array $settings Each assigned to the relevant attribute
60
+ * @throws ApiClientException
61
+ */
62
+ public function __construct(array $settings = array())
63
+ {
64
+ if( ! array_key_exists('APIKEY', $settings))
65
+ throw new ApiClientException("APIKEY parameter is needed to use the API");
66
+
67
+ $this->api_key = $settings["APIKEY"];
68
+
69
+ if(array_key_exists("debug", $settings)){
70
+ $this->debug = $settings["debug"];
71
+ }
72
+
73
+ if(array_key_exists("environment", $settings)){
74
+ $this->setEnvironment($settings["environment"]);
75
+ }
76
+
77
+ $this->initBaseClientSettings($settings);
78
+ $this->initServiceDescriptionDefaultSettings($settings);
79
+ }
80
+
81
+ /**
82
+ * Environment setter - tied to 'secure' attribute
83
+ * All non development enviroments go over https (secure=true)
84
+ */
85
+ private function setEnvironment($value){
86
+ $this->environment = $value;
87
+ $this->secure = ($value == "development" ? false : true);
88
+ return $this;
89
+ }
90
+
91
+ private function setBaseClientSetting($key, $value){
92
+ $this->base_client_settings[$key] = $value;
93
+ return $this;
94
+ }
95
+
96
+ private function setServiceDescriptionDefaultSetting($key, $value){
97
+ $this->service_description_default_settings[$key] = $value;
98
+ return $this;
99
+ }
100
+
101
+ /**
102
+ * Get settings for the base client
103
+ * exceptions is always set to false
104
+ *
105
+ * @return array
106
+ */
107
+ private function getBaseClientSettings(){
108
+ return $this->base_client_settings;
109
+ }
110
+
111
+ private function getApiKey(){
112
+ return $this->api_key;
113
+ }
114
+
115
+ private function getServiceDescriptionDefaultSettings(){
116
+ return $this->service_description_default_settings;
117
+ }
118
+
119
+
120
+ /**
121
+ * Extract settings related to base client, init corresponding attribute
122
+ * @param array $settings list of all settings
123
+ */
124
+ private function initBaseClientSettings($settings)
125
+ {
126
+ foreach(['timeout', 'connect_timeout'] as $base_setting_key){
127
+ if(array_key_exists($base_setting_key, $settings)){
128
+ $this->setBaseClientSetting($base_setting_key, $settings[$base_setting_key]);
129
+ }
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Filter settings related to service description, init corresponding attribute
135
+ * @param array $settings list of all settings
136
+ */
137
+ private function initServiceDescriptionDefaultSettings($settings){
138
+ $excluded_keys = ["APIKEY", "environment", "timeout", "connect_timeout"];
139
+ $default_settings = array_diff_key ($settings, array_flip($excluded_keys));
140
+ foreach($default_settings as $key => $value){
141
+ $this->setServiceDescriptionDefaultSetting($key, $value);
142
+ }
143
+ }
144
+
145
+ public function __call($method, $parameters)
146
+ {
147
+ $this->buildClientIfNeeded();
148
+
149
+ return call_user_func_array([$this->serviceClient, $method], $parameters);
150
+ }
151
+
152
+ private function buildClientIfNeeded()
153
+ {
154
+ $this->baseClient = new \GuzzleHttp\Client(['defaults' => $this->getBaseClientSettings()]);
155
+
156
+ $this->baseClient->setDefaultOption('headers/Authorization', 'Basic '.$this->getApiKey());
157
+
158
+ $this->buildServiceDescription();
159
+
160
+ $this->serviceClient = new \GuzzleHttp\Command\Guzzle\GuzzleClient(
161
+ $this->baseClient,
162
+ $this->serviceDescription,
163
+ [
164
+ 'emitter' => $this->baseClient->getEmitter(),
165
+ 'defaults' => $this->getServiceDescriptionDefaultSettings()
166
+ ]
167
+ );
168
+
169
+ if($this->debug===true)
170
+ $this->serviceClient->getEmitter()->attach(new LogSubscriber());
171
+ }
172
+
173
+ /**
174
+ * Build base url based on corresponding settings.
175
+ * @return string
176
+ */
177
+ private function buildBaseUrl()
178
+ {
179
+ $protocol = ($this->secure === true) ? "https" : "http";
180
+ switch($this->environment)
181
+ {
182
+ case "development":
183
+ $domain = "localhost:8000";
184
+ break;
185
+ case "sandbox":
186
+ $domain = "recs-staging.herokuapp.com";
187
+ break;
188
+ case "production":
189
+ $domain = "recs.nektria.com";
190
+ break;
191
+ case "timeout":
192
+ $domain = "10.255.255.1";
193
+ break;
194
+ default:
195
+ $domain = "recs.nektria.com";
196
+ }
197
+ return $protocol."://".$domain."/api/";
198
+ }
199
+
200
+ /**
201
+ * Build service description
202
+ * Hook on settings to build the base url
203
+ *
204
+ */
205
+ private function buildServiceDescription()
206
+ {
207
+ $apiDescription = $this->getServiceDefinition('services');
208
+ $apiDescription["baseUrl"] = $this->buildBaseUrl();
209
+
210
+ $this->serviceDescription = new Description($apiDescription);
211
+ }
212
+
213
+ /**
214
+ * Load resource configuration JSON into an array
215
+ * @param string $name - at the moment, always 'services'
216
+ * @return mixed
217
+ */
218
+ private function getServiceDefinition($name)
219
+ {
220
+ $json = file_get_contents(__DIR__.'/services/'.$name.'.json');
221
+ return json_decode($json,true);
222
+ }
223
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Description.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use GuzzleHttp\Command\Guzzle\Description as GuzzleDescription;
6
+
7
+ class Description extends GuzzleDescription
8
+ {
9
+ public function setBaseUrl($url)
10
+ {
11
+ $this->baseUrl = $url;
12
+ }
13
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Exceptions/ApiClientException.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Exceptions;
4
+
5
+
6
+ class ApiClientException extends \Exception
7
+ {
8
+
9
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Exceptions/ApiResponseException.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Exceptions;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+
8
+ class ApiResponseException extends ApiClientException
9
+ {
10
+ private $response;
11
+
12
+ /**
13
+ *
14
+ * @param string $status_code
15
+ * @param ResponseBodyWrapper $response
16
+ */
17
+ public function __construct($status_code, ResponseBodyWrapper $response)
18
+ {
19
+ parent::__construct($response->getMessage(), $status_code);
20
+
21
+ $this->response = $response;
22
+ }
23
+
24
+ public function hasApiErrorCode(){ return $this->response->hasCode(); }
25
+ public function hasApiMessageBody(){ return $this->response->hasContent(); }
26
+
27
+ public function getApiErrorCode(){ return $this->response->getCode(); }
28
+ public function getApiMessageBody(){ return $this->response->getContent(); }
29
+
30
+ /**
31
+ * @return string - fail for 4xx, error for 5xx
32
+ */
33
+ public function getApiStatus(){ return $this->response->getStatus(); }
34
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Price.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ class Price
8
+ {
9
+ private $amount;
10
+ private $currency_code;
11
+ private $currency_sign;
12
+
13
+ public function __construct($amount, $currency_code)
14
+ {
15
+ if($currency_code != "EUR")
16
+ throw new ApiClientException("Our only accepted currency is EUR.");
17
+
18
+ $this->amount = $amount;
19
+ $this->currency_code = $currency_code;
20
+ $this->currency_sign = "€";
21
+ }
22
+
23
+ public function getAmount(){ return $this->amount; }
24
+ public function getCurrencyCode(){ return $this->currency_code; }
25
+ public function getCurrency(){ return $this->getCurrencyCode(); } // deprecated
26
+ public function getCurrencySign(){ return $this->currency_sign; }
27
+
28
+ public function __toString(){ return $this->getAmount().$this->getCurrencySign(); }
29
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Product.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ /**
6
+ * Product
7
+ **/
8
+ class Product
9
+ {
10
+
11
+ /**
12
+ * @var string
13
+ *
14
+ */
15
+ private $reference;
16
+
17
+ /**
18
+ * @var string
19
+ *
20
+ */
21
+ private $name;
22
+
23
+ /**
24
+ * @var float
25
+ */
26
+ private $price;
27
+
28
+ /**
29
+ * @var integer
30
+ */
31
+ private $height;
32
+
33
+ /**
34
+ * @var integer
35
+ */
36
+ private $width;
37
+
38
+ /**
39
+ * @var integer
40
+ */
41
+ private $depth;
42
+
43
+ /**
44
+ * @var float
45
+ */
46
+ private $weight;
47
+
48
+ /**
49
+ * Initialize ride collection
50
+ * Initialized from array format if supplied
51
+ * Note: we do NOT take into account origin_information, as this is another entity.
52
+ *
53
+ * Constructor
54
+ */
55
+ public function __construct(array $params = null)
56
+ {
57
+ if(is_null($params)) return;
58
+
59
+ foreach(array("name", "reference") as $key)
60
+ if(! array_key_exists($key, $params))
61
+ throw new \Exception("key $key is compulsory in Product entity constructor.");
62
+
63
+ if(array_key_exists("size", $params))
64
+ foreach(array("height_cm", "width_cm", "depth_cm") as $key)
65
+ if(! array_key_exists($key, $params["size"]))
66
+ throw new \Exception("key $key is compulsory in Product Size entity constructor (whenever a size is specified).");
67
+
68
+ $this->setName($params["name"]);
69
+ $this->setReference($params["reference"]);
70
+
71
+ if(array_key_exists("size", $params))
72
+ {
73
+ $this->setHeight($params["size"]["height_cm"]);
74
+ $this->setWidth($params["size"]["width_cm"]);
75
+ $this->setDepth($params["size"]["depth_cm"]);
76
+ }
77
+
78
+ $this->setWeight($params["weight_kg"]);
79
+
80
+ if(array_key_exists("price", $params))
81
+ $this->setPrice($params["price"]);
82
+ }
83
+
84
+ public function asArray()
85
+ {
86
+ $result = array(
87
+ "name" => $this->getName(),
88
+ "reference" => $this->getReference(),
89
+ );
90
+
91
+ if($this->hasSize())
92
+ $result["size"] = array(
93
+ "height" => $this->getHeight(),
94
+ "width" => $this->getWidth(),
95
+ "depth" => $this->getDepth()
96
+ );
97
+
98
+ if($this->hasWeight())
99
+ $result["weight"] = $this->getWeight();
100
+
101
+ if($this->hasPrice())
102
+ {
103
+ $result["price"] = $this->getPrice();
104
+ $result["currency_code"] = $this->getCurrencyCode();
105
+ }
106
+
107
+ return $result;
108
+ }
109
+
110
+ /**
111
+ * Set product number
112
+ *
113
+ * @param string $number
114
+ * @return Product
115
+ */
116
+ public function setReference($number)
117
+ {
118
+ $this->reference = $number;
119
+
120
+ return $this;
121
+ }
122
+
123
+ /**
124
+ * Get name
125
+ *
126
+ * @return string
127
+ */
128
+ public function getReference()
129
+ {
130
+ return $this->reference;
131
+ }
132
+
133
+ /**
134
+ * Set name
135
+ *
136
+ * @param string $name
137
+ * @return Product
138
+ */
139
+ public function setName($name)
140
+ {
141
+ $this->name = $name;
142
+
143
+ return $this;
144
+ }
145
+
146
+ /**
147
+ * Get name
148
+ *
149
+ * @return string
150
+ */
151
+ public function getName()
152
+ {
153
+ return $this->name;
154
+ }
155
+
156
+ /**
157
+ * Set price
158
+ *
159
+ * @param float $price
160
+ * @return Product
161
+ */
162
+ public function setPrice($price)
163
+ {
164
+ $this->price = $price;
165
+
166
+ return $this;
167
+ }
168
+
169
+ /**
170
+ * Get price
171
+ *
172
+ * @return string
173
+ */
174
+ public function getPrice()
175
+ {
176
+ return $this->price;
177
+ }
178
+
179
+ public function hasPrice(){ return ! is_null($this->price); }
180
+
181
+ /**
182
+ * Set height
183
+ *
184
+ * @param integer $height
185
+ * @return Product
186
+ */
187
+ public function setHeight($height)
188
+ {
189
+ $this->height = $height;
190
+
191
+ return $this;
192
+ }
193
+
194
+ /**
195
+ * Get height
196
+ *
197
+ * @return integer
198
+ */
199
+ public function getHeight()
200
+ {
201
+ return $this->height;
202
+ }
203
+
204
+ private function hasHeight(){ return ! is_null($this->height); }
205
+
206
+ /**
207
+ * Set width
208
+ *
209
+ * @param integer $width
210
+ * @return Product
211
+ */
212
+ public function setWidth($width)
213
+ {
214
+ $this->width = $width;
215
+
216
+ return $this;
217
+ }
218
+
219
+ /**
220
+ * Get width
221
+ *
222
+ * @return integer
223
+ */
224
+ public function getWidth()
225
+ {
226
+ return $this->width;
227
+ }
228
+
229
+ private function hasWidth(){ return ! is_null($this->width); }
230
+
231
+ /**
232
+ * Set depth
233
+ *
234
+ * @param integer $depth
235
+ * @return Product
236
+ */
237
+ public function setDepth($depth)
238
+ {
239
+ $this->depth = $depth;
240
+
241
+ return $this;
242
+ }
243
+
244
+ /**
245
+ * Get depth
246
+ *
247
+ * @return integer
248
+ */
249
+ public function getDepth()
250
+ {
251
+ return $this->depth;
252
+ }
253
+
254
+ private function hasDepth(){ return ! is_null($this->depth); }
255
+
256
+ public function hasSize()
257
+ {
258
+ if(!$this->hasHeight()) return false;
259
+ if(!$this->hasWidth()) return false;
260
+ if($this->hasDepth()) return false;
261
+
262
+ return true;
263
+ }
264
+
265
+ /**
266
+ * Set weight
267
+ *
268
+ * @param float $weight
269
+ * @return Product
270
+ */
271
+ public function setWeight($weight)
272
+ {
273
+ $this->weight = $weight;
274
+
275
+ return $this;
276
+ }
277
+
278
+ /**
279
+ * Get weight
280
+ *
281
+ * @return float
282
+ */
283
+ public function getWeight()
284
+ {
285
+ return $this->weight;
286
+ }
287
+
288
+ public function hasWeight(){ return ! is_null($this->weight); }
289
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/BackendAccessRequest.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * Retrieve url to access merchant configuration parameters.
10
+ * @author mika
11
+ *
12
+ */
13
+ class BackendAccessRequest extends BaseRequest
14
+ {
15
+ /**
16
+ * (non-PHPdoc)
17
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
18
+ * @return \Nektria\Recs\MerchantApi\Responses\BackendAccessResponse
19
+ * @throws ApiResponseException
20
+ */
21
+ protected function unsafe_execute(array $params)
22
+ {
23
+ $params = $this->mergeRequestSettings($params);
24
+
25
+ $response = $this->client->backendAccess($params);
26
+ $wrapped_response = new ResponseBodyWrapper($response);
27
+ if( ! $wrapped_response->isSuccessfull())
28
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
29
+
30
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\BackendAccessResponse");
31
+ return $response_message;
32
+
33
+ }
34
+
35
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/BaseRequest.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Client;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+
8
+ /**
9
+ * Base request deals with client creation
10
+ *
11
+ * @author mika
12
+ *
13
+ */
14
+ abstract class BaseRequest
15
+ {
16
+ protected $client;
17
+
18
+ private $request_keys;
19
+ protected $request_settings;
20
+
21
+ /**
22
+ * Split settings into client settings and request settings
23
+ * @param array $settings
24
+ */
25
+ public function __construct(array $settings = array())
26
+ {
27
+ $this->request_keys = array("id"); // more to come?
28
+ list($client_settings, $request_settings) = $this->split($settings);
29
+
30
+ $this->request_settings = $request_settings;
31
+ $this->client = new Client($client_settings);
32
+ }
33
+
34
+ /**
35
+ * Separate keys related to client settings from keys related to the request
36
+ *
37
+ * @param array $settings
38
+ * @return multitype: array split into an array of settings and an array
39
+ * of request settings
40
+ */
41
+ private function split(array $settings)
42
+ {
43
+ $request_keys = $this->request_keys;
44
+ $request_settings = array();
45
+ foreach($request_keys as $rq)
46
+ {
47
+ if( ! array_key_exists($rq, $settings)) continue;
48
+ $request_settings[$rq] = $settings[$rq];
49
+ unset($settings[$rq]);
50
+ }
51
+ return array($settings, $request_settings);
52
+
53
+ }
54
+
55
+ protected function mergeRequestSettings($params)
56
+ {
57
+ return array_merge($params, $this->request_settings);
58
+ }
59
+
60
+ protected function getRequestSettings(){ return $this->request_settings; }
61
+
62
+ /**
63
+ * Shoot the request, get response
64
+ * @param array $params string or array of parameters in the body
65
+ * @return BaseResponse
66
+ */
67
+ abstract protected function unsafe_execute(array $params);
68
+
69
+ /**
70
+ * Get to execute specific workload catching Guzzle exception and converting them to
71
+ * more readable exceptions of our flavour.
72
+ *
73
+ * OBSOLETE as we exectue guzzle with option to throw no exception.
74
+ *
75
+ * @param array $params array/json parameters
76
+ * @return \Nektria\Recs\MerchantApi\Responses\BaseResponse
77
+ * @throws ApiClientException
78
+ * @throws
79
+ */
80
+ public function execute($params=array())
81
+ {
82
+ if(! is_array($params))
83
+ $params = json_decode($params, true);
84
+
85
+ if(! is_array($params))
86
+ throw new ApiClientException("Invalid parameter format in the request execution call.");
87
+
88
+ try
89
+ {
90
+ return $this->unsafe_execute($params);
91
+ }
92
+ catch(GuzzleHttp\Command\Exception\CommandClientException $e)
93
+ {
94
+ $message = "Error ".$e->getResponse()->getStatusCode().":".$e->getResponse()->getBody()->getContents();
95
+ // var_dump($e->getResponse()->getEffectiveUrl());
96
+ throw new ApiClientException($message, $e->getResponse()->getStatusCode());
97
+ }
98
+ catch(GuzzleHttp\Command\Exception\CommandServerException $e)
99
+ {
100
+ $message = "Error ".$e->getResponse()->getStatusCode().":".$e->getResponse()->getBody()->getContents();
101
+ // var_dump($e->getResponse()->getEffectiveUrl());
102
+ throw new ApiClientException($message, $e->getResponse()->getStatusCode());
103
+ }
104
+ catch(GuzzleHttp\Command\Exception\CommandException $e)
105
+ {
106
+ $message = "Error ".$e->getResponse()->getStatusCode().":".$e->getResponse()->getBody()->getContents();
107
+ throw new ApiClientException($message, $e->getResponse()->getStatusCode());
108
+ }
109
+ catch(GuzzleHttp\Exception\RequestException $e)
110
+ {
111
+ error_log($e->getResponse()->getContent());
112
+ var_dump($e->getResponse()->getContent());
113
+ throw($e);
114
+ }
115
+ catch (GuzzleHttp\Exception\BadResponseException $e)
116
+ {
117
+ error_log($e->getResponse()->getContent());
118
+ var_dump($e->getResponse()->getContent());
119
+ throw($e);
120
+ }
121
+ catch (GuzzleHttp\Exception\ServerException $e)
122
+ {
123
+ error_log($e->getResponse()->getContent());
124
+ var_dump($e->getResponse()->getContent());
125
+ throw($e);
126
+ }
127
+ }
128
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ClassicAvailabilityRequest.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
8
+
9
+ class ClassicAvailabilityRequest extends BaseRequest
10
+ {
11
+ /**
12
+ * (non-PHPdoc)
13
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
14
+ * @return \Nektria\Recs\MerchantApi\Responses\ClassicAvailabilityResponse
15
+ * @throws ApiClientException
16
+ */
17
+ protected function unsafe_execute(array $params)
18
+ {
19
+ if( ! $this->checkServiceType($params) )
20
+ return $this->thereIsNoAvailability();
21
+
22
+ $rq_params = $this->getRequestSettings();
23
+ $response = $this->client->classicAvailability($rq_params);
24
+ $wrapped_response = new ResponseBodyWrapper($response);
25
+ if( ! $wrapped_response->isSuccessfull())
26
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
27
+
28
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ClassicAvailabilityResponse");
29
+ return $response_message;
30
+ }
31
+
32
+ /**
33
+ * Service type has to be here, and to be classic.
34
+ *
35
+ * @param array $params
36
+ * @throws ApiClientException if missing service_type parameter
37
+ * @return boolean true if we have availability for classic delivery
38
+ */
39
+ private function checkServiceType(array $params)
40
+ {
41
+ if(! array_key_exists("service_type", $params))
42
+ throw new ApiClientException("You need to specify the service type in Classic Availability Request. Service type is returned in ServiceCreationResponse.");
43
+
44
+ if($params["service_type"] != "classic") return false;
45
+
46
+ return true;
47
+ }
48
+
49
+ private function thereIsNoAvailability()
50
+ {
51
+ return new \Nektria\Recs\MerchantApi\Responses\ClassicAvailabilityResponse(false);
52
+ }
53
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ClassicConfirmationRequest.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ class ClassicConfirmationRequest extends BaseRequest
9
+ {
10
+ /**
11
+ * (non-PHPdoc)
12
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
13
+ * @return \Nektria\Recs\MerchantApi\Responses\ClassicConfirmationResponse
14
+ * @throws ApiResponseException
15
+ */
16
+ protected function unsafe_execute(array $params)
17
+ {
18
+ $params = $this->mergeRequestSettings($params);
19
+
20
+ $response = $this->client->classicConfirmation($params);
21
+ $wrapped_response = new ResponseBodyWrapper($response);
22
+ if( ! $wrapped_response->isSuccessfull())
23
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
24
+
25
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ClassicConfirmationResponse");
26
+ return $response_message;
27
+ }
28
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/CoverageRequest.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
6
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
7
+
8
+ /**
9
+ *
10
+ * @author mika
11
+ *
12
+ */
13
+ class CoverageRequest extends BaseRequest
14
+ {
15
+ /**
16
+ * Force empty API key, because our base client requires it :/
17
+ * (and we need none)
18
+ * @param array settings
19
+ */
20
+ public function __construct(array $settings=array())
21
+ {
22
+ $settings["APIKEY"] = "";
23
+ parent::__construct($settings);
24
+ }
25
+
26
+ /**
27
+ * @see BaseRequest::execute()
28
+ * @return CoverageResponse
29
+ * @throws ApiResponseException
30
+ */
31
+ protected function unsafe_execute(array $params)
32
+ {
33
+ $params = $this->mergeRequestSettings($params);
34
+
35
+ $response = $this->client->coverage($params);
36
+ $wrapped_response = new ResponseBodyWrapper($response);
37
+ if( ! $wrapped_response->isSuccessfull())
38
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
+
40
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\CoverageResponse");
41
+ return $response_message;
42
+ }
43
+
44
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/KeepAliveRequest.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * We encapsulate the last mile and the transit requests,
10
+ * transit request is shot only when needed,
11
+ * and returned prices are combined results.
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class KeepAliveRequest extends BaseRequest
17
+ {
18
+ /**
19
+ * (non-PHPdoc)
20
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
21
+ * @return \Nektria\Recs\MerchantApi\Responses\KeepAliveResponse
22
+ * @throws ApiResponseException
23
+ */
24
+ protected function unsafe_execute(array $dummy=array())
25
+ {
26
+ $params = $this->getRequestSettings();
27
+
28
+ $response = $this->client->keepAlive($params);
29
+ $wrapped_response = new ResponseBodyWrapper($response);
30
+ if( ! $wrapped_response->isSuccessfull())
31
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
32
+
33
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\NullResponse");
34
+ return $response_message;
35
+
36
+ }
37
+
38
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileAvailabilityRequest.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
8
+
9
+ /**
10
+ * We encapsulate the last mile and the transit requests,
11
+ * transit request is shot only when needed,
12
+ * and returned prices are combined results.
13
+ *
14
+ * @author mika
15
+ *
16
+ */
17
+ class LastMileAvailabilityRequest extends BaseRequest
18
+ {
19
+ /**
20
+ * Service type has to be here, and to be classic.
21
+ *
22
+ * @param array $params
23
+ * @throws ApiClientException if missing service_type parameter
24
+ * @return boolean true if we have availability for classic delivery
25
+ */
26
+ private function checkServiceType(array $params)
27
+ {
28
+ if(! array_key_exists("service_type", $params))
29
+ throw new ApiClientException("You need to specify the service type in LastMileAvailabilityRequest. Service type is returned in ServiceCreationResponse.");
30
+
31
+ if($params["service_type"] == "last-mile-with-transit") return true;
32
+ if($params["service_type"] == "last-mile-only") return true;
33
+
34
+ return false;
35
+ }
36
+
37
+ /**
38
+ * Is this a service with transit ?
39
+ * @param array $params
40
+ * @return boolean
41
+ */
42
+ private function checkTransit($params)
43
+ {
44
+ if($params["service_type"] == "last-mile-with-transit") return true;
45
+ if($params["service_type"] == "last-mile-only") return false;
46
+ }
47
+
48
+ private function thereIsNoAvailability()
49
+ {
50
+ return new \Nektria\Recs\MerchantApi\Responses\LastMileAvailabilityResponse(false);
51
+ }
52
+
53
+ /**
54
+ * Set up the logic to combine the two slots whenever this is needed
55
+ *
56
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
57
+ * @return \Nektria\Recs\MerchantApi\Responses\LastMileAvailabilityResponse
58
+ * @throws ApiResponseException
59
+ */
60
+ protected function unsafe_execute(array $params)
61
+ {
62
+ if( ! $this->checkServiceType($params) )
63
+ return $this->thereIsNoAvailability();
64
+
65
+ $params = $this->mergeRequestSettings($params);
66
+
67
+ $response = $this->client->lastMileAvailability($params);
68
+ $wrapped_response = new ResponseBodyWrapper($response);
69
+ if( ! $wrapped_response->isSuccessfull())
70
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
71
+
72
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\LastMileAvailabilityResponse");
73
+
74
+ return $response_message;
75
+ }
76
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileBestPriceRequest.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+ use Nektria\Recs\MerchantApi\Responses\LastMileBestPriceResponse;
8
+
9
+ /**
10
+ * Get assessment of best price for last mile service
11
+ * (before we get shopper address)
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class LastMileBestPriceRequest extends BaseRequest
17
+ {
18
+
19
+
20
+ /**
21
+ * (non-PHPdoc)
22
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
23
+ * @return \Nektria\Recs\MerchantApi\Responses\LastMileBestPriceResponse
24
+ * @throws ApiResponseException
25
+ */
26
+ protected function unsafe_execute(array $params)
27
+ {
28
+ $params = $this->mergeRequestSettings($params);
29
+
30
+ $response = $this->client->lastMileBestPrice($params);
31
+ $wrapped_response = new ResponseBodyWrapper($response);
32
+ if( ! $wrapped_response->isSuccessfull())
33
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
34
+
35
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\LastMileBestPriceResponse");
36
+ return $response_message;
37
+ }
38
+
39
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileConfirmationRequest.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * We encapsulate the last mile and the transit requests,
10
+ * transit request is shot only when needed,
11
+ * and returned prices are combined results.
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class LastMileConfirmationRequest extends BaseRequest
17
+ {
18
+ /**
19
+ * (non-PHPdoc)
20
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
21
+ * @return \Nektria\Recs\MerchantApi\Responses\LastMileConfirmationResponse
22
+ * @throws ApiResponseException
23
+ */
24
+ protected function unsafe_execute(array $params=array())
25
+ {
26
+ $params = $this->mergeRequestSettings($params);
27
+
28
+ $response = $this->client->lastMileConfirmation($params);
29
+ $wrapped_response = new ResponseBodyWrapper($response);
30
+ if( ! $wrapped_response->isSuccessfull())
31
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
32
+
33
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\LastMileConfirmationResponse");
34
+ return $response_message;
35
+ }
36
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/LastMileValidationRequest.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * We encapsulate the last mile and the transit requests,
10
+ * transit request is shot only when needed,
11
+ * and returned prices are combined results.
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class LastMileValidationRequest extends BaseRequest
17
+ {
18
+ /**
19
+ * (non-PHPdoc)
20
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
21
+ * @return \Nektria\Recs\MerchantApi\Responses\LastMileValidationResponse
22
+ * @throws ApiResponseException
23
+ */
24
+ protected function unsafe_execute(array $params)
25
+ {
26
+ $params = $this->mergeRequestSettings($params);
27
+
28
+ $response = $this->client->lastMileValidation($params);
29
+ $wrapped_response = new ResponseBodyWrapper($response);
30
+ if( ! $wrapped_response->isSuccessfull())
31
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
32
+
33
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\NullResponse");
34
+ return $response_message;
35
+ }
36
+
37
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/RegistrationAccessRequest.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * Retrieve url to access merchant configuration parameters.
10
+ * @author mika
11
+ *
12
+ */
13
+ class RegistrationAccessRequest extends BaseRequest
14
+ {
15
+ /**
16
+ * Force empty API key, because our base client requires it :/
17
+ * @param array settings
18
+ */
19
+ public function __construct(array $settings=array())
20
+ {
21
+ $settings["APIKEY"] = "";
22
+ parent::__construct($settings);
23
+ }
24
+
25
+ /**
26
+ * (non-PHPdoc)
27
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
28
+ * @return \Nektria\Recs\MerchantApi\Responses\BackendAccessResponse
29
+ * @throws ApiResponseException
30
+ */
31
+ protected function unsafe_execute(array $params)
32
+ {
33
+ $params = $this->mergeRequestSettings($params);
34
+
35
+ $response = $this->client->registrationAccess($params);
36
+ $wrapped_response = new ResponseBodyWrapper($response);
37
+ if( ! $wrapped_response->isSuccessfull())
38
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
+
40
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\RegistrationAccessResponse");
41
+ return $response_message;
42
+
43
+ }
44
+
45
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/SandboxApiKeyRequest.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Responses\SandboxApiKeyResponse;
7
+
8
+ /**
9
+ * Retrieve api key for testing.
10
+ * @author mika
11
+ *
12
+ */
13
+ class SandboxApiKeyRequest extends BaseRequest
14
+ {
15
+ /**
16
+ * Force empty API key, because our base client requires it :/
17
+ * @param array settings
18
+ */
19
+ public function __construct(array $settings=array())
20
+ {
21
+ $settings["APIKEY"] = "";
22
+ parent::__construct($settings);
23
+ }
24
+
25
+ /**
26
+ * (non-PHPdoc)
27
+ * @see BaseRequest::unsafe_execute()
28
+ * @return SandboxApiKeyResponse
29
+ * @throws ApiResponseException
30
+ */
31
+ protected function unsafe_execute(array $params)
32
+ {
33
+ $params = $this->mergeRequestSettings($params);
34
+
35
+ $response = $this->client->sandboxApiKey($params);
36
+ $wrapped_response = new ResponseBodyWrapper($response);
37
+ if( ! $wrapped_response->isSuccessfull())
38
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
+
40
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\SandboxApiKeyResponse");
41
+ return $response_message;
42
+ }
43
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ServiceCreationRequest.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
6
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
7
+
8
+ class ServiceCreationRequest extends BaseRequest
9
+ {
10
+ /**
11
+ * (non-PHPdoc)
12
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
13
+ * @param array $params: array with following keys
14
+ * - shopper: shopper details as described in the docs
15
+ * - destination_address: shopper address as described in the docs
16
+ * - products: shopping basket products as described in the docs (optional)
17
+ * - currency_code: 3 letters code for the currency that should be used for all following requests (optional)
18
+ * - session_timeout: duration of the session in the store, in seconds
19
+ *
20
+ * @return \Nektria\Recs\MerchantApi\Responses\ServiceCreationResponse
21
+ * @throws ApiResponseException
22
+ */
23
+ protected function unsafe_execute(array $params=array())
24
+ {
25
+ $params = $this->buildParams($params);
26
+
27
+ $response = $this->client->serviceCreation($params);
28
+ $wrapped_response = new ResponseBodyWrapper($response);
29
+ if( ! $wrapped_response->isSuccessfull())
30
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
31
+
32
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ServiceCreationResponse");
33
+ return $response_message;
34
+ }
35
+
36
+ /**
37
+ * Set up request for last mile and classic services
38
+ * Cast session_timeout to int
39
+ */
40
+ private function buildParams($params)
41
+ {
42
+ array_merge($params, array("services" => ["classic", "last-mile"]));
43
+
44
+ if(array_key_exists("session_timeout", $params))
45
+ $params["session_timeout"] = (int)$params["session_timeout"];
46
+
47
+ return $params;
48
+ }
49
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/ShowShippingRequest.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * We encapsulate the last mile and the transit requests,
10
+ * transit request is shot only when needed,
11
+ * and returned prices are combined results.
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class ShowShippingRequest extends BaseRequest
17
+ {
18
+ /**
19
+ * (non-PHPdoc)
20
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
21
+ * @return \Nektria\Recs\MerchantApi\Responses\ShowShippingResponse
22
+ * @throws ApiResponseException
23
+ */
24
+ protected function unsafe_execute(array $params=array())
25
+ {
26
+ $params = $this->mergeRequestSettings($params);
27
+
28
+ $response = $this->client->showShipping($params);
29
+ $wrapped_response = new ResponseBodyWrapper($response);
30
+ if( ! $wrapped_response->isSuccessfull())
31
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
32
+
33
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ShowShippingResponse");
34
+ return $response_message;
35
+ }
36
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/TestRequest.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+ use Nektria\Recs\MerchantApi\Responses\NullResponse;
8
+
9
+ class TestRequest extends BaseRequest
10
+ {
11
+ protected function unsafe_execute(array $params=null)
12
+ {
13
+ $response = $this->client->test();
14
+ $wrapped_response = new ResponseBodyWrapper($response);
15
+
16
+ if (! $wrapped_response->isSuccessfull())
17
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
18
+
19
+ return new NullResponse();
20
+ }
21
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Requests/getAssetsRequest.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Requests;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
7
+
8
+ /**
9
+ * We encapsulate the last mile and the transit requests,
10
+ * transit request is shot only when needed,
11
+ * and returned prices are combined results.
12
+ *
13
+ * @author mika
14
+ *
15
+ */
16
+ class getAssetsRequest extends BaseRequest
17
+ {
18
+ /**
19
+ * (non-PHPdoc)
20
+ * @see \Nektria\Recs\MerchantApiMessages\BaseRequest::execute()
21
+ * @return \Nektria\Recs\MerchantApi\Responses\getAssetsResponse
22
+ * @throws ApiResponseException
23
+ */
24
+ protected function unsafe_execute(array $params)
25
+ {
26
+ $params = $this->mergeRequestSettings($params);
27
+
28
+ $response = $this->client->getAssets($params);
29
+ $wrapped_response = new ResponseBodyWrapper($response);
30
+ if( ! $wrapped_response->isSuccessfull())
31
+ throw new ApiResponseException($response["httpStatus"], $wrapped_response);
32
+
33
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\getAssetsResponse");
34
+ return $response_message;
35
+
36
+ }
37
+
38
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/BackendAccessResponse.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\Exceptions;
6
+
7
+ class BackendAccessResponse
8
+ {
9
+ private $uri;
10
+
11
+ /**
12
+ * Instantiate message variables
13
+ * @param string $content in json format or array format
14
+ * @throws ApiClientException
15
+ */
16
+ public function __construct($content)
17
+ {
18
+ if(is_string($content))
19
+ $a_content = json_decode($content, true);
20
+ else
21
+ $a_content = $content;
22
+
23
+ if(is_null($a_content))
24
+ throw new ApiClientException("Incorrect Json Format in BackendAccess message response");
25
+
26
+ if(! array_key_exists("uri", $a_content))
27
+ throw new ApiClientException("Uri field is compulsory in BackendAccess message response");
28
+
29
+ $this->uri = $a_content["uri"];
30
+ }
31
+
32
+ public function getBackendUrl(){ return $this->uri; }
33
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/BaseResponse.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ /**
8
+ * Temporary response message. It displays request class name and response class name.
9
+ *
10
+ * @author mika
11
+ *
12
+ */
13
+ class BaseResponse
14
+ {
15
+ protected function checkCompulsoryFields($list, $content)
16
+ {
17
+ if(is_null($content))
18
+ throw new ApiClientException("Incorrect Json Format in InAndOut message response");
19
+
20
+ foreach($list as $element)
21
+ if(! array_key_exists($element, $content))
22
+ throw new ApiClientException(ucfirst($element)." field is compulsory in ".get_class($this)." message response.");
23
+ }
24
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ClassicAvailabilityResponse.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Price;
6
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
7
+
8
+ class ClassicAvailabilityResponse extends BaseResponse
9
+ {
10
+ private $available;
11
+ private $price;
12
+
13
+ /**
14
+ *
15
+ * @param array or false $content array with response
16
+ * false if request was not shot
17
+ */
18
+ public function __construct($content)
19
+ {
20
+ if($content === false)
21
+ {
22
+ $this->available = false;
23
+ return;
24
+ }
25
+ $this->available = true;
26
+
27
+ if(is_string($content))
28
+ $a_content = json_decode($content, true);
29
+ else
30
+ $a_content = $content;
31
+
32
+ if(is_null($a_content))
33
+ throw new ApiClientException("Incorrect Json Format in Confirmation Response message response");
34
+
35
+ $this->checkCompulsoryFields(["price", "currency_code"], $content);
36
+ $this->price = new Price($content["price"], $content["currency_code"]);
37
+ }
38
+
39
+ public function isAvailable()
40
+ {
41
+ return $this->available ? true : false;
42
+ }
43
+
44
+ /**
45
+ * @todo pick up real price from webservice
46
+ * @return Ambigous <number, NULL>
47
+ */
48
+ public function getPrice()
49
+ {
50
+ return $this->isAvailable() ? $this->price : null;
51
+ }
52
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ClassicConfirmationResponse.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
5
+ use Nektria\Recs\MerchantApi\Price;
6
+
7
+ class ClassicConfirmationResponse extends BaseResponse
8
+ {
9
+ private $price;
10
+
11
+ public function getPrice(){ return $this->price; }
12
+
13
+ /**
14
+ * Instanciate message variables
15
+ * @param string $content in json format or array format
16
+ * @throws ApiClientException
17
+ */
18
+ public function __construct($content)
19
+ {
20
+ if(is_string($content))
21
+ $a_content = json_decode($content, true);
22
+ else
23
+ $a_content = $content;
24
+
25
+ if(is_null($a_content))
26
+ throw new ApiClientException("Incorrect Json Format in Confirmation Response message response");
27
+
28
+ $this->checkCompulsoryFields(["total_price", "currency_code"], $content);
29
+
30
+ $this->price = new Price($content["total_price"], $content["currency_code"]);
31
+ }
32
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/CoverageResponse.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ class CoverageResponse
8
+ {
9
+ private $country_codes;
10
+
11
+ /**
12
+ * @return array of country codes
13
+ */
14
+ public function getCoveredCountries()
15
+ {
16
+ return $this->country_codes;
17
+ }
18
+
19
+ /**
20
+ * Instantiate message variables
21
+ * @param string $content in json format or array format
22
+ * @throws ApiClientException
23
+ */
24
+ public function __construct($content=null)
25
+ {
26
+ if(is_string($content))
27
+ $a_content = json_decode($content, true);
28
+ else
29
+ $a_content = $content;
30
+
31
+ if(is_null($a_content))
32
+ throw new ApiClientException("Incorrect Json Format in Coverage message response");
33
+
34
+ $this->country_codes = $a_content["country_codes"];
35
+ }
36
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileAvailabilityResponse.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Price;
6
+ use Nektria\Recs\MerchantApi\TimeWindowPrice;
7
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
8
+
9
+ class LastMileAvailabilityResponse
10
+ {
11
+ private $available;
12
+ private $best_price;
13
+ private $highest_price;
14
+ private $time_window_prices;
15
+
16
+ public function isAvailable(){ return $this->available ? true : false; }
17
+ public function getHighestPrice(){ return $this->highest_price; }
18
+ public function getBestPrice(){ return $this->best_price; }
19
+
20
+ private function addTimeWindowPrice(TimeWindowPrice $tw)
21
+ {
22
+ $this->time_window_prices[] = $tw;
23
+ }
24
+ /**
25
+ *
26
+ * @param array or false $content array with response
27
+ * false if request was not shot
28
+ */
29
+ public function __construct($content)
30
+ {
31
+ if($this->processUnavailable($content)) return;
32
+ $a_content = $this->formatAndCheck($content);
33
+ $this->checkCompulsoryFields(["best_price","highest_price", "currency_code","time_window_prices"], $a_content);
34
+
35
+ $currency_code = $a_content["currency_code"];
36
+ $this->best_price = new Price($a_content["best_price"], $currency_code);
37
+ $this->highest_price = new Price($a_content["highest_price"], $currency_code);
38
+
39
+ $this->time_window_prices = array();
40
+ foreach($a_content["time_window_prices"] as $twp)
41
+ $this->addTimeWindowPrice(new TimeWindowPrice($twp, $currency_code));
42
+ }
43
+
44
+
45
+ private function getTimeWindowPrices(){return $this->time_window_prices; }
46
+
47
+ /**
48
+ * if param is set to boolean value false, we have no availability whatsoever.
49
+ *
50
+ * @param mixed $content
51
+ * @return boolean
52
+ */
53
+ private function processUnavailable($content)
54
+ {
55
+ $unavailable = ($content === false) ? true : false;
56
+ $this->available = !$unavailable;
57
+ return $unavailable;
58
+ }
59
+
60
+ /**
61
+ *
62
+ * @param mixed $content
63
+ * @return array
64
+ * @throws ApiClientException if invalid json
65
+ */
66
+ protected function formatAndCheck($content)
67
+ {
68
+ if(is_string($content))
69
+ {
70
+ $a_content = json_decode($content, true);
71
+ if(json_last_error() != JSON_ERROR_NONE)
72
+ throw new ApiClientException("Incorrect Json Format in InAndOut message response");
73
+ }
74
+ else
75
+ $a_content = $content;
76
+
77
+ return $a_content;
78
+ }
79
+
80
+ protected function checkCompulsoryFields($compulsory_list, $message)
81
+ {
82
+ foreach($compulsory_list as $field)
83
+ if(! array_key_exists($field, $message))
84
+ throw new ApiClientException("$field field is compulsory in Last Mile Availability message response");
85
+ }
86
+
87
+ /**
88
+ * Get information about prices and calendar windows
89
+ * We return the original response plus additional information
90
+ * to format the widget, and which is made available in time_window_ranges
91
+ *
92
+ * @return string in json format
93
+ */
94
+ public function getPriceMatrix()
95
+ {
96
+ $result = array(
97
+ "best_price" => $this->getBestPrice()->getAmount(),
98
+ "highest_price" => $this->getHighestPrice()->getAmount(),
99
+ "currency_code" => "EUR",
100
+ "time_window_ranges" =>
101
+ array(
102
+ "min_hour" => $this->getMinHour(),
103
+ "max_hour" => $this->getMaxHour(),
104
+ "days" => $this->getDays()
105
+
106
+ ),
107
+ "time_window_prices" => $this->getTimeWindowPricesArray()
108
+ );
109
+
110
+ return json_encode($result);
111
+ }
112
+
113
+ private function getTimeWindowPricesArray()
114
+ {
115
+ $result = array();
116
+ foreach($this->getTimeWindowPrices() as $twp)
117
+ {
118
+ $element = array(
119
+ "start_time" => $twp->getStartTime()->format(\DateTime::ATOM),
120
+ "end_time" => $twp->getEndTime()->format(\DateTime::ATOM),
121
+ "price" => $twp->getPrice()->getAmount()
122
+ );
123
+ $result[] = $element;
124
+ }
125
+ return $result;
126
+ }
127
+
128
+ /**
129
+ * @return string hour in format H:i:s with leading 0
130
+ */
131
+ private function getMinHour()
132
+ {
133
+ $min_hour = 23;
134
+ foreach($this->getTimeWindowPrices() as $twp)
135
+ $min_hour = min($twp->getStartTime()->format("H"), $min_hour);
136
+ return $min_hour.":00:00";
137
+ }
138
+
139
+ /**
140
+ * @return string hour in format H:i:s with leading 0
141
+ */
142
+ private function getMaxHour()
143
+ {
144
+ $max_hour = 0;
145
+ foreach($this->getTimeWindowPrices() as $twp)
146
+ $max_hour = max($twp->getEndTime()->format("H"), $max_hour);
147
+ return $max_hour.":00:00";
148
+ }
149
+
150
+ /**
151
+ * @return string[] array of days informat Y-m-d, ordered chronologically
152
+ */
153
+ private function getDays()
154
+ {
155
+ $days = array();
156
+ foreach($this->getTimeWindowPrices() as $twp)
157
+ $days[$twp->getStartTime()->format("Y-m-d")] = null;
158
+
159
+ $days = array_keys($days);
160
+ sort($days);
161
+
162
+ return $days;
163
+ }
164
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileBestPriceResponse.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+ use Nektria\Recs\MerchantApi\Price;
7
+
8
+ class LastMileBestPriceResponse
9
+ {
10
+ private $price;
11
+
12
+ public function getPrice(){ return $this->price; }
13
+
14
+ /**
15
+ * @deprecated use getPrice to retrieve price object instead
16
+ * @return float
17
+ */
18
+ public function getBestPrice(){ return $this->price->getAmount(); }
19
+
20
+ /**
21
+ * @deprecated use getPrice to retrieve price object instead
22
+ * @return string
23
+ */
24
+ public function getBestPriceCurrency(){ return $this->price->getCurrencyCode(); }
25
+
26
+ /**
27
+ * @deprecated use getPrice to retrieve price object instead
28
+ * @return string
29
+ */
30
+ public function getBestPriceCurrencySign(){ return $this->price->getCurrencySign(); }
31
+
32
+ /**
33
+ * Instantiate message variables
34
+ * @param string $content in json format or array format
35
+ * @throws ApiClientException
36
+ */
37
+ public function __construct($content=null)
38
+ {
39
+ if(is_string($content))
40
+ $a_content = json_decode($content, true);
41
+ else
42
+ $a_content = $content;
43
+
44
+ if(is_null($a_content))
45
+ throw new ApiClientException("Incorrect Json Format in LastMileBestPrice message response");
46
+
47
+ $this->price = new Price($a_content["price"], $a_content["currency_code"]);
48
+ }
49
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/LastMileConfirmationResponse.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+ use Nektria\Recs\MerchantApi\Price;
7
+ use Nektria\Recs\MerchantApi\TimeWindow;
8
+
9
+ class lastMileConfirmationResponse
10
+ {
11
+ private $price;
12
+ private $delivery_windows;
13
+
14
+ public function getFormattedPrice(){ return $this->price->getAmount()."€"; }
15
+ public function getDeliveryWindows(){ return $this->delivery_windows; }
16
+
17
+ /**
18
+ * Instanciate message variables
19
+ * @param string $content in json format or array format
20
+ * @throws ApiClientException
21
+ */
22
+ public function __construct($content)
23
+ {
24
+ if(is_string($content))
25
+ $a_content = json_decode($content, true);
26
+ else
27
+ $a_content = $content;
28
+
29
+ if(is_null($a_content))
30
+ throw new ApiClientException("Incorrect Json Format in InAndOut message response");
31
+
32
+ $this->price = new Price($a_content["total_price"], $a_content["currency_code"]);
33
+ $this->delivery_windows = array();
34
+ foreach($a_content["delivery_windows"] as $a_window)
35
+ $this->delivery_windows[] = new TimeWindow($a_window);
36
+ }
37
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/NullResponse.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ class NullResponse
6
+ {
7
+
8
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/RegistrationAccessResponse.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\Exceptions;
6
+
7
+ class RegistrationAccessResponse
8
+ {
9
+ private $uri;
10
+
11
+ /**
12
+ * Instantiate message variables
13
+ * @param string $content in json format or array format
14
+ * @throws ApiClientException
15
+ */
16
+ public function __construct($content)
17
+ {
18
+ if(is_string($content))
19
+ $a_content = json_decode($content, true);
20
+ else
21
+ $a_content = $content;
22
+
23
+ if(is_null($a_content))
24
+ throw new ApiClientException("Incorrect Json Format in RegistrationAccess message response");
25
+
26
+ if(! array_key_exists("uri", $a_content))
27
+ throw new ApiClientException("Uri field is compulsory in RegistrationAccess message response");
28
+
29
+ $this->uri = $a_content["uri"];
30
+ }
31
+
32
+ public function getRegistrationUrl(){ return $this->uri; }
33
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ResponseBodyWrapper.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ /**
8
+ * Wrapper for all the messages
9
+ * @author mika
10
+ *
11
+ */
12
+ class ResponseBodyWrapper
13
+ {
14
+ protected $status;
15
+ private $content;
16
+ private $message;
17
+ private $code;
18
+
19
+ public function getStatus(){ return $this->status; }
20
+
21
+ public function hasMessage(){ return ! is_null($this->message); }
22
+ public function hasCode(){ return ! is_null($this->code); }
23
+ public function hasContent(){ return !is_null($this->content); }
24
+
25
+ public function getMessage(){ return $this->message; }
26
+ public function getCode(){ return $this->code;}
27
+
28
+
29
+ /**
30
+ * Instantiate wrapper variables
31
+ * @param string $body in json format
32
+ * @throws ApiClientException
33
+ */
34
+ public function __construct($body)
35
+ {
36
+ if(is_string($body))
37
+ $a_body = json_decode($body, true);
38
+ else
39
+ $a_body = $body;
40
+
41
+ if(is_null($a_body))
42
+ throw new ApiClientException("Incorrect Json Format in message response");
43
+
44
+ if(! array_key_exists("status", $a_body))
45
+ throw new ApiClientException("Status field is compulsory in message response");
46
+
47
+ //if(! array_key_exists("content", $a_content))
48
+ // throw new ApiClientException("Content field is compulsory in message response.");
49
+
50
+ $this->status = $a_body["status"];
51
+
52
+ if(array_key_exists("content", $a_body)) // should not be needed...
53
+ $this->content = $a_body["content"];
54
+
55
+ if(array_key_exists("message", $a_body))
56
+ $this->message = $a_body["message"];
57
+
58
+ if(array_key_exists("code", $a_body))
59
+ $this->code = $a_body["code"];
60
+ }
61
+
62
+ public function isSuccessfull(){ return $this->status == "success"; }
63
+
64
+ /**
65
+ * Getter for content, with option for on the fly creation of message object
66
+ *
67
+ * @param string $message_class the name of the class interpreting the content
68
+ * @return mixed
69
+ */
70
+ public function getContent($message_class=null)
71
+ {
72
+ return is_null($message_class) ?
73
+ $this->content :
74
+ new $message_class($this->content);
75
+ }
76
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/SandboxApiKeyResponse.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ class SandboxApiKeyResponse
8
+ {
9
+ private $api_key;
10
+
11
+ /**
12
+ * @return array of country codes
13
+ */
14
+ public function getApiKey()
15
+ {
16
+ return $this->api_key;
17
+ }
18
+
19
+ /**
20
+ * Instantiate message variables
21
+ * @param string $content in json format or array format
22
+ * @throws ApiClientException
23
+ */
24
+ public function __construct($content=null)
25
+ {
26
+ if(is_string($content))
27
+ $a_content = json_decode($content, true);
28
+ else
29
+ $a_content = $content;
30
+
31
+ if(is_null($a_content))
32
+ throw new ApiClientException("Incorrect Json Format in Coverage message response");
33
+
34
+ $this->api_key = $a_content["api_key"];
35
+ }
36
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ServiceCreationResponse.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ class ServiceCreationResponse extends BaseResponse
8
+ {
9
+ private $service_number;
10
+ private $service_type;
11
+
12
+ /**
13
+ * Instanciate message variables
14
+ * @param string $content in json format or array format
15
+ * @throws ApiClientException
16
+ */
17
+ public function __construct($content)
18
+ {
19
+ $a_content = is_string($content) ? json_decode($content, true) : $content;
20
+ $compulsory = array("service_number", "last-mile", "classic");
21
+ $this->checkCompulsoryFields($compulsory, $a_content);
22
+
23
+ $this->service_number = $a_content["service_number"];
24
+ $this->service_type = $this->computeServiceType($a_content);
25
+ }
26
+
27
+ /**
28
+ * Find out what service we provide.
29
+ *
30
+ * @param array $content
31
+ * @return string
32
+ */
33
+ private function computeServiceType(array $content)
34
+ {
35
+ if($content["last-mile"]["availability"])
36
+ return "last-mile-with-transit";
37
+ else
38
+ return $content["classic"]["availability"] ?
39
+ "classic" :
40
+ "unavailable";
41
+ }
42
+
43
+ public function getServiceNumber()
44
+ {
45
+ return $this->service_number;
46
+ }
47
+
48
+ /**
49
+ * @return unavailable / classic / last-mile-only / last-mile-with-transit
50
+ */
51
+ public function getServiceType()
52
+ {
53
+ return $this->service_type;
54
+ }
55
+
56
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/ShowShippingResponse.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+ use Nektria\Recs\MerchantApi\Price;
7
+ use Nektria\Recs\MerchantApi\Address;
8
+ use Nektria\Recs\MerchantApi\Product;
9
+ use Nektria\Recs\MerchantApi\TimeWindow;
10
+
11
+ class ShowShippingResponse
12
+ {
13
+ private $merchant_name;
14
+ private $service_type;
15
+
16
+ private $shipping_cost;
17
+ private $order_number;
18
+ private $order_date;
19
+
20
+ private $status;
21
+
22
+ private $delivery_windows;
23
+ private $shopper_address;
24
+ private $products;
25
+
26
+ public function getMerchantName(){ return $this->merchant_name; }
27
+ public function getServiceType(){ return $this->service_type; }
28
+ public function isLastMile(){ return $this->service_type == "last-mile"; }
29
+
30
+ public function getShippingCost(){ return $this->shipping_cost; }
31
+ public function getOrderNumber(){ return $this->order_number; }
32
+ public function getOrderDate(){ return $this->order_date; }
33
+
34
+ public function getStatus(){ return $this->status; }
35
+
36
+ public function getDeliveryWindows(){ return $this->delivery_windows; }
37
+ public function getShopperAddress(){ return $this->shopper_address; }
38
+
39
+ private function hasProducts(){ return ! is_null($this->products); }
40
+ public function getProducts(){ return $this->products; }
41
+
42
+ private function isLastMileDelivery(){ return $this->service_type == "last-mile"; }
43
+ private function hasDeliveryWindows(){ return ! is_null($this->delivery_windows);}
44
+ private function addDeliveryWindow($window)
45
+ {
46
+ if(! $this->hasDeliveryWindows()) $this->delivery_windows = array();
47
+ $this->delivery_windows[] = is_array($window) ? new TimeWindow($window) : $window;
48
+ }
49
+
50
+ private function addProduct($product)
51
+ {
52
+ if(! $this->hasProducts()) $this->products = array();
53
+ $this->products[] = is_array($product) ? new Product($product) : $product;
54
+ }
55
+
56
+ /**
57
+ * Instanciate message variables
58
+ * @param string $content in json format or array format
59
+ * @throws ApiClientException
60
+ */
61
+ public function __construct($content)
62
+ {
63
+ if(is_string($content))
64
+ $a_content = json_decode($content, true);
65
+ else
66
+ $a_content = $content;
67
+
68
+ if(is_null($a_content))
69
+ throw new ApiClientException("Incorrect Json Format in InAndOut message response");
70
+
71
+ $this->merchant_name = $a_content["merchant"];
72
+ $this->service_type = $a_content["delivery_type"];
73
+ $this->order_number = $a_content["number"];
74
+ $this->order_date = new \DateTime($a_content["date"]);
75
+
76
+ $this->status = $a_content["status"];
77
+
78
+ if(array_key_exists("shipping_cost", $a_content))
79
+ $this->shipping_cost = new Price($a_content["shipping_cost"], $a_content["currency_code"]);
80
+
81
+ if($this->isLastMileDelivery())
82
+ foreach($a_content["windows"] as $window)
83
+ $this->addDeliveryWindow($window);
84
+
85
+ $this->shopper_address = new Address($a_content["destination"]);
86
+
87
+ foreach($a_content["products"] as $product)
88
+ $this->addProduct($product);
89
+ }
90
+
91
+ public function asArray()
92
+ {
93
+ $result = array(
94
+ "merchant" => $this->getMerchantName(),
95
+ "service_type" => $this->getServiceType(),
96
+ "shipping_cost" => (string)$this->getShippingCost(),
97
+ "order_number" => $this->getOrderNumber(),
98
+ "order_date" => $this->getOrderDate()->format("Y-m-d"),
99
+ "status"=> $this->getStatus(),
100
+ "shopper_address" => $this->getShopperAddress()->asArray()
101
+ );
102
+
103
+ $result["products"] = array();
104
+ foreach($this->getProducts() as $product)
105
+ $result["products"][] = $product->asArray();
106
+
107
+ if($this->isLastMileDelivery())
108
+ {
109
+ $result["windows"] = array();
110
+ foreach($this->getDeliveryWindows() as $window)
111
+ $result["windows"][] = $window->asArray();
112
+ }
113
+
114
+ return $result;
115
+ }
116
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/TransitAvailabilityResponse.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ class TransitAvailabilityResponse extends InAndOut
6
+ {
7
+
8
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/TransitConfirmationResponse.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ class TransitConfirmationResponse extends InAndOut
6
+ {
7
+
8
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/Responses/getAssetsResponse.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi\Responses;
4
+
5
+ use Nektria\Recs\Exceptions;
6
+
7
+ class getAssetsResponse
8
+ {
9
+ private $css_url;
10
+ private $js_url;
11
+ private $html_url;
12
+
13
+ /**
14
+ * Instanciate message variables
15
+ * @param string $content in json format or array format
16
+ * @throws ApiClientException
17
+ */
18
+ public function __construct($content)
19
+ {
20
+ if(is_string($content))
21
+ $a_content = json_decode($content, true);
22
+ else
23
+ $a_content = $content;
24
+
25
+ if(is_null($a_content))
26
+ throw new ApiClientException("Incorrect Json Format in getAssets message response");
27
+
28
+ if(! array_key_exists("js", $a_content))
29
+ throw new ApiClientException("In field is compulsory in getAssets message response");
30
+
31
+ if(! array_key_exists("css", $a_content))
32
+ throw new ApiClientException("Out field is compulsory in getAssets message response.");
33
+
34
+ if(! array_key_exists("html", $a_content))
35
+ throw new ApiClientException("Out field is compulsory in getAssets message response.");
36
+
37
+ $this->js_url = $a_content["js"];
38
+ $this->css_url = $a_content["css"];
39
+ $this->html_url = $a_content["html"];
40
+ }
41
+
42
+ public function getCssUrl(){ return $this->css_url; }
43
+ public function getJsUrl(){ return $this->js_url; }
44
+ public function getHtmlUrl(){ return $this->html_url; }
45
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/ShowShippingHelper.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use Nektria\Recs\MerchantApi\Responses\ShowShippingResponse;
6
+
7
+ /**
8
+ * Class ShowShippingHelper: ShowShippingResponse wrapper to display things
9
+ * @package Nektria\Recs\MerchantApi
10
+ */
11
+ class ShowShippingHelper
12
+ {
13
+ private $response;
14
+ private $locale;
15
+
16
+ public function __construct(ShowShippingResponse $response, $locale)
17
+ {
18
+ $this->response = $response;
19
+ $this->locale = $locale;
20
+ }
21
+
22
+
23
+ public function getResponse(){ return $this->response; }
24
+ public function isLastMile()
25
+ {
26
+ return $this->response->isLastMile();
27
+ }
28
+
29
+ /**
30
+ * Get string explaining status of the shipping resposne
31
+ * @return string human readable status
32
+ */
33
+ public function getStatus()
34
+ {
35
+ // if($this->locale != "ES_es") $this->warning !;
36
+
37
+ switch($this->response->getStatus())
38
+ {
39
+ case "pending": $wording = "Servicio previsto. Pendiente de asignación a operador logístico de RECS";break;
40
+ case "in-process": $wording = "Servicio asignado a operador logístico de RECS";break;
41
+ case "completed": $wording = "Entregado a consumidor";break;
42
+ case "cancelled": $wording = "Cancelado" ;break;
43
+ default: $wording = "Estado desconocido.";
44
+ }
45
+ return $wording;
46
+ }
47
+
48
+ public function getDeliveryWindows()
49
+ {
50
+ // if($this->locale != "ES_es") $this->warning !;
51
+ setlocale(LC_TIME, "ES_es");
52
+
53
+ $delivery_windows = array();
54
+ foreach($this->response->getDeliveryWindows() as $time_window)
55
+ {
56
+ $formatted_time = strftime("%A %e %B", $time_window->getStartTime()->getTimestamp());
57
+ $formatted_time .= " entre las ".$time_window->getStartTime()->format("H")."h";
58
+ $formatted_time .= " y las ".$time_window->getEndTime()->format("H")."h";
59
+ $delivery_windows[] = $formatted_time;
60
+ }
61
+ return $delivery_windows;
62
+ }
63
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/TimeWindow.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+ class TimeWindow
8
+ {
9
+ private $start_time;
10
+ private $end_time;
11
+
12
+ /**
13
+ * @param <string> array of ISO8601 strings $time_window
14
+ * with keys "start_time" and "end_time"
15
+ * @throws ApiClientException
16
+ */
17
+ public function __construct($time_window)
18
+ {
19
+ if( ! array_key_exists("start_time", $time_window))
20
+ throw new ApiClientException("Incorrect format for new time window price (start_time).");
21
+
22
+ if( ! array_key_exists("end_time", $time_window))
23
+ throw new ApiClientException("Incorrect format for new time window price (end_time).");
24
+
25
+ $this->start_time = new \DateTime($time_window["start_time"]);
26
+ $this->end_time = new \DateTime($time_window["end_time"]);
27
+
28
+ if($this->start_time > $this->end_time)
29
+ throw new ApiClientException("Start time should be previous end time.");
30
+ }
31
+
32
+ public function asArray()
33
+ {
34
+ return array(
35
+ "start_time" => $this->getStartTime()->format(\DateTime::ATOM),
36
+ "end_time" => $this->getEndTime()->format(\DateTime::ATOM)
37
+ );
38
+ }
39
+
40
+ public function getStartTime(){ return $this->start_time; }
41
+ public function getEndTime(){ return $this->end_time; }
42
+
43
+ /**
44
+ * return list of days involved in this time window (usually one).
45
+ * @return DateTime[]
46
+ */
47
+ public function getDays()
48
+ {
49
+ $days = array();
50
+ if($this->start_time == $this->end_time) return $days;
51
+
52
+ $current_time = clone $this->start_time;
53
+ $current_time->setTime(0,0,0);
54
+ while($current_time < $this->end_time)
55
+ $days[] = $current_time;
56
+
57
+ return $days;
58
+ }
59
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/TimeWindowPrice.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Nektria\Recs\MerchantApi;
4
+
5
+ use Nektria\Recs\MerchantApi\Exceptions\ApiClientException;
6
+
7
+
8
+ /**
9
+ * Add price concept to a time window.
10
+ *
11
+ * @author mika
12
+ *
13
+ */
14
+ class TimeWindowPrice extends TimeWindow
15
+ {
16
+ private $price;
17
+
18
+ /**
19
+ * @param <string> array of ISO8601 strings $time_window
20
+ * with keys "start_time", "end_time" and "price"
21
+ * @param string $default_currency_code
22
+ * @throws RecsBookingException
23
+ */
24
+ public function __construct($time_window_price, $default_currency_code=null)
25
+ {
26
+ parent::__construct($time_window_price);
27
+
28
+ if( ! array_key_exists("price", $time_window_price))
29
+ throw new ApiClientException("Incorrect format for new time window price (price).");
30
+
31
+ if( ! array_key_exists("currency_code", $time_window_price))
32
+ if(is_null($default_currency_code))
33
+ throw new ApiClientException("Incorrect format for new time window price (currency_code).");
34
+
35
+ $currency_code = array_key_exists("currency_code", $time_window_price) ?
36
+ $time_window_price["currency_code"] :
37
+ $default_currency_code;
38
+ $this->price = new Price($time_window_price["price"], $currency_code);
39
+ }
40
+
41
+ public function getPrice(){ return $this->price; }
42
+ }
app/code/community/Nektria/Nektria/ReCS/lib/Nektria/src/services/services.json ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "ReCS API",
3
+ "apiVersion": "1.1.17",
4
+ "description": "Responsive eCommerce Shipping API",
5
+ "operations": {
6
+ "test": {
7
+ "httpMethod": "GET",
8
+ "uri": "test",
9
+ "summary": "Test request is useful to verify the client authentication is correct",
10
+ "responseClass": "TestOutput"
11
+ },
12
+ "serviceCreation": {
13
+ "httpMethod": "POST",
14
+ "uri": "services",
15
+ "summary": "Service Creation - trying unsuccessfully to use responseClass \\Nektria\\Recs\\MerchantApiMessages\\ResponseBodyWrapper",
16
+ "responseClass": "GenericOutput",
17
+ "parameters":{
18
+ "services": {
19
+ "location": "json",
20
+ "type": "array",
21
+ "description": "Type of services requested (should be classic + last-mile)",
22
+ "required": true
23
+ },
24
+ "shopper": {
25
+ "location": "json",
26
+ "type": "array",
27
+ "description": "Shopper name and contact details",
28
+ "required": true
29
+ },
30
+ "destination_address": {
31
+ "location": "json",
32
+ "type": "array",
33
+ "description": "Shopper address",
34
+ "required": true
35
+ },
36
+ "products": {
37
+ "location": "json",
38
+ "type": "array",
39
+ "description": "List of products in the shopping basket",
40
+ "required": true
41
+ },
42
+ "session_timeout": {
43
+ "location": "json",
44
+ "type": "integer",
45
+ "description": "store session duration in seconds",
46
+ "required": false
47
+ },
48
+ "currency_code": {
49
+ "location": "json",
50
+ "type": "string",
51
+ "description": "Requested currency code (3 letters) for following responses - expected EUR",
52
+ "required": false
53
+ }
54
+ }
55
+ },
56
+ "lastMileAvailability": {
57
+ "httpMethod": "POST",
58
+ "uri": "services/{id}/last-mile",
59
+ "summary": "Get availability windows and prices for the last mile delivery service.",
60
+ "parameters": {
61
+ "id": {
62
+ "location": "uri",
63
+ "description": "ID of service request",
64
+ "required": true
65
+ }
66
+ },
67
+ "responseClass": "GenericOutput"
68
+ },
69
+ "lastMileValidation": {
70
+ "httpMethod": "PATCH",
71
+ "uri": "services/{id}/last-mile/validate",
72
+ "summary": "Choose delivery window for last mile and verify the price is correct.",
73
+ "parameters": {
74
+ "id": {
75
+ "location": "uri",
76
+ "description": "ID of service request",
77
+ "required": true
78
+ },
79
+ "validation_windows": {
80
+ "location": "json",
81
+ "type": "array",
82
+ "description": "Initially chosen delivery timeslots",
83
+ "required": true
84
+ },
85
+ "delivery_windows": {
86
+ "location": "json",
87
+ "type": "array",
88
+ "description": "Chosen delivery timeslots",
89
+ "required": true
90
+ },
91
+ "total_price": {
92
+ "location": "json",
93
+ "type": "number",
94
+ "description": "Total price of the delivery selection",
95
+ "required": true
96
+ },
97
+ "currency_code": {
98
+ "location": "json",
99
+ "type": "string",
100
+ "description": "Currency that is being used (should be EUR)",
101
+ "required": true
102
+ }
103
+ },
104
+ "responseClass": "GenericOutput"
105
+ },
106
+ "lastMileConfirmation": {
107
+ "httpMethod": "PATCH",
108
+ "uri": "services/{id}/last-mile/confirm",
109
+ "summary": "Confirm a last mile service",
110
+ "parameters": {
111
+ "id": {
112
+ "location": "uri",
113
+ "description": "ID of service request",
114
+ "required": true
115
+ },
116
+ "order_number": {
117
+ "location": "json",
118
+ "type": "string",
119
+ "description": "order number in eCommerce",
120
+ "required": false
121
+ }
122
+ },
123
+ "responseClass": "GenericOutput"
124
+ },
125
+ "classicAvailability": {
126
+ "httpMethod": "POST",
127
+ "uri": "services/{id}/classic",
128
+ "summary": "Get availability and prices for classic delivery service",
129
+ "parameters": {
130
+ "id": {
131
+ "location": "uri",
132
+ "description": "ID of service request",
133
+ "required": true
134
+ }
135
+ },
136
+ "responseClass": "GenericOutput"
137
+ },
138
+ "classicConfirmation": {
139
+ "httpMethod": "PATCH",
140
+ "uri": "services/{id}/classic/confirm",
141
+ "summary": "Confirm a classic service",
142
+ "parameters": {
143
+ "id": {
144
+ "location": "uri",
145
+ "description": "ID of service request",
146
+ "required": true
147
+ },
148
+ "order_number": {
149
+ "location": "json",
150
+ "type": "string",
151
+ "description": "order number in eCommerce",
152
+ "required": false
153
+ }
154
+ },
155
+ "responseClass": "GenericOutput"
156
+ },
157
+ "keepAlive": {
158
+ "httpMethod": "PATCH",
159
+ "uri": "services/{id}/keep-alive",
160
+ "summary": "Reset last mile request timeout so it does not expire",
161
+ "parameters": {
162
+ "id": {
163
+ "location": "uri",
164
+ "description": "ID of service request",
165
+ "required": true
166
+ }
167
+ },
168
+ "responseClass": "GenericOutput"
169
+ },
170
+ "getAssets": {
171
+ "httpMethod": "GET",
172
+ "uri": "services/{id}/assets",
173
+ "summary": "Retrieve locations of the assets for the widget",
174
+ "parameters": {
175
+ "id": {
176
+ "location": "uri",
177
+ "description": "ID of service request",
178
+ "required": true
179
+ },
180
+ "language": {
181
+ "location": "query",
182
+ "type": "string",
183
+ "description": "locale descriptor (5 letters)",
184
+ "required": false
185
+ },
186
+ "version": {
187
+ "location": "query",
188
+ "type": "string",
189
+ "description": "asset version number requested",
190
+ "required": false
191
+ }
192
+ },
193
+ "responseClass": "GenericOutput"
194
+ },
195
+ "showShipping": {
196
+ "httpMethod": "GET",
197
+ "uri": "services/{id}/shipping",
198
+ "summary": "Retrieve information about a shipping",
199
+ "parameters": {
200
+ "id": {
201
+ "location": "uri",
202
+ "description": "ID of service request",
203
+ "required": true
204
+ }
205
+ },
206
+ "responseClass": "GenericOutput"
207
+ },
208
+ "backendAccess": {
209
+ "httpMethod": "GET",
210
+ "uri": "configuration/backend-access",
211
+ "summary": "Get link to edit merchant's advanced settings",
212
+ "responseClass": "GenericOutput"
213
+ },
214
+ "registrationAccess": {
215
+ "httpMethod": "GET",
216
+ "uri": "configuration/registration-access",
217
+ "summary": "Get link to log in to your account or to create a new account",
218
+ "responseClass": "GenericOutput"
219
+ },
220
+ "sandboxApiKey": {
221
+ "httpMethod": "GET",
222
+ "uri": "configuration/sandbox-api-key",
223
+ "summary": "Get an Api Key for running test requests",
224
+ "responseClass": "GenericOutput"
225
+ },
226
+ "coverage": {
227
+ "httpMethod": "GET",
228
+ "uri": "configuration/coverage",
229
+ "summary": "Retrieve countries covered by the service",
230
+ "responseClass": "GenericOutput"
231
+ },
232
+ "lastMileBestPrice": {
233
+ "httpMethod": "GET",
234
+ "uri": "last-mile-best-price",
235
+ "summary": "Find out the best offer we can boast before we know destination address",
236
+ "responseClass": "GenericOutput"
237
+ }
238
+ },
239
+ "models": {
240
+ "TestOutput": {
241
+ "type": "object",
242
+ "properties": {
243
+ "status": {
244
+ "location": "json",
245
+ "type": "string"
246
+ },
247
+ "httpStatus": {
248
+ "location": "statusCode",
249
+ "type": "string"
250
+ },
251
+ "message": {
252
+ "location": "json",
253
+ "type": "string"
254
+ },
255
+ "code": {
256
+ "location": "json",
257
+ "type": "string"
258
+ },
259
+ "content": {
260
+ "type": "null",
261
+ "location": "json"
262
+ }
263
+ }
264
+ },
265
+ "GenericOutput": {
266
+ "type": "object",
267
+ "properties": {
268
+ "httpStatus": {
269
+ "location": "statusCode",
270
+ "type": "string"
271
+ },
272
+ "status": {
273
+ "location": "json",
274
+ "type": "string"
275
+ },
276
+ "message": {
277
+ "location": "json",
278
+ "type": "string"
279
+ },
280
+ "code": {
281
+ "location": "json",
282
+ "type": "string"
283
+ },
284
+ "content": {
285
+ "type": "object",
286
+ "location": "json",
287
+ "additionalProperties": true
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
app/code/community/Nektria/Nektria/ReCS/sql/nektria_recs_setup/install-1.0.0.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Setup procedure for Nektria ReCS extension
4
+ */
5
+
6
+ $installer = $this;
7
+
8
+ $installer->startSetup();
9
+
10
+ $table = $installer->getConnection()
11
+ ->newTable( $installer->getTable('nektria_recs/lastmile') )
12
+ ->addColumn('lastmile_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
13
+ 'unsigned' => true,
14
+ 'identify' => true,
15
+ 'nullable' => false,
16
+ 'primary' => true
17
+ ), 'LastMile id')
18
+ ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_TEXT, 60, array(
19
+ 'nullable' => false
20
+ ), 'Order id')
21
+ ->addColumn('user_selection', Varien_Db_Ddl_Table::TYPE_TEXT, '2M', array(
22
+ 'nullable' => false
23
+ ), 'UserSelection')
24
+ ->addIndex( $installer->getIdxName(
25
+ $installer->getTable('nektria_recs/lastmile'),
26
+ array('order_id'),
27
+ Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
28
+ ) ,
29
+ array('order_id'),
30
+ array( 'type' =>Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX)
31
+ )
32
+ ->setComment( 'User Selection from Nektria ReCS' );
33
+
34
+ $installer->getConnection()->createTable( $table );
35
+
36
+ $installer->endSetup();
app/code/community/Nektria/Nektria/ReCS/sql/nektria_recs_setup/install-1.0.1.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Setup procedure for Nektria ReCS extension
4
+ */
5
+
6
+ $installer = $this;
7
+
8
+ $installer->startSetup();
9
+
10
+ if ($installer->getConnection()->isTableExists('nektria_recs/lastmile') != true) {
11
+ $table = $installer->getConnection()
12
+ ->newTable( $installer->getTable('nektria_recs/lastmile') )
13
+ ->addColumn('lastmile_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
14
+ 'unsigned' => true,
15
+ 'identify' => true,
16
+ 'nullable' => false,
17
+ 'primary' => true
18
+ ), 'LastMile id')
19
+ ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_TEXT, 60, array(
20
+ 'nullable' => false
21
+ ), 'Order id')
22
+ ->addColumn('user_selection', Varien_Db_Ddl_Table::TYPE_TEXT, '2M', array(
23
+ 'nullable' => false
24
+ ), 'UserSelection')
25
+ ->addIndex( $installer->getIdxName(
26
+ $installer->getTable('nektria_recs/lastmile'),
27
+ array('order_id'),
28
+ Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX
29
+ ) ,
30
+ array('order_id'),
31
+ array( 'type' =>Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX)
32
+ )
33
+ ->setComment( 'User Selection from Nektria ReCS' );
34
+
35
+ $installer->getConnection()->createTable( $table );
36
+ }
37
+
38
+ $table = $installer->getConnection()
39
+ ->changeColumn($installer->getTable('nektria_recs/lastmile'), 'lastmile_id', 'lastmile_id', array(
40
+ 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
41
+ 'auto_increment' => true,
42
+ 'identity' => true
43
+ ));
44
+
45
+ $installer->endSetup();
app/code/community/Nektria/ReCS/Helper/Data.php CHANGED
@@ -26,7 +26,7 @@ class Nektria_ReCS_Helper_Data extends Mage_Core_Helper_Abstract
26
 
27
  public function getReCSMethods(){
28
  return array(
29
- 'lastmile' => $this->__('RECS: elige día y hora'),
30
  'classic' => $this->__('RECS: Servicio Estándar')
31
  );
32
  }
26
 
27
  public function getReCSMethods(){
28
  return array(
29
+ 'lastmile' => $this->__('Elige día y hora'),
30
  'classic' => $this->__('RECS: Servicio Estándar')
31
  );
32
  }
app/code/community/Nektria/ReCS/Model/Carrier.php CHANGED
@@ -133,7 +133,8 @@ class Nektria_ReCS_Model_Carrier extends Mage_Shipping_Model_Carrier_Abstract im
133
 
134
  //checks first if the nektria service is working in serviceCreation and serviceType after
135
  $this->log($working_service, 'Working Service' );
136
- $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
 
137
 
138
  if ($working_service && $shippingAddress['postal_code']=='' && Mage::helper('nektria')->getConfig('lastmiledefault')){
139
  //If it's first call and only have country, and no postal code then lastmile by default
133
 
134
  //checks first if the nektria service is working in serviceCreation and serviceType after
135
  $this->log($working_service, 'Working Service' );
136
+ //checks if internal currency code is the same then void transaction
137
+ $currency_code = Mage::app()->getStore()->getBaseCurrencyCode();
138
 
139
  if ($working_service && $shippingAddress['postal_code']=='' && Mage::helper('nektria')->getConfig('lastmiledefault')){
140
  //If it's first call and only have country, and no postal code then lastmile by default
app/code/community/Nektria/ReCS/Model/Observer.php CHANGED
@@ -106,7 +106,7 @@ class Nektria_ReCS_Model_Observer
106
  //if validate security stops the payment process
107
  $recs = new NektriaSdk();
108
  //Check errors
109
- if ($recs->validateSecurity())
110
  Mage::throwException(Mage::helper('nektria')->__('Shipping method choices have timed out, please select your delivery windows again'));
111
 
112
  //Forbidden offline payment methods
106
  //if validate security stops the payment process
107
  $recs = new NektriaSdk();
108
  //Check errors
109
+ if (Mage::helper('nektria')->getLastMileSelected() && $recs->validateSecurity())
110
  Mage::throwException(Mage::helper('nektria')->__('Shipping method choices have timed out, please select your delivery windows again'));
111
 
112
  //Forbidden offline payment methods
app/code/community/Nektria/ReCS/controllers/TestController.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
-
3
- class Nektria_ReCS_SdkController extends Mage_Core_Controller_Front_Action
4
- {
5
- public function indexAction(){
6
- echo 'Hello World 1';
7
- }
8
- public function testAction(){
9
- echo 'Hello World';
10
- }
11
- }
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Nektria/ReCS/lib/Nektria/CHANGELOG.md CHANGED
@@ -12,11 +12,19 @@ This project adheres to [Semantic Versioning](http://semver.org/).
12
  - Find and include language specific initializations for used languages (es, ca, en)
13
  - setup javascript included file to read query string and display dates in specified language.
14
  - change repo name to recs-merchant-sdk-php & update composer.json accordingly.
15
- - Get list of operating countries from an API call.
16
 
17
  ### To Fix
18
  - Work with a tag an not a helper to display html. Full html should be initialized via javascript.
19
 
 
 
 
 
 
 
 
 
 
20
  ## [1.1.15] - 2015-12-16
21
  ### Added
22
  - SandboxApiKey Request, LastMileBestPrice Request and CoverageRequest now get values from API calls.
12
  - Find and include language specific initializations for used languages (es, ca, en)
13
  - setup javascript included file to read query string and display dates in specified language.
14
  - change repo name to recs-merchant-sdk-php & update composer.json accordingly.
 
15
 
16
  ### To Fix
17
  - Work with a tag an not a helper to display html. Full html should be initialized via javascript.
18
 
19
+ ## [1.1.17] - 2016-01-12
20
+ ### Added
21
+ - Added "session_timeout" and "currency_code" fields in ServiceRequest so that they are passed in the API call.
22
+
23
+ ## [1.1.16] - 2016-01-05
24
+ ### Fix
25
+ - Removed obsolete test file
26
+ - Removed call to static "class" method, which is not compatible with php 5.4
27
+
28
  ## [1.1.15] - 2015-12-16
29
  ### Added
30
  - SandboxApiKey Request, LastMileBestPrice Request and CoverageRequest now get values from API calls.
app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/CoverageRequest.php CHANGED
@@ -3,7 +3,6 @@
3
  namespace Nektria\Recs\MerchantApi\Requests;
4
 
5
  use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
6
- use Nektria\Recs\MerchantApi\Responses\CoverageResponse;
7
  use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
8
 
9
  /**
@@ -38,7 +37,7 @@ class CoverageRequest extends BaseRequest
38
  if( ! $wrapped_response->isSuccessfull())
39
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
40
 
41
- $response_message = $wrapped_response->getContent(CoverageResponse::class);
42
  return $response_message;
43
  }
44
 
3
  namespace Nektria\Recs\MerchantApi\Requests;
4
 
5
  use Nektria\Recs\MerchantApi\Exceptions\ApiResponseException;
 
6
  use Nektria\Recs\MerchantApi\Responses\ResponseBodyWrapper;
7
 
8
  /**
37
  if( ! $wrapped_response->isSuccessfull())
38
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
 
40
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\CoverageResponse");
41
  return $response_message;
42
  }
43
 
app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/LastMileBestPriceRequest.php CHANGED
@@ -32,7 +32,7 @@ class LastMileBestPriceRequest extends BaseRequest
32
  if( ! $wrapped_response->isSuccessfull())
33
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
34
 
35
- $response_message = $wrapped_response->getContent(LastMileBestPriceResponse::class);
36
  return $response_message;
37
  }
38
 
32
  if( ! $wrapped_response->isSuccessfull())
33
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
34
 
35
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\LastMileBestPriceResponse");
36
  return $response_message;
37
  }
38
 
app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/SandboxApiKeyRequest.php CHANGED
@@ -37,7 +37,7 @@ class SandboxApiKeyRequest extends BaseRequest
37
  if( ! $wrapped_response->isSuccessfull())
38
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
 
40
- $response_message = $wrapped_response->getContent(SandboxApiKeyResponse::class);
41
  return $response_message;
42
  }
43
  }
37
  if( ! $wrapped_response->isSuccessfull())
38
  throw new ApiResponseException($response["httpStatus"], $wrapped_response);
39
 
40
+ $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\SandboxApiKeyResponse");
41
  return $response_message;
42
  }
43
  }
app/code/community/Nektria/ReCS/lib/Nektria/src/Requests/ServiceCreationRequest.php CHANGED
@@ -13,15 +13,17 @@ class ServiceCreationRequest extends BaseRequest
13
  * @param array $params: array with following keys
14
  * - shopper: shopper details as described in the docs
15
  * - destination_address: shopper address as described in the docs
16
- * - products: shopping basket products as described in the docs
 
 
17
  *
18
  * @return \Nektria\Recs\MerchantApi\Responses\ServiceCreationResponse
19
  * @throws ApiResponseException
20
  */
21
  protected function unsafe_execute(array $params=array())
22
  {
23
- $params = array_merge($params, array("services" => ["classic", "last-mile"]));
24
-
25
  $response = $this->client->serviceCreation($params);
26
  $wrapped_response = new ResponseBodyWrapper($response);
27
  if( ! $wrapped_response->isSuccessfull())
@@ -30,4 +32,18 @@ class ServiceCreationRequest extends BaseRequest
30
  $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ServiceCreationResponse");
31
  return $response_message;
32
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
13
  * @param array $params: array with following keys
14
  * - shopper: shopper details as described in the docs
15
  * - destination_address: shopper address as described in the docs
16
+ * - products: shopping basket products as described in the docs (optional)
17
+ * - currency_code: 3 letters code for the currency that should be used for all following requests (optional)
18
+ * - session_timeout: duration of the session in the store, in seconds
19
  *
20
  * @return \Nektria\Recs\MerchantApi\Responses\ServiceCreationResponse
21
  * @throws ApiResponseException
22
  */
23
  protected function unsafe_execute(array $params=array())
24
  {
25
+ $params = $this->buildParams($params);
26
+
27
  $response = $this->client->serviceCreation($params);
28
  $wrapped_response = new ResponseBodyWrapper($response);
29
  if( ! $wrapped_response->isSuccessfull())
32
  $response_message = $wrapped_response->getContent("\\Nektria\\Recs\\MerchantApi\\Responses\\ServiceCreationResponse");
33
  return $response_message;
34
  }
35
+
36
+ /**
37
+ * Set up request for last mile and classic services
38
+ * Cast session_timeout to int
39
+ */
40
+ private function buildParams($params)
41
+ {
42
+ array_merge($params, array("services" => ["classic", "last-mile"]));
43
+
44
+ if(array_key_exists("session_timeout", $params))
45
+ $params["session_timeout"] = (int)$params["session_timeout"];
46
+
47
+ return $params;
48
+ }
49
  }
app/code/community/Nektria/ReCS/lib/Nektria/src/services/services.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "ReCS API",
3
- "apiVersion": "1.1.19",
4
  "description": "Responsive eCommerce Shipping API",
5
  "operations": {
6
  "test": {
@@ -22,11 +22,11 @@
22
  "required": true
23
  },
24
  "shopper": {
25
- "location": "json",
26
- "type": "array",
27
- "description": "Shopper name and contact details",
28
- "required": true
29
- },
30
  "destination_address": {
31
  "location": "json",
32
  "type": "array",
@@ -38,6 +38,18 @@
38
  "type": "array",
39
  "description": "List of products in the shopping basket",
40
  "required": true
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
  }
43
  },
1
  {
2
  "name": "ReCS API",
3
+ "apiVersion": "1.1.17",
4
  "description": "Responsive eCommerce Shipping API",
5
  "operations": {
6
  "test": {
22
  "required": true
23
  },
24
  "shopper": {
25
+ "location": "json",
26
+ "type": "array",
27
+ "description": "Shopper name and contact details",
28
+ "required": true
29
+ },
30
  "destination_address": {
31
  "location": "json",
32
  "type": "array",
38
  "type": "array",
39
  "description": "List of products in the shopping basket",
40
  "required": true
41
+ },
42
+ "session_timeout": {
43
+ "location": "json",
44
+ "type": "integer",
45
+ "description": "store session duration in seconds",
46
+ "required": false
47
+ },
48
+ "currency_code": {
49
+ "location": "json",
50
+ "type": "string",
51
+ "description": "Requested currency code (3 letters) for following responses - expected EUR",
52
+ "required": false
53
  }
54
  }
55
  },
app/code/community/Nektria/ReCS/lib/Nektria/test.php DELETED
@@ -1,210 +0,0 @@
1
- <?php
2
-
3
- // Require the Composer autoloader.
4
- require 'vendor/autoload.php';
5
-
6
- function executeRequest($request_name)
7
- {
8
- switch($request_name)
9
- {
10
- case "test":
11
- $tr = new Nektria\Recs\MerchantApi\Requests\TestRequest([
12
- 'APIKEY' => 'dGVzdDp0ZXN0'
13
- ]);
14
- $response = $tr->execute();
15
- break;
16
- case "service-creation":
17
- $response = executeServiceCreation();
18
- break;
19
- case "last-mile-availability":
20
- $response = executeLastMileAvailability();
21
- break;
22
- case "last-mile-validation":
23
- $response = executeLastMileValidation();
24
- break;
25
- case "last-mile-confirmation":
26
- $lmcr = new Nektria\Recs\MerchantApi\Requests\LastMileConfirmationRequest([
27
- 'APIKEY' => 'dGVzdDp0ZXN0',
28
- 'id' => '1'
29
- ]);
30
-
31
- $response = $lmcr->execute();
32
- break;
33
- case "classic-availability":
34
- $response = executeClassicAvailability();
35
- break;
36
- case "classic-confirmation":
37
- $lmcr = new Nektria\Recs\MerchantApi\Requests\ClassicConfirmationRequest([
38
- 'APIKEY' => 'dGVzdDp0ZXN0',
39
- 'id' => '1'
40
- ]);
41
-
42
- $response = $lmcr->execute();
43
- break;
44
- case "keep-alive":
45
- $kar = new Nektria\Recs\MerchantApi\Requests\KeepAliveRequest([
46
- 'APIKEY' => 'dGVzdDp0ZXN0',
47
- 'id' => '1'
48
- ]);
49
-
50
- $more_params = array("here" => "is", "some" => "more");
51
- $response = $kar->execute($more_params);
52
- break;
53
- case "get-assets":
54
- $gar = new Nektria\Recs\MerchantApi\Requests\getAssetsRequest([
55
- 'APIKEY' => 'dGVzdDp0ZXN0',
56
- 'id' => '1'
57
- ]);
58
-
59
- $more_params = array("here" => "is", "some" => "more");
60
- $response = $gar->execute($more_params);
61
- break;
62
- default:
63
- $response = "Incorrect parameter $request_name. This is not a know service.";
64
- }
65
-
66
- return $response;
67
- }
68
-
69
- $opt = getopt("r:");
70
-
71
- if(array_key_exists("r", $opt))
72
- {
73
- var_dump(executeRequest($opt["r"]));
74
- }
75
- else
76
- {
77
- echo 'use: test.php [-r test-name]
78
- with test name in
79
- "test", "service-creation", "last-mile-availability",
80
- "last-mile-validation", "last-mile-confirmation",
81
- "classic-availability", "classic-confirmation",
82
- "keep-alive", "get-assets"
83
- ';
84
- }
85
-
86
-
87
-
88
- function executeServiceCreation()
89
- {
90
- $sr = new Nektria\Recs\MerchantApi\Requests\ServiceCreationRequest([
91
- 'APIKEY' => 'dGVzdDp0ZXN0'
92
- ]);
93
-
94
- $params = array(
95
- "order_number" => "abc",
96
- "services" => ["last-mile", "classic"],
97
- "shopper" => array(
98
- "name" => "Roberto",
99
- "surname" => "Rodríguez",
100
- "email" => "roberto.rodriguez@gmail.com",
101
- "phone" => "83486923409"
102
- ),
103
- "destination_address" => array(
104
- "postal_code" => "08022",
105
- "street_type" => "Pza.",
106
- "street_name" => "Urquinaona",
107
- "street_number" => "5",
108
- "city" => "Barcelona",
109
- "country_code" => "ES"
110
- ),
111
- "products" => array(
112
-
113
- array(
114
- "name" => "T-shirt Monashee",
115
- "reference" => "PQR48-D",
116
- "quantity" => 1,
117
- "weight_kg" => 0.5,
118
- "size" =>
119
- array(
120
- "height_cm" => 20,
121
- "width_cm" => 10,
122
- "depth_cm" =>10
123
- )
124
- ),
125
- array(
126
- "name" => "Jeans Lemon pie",
127
- "reference" => "WDV48-D",
128
- "quantity" => 2,
129
- "weight_kg" => 0.5,
130
- "size" =>
131
- array(
132
- "height_cm" => 20,
133
- "width_cm" => 10,
134
- "depth_cm" =>10
135
- )
136
- )
137
- )
138
- );
139
-
140
- return $sr->execute($params);
141
- }
142
-
143
- function executeLastMileAvailability()
144
- {
145
- $lmar = new Nektria\Recs\MerchantApi\Requests\LastMileAvailabilityRequest([
146
- 'APIKEY' => 'dGVzdDp0ZXN0',
147
- 'id' => '1'
148
- ]);
149
-
150
- $more_params = array("service_type" => "last-mile-with-transit");
151
- return $lmar->execute($more_params);
152
-
153
- }
154
-
155
- function executeLastMileValidation()
156
- {
157
- $lmvr = new Nektria\Recs\MerchantApi\Requests\LastMileValidationRequest([
158
- 'APIKEY' => 'dGVzdDp0ZXN0',
159
- 'id' => '1'
160
- ]);
161
-
162
- $params = array(
163
- "delivery_windows" => [["start_time" => "2015-05-19T14:00:00+02:00", "end_time" => "2015-05-19T17:00:00+02:00"]],
164
- "validation_windows" => [
165
- ["start_time" => "2015-05-18T12:00:00+02:00", "end_time" => "2015-05-18T14:00:00+02:00"],
166
- ["start_time" => "2015-05-18T16:00:00+02:00", "end_time" => "2015-05-18T18:00:00+02:00"]
167
- ],
168
- "total_price" => 16.3,
169
- "currency_code" => "EUR"
170
- );
171
- try
172
- {
173
- return $lmvr->execute($params);
174
- }
175
- catch(GuzzleHttp\Command\Exception\CommandException $e)
176
- {
177
- var_dump($e->getResponse()->getBody()->getContents());
178
- var_dump($e->getResponse()->getStatusCode());
179
-
180
- }
181
- catch(GuzzleHttp\Command\Exception\CommandClientException $e)
182
- {
183
- var_dump($e->getResponse()->getBody()->getContents());
184
- var_dump($e->getResponse()->getStatusCode());
185
- var_dump($e->getResponse()->getEffectiveUrl());
186
- }
187
- catch(GuzzleHttp\Command\Exception\CommandServerException $e)
188
- {
189
- var_dump($e->getResponse()->getBody()->getContents());
190
- var_dump($e->getResponse()->getStatusCode());
191
- var_dump($e->getResponse()->getEffectiveUrl());
192
- }
193
- catch(GuzzleHttp\Command\Exception\CommandException $e)
194
- {
195
- var_dump(get_class($e));
196
- }
197
- }
198
-
199
- function executeClassicAvailability()
200
- {
201
- $car = new Nektria\Recs\MerchantApi\Requests\ClassicAvailabilityRequest([
202
- 'APIKEY' => 'dGVzdDp0ZXN0',
203
- 'id' => '1'
204
- ]);
205
-
206
- $more_params = array("service_type" => "classic");
207
- return $car->execute($more_params);
208
-
209
- }
210
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/recs/email/lastmile.phtml CHANGED
@@ -26,9 +26,9 @@
26
  <?php foreach ($selectedTime['validation_windows'] as $selectedDate): ?>
27
  <li><?php
28
  echo $this->__('from').
29
- ': '.Mage::getModel('core/date')->date('h:i', strtotime($selectedDate['start_time'])).
30
  ' '.Mage::helper('nektria')->_('to').
31
- ': '.Mage::getModel('core/date')->date('h:i', strtotime($selectedDate['end_time'])).
32
  ' '.Mage::helper('nektria')->_('for').
33
  ': '.Mage::getModel('core/date')->date('d/m/y', strtotime($selectedDate['end_time']));
34
  ?></li>
26
  <?php foreach ($selectedTime['validation_windows'] as $selectedDate): ?>
27
  <li><?php
28
  echo $this->__('from').
29
+ ': '.Mage::getModel('core/date')->date('H:i', strtotime($selectedDate['start_time'])).
30
  ' '.Mage::helper('nektria')->_('to').
31
+ ': '.Mage::getModel('core/date')->date('H:i', strtotime($selectedDate['end_time'])).
32
  ' '.Mage::helper('nektria')->_('for').
33
  ': '.Mage::getModel('core/date')->date('d/m/y', strtotime($selectedDate['end_time']));
34
  ?></li>
app/design/frontend/base/default/template/recs/shipping_method/available.phtml CHANGED
@@ -65,8 +65,9 @@
65
 
66
  <script type="text/javascript">
67
 
68
- var nektriaUserSelection = false;
69
  var gomage_lightCheckout = false;
 
70
 
71
  function nektria_selection_callback(userSelection, totalPrice){
72
  window.nektriaStringUserSelection = userSelection;
@@ -82,6 +83,7 @@
82
  //confirm selection to continue submit
83
  nektriaUserSelection = true;
84
 
 
85
  jQuery("#s_method_nektria_recs_lastmile").prop("checked",true).removeAttr("disabled");
86
  jQuery("#s_method_nektria_recs_lastmile").click();
87
  if (!gomage_lightCheckout){
@@ -97,20 +99,17 @@
97
  jsfile.setAttribute("src", "<?php echo $js_code; ?>");
98
 
99
  jsfile.onload = function() {
100
- jQuery("#nektriaTimeWindowBT").on("click change", function(){
 
101
  nektria_recs.showTimeWindowArea();
102
- jQuery("#s_method_nektria_recs_lastmile").prop("checked",false).attr("disabled","disabled");
103
- jQuery("#co-shipping-method-form input.radio, #gcheckout-shipping-method-available input.radio[name='shipping_method']").prop("checked",false);
104
  });
105
 
106
- jQuery("#co-shipping-method-form input.radio, #gcheckout-shipping-method-available input.radio").not("#s_method_nektria_recs_lastmile").on("click change" ,function(){
107
  nektria_recs.hideTimeWindowArea();
108
  jQuery("#nektriaTimeWindowBT").prop("checked", false);
109
- jQuery("#s_method_nektria_recs_lastmile").prop("checked",false).attr("disabled","disabled");
110
  });
111
 
112
- jQuery("#s_method_nektria_recs_lastmile").attr("disabled","disabled");
113
-
114
  nektria_recs.initTimeWindowPrices(<?php echo Mage::getSingleton('checkout/session')->getPriceMatrix(); ?>, nektria_selection_callback);
115
  if (window.showTimeWindowArea){
116
  nektria_recs.showTimeWindowArea();
@@ -121,6 +120,16 @@
121
  jQuery("#nektria_since").hide();
122
  }
123
  };
 
 
 
 
 
 
 
 
 
 
124
 
125
  document.getElementsByTagName("head")[0].appendChild(jsfile);
126
 
@@ -131,7 +140,23 @@
131
  cssfile.setAttribute("href", "<?php echo $css_code; ?>");
132
 
133
  document.getElementsByTagName("head")[0].appendChild(cssfile);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  <?php endif; ?>
 
 
135
  </script>
136
 
137
  <?php if(Mage::helper('nektria')->getGomageLightCheckoutEnabled()): ?>
@@ -174,17 +199,17 @@
174
  <?php endif; ?>
175
 
176
  <input type="hidden" name="nektria_selection" id="nektria_selection" value='<?php if( Mage::helper('nektria')->getLastSelection() ) : ?><?php echo Mage::helper('nektria')->getLastSelection(); ?><?php else: ?>{}<?php endif; ?>' />
177
- <input id="nektriaTimeWindowBT" type="radio" value="" class="radio" <?php if(Mage::helper('nektria')->getLastMileSelected()): ?>checked<?php endif; ?> />
178
  <?php if ($_sole) : ?>
179
 
180
  <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" disabled="disabled" <?php if(Mage::helper('nektria')->getLastMileSelected()): ?>checked<?php endif; ?> /></span>
181
  <script type="text/javascript"> window.showTimeWindowArea = true; </script>
182
 
183
  <?php else: ?>
184
- <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' disabled="disabled" ' ?> class="radio" <?php if(Mage::helper('nektria')->getLastMileSelected()): ?>checked<?php endif; ?> /></span>
185
  <?php endif; ?>
186
 
187
- <label for="nektriaTimeWindowBT" id="nektriaLabel"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> <span id="nektria_since"><?php echo $this->__('since'); ?></span>
188
  <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
189
  <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
190
  <?php echo $_excl; ?>
@@ -195,18 +220,46 @@
195
 
196
  </label>
197
 
198
- <?php if (Mage::getSingleton('checkout/session')->getPriceMatrix()) {
199
- $ctx = stream_context_create(array(
200
- 'http'=>
201
- array(
202
- 'timeout' => 1, //1 seconds
203
- ),
204
- 'https'=>
205
- array(
206
- 'timeout' => 2, //2 seconds in production
207
- ),
208
- ));
209
- echo file_get_contents($html_code, FALSE, $ctx);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  }
211
  ?>
212
 
65
 
66
  <script type="text/javascript">
67
 
68
+ var nektriaUserSelection = <?php if( Mage::helper('nektria')->getLastSelection() ) : ?>true<?php else:?>false<?php endif;?>;
69
  var gomage_lightCheckout = false;
70
+ var nektriaStringUserSelection = '<?php echo Mage::helper('nektria')->getLastSelection(); ?>';
71
 
72
  function nektria_selection_callback(userSelection, totalPrice){
73
  window.nektriaStringUserSelection = userSelection;
83
  //confirm selection to continue submit
84
  nektriaUserSelection = true;
85
 
86
+ jQuery("#nektriaTimeWindowBT").prop("checked", true);
87
  jQuery("#s_method_nektria_recs_lastmile").prop("checked",true).removeAttr("disabled");
88
  jQuery("#s_method_nektria_recs_lastmile").click();
89
  if (!gomage_lightCheckout){
99
  jsfile.setAttribute("src", "<?php echo $js_code; ?>");
100
 
101
  jsfile.onload = function() {
102
+ $('nektriaTimeWindowBT').stopObserving('click'); //prototype unbind
103
+ jQuery("#nektriaTimeWindowBT").off("click").on("click", function(e){
104
  nektria_recs.showTimeWindowArea();
105
+ e.preventDefault();
 
106
  });
107
 
108
+ jQuery("#co-shipping-method-form input.radio, #gcheckout-shipping-method-available input.radio").not("#s_method_nektria_recs_lastmile, #nektriaTimeWindowBT").on("click" ,function(){
109
  nektria_recs.hideTimeWindowArea();
110
  jQuery("#nektriaTimeWindowBT").prop("checked", false);
 
111
  });
112
 
 
 
113
  nektria_recs.initTimeWindowPrices(<?php echo Mage::getSingleton('checkout/session')->getPriceMatrix(); ?>, nektria_selection_callback);
114
  if (window.showTimeWindowArea){
115
  nektria_recs.showTimeWindowArea();
120
  jQuery("#nektria_since").hide();
121
  }
122
  };
123
+
124
+
125
+ jQuery(document).ready(function(){
126
+ $('nektriaTimeWindowBT').stopObserving('click'); //prototype unbind
127
+ if (jQuery("#s_method_nektria_recs_lastmile").prop("checked")){
128
+ jQuery("#nektriaTimeWindowBT").prop("checked",true);
129
+ }else{
130
+ jQuery("#nektriaTimeWindowBT").prop("checked",false);
131
+ }
132
+ });
133
 
134
  document.getElementsByTagName("head")[0].appendChild(jsfile);
135
 
140
  cssfile.setAttribute("href", "<?php echo $css_code; ?>");
141
 
142
  document.getElementsByTagName("head")[0].appendChild(cssfile);
143
+ <?php else : ?>
144
+
145
+ jQuery(document).ready(function(){
146
+ $('nektriaTimeWindowBT').stopObserving('click'); //prototype unbind
147
+ jQuery("#nektriaTimeWindowBT").off("click").on("click", function(e){
148
+ alert("<?php echo $this->__('Please you must fill the shipping address to enable this option'); ?>");
149
+ e.preventDefault();
150
+ });
151
+
152
+ jQuery("#co-shipping-method-form input.radio, #gcheckout-shipping-method-available input.radio").not("#s_method_nektria_recs_lastmile, #nektriaTimeWindowBT").on("click" ,function(){
153
+ jQuery("#nektriaTimeWindowBT").prop("checked", false);
154
+ });
155
+ });
156
+
157
  <?php endif; ?>
158
+
159
+
160
  </script>
161
 
162
  <?php if(Mage::helper('nektria')->getGomageLightCheckoutEnabled()): ?>
199
  <?php endif; ?>
200
 
201
  <input type="hidden" name="nektria_selection" id="nektria_selection" value='<?php if( Mage::helper('nektria')->getLastSelection() ) : ?><?php echo Mage::helper('nektria')->getLastSelection(); ?><?php else: ?>{}<?php endif; ?>' />
202
+ <input id="nektriaTimeWindowBT" type="radio" value="" class="radio" <?php if(Mage::helper('nektria')->getLastSelection()): ?>checked<?php endif; ?> />
203
  <?php if ($_sole) : ?>
204
 
205
  <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" disabled="disabled" <?php if(Mage::helper('nektria')->getLastMileSelected()): ?>checked<?php endif; ?> /></span>
206
  <script type="text/javascript"> window.showTimeWindowArea = true; </script>
207
 
208
  <?php else: ?>
209
+ <span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?> "<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' disabled="disabled" ' ?> class="radio" <?php if(Mage::helper('nektria')->getLastMileSelected()): ?>checked<?php endif; ?> /></span>
210
  <?php endif; ?>
211
 
212
+ <label for="nektriaTimeWindowBT" id="nektriaLabel"> <span style="font-style:italic;font-weight:bold;">¡Recomendado! </span><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?> <span id="nektria_since"><?php echo $this->__('since'); ?></span>
213
  <?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
214
  <?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
215
  <?php echo $_excl; ?>
220
 
221
  </label>
222
 
223
+ <?php if (Mage::getSingleton('checkout/session')->getPriceMatrix()) {
224
+ //check session cache
225
+ $cachedIframe = Mage::getSingleton('checkout/session')->getRecsIframe();
226
+ if(! $cachedIframe){
227
+ $ctx = stream_context_create(array(
228
+ 'http'=>
229
+ array(
230
+ 'timeout' => 2, //1 seconds
231
+ ),
232
+ 'https'=>
233
+ array(
234
+ 'timeout' => 2, //2 seconds in production
235
+ ),
236
+ ));
237
+ $recs_iframe = file_get_contents($html_code, FALSE, $ctx);
238
+
239
+ if (isset($recs_iframe{1})){ //if we have html contents
240
+ echo $recs_iframe;
241
+
242
+ Mage::getSingleton('checkout/session')->setRecsIframe($recs_iframe); //saving in cache
243
+ }else{
244
+ ?>
245
+ <script type="text/javascript">
246
+ jQuery(document).ready(function(){
247
+ if ( nektriaUserSelection ){
248
+ jQuery("#nektriaTimeWindowBT").off("click").on("click", function(e){
249
+ alert("<?php echo $this->__('Due to problems in the service connection you can not change your selection in this moment\n Please change the shipping method and try again.')?>");
250
+ e.preventDefault();
251
+ });
252
+ }else{
253
+ jQuery("#nektriaTimeWindowBT, #nektriaLabel").hide();
254
+ }
255
+ });
256
+ </script>
257
+ <?php
258
+ }
259
+ }else{
260
+ echo $cachedIframe;
261
+ }
262
+ unset($cachedIframe);
263
  }
264
  ?>
265
 
app/design/frontend/base/default/template/recs/totals/lastmile.phtml CHANGED
@@ -31,9 +31,9 @@
31
  <?php foreach ($selectedTime['validation_windows'] as $selectedDate): ?>
32
  <li><?php
33
  echo $this->__('from').
34
- ': '.Mage::getModel('core/date')->date('h:i', strtotime($selectedDate['start_time'])).
35
  ' '.Mage::helper('nektria')->_('to').
36
- ': '.Mage::getModel('core/date')->date('h:i', strtotime($selectedDate['end_time'])).
37
  ' '.Mage::helper('nektria')->_('for').
38
  ': '.Mage::getModel('core/date')->date('d/m/y', strtotime($selectedDate['end_time']));
39
  ?></li>
31
  <?php foreach ($selectedTime['validation_windows'] as $selectedDate): ?>
32
  <li><?php
33
  echo $this->__('from').
34
+ ': '.Mage::getModel('core/date')->date('H:i', strtotime($selectedDate['start_time'])).
35
  ' '.Mage::helper('nektria')->_('to').
36
+ ': '.Mage::getModel('core/date')->date('H:i', strtotime($selectedDate['end_time'])).
37
  ' '.Mage::helper('nektria')->_('for').
38
  ': '.Mage::getModel('core/date')->date('d/m/y', strtotime($selectedDate['end_time']));
39
  ?></li>
app/locale/es_ES/Nektria_Translations.csv CHANGED
@@ -23,4 +23,6 @@
23
  "error connecting to the service, check it the API Key","error en la conexión al servicio, compruebe su API Key"
24
  "error connecting to the service","error en la conexión al servicio"
25
  "since","desde"
26
- "Your site is in demo mode, ReCS is blocked in sandbox mode","Su sitio está en modo demo, ReCS está bloqueado en modo pruebas"
 
 
23
  "error connecting to the service, check it the API Key","error en la conexión al servicio, compruebe su API Key"
24
  "error connecting to the service","error en la conexión al servicio"
25
  "since","desde"
26
+ "Your site is in demo mode, ReCS is blocked in sandbox mode","Su sitio está en modo demo, ReCS está bloqueado en modo pruebas"
27
+ "Please you must fill the shipping address to enable this option","Debe completar la dirección de envío antes de activar esta opción"
28
+ "Due to problems in the service connection you can not change your selection in this moment\n Please change the shipping method and try again.","Debido a problemas con la conexión al servicio usted no puede cambiar su selección en este momento\n Por favor cambie el método de envío y pruebe de nuevo."
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Nektria_ReCS</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
7
  <channel>community</channel>
@@ -16,11 +16,11 @@ Choose the theme that best fits your shop !&#xD;
16
  more information on our website: http://www.recshipping.com/&#xD;
17
  &#xD;
18
  Note: Our extension is compatible with the LightCheckout module!</description>
19
- <notes>Bug fix exception when incorrect API Key in production is configured</notes>
20
  <authors><author><name>Digio Soluciones Digitales</name><user>digio</user><email>jose@digio.es</email></author><author><name>Mikael Baron</name><user>mikael_baron</user><email>mikael@nektria.com</email></author></authors>
21
- <date>2015-12-29</date>
22
- <time>12:20:52</time>
23
- <contents><target name="magecommunity"><dir name="Nektria"><dir name="ReCS"><dir name="Block"><file name="Config.php" hash="605e2c38b2e96539f8c13bf487a873b4"/><file name="Registration.php" hash="8acd523335aac0a89f85a9285cd2d48e"/><file name="Testsdk.php" hash="264e4410d0d5895d03704a054b68a028"/></dir><dir name="Helper"><file name="Data.php" hash="88c63cc900b842e35e4a21da4a9dac41"/></dir><dir name="Model"><file name="Carrier.php" hash="20e93b705634d09e60bf0c91d063014b"/><file name="Lastmile.php" hash="58800f6a1d6494cddf6c4a09712cb5b8"/><file name="Observer.php" hash="a42b40f1c09d00b94cc5e3d2edc4bd2e"/><file name="Paymentmethods.php" hash="e74903910fb8b1d973914c5d007b0559"/><dir name="Resource"><dir name="Lastmile"><file name="Collection.php" hash="b3c178ac9e474b229dc92dda487496d1"/></dir><file name="Lastmile.php" hash="5deaf65f0a8701e63e291893e6414d83"/></dir><dir name="Sales"><file name="Order.php" hash="784b6ace35afbfb1c250ec4bdabb1b29"/></dir></dir><dir name="controllers"><file name="SdkController.php" hash="f49c902b27eba59d6b55f5e1b25ff266"/><file name="TestController.php" hash="1ac16cedaa473caf88209778536fbddc"/></dir><dir name="etc"><file name="config.xml" hash="e64f0266a0b2ff93a5bc7724f888b556"/><file name="system.xml" hash="207401993361affebe83669ab1997223"/></dir><dir name="lib"><dir name="Nektria"><file name="CHANGELOG.md" hash="70e1c8f5b06b67415e6dfc24614cd5de"/><file name="LICENSE.md" hash="f2c581eab0338cfc8dff951987bad127"/><file name="README.md" hash="93588bf1d91fdc0f90b3305a9e99063d"/><file name="composer.json" hash="722c6fb2f2299e94a37b3b5d151f6731"/><file name="composer.lock" hash="b498933e56fac022e8023802a164a002"/><dir name="src"><file name="Address.php" hash="a06450f90a49e90b84689ed386110848"/><file name="Client.php" hash="a552803172ec4566e3caf6016754d12a"/><file name="Description.php" hash="5262a31bcaa75fb606bc931a3f7c8ed4"/><dir name="Exceptions"><file name="ApiClientException.php" hash="4a372b94fe96d57f00585964aa5de9ad"/><file name="ApiResponseException.php" hash="5766a0c8da908027f33fbbea5e54ca05"/></dir><file name="Price.php" hash="b71d5a4ae0ad93c082c77f71fe5ad08c"/><file name="Product.php" hash="383a4b33ad6667efc4d44f46340e60a2"/><dir name="Requests"><file name="BackendAccessRequest.php" hash="9a9f7b944a141baf6ae1726375d55315"/><file name="BaseRequest.php" hash="794a9b7886e93c43eb4068f06e087300"/><file name="ClassicAvailabilityRequest.php" hash="eeaff0374c838bcfb2e7bd1a7bc86647"/><file name="ClassicConfirmationRequest.php" hash="e6fa133a76cfcdc4224a54cf0c533c63"/><file name="CoverageRequest.php" hash="f86985395665aa45d6638984e94cd012"/><file name="KeepAliveRequest.php" hash="1dc5fa4916275f2c964c8951224235be"/><file name="LastMileAvailabilityRequest.php" hash="fa5ae9b6444d50a190841ff29992de1c"/><file name="LastMileBestPriceRequest.php" hash="f2c7d621bdc295c4a4ec6d2d3ef9a14c"/><file name="LastMileConfirmationRequest.php" hash="ed2c9ab713c659c1966d8bcd81aeafeb"/><file name="LastMileValidationRequest.php" hash="21cf5790f64052028eaca1077bfb0bcc"/><file name="RegistrationAccessRequest.php" hash="9b6d084ed813218fc5539681cf5f6956"/><file name="SandboxApiKeyRequest.php" hash="6f21eaa801e71b68f2326223fa5cffc6"/><file name="ServiceCreationRequest.php" hash="d37240018b197f6a320a12b4194835a3"/><file name="ShowShippingRequest.php" hash="a45ce1bbeb9f42d4665ef1c029f26b82"/><file name="TestRequest.php" hash="5b4cb97c8d5975fe6367bfec96113926"/><file name="getAssetsRequest.php" hash="58aa8a75c2ea53eb1eebde566a7610c0"/></dir><dir name="Responses"><file name="BackendAccessResponse.php" hash="8c5b38813d387780b972c91207c31736"/><file name="BaseResponse.php" hash="33f3797e9c9e91b3a2a615ca85247977"/><file name="ClassicAvailabilityResponse.php" hash="773653c362001788e16ce128a90f2558"/><file name="ClassicConfirmationResponse.php" hash="5d9ed11dae8cb75e3c9960fb744736be"/><file name="CoverageResponse.php" hash="c38b3cc2bba948f16278f46ce15fe7f9"/><file name="LastMileAvailabilityResponse.php" hash="13e6615241f6c2a78d910af3b29b0f7f"/><file name="LastMileBestPriceResponse.php" hash="18aab01bc5bc4902f04ed94e038aa7ff"/><file name="LastMileConfirmationResponse.php" hash="71739279f5e9082e473546f5708351c8"/><file name="NullResponse.php" hash="93c8006a8cf5e0b9d11282d1eb82f245"/><file name="RegistrationAccessResponse.php" hash="0cb5636b0960b8957a5af6902beb4781"/><file name="ResponseBodyWrapper.php" hash="9f6a0a35632303e846d7454b7b54b1a5"/><file name="SandboxApiKeyResponse.php" hash="3880f31f66ca86850061ec5227f6c8d5"/><file name="ServiceCreationResponse.php" hash="f561c6c6897fb703d7965f6bbed8eb64"/><file name="ShowShippingResponse.php" hash="99baba4daec77cf260eb0e995639b726"/><file name="TransitAvailabilityResponse.php" hash="f6ee6023dba18b3dc5b86061b6d979ea"/><file name="TransitConfirmationResponse.php" hash="a6fe1cc1326d8f372b2e980b5a6ca2a4"/><file name="getAssetsResponse.php" hash="0c3d9b0c8497d41d7f170d7fb948443f"/></dir><file name="ShowShippingHelper.php" hash="5fd55ecebae8fdeea739ffd0a1cdde7b"/><file name="TimeWindow.php" hash="eee34cc65df56cea229cc06ff2ce0103"/><file name="TimeWindowPrice.php" hash="31a6698f74f341b6780956ba951b2731"/><dir name="services"><file name="services.json" hash="acd5115d51fe41801d54f58aef49e69c"/></dir></dir><file name="test.php" hash="75ef983b0e4af1e502de8900f533f6c0"/><dir name="vendor"><file name="autoload.php" hash="0925eae8ac293490e5fc975679e8d09a"/><dir name="composer"><file name="ClassLoader.php" hash="9c1e7fe1a9eb1693e07ee4420ca5361e"/><file name="LICENSE" hash="084a034acbad39464e3df608c6dc064f"/><file name="autoload_classmap.php" hash="8645d3a4e3ad87e7cf4d88a46717aab4"/><file name="autoload_files.php" hash="2e85332f49b950e0803a44b0b32e2e45"/><file name="autoload_namespaces.php" hash="6283a0a4a3a2d2c8973dcea23edd07f4"/><file name="autoload_psr4.php" hash="158231c55af504a4879bf5e66885ecc5"/><file name="autoload_real.php" hash="2cc2523fead4b3011773884563248734"/><file name="installed.json" hash="7182f34454afa1edd2b24a956f708c35"/></dir><dir name="guzzlehttp"><dir name="command"><file name="LICENSE" hash="582d7d97bab524143526a38575956e46"/><file name="composer.json" hash="6a4db1d61cf703bb376e300f2b8ff450"/><dir name="src"><file name="AbstractClient.php" hash="f9842d8b970876368f3c4cd44aab11b0"/><file name="Command.php" hash="47e1e4fe507c1e85fa02e75b635cfb7c"/><file name="CommandInterface.php" hash="3dae8f8358cc93fbe29de5b714cd704a"/><file name="CommandToRequestIterator.php" hash="e48d64affa57a6fd3eb0b5f6aa0d5434"/><file name="CommandTransaction.php" hash="ab514b3ff0099b1e463d35aead687611"/><file name="CommandUtils.php" hash="787e835f4660e46ab26445506f8c4ed0"/><dir name="Event"><file name="CommandEvent.php" hash="6c7fc87858a8584f5aebededd10c243f"/><file name="InitEvent.php" hash="108505d45ed7012583cfb543b777b1f2"/><file name="PreparedEvent.php" hash="aac473c4e68ade95452387d7069ddc36"/><file name="ProcessEvent.php" hash="4e50fd5e3861fe4a595e98b0ec3f16e4"/></dir><dir name="Exception"><file name="CommandClientException.php" hash="24e95664f5fa914d6ebf1a689de34c95"/><file name="CommandException.php" hash="48b60048c83f240c3babf0b27470b6b2"/><file name="CommandServerException.php" hash="588645616a623dfdf2c5e65e04c408aa"/></dir><file name="ServiceClientInterface.php" hash="eafcecbcaf8f1dce5b8cbe52b7321a1c"/><dir name="Subscriber"><file name="Debug.php" hash="2a7bc810a41587cfdc4f4a38c4e71029"/><file name="ResultMock.php" hash="e1d45561599e46b12918ad6732cf3e0e"/></dir></dir></dir><dir name="guzzle"><file name="CHANGELOG.md" hash="acc188c927e6bf09d6f9d018ca24d1e8"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="317955136cb3575149363d0b7174dbe5"/><file name="README.md" hash="d1df21412e1e3a6dd1d2d5b796db9be7"/><file name="UPGRADING.md" hash="8d0d9048e11ed2b5e79b1ad86db91d48"/><dir name="build"><file name="packager.php" hash="ab4669be9765aecb479f77c67b98b276"/></dir><file name="composer.json" hash="67f18c5c530a0534f1164fb1ff040444"/><dir name="docs"><file name="Makefile" hash="12a604d6e6b876e11714735cdc6403f1"/><dir name="_static"><file name="guzzle-icon.png" hash="18e05d325a1a51de498fc4a32b15ca48"/><file name="logo.png" hash="f87c876737dd9b36664e6055196c1341"/></dir><dir name="_templates"><file name="nav_links.html" hash="fb4639874978e92069d3d58405369a40"/></dir><file name="clients.rst" hash="f49ec91ff685e740a00dc295297a2660"/><file name="conf.py" hash="24f0dcb8445fe1e4f2c05aa782f9385e"/><file name="events.rst" hash="c1615c7cd00adb02cdebe755b7bb1b18"/><file name="faq.rst" hash="94e3a8cefa5068ebea9223b2ab9cb194"/><file name="handlers.rst" hash="e92fd255c14344536d326b19fcd6ae70"/><file name="http-messages.rst" hash="37e5a669761894e39e32f6cc6da9ede3"/><file name="index.rst" hash="ebb9c7abc88df5051c5eb2419fbb740a"/><file name="overview.rst" hash="0b8656757de9b8f5b0b4f3c6179755db"/><file name="quickstart.rst" hash="c8777d83b78d55453bf8c2ae22a9beb4"/><file name="requirements.txt" hash="444d2df1b594a091c02af61aa48e3ad9"/><file name="streams.rst" hash="c074299618766206fdf8273e89c36fe3"/><file name="testing.rst" hash="435bfaab2b1d85cc3f0e9895fb49ccb7"/></dir><file name="phpunit.xml.dist" hash="b9ae0ee5ca5b26ef09506f77bc93f8be"/><dir name="src"><file name="BatchResults.php" hash="9601ffcd97c39a60ccb6d14bb008bbb3"/><file name="Client.php" hash="637bba764765ed5e7684f35532c0a4ed"/><file name="ClientInterface.php" hash="b5137b3a2e3d26ce9be986dfd13499e6"/><file name="Collection.php" hash="431f847865c9621f926b35f91a85dd2c"/><dir name="Cookie"><file name="CookieJar.php" hash="2981ed1414b29b66426eece64865c3ab"/><file name="CookieJarInterface.php" hash="51fd9da76a30957b484296f452c1da42"/><file name="FileCookieJar.php" hash="4aa9c86927b79cf2d978253e0410fb78"/><file name="SessionCookieJar.php" hash="b6c5adee6743072b733a8f3dba43761b"/><file name="SetCookie.php" hash="00db8c8eb2182fddf8afadaaaff20460"/></dir><dir name="Event"><file name="AbstractEvent.php" hash="ce6fb61cd25791ac865d4e84cd9759fd"/><file name="AbstractRequestEvent.php" hash="b18f06f7d9c95a0cc3ef99fdbf4dc203"/><file name="AbstractRetryableEvent.php" hash="2d170945ffa71a89f384ec58078e0c19"/><file name="AbstractTransferEvent.php" hash="89813f179d9cd109a17bebc28494d773"/><file name="BeforeEvent.php" hash="f2cd9a9ac1070b718540129f5909402e"/><file name="CompleteEvent.php" hash="a2b9b8e1e58f198601c22a7f2708b2c1"/><file name="Emitter.php" hash="ad466ad06deedb7331ce7cbd7764f8d9"/><file name="EmitterInterface.php" hash="50d4ccf2a59c4d70b6134873f6934c6e"/><file name="EndEvent.php" hash="1f076fa17483b2dd92098023e78069b6"/><file name="ErrorEvent.php" hash="9d0eaa82626bccaffac0a5f978c13fd8"/><file name="EventInterface.php" hash="2cf7086b80fad54dd9fb1bd66bd3af95"/><file name="HasEmitterInterface.php" hash="aca299bf20f91968a149cb89e117ddc9"/><file name="HasEmitterTrait.php" hash="fceb27761c90d7704cfc2e7ab31651b0"/><file name="ListenerAttacherTrait.php" hash="e71a23d493f4af08228d061dab2ee118"/><file name="ProgressEvent.php" hash="92e78daf64260f604add6dc7ae6b1c4c"/><file name="RequestEvents.php" hash="21dcaf3d461607486b356042032ac74d"/><file name="SubscriberInterface.php" hash="399edbac1d85763544dc54c597194345"/></dir><dir name="Exception"><file name="BadResponseException.php" hash="5d502016856c146aa47d0bbed5106ee1"/><file name="ClientException.php" hash="d1c7f54a71cb105131c0c22b20619bcb"/><file name="ConnectException.php" hash="9ff38d10d12832a15172c72c086143a4"/><file name="CouldNotRewindStreamException.php" hash="d73abf147478558ed008bbffe9985780"/><file name="ParseException.php" hash="4cc7b783e1a68628a7a85f2ad163e775"/><file name="RequestException.php" hash="583ee428fc5aed66ee3b68d05acd967d"/><file name="ServerException.php" hash="36ecb7a8e416e9633b10e677fa5a639e"/><file name="StateException.php" hash="7ed449728b670500dcbde0fad3d2c0c8"/><file name="TooManyRedirectsException.php" hash="9952c5877077fad22bed15fbe04a1ca7"/><file name="TransferException.php" hash="42ffaf70cff001e7b0cfc42ce2e8f8dd"/><file name="XmlParseException.php" hash="77d95d8fa4fb670b348f9c0318a6e107"/></dir><file name="HasDataTrait.php" hash="fb294d4af626e5dd9cf4dec0a146ba0b"/><dir name="Message"><file name="AbstractMessage.php" hash="305754413e6ce7869b6d5c1d711d531b"/><file name="AppliesHeadersInterface.php" hash="8e21471c8384c82f9953a5f35a8c1aad"/><file name="FutureResponse.php" hash="f272567b867f4ac209dd6c92eaf19056"/><file name="MessageFactory.php" hash="a325ba562846468a6267fda2031c7cec"/><file name="MessageFactoryInterface.php" hash="72c981182dc3381da7e1d764745fb50f"/><file name="MessageInterface.php" hash="396bfc61fe4cebb62fa47524c772b513"/><file name="MessageParser.php" hash="a73a7ad08d219ccbd98679a31328d249"/><file name="Request.php" hash="69893f14e5f063861b7a9229cde5d741"/><file name="RequestInterface.php" hash="375992a94f5e9926801bff04d9a97c33"/><file name="Response.php" hash="a5fafa750b85c8bfc94c8ecf22d33fef"/><file name="ResponseInterface.php" hash="650349ea50ba9118c92e34fa95ff7e27"/></dir><file name="Mimetypes.php" hash="98c49c56940197e757af27bb7e13a89b"/><file name="Pool.php" hash="324bd717b59e8aab19b6047b5715e04f"/><dir name="Post"><file name="MultipartBody.php" hash="f33a49bd4efe5ea4685365600bd383d7"/><file name="PostBody.php" hash="bb0f2cf36086a5ab8c83907468472d7f"/><file name="PostBodyInterface.php" hash="6b2f4ea74647a3b5c122366b50fd4931"/><file name="PostFile.php" hash="855721b2dd955fab148b96f609d66349"/><file name="PostFileInterface.php" hash="125d790f2656efe2005a46d98bbf9ccd"/></dir><file name="Query.php" hash="87ec30bde4145bb5086b0f905a37acc7"/><file name="QueryParser.php" hash="e756aae39877cf8137a7d61731a96c5b"/><file name="RequestFsm.php" hash="53643f146ac4a8af437f985b56537cf3"/><file name="RingBridge.php" hash="f5a096b469ac183996a00ccbe59d2ff1"/><dir name="Subscriber"><file name="Cookie.php" hash="9da9bde856192c9588ba7288508fe57c"/><file name="History.php" hash="0b69411a23222125a63b1168e872e7d1"/><file name="HttpError.php" hash="54881525a1132d20b9c94d2263c74c3c"/><file name="Mock.php" hash="7e03e626b83424724aae8e3a6aaaac4a"/><file name="Prepare.php" hash="ea2f4fad216b1050c6bc69c6c9de28a6"/><file name="Redirect.php" hash="5937a24086742fe1d71f70632cf74626"/></dir><file name="ToArrayInterface.php" hash="d6f685d05271786954881729ea03acdf"/><file name="Transaction.php" hash="4b09f99ae5c89731dd0ded5c7e270fce"/><file name="UriTemplate.php" hash="d1eb1c8d5d8e952ec5ebc5ec229ebd8b"/><file name="Url.php" hash="5aedbcee0366876653ff7740928d0b7b"/><file name="Utils.php" hash="7bfdfed1cfceac8fb74825e2e7d58ca2"/></dir><dir name="tests"><file name="BatchResultsTest.php" hash="2bece7f1aab2b56c7d0a95044d364455"/><file name="ClientTest.php" hash="3bfe6825efd15d6d92d08914b5d3e9ec"/><file name="CollectionTest.php" hash="a12026f2f56133a78abc670cdbc41ef8"/><dir name="Cookie"><file name="CookieJarTest.php" hash="0b4f9c735a6777d87ca27a88adba5ade"/><file name="FileCookieJarTest.php" hash="a53871768dfbdd5fdd1c810bbbc97081"/><file name="SessionCookieJarTest.php" hash="e6b75dee2a71c1cf330b3dfaa8510234"/><file name="SetCookieTest.php" hash="9e89006d954368173e74dac68a2188fd"/></dir><dir name="Event"><file name="AbstractEventTest.php" hash="d6c4101eb6d4f9785710bb75faeb0b21"/><file name="AbstractRequestEventTest.php" hash="7d7e5da804db3051bd646058fdcec31b"/><file name="AbstractRetryableEventTest.php" hash="bc0811545d15c9749b03c954bc22dc4b"/><file name="AbstractTransferEventTest.php" hash="f7933c0b89a3697373fd3e926d1b29cc"/><file name="BeforeEventTest.php" hash="e1e03516a4eafbd9c0399ed07092dbeb"/><file name="EmitterTest.php" hash="ad7982eab84ad5ce11f1f8bd04a01cc6"/><file name="ErrorEventTest.php" hash="b6274e50ba68c65f4951780215ef9b5e"/><file name="HasEmitterTraitTest.php" hash="2d1716214cdf9d89e433706292754293"/><file name="ListenerAttacherTraitTest.php" hash="61f0139442059871254ce2e921b7b13b"/><file name="ProgressEventTest.php" hash="6c9bcc84308a5093dc2d90c02d0a00d1"/><file name="RequestEventsTest.php" hash="16a17dc96688fd52d8ebadb3743561a3"/></dir><dir name="Exception"><file name="ParseExceptionTest.php" hash="9ae68634df9b8bd4da10db3ae3c98240"/><file name="RequestExceptionTest.php" hash="02c354306343fc46aa523d6c22b6a363"/><file name="XmlParseExceptionTest.php" hash="0fa1390ebeb36ded883e0e9f67131710"/></dir><file name="IntegrationTest.php" hash="77ecb08442b3edaf4a17dbc3b5eb6645"/><dir name="Message"><file name="AbstractMessageTest.php" hash="4d28bffec70b45a77d5ca8e5c60f7013"/><file name="FutureResponseTest.php" hash="4ec0c219593360e97d539b98982875a9"/><file name="MessageFactoryTest.php" hash="4a4da3a4dcaea6e470f0db5f36aef037"/><file name="MessageParserTest.php" hash="61023f113eafb82e1c519d4e007df5c0"/><file name="RequestTest.php" hash="a213727539122149ba0ef29f43dd5ab1"/><file name="ResponseTest.php" hash="b2eee9848eb5753370156db659fea334"/></dir><file name="MimetypesTest.php" hash="b97bc6a576e373a0f9ea663c67994606"/><file name="PoolTest.php" hash="1c36bb95c48e06a8676869fe3a00efb9"/><dir name="Post"><file name="MultipartBodyTest.php" hash="2f5b276dc55f4e6acc353f15da893090"/><file name="PostBodyTest.php" hash="bd99b38841137550692b0f7758a91e5c"/><file name="PostFileTest.php" hash="61126cad841a60e81eb44a455c3a2468"/></dir><file name="QueryParserTest.php" hash="263e1bfbd5a62751d31b37b1f7b6a366"/><file name="QueryTest.php" hash="22f2d92e4861f452ff44c885ad606cc6"/><file name="RequestFsmTest.php" hash="a1e93b846366335645bdbb527ba5307b"/><file name="RingBridgeTest.php" hash="96b4a0305c26b445fd2a60b866893847"/><file name="Server.php" hash="5f48ad0972b3bebb9fc45b65c6495e49"/><dir name="Subscriber"><file name="CookieTest.php" hash="3d6f6925dcadba10ede56d56b920eac4"/><file name="HistoryTest.php" hash="7ad048226fb91b77be6a191fd7f4c4b6"/><file name="HttpErrorTest.php" hash="f7ef34e0b5cf44bc4274097ff1d3c7df"/><file name="MockTest.php" hash="bac3eebae3a935597e1721b06aea4164"/><file name="PrepareTest.php" hash="9e17a67eec520969e0f3ab550708735a"/><file name="RedirectTest.php" hash="c1d1e3980709198e3b1cb17bf8867046"/></dir><file name="TransactionTest.php" hash="880f3a2f0941a608b15de98231ad5e63"/><file name="UriTemplateTest.php" hash="896b5959837d4094ce45d3d4f1a0efc4"/><file name="UrlTest.php" hash="023ba3e99932d6427cfefea2a28825e6"/><file name="UtilsTest.php" hash="39002d5af09b85b2ec765e6e4698f94e"/><file name="bootstrap.php" hash="2485c354ba16ebdece68b7036a68d90a"/><file name="perf.php" hash="1f2e05c29dea96304aa4ff3f07480801"/></dir><file name=".editorconfig" hash="7e66193b631a146c4a293759de00bf55"/><file name=".gitignore" hash="98d0c9e025ddeaea0512712bf442e39f"/><file name=".travis.yml" hash="fc89cdb2bffb45541e0ab0eaa564b136"/></dir><dir name="guzzle-services"><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="f3364726c6c548160b4af524d7749226"/><file name="README.rst" hash="a5eb708dee2d36276d12ee97a2d855e1"/><file name="composer.json" hash="4dc80269f09ee9e68ca470fd22b75140"/><file name="phpunit.xml.dist" hash="0a0f7e08978d788bfe53c30fb8fea79a"/><dir name="src"><file name="Description.php" hash="18701338f73aab046e9dd1cc01c8464c"/><file name="DescriptionInterface.php" hash="5bf2e170c1713ca461527d92c4d11bcd"/><file name="GuzzleClient.php" hash="61c2e61eea4c23ac89fa5aa4b7000c76"/><file name="Operation.php" hash="b4414480b481e1fc112719ab7ceda602"/><file name="Parameter.php" hash="8679cca4a8a6eb02367c9f3791e14f39"/><dir name="RequestLocation"><file name="AbstractLocation.php" hash="b79e5e0ed31b444b6ff4db9c91010c9c"/><file name="BodyLocation.php" hash="bf342b2ec4e883b71cd17bc78d58d3db"/><file name="HeaderLocation.php" hash="6b08999b75d9685f11a478f2dc597137"/><file name="JsonLocation.php" hash="2d2b7f4e4406d3a2d300267d97d07037"/><file name="PostFieldLocation.php" hash="d3cddfd75a9d764f731a42ece5114ae0"/><file name="PostFileLocation.php" hash="cefdb773df7a8526adc5c9d3b2dd8b87"/><file name="QueryLocation.php" hash="e498fa726d6a31c1de051ad7cf0440d0"/><file name="RequestLocationInterface.php" hash="256addedd3129e536592959b5d15cec4"/><file name="XmlLocation.php" hash="e25fc2ae8b2f18a7e5cb74a15f6c4b78"/></dir><dir name="ResponseLocation"><file name="AbstractLocation.php" hash="7bf6c0ce0939cbad8e5a910c0c038c82"/><file name="BodyLocation.php" hash="cc1e61e02c3ec22e3a88bfdf1190a9a1"/><file name="HeaderLocation.php" hash="60e2afc6d54f6e7a287ae563cc8b5672"/><file name="JsonLocation.php" hash="401676e23362dd09f9f0dc6bcdcb22ea"/><file name="ReasonPhraseLocation.php" hash="e0e0614f7b150da17d0d599bfed7081a"/><file name="ResponseLocationInterface.php" hash="5c29ed2e157580f7576e59780f6e0e76"/><file name="StatusCodeLocation.php" hash="113889d6e28a5ef2e7a40818c3044b4b"/><file name="XmlLocation.php" hash="8589906cc9f5b3719166b5e7d77a51d3"/></dir><file name="SchemaFormatter.php" hash="cf5eb3ada11ce4ddad9971b7acd033a6"/><file name="SchemaValidator.php" hash="6c0f364d6b2d9d5b07cbc6e4d7350a6a"/><file name="Serializer.php" hash="3db6574d8e55ba6680cad7c9c0869786"/><dir name="Subscriber"><file name="ProcessResponse.php" hash="33ab7f4f0491dc8ed30f45b272d4f7a4"/><file name="ValidateInput.php" hash="22700d95812e1526e0ab070927de3c89"/></dir></dir><dir name="tests"><file name="DescriptionTest.php" hash="071edbc19de928c6647457ecb84a1d5c"/><file name="GuzzleClientTest.php" hash="283e621f79108b56a7801f3a64553fa8"/><file name="OperationTest.php" hash="37498b3bc3148f57c8b36cab08cc10d8"/><file name="ParameterTest.php" hash="c05f957913771df2fe88caa0c522c554"/><dir name="RequestLocation"><file name="BodyLocationTest.php" hash="48f98fef7f77deb609133eed3ff3915b"/><file name="HeaderLocationTest.php" hash="db169df2970e05556ab394141135025f"/><file name="JsonLocationTest.php" hash="202768cb03debf540bfe6c72d41ecf4c"/><file name="PostFieldLocationTest.php" hash="4f8fd5fa5a4a76e75f26345407b36309"/><file name="PostFileLocationTest.php" hash="7e632a6453f8224135cacb32a44128fa"/><file name="QueryLocationTest.php" hash="27a56d4d5a2350055123931ffa285696"/><file name="XmlLocationTest.php" hash="0f462e9e04d97c5ede2741740775fcc0"/></dir><dir name="ResponseLocation"><file name="BodyLocationTest.php" hash="79252c9ad9b4e50d51e12044e5f23e4a"/><file name="HeaderLocationTest.php" hash="958fd9ed78860b2299188c1cb636e081"/><file name="JsonLocationTest.php" hash="96c2d8042aeff4cbea9a78e1207bf8d7"/><file name="ReasonPhraseLocationTest.php" hash="542c13fa76ad9d3bf5a599de943c48d4"/><file name="StatusCodeLocationTest.php" hash="6d3a1070a4e41aa094a9279dd3493e76"/><file name="XmlLocationTest.php" hash="64813fceb6aa37497a774d2b9028ef5d"/></dir><file name="SchemaFormatterTest.php" hash="622c275fb473edfb92094e4929718195"/><file name="SchemaValidatorTest.php" hash="e875b51dbc49c18883d4431efbd9bb8a"/><file name="SerializerTest.php" hash="8ccac616b1ac162e4bfe70553318fd6f"/><dir name="Subscriber"><file name="ProcessResponseTest.php" hash="1dd8cdc678cae379bb83cc0b68f5d297"/><file name="ValidateInputTest.php" hash="88a77941ddd4020f8c545a23faf55b24"/></dir></dir><file name=".gitignore" hash="42681fa01a89f4be449cbee88066955c"/><file name=".travis.yml" hash="277b298f9d9212ade8c84fddf8d87561"/></dir><dir name="log-subscriber"><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="README.rst" hash="54c951dcdf7412ecb5a0c0cfe0f54d8e"/><file name="composer.json" hash="3b6b8e6f4120cec4148faecdca206153"/><file name="phpunit.xml.dist" hash="0a0f7e08978d788bfe53c30fb8fea79a"/><dir name="src"><file name="Formatter.php" hash="c5b9539c49d77dcab9ff952547bbe780"/><file name="LogSubscriber.php" hash="39b79bee16d09324cac27f5ffc686929"/><file name="SimpleLogger.php" hash="9d9e9d52c4b1a82df5f82a2386af75b4"/></dir><dir name="tests"><file name="FormatterTest.php" hash="3e9e0f1fb090a58d8b1227e81a3dcd20"/><file name="LogSubscriberTest.php" hash="2ccde676513a6cc22ade7eb44d1fb7c4"/><file name="SimpleLoggerTest.php" hash="8b3e0340b59a223a698eae26af24b3bd"/></dir><file name=".gitignore" hash="af19642b4a44a0330a47893c52d33a78"/><file name=".travis.yml" hash="e52939624b9ea1eff7db5a0737954162"/></dir><dir name="ringphp"><file name="CHANGELOG.md" hash="799347e9b288e0be8ea32f1a1abf8267"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="a17b9a1407c7959a90868c31f61e71f4"/><file name="README.rst" hash="e7a3f00179cfb4b0feee9f88b85e9fe9"/><file name="composer.json" hash="68665e93d1453df2865ed80265fff1ba"/><dir name="docs"><file name="Makefile" hash="777df5c7fafb2d6bfcb3c802e84adc3a"/><file name="client_handlers.rst" hash="6ca3e9e513f571032762133d8a162471"/><file name="client_middleware.rst" hash="681214a7d675a62a5ef3b86acfe37a20"/><file name="conf.py" hash="9f2affce54bd7d8c9a9007b59fc763e0"/><file name="futures.rst" hash="34a204df5751b48199926211066729eb"/><file name="index.rst" hash="a3671abf15c984498720c8899bb08394"/><file name="requirements.txt" hash="baa676171a96a28c1393d91384b1b7ef"/><file name="spec.rst" hash="a01eb587edb3e5114007cad16d235e02"/><file name="testing.rst" hash="6413148aac13954f10afe9f49312710d"/></dir><file name="phpunit.xml.dist" hash="a08ade01ef087db50589d228bb9eb420"/><dir name="src"><dir name="Client"><file name="ClientUtils.php" hash="0287d3512ac65d1f8e278e219274c847"/><file name="CurlFactory.php" hash="f909fb13038da4267441077c7b794500"/><file name="CurlHandler.php" hash="85e6686ed0f84679fc7e4f851c268b63"/><file name="CurlMultiHandler.php" hash="fc5c927d9981a88d28ec6071c437bfbf"/><file name="Middleware.php" hash="10b4e00d41ae53ab744c3df441813175"/><file name="MockHandler.php" hash="d9b3b00bd2e611076fb26f6706c6210c"/><file name="StreamHandler.php" hash="f7d46f8fe620052a8d45b454c42cedc0"/></dir><file name="Core.php" hash="f658655aef2402084df1ae4f1fe426aa"/><dir name="Exception"><file name="CancelledException.php" hash="b520e10d3139675532606f2a0334cca7"/><file name="CancelledFutureAccessException.php" hash="fa44e44ab519317596c0790a65d7bf38"/><file name="ConnectException.php" hash="de603e26f57a49cd5e4eab10e1686f15"/><file name="RingException.php" hash="965eeeb09364f0e0da13d094eefb4be3"/></dir><dir name="Future"><file name="BaseFutureTrait.php" hash="718e41c2d5cef401149c20ca371ad424"/><file name="CompletedFutureArray.php" hash="2ac2ca1892020c4608f2435fd0ebccd5"/><file name="CompletedFutureValue.php" hash="3c6ebdc379ed9af49fc185dd3d37c210"/><file name="FutureArray.php" hash="7f9b892d14899e73e491389c48301d4a"/><file name="FutureArrayInterface.php" hash="4871442a53bd711d89ac9823ee0d8df9"/><file name="FutureInterface.php" hash="eb26d9d532221a1425a8fac2aad96a9e"/><file name="FutureValue.php" hash="be5e06025b123a0d8a9acb8198c2f936"/><file name="MagicFutureTrait.php" hash="94f71a67eebbeaf6f85f778b73ae931d"/></dir></dir><dir name="tests"><dir name="Client"><file name="CurlFactoryTest.php" hash="acaa0fec3dcbc3128b80e020340ac669"/><file name="CurlHandlerTest.php" hash="21ec6983ba2f120240b61e9ab428198d"/><file name="CurlMultiHandlerTest.php" hash="06596c64487027c651f33b797e12a2f6"/><file name="MiddlewareTest.php" hash="100c93dbc7a3053493a42e3e42a244a5"/><file name="MockHandlerTest.php" hash="38eee76c7a84144938ad6704f87d805e"/><file name="Server.php" hash="fa6f211ad34231d3db7bd09a65e20669"/><file name="StreamHandlerTest.php" hash="29e30c9dbdd9728b000494d651e135cb"/><file name="server.js" hash="88d159b78be1b7fa9212209d4d38aef3"/></dir><file name="CoreTest.php" hash="5f7dca3a73b8831f4465fe8dab669118"/><dir name="Future"><file name="CompletedFutureArrayTest.php" hash="700f902ea1cce7e9001d01568ed581d8"/><file name="CompletedFutureValueTest.php" hash="f0f0fbd1dd1c4ac7c200cac5254f6cf8"/><file name="FutureArrayTest.php" hash="faa49dcfb801b774d54ee6c086011614"/><file name="FutureValueTest.php" hash="e7c40a1fd52bb1a58aaad00c8705b37f"/></dir><file name="bootstrap.php" hash="2b4a9ef0805593b41fc90c937437c53d"/></dir><file name=".gitignore" hash="2eb59fa71b9af27e9490e3f48045826d"/><file name=".travis.yml" hash="efa3829190500a4d0da1a423497a5cbe"/></dir><dir name="streams"><file name="CHANGELOG.rst" hash="4752dfe3eab49192fde530a2c2cdb4fe"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="648bf3b1ee188fe82ff842fbf8703ce6"/><file name="README.rst" hash="3e6fd1afbf41950f151ec71a248852ea"/><file name="composer.json" hash="b1a7224ca7d3dc8822599053a986ecb7"/><file name="phpunit.xml.dist" hash="2c20ff733adcdbfc654d37cd863c62a1"/><dir name="src"><file name="AppendStream.php" hash="6058885102fd00fb17b3ba541631bd07"/><file name="AsyncReadStream.php" hash="357a76d042d9f3e7aec1062f6e3a80d2"/><file name="BufferStream.php" hash="87ddb692697c7708e20e1145e7a63911"/><file name="CachingStream.php" hash="6fe89b215a313c235b9239e52378180b"/><file name="DroppingStream.php" hash="44a9450100c8a5f85f3b95563417ccf5"/><dir name="Exception"><file name="CannotAttachException.php" hash="ab4352ccfc2468697a1a86945bbdd1c8"/><file name="SeekException.php" hash="68575bcb6ba2622232ffe7e65450b165"/></dir><file name="FnStream.php" hash="d4bf7cd1da1124cf8c5a561cecdc5059"/><file name="GuzzleStreamWrapper.php" hash="048a82bcb138568e0bbbceaf5f886716"/><file name="InflateStream.php" hash="788a139a27c18d6bd886159e8ef8c10e"/><file name="LazyOpenStream.php" hash="2424456087e77c0cdf3ba02de4f15e9c"/><file name="LimitStream.php" hash="e2a9332833d878494ed30fb3d9f2b8a3"/><file name="MetadataStreamInterface.php" hash="802f0231c068d9f085f3c8653bb926d1"/><file name="NoSeekStream.php" hash="a35f7ea68c23cab4d246f7a2a0edcbe9"/><file name="NullStream.php" hash="a0b4395fc529242d414dd578c4c6f980"/><file name="PumpStream.php" hash="bb422e1161cc1ccf89951fea853f135a"/><file name="Stream.php" hash="f6efbdb369652e6351c8e837febe1795"/><file name="StreamDecoratorTrait.php" hash="775c6b0b12cec849cd1be3bab364006a"/><file name="StreamInterface.php" hash="4ed5919e395f7e4c568e600c800f378d"/><file name="Utils.php" hash="5ee03fd3c0c37082efab7dc213c9f455"/></dir><dir name="tests"><file name="AppendStreamTest.php" hash="7c1d5b1fd981a895240c532a3388cadd"/><file name="AsyncReadStreamTest.php" hash="3cf24da24619f99afd5361953a87a0c9"/><file name="BufferStreamTest.php" hash="e1dff59b71a28ca18f2bf64d88160f8e"/><file name="CachingStreamTest.php" hash="8857ec65fa6e1733a835d1bdecadf0df"/><file name="DroppingStreamTest.php" hash="cb27027850b6b6b87764e716f18568fc"/><dir name="Exception"><file name="SeekExceptionTest.php" hash="2396902960ff0282591d51fd5d40c2df"/></dir><file name="FnStreamTest.php" hash="10285ef01d4cdde83ee80b6132f05a30"/><file name="GuzzleStreamWrapperTest.php" hash="c3f6afb7e215827d5c02cc7ccb4a1848"/><file name="InflateStreamTest.php" hash="b34cbead206f2c39af9735299732b0c5"/><file name="LazyOpenStreamTest.php" hash="794d1631cdf4970a0e69d6ec18290b8a"/><file name="LimitStreamTest.php" hash="66aa7cda081a9d98b8520f942d8f959c"/><file name="NoSeekStreamTest.php" hash="23e203dceb9d70b248d9c3ff5a7aa19b"/><file name="NullStreamTest.php" hash="667a01a596537fe1743ccc237e29cb61"/><file name="PumpStreamTest.php" hash="4cfac47d1911e456bb024913883d675e"/><file name="StreamDecoratorTraitTest.php" hash="0a5247c33b45fd37eb6d4582fd33560e"/><file name="StreamTest.php" hash="a9651186306c293533de2c7d9575f23b"/><file name="UtilsTest.php" hash="f137bb850134805b09794ce79423d9ad"/></dir><file name=".gitignore" hash="af19642b4a44a0330a47893c52d33a78"/><file name=".travis.yml" hash="2559fbe72dc387ede606879bedf4a420"/></dir></dir><dir name="psr"><dir name="log"><file name="LICENSE" hash="1a74629072fd794937be394ab689327e"/><dir name="Psr"><dir name="Log"><file name="AbstractLogger.php" hash="a57c1be541193b72d09307bb0dfb9ed2"/><file name="InvalidArgumentException.php" hash="7d2f0bd1583524d739fff12f0507de65"/><file name="LogLevel.php" hash="19ab55cc711ed2f3ab2ec72e7f0600cb"/><file name="LoggerAwareInterface.php" hash="3ba5ffac8108e1da7657b1fad8651900"/><file name="LoggerAwareTrait.php" hash="5b3adf6c4f09c61d7488b0f9ac2c696a"/><file name="LoggerInterface.php" hash="023885df6a26d8137d5a13da51f066d2"/><file name="LoggerTrait.php" hash="1cb8db6d0b81cf85f81b6c7c09db7a9a"/><file name="NullLogger.php" hash="e71559fea0239b7441d221f8c7beae5b"/><dir name="Test"><file name="LoggerInterfaceTest.php" hash="867f36a94c35322470458f4eba246458"/></dir></dir></dir><file name="README.md" hash="144a71a4e1f9c67ac79751acc37614c4"/><file name="composer.json" hash="de1539d2aa7830d13a968d33d1039f1a"/><file name=".gitignore" hash="e8a346051f935e6cb104e1dc40998a91"/></dir></dir><dir name="react"><dir name="promise"><file name="CHANGELOG.md" hash="2b1f02283ecd949264f900170ea8b3fc"/><file name="LICENSE" hash="e46a0a186cdc556ce7574113f2653180"/><file name="README.md" hash="bbcb0875dc0201cdfe6573443d2bea14"/><file name="composer.json" hash="0ca73967404075ef80fc494b370ddefc"/><file name="phpunit.xml.dist" hash="7d9482f8cd074b464c0f57496e727d5e"/><dir name="src"><file name="CancellablePromiseInterface.php" hash="1d8feeea39ac3cd66f2c041f0f6589f0"/><file name="Deferred.php" hash="a922b6f8f9d7f8525ddc2c5704eb1377"/><file name="ExtendedPromiseInterface.php" hash="1a287908208d527bbbe6e3128af84d26"/><file name="FulfilledPromise.php" hash="773d525b931f7ceb4e1cfa1fec923462"/><file name="LazyPromise.php" hash="a34e5f6bbc510757cb2d41ca41b846e5"/><file name="Promise.php" hash="f7ff3401d5f36e6e4bd613c859fd8d76"/><file name="PromiseInterface.php" hash="488da4a38d218ba8fb3eaea05dd1c264"/><file name="PromisorInterface.php" hash="d7bf061df9395a7cf5fd082805e42c7a"/><file name="RejectedPromise.php" hash="55b2be16604c09ed1add52d1c49dc56c"/><file name="UnhandledRejectionException.php" hash="b814c8ef9bd08d1d41782104aa6ef8f9"/><file name="functions.php" hash="ce714c7d1e64104fa43c043555078a8f"/><file name="functions_include.php" hash="4da7302e4ed0862c6fa885a3c66bcd01"/></dir><dir name="tests"><file name="DeferredTest.php" hash="5fb76a8bd96a79598d69afb9bcc8c1e1"/><file name="FulfilledPromiseTest.php" hash="20e21c11b19ec8b46a47fc072e7a9e0c"/><file name="FunctionAllTest.php" hash="c2ee53ecc37d95fc55c57912477c215a"/><file name="FunctionAnyTest.php" hash="23565b2dfd5969a213862a7f061b2e03"/><file name="FunctionCheckTypehintTest.php" hash="b48395c507606f68d32150ddfc28ae0d"/><file name="FunctionMapTest.php" hash="287d180adefce847aa222bdb05025eb9"/><file name="FunctionRaceTest.php" hash="3d9edf2ca2f2253496c8cf0ecba7c5d6"/><file name="FunctionReduceTest.php" hash="1b9bc983e9900e29f187475072d10cd9"/><file name="FunctionRejectTest.php" hash="4209c5e6b051b3c065b4a8e1e32949dd"/><file name="FunctionResolveTest.php" hash="4836614d978e9b75b8857ed92e837468"/><file name="FunctionSomeTest.php" hash="78c1ad99506be879d910617d744274c0"/><file name="LazyPromiseTest.php" hash="f3f8f1e47ebf5097d726086c785a7b20"/><dir name="PromiseAdapter"><file name="CallbackPromiseAdapter.php" hash="3429d665b2a9dd4a9d3606af69db5c17"/><file name="PromiseAdapterInterface.php" hash="a02b0b5e52a71149688f7bef8894fcda"/></dir><dir name="PromiseTest"><file name="CancelTestTrait.php" hash="eab33b77dca722a733911b1e94ffb16c"/><file name="FullTestTrait.php" hash="e82099e47b8fe984b7f5ff832c811b9b"/><file name="NotifyTestTrait.php" hash="314ba252939f84fd2885064409d4247d"/><file name="PromiseFulfilledTestTrait.php" hash="d83a22d7b2792a2e067447533ef80598"/><file name="PromisePendingTestTrait.php" hash="ca94a285a8ac4b0f402f9915025997a9"/><file name="PromiseRejectedTestTrait.php" hash="286f6bd7327a649c553096b4cb899642"/><file name="PromiseSettledTestTrait.php" hash="2b4de2fa354193aa5d577d2996713eb0"/><file name="RejectTestTrait.php" hash="11d13fb0d33113764df7ad81981e3ff5"/><file name="ResolveTestTrait.php" hash="e8786f5b09a518feb6cb991ec28093df"/></dir><file name="PromiseTest.php" hash="7bbbd1f2acb6e6187b42751a093fb057"/><file name="RejectedPromiseTest.php" hash="e72e7e3d7bc3e7779ea1b8383604a263"/><dir name="Stub"><file name="CallableStub.php" hash="aa2c5ca5528276a340c013c950c3c792"/></dir><file name="TestCase.php" hash="4c1e0a05effe1354008b82a9c903b5b9"/><file name="bootstrap.php" hash="ac271c71e8caa31202d61356508b7c32"/></dir><file name=".gitignore" hash="dbc957e3a33427be6ecce1f274683ed4"/><file name=".travis.yml" hash="ae054f04b30abca8bfdb9f0726d02c2d"/></dir></dir></dir><file name=".editorconfig" hash="992eebd87865ed8081f2f65e2049cd7b"/><file name=".git" hash="ffafd865dc05f7a97a328e8da0a4f0c1"/><file name=".gitignore" hash="54e699d77045a737ccc746b8cc227162"/></dir><file name="Nektria.php" hash="35ec68758ec75b40e3aeccdbf67bd03e"/></dir><dir name="sql"><dir name="nektria_recs_setup"><file name="install-1.0.0.php" hash="8b9f2a7289187a054aa867aab397b24a"/><file name="install-1.0.1.php" hash="3685fc27ea718cbc5ca8e8269f6b078d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="recs"><dir name="email"><file name="lastmile.phtml" hash="45fee0e197b2aaa2f4a8ea2ea3c499b6"/></dir><dir name="progress"><file name="shipping_method.phtml" hash="835b3cad28fce0565efb56b7be052d47"/></dir><dir name="shipping_method"><file name="available.phtml" hash="f29983b29a0f2335ed946aa085d4e991"/></dir><dir name="totals"><file name="gomage.phtml" hash="0f7c34bcf53e50868f368945df74ebc3"/><file name="lastmile.phtml" hash="ebd821972959dbea1260ba2760cd127f"/><file name="onepage.phtml" hash="ef089e02099d64ddb8634a4fb53b8398"/><file name="success.phtml" hash="d41fb8bc248a8516cc51825b0c4b8d4f"/></dir></dir></dir><dir name="layout"><file name="recs.xml" hash="c671b7f667b38d62564d435493ca031c"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="recs"><dir name="sales"><dir name="order"><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="dab64339a84f4ff7f5d85b5fd8ee46ea"/></dir><dir name="view"><file name="form.phtml" hash="93b8200fecb0e2b5226b2763ac5d97db"/></dir></dir><dir name="invoice"><dir name="create"><file name="form.phtml" hash="40ded721298719c36a0eba62db5cc3b3"/></dir><dir name="view"><file name="form.phtml" hash="c57e9f594cac34fd7a465eefe3671d22"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="e05472213fdc397e09311bdc3e0b856d"/></dir><dir name="view"><file name="form.phtml" hash="5a4ba9ac376a5e753e61808b33ac7902"/></dir></dir><dir name="view"><file name="info.phtml" hash="ba408dd6e2ebec0a3ec7f4af115b7631"/><file name="lastmile.phtml" hash="6694b381456a14886fdcb75bcbb69274"/></dir></dir></dir></dir></dir><dir name="layout"><file name="recs.xml" hash="2ee79c0a8a9435bf9fe36467d2990a30"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="es_ES"><file name="Nektria_Translations.csv" hash="1f289a0a285d0fbaf78b329d87553b7e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Nektria_ReCS.xml" hash="9003ab46f73920faa5daf6b7f8c5288e"/></dir></target></contents>
24
  <compatible/>
25
- <dependencies><required><php><min>5.4.0</min><max>7.0.1</max></php><extension><name>curl</name><min></min><max></max></extension></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Nektria_ReCS</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/lgpl-license.php">LGPL</license>
7
  <channel>community</channel>
16
  more information on our website: http://www.recshipping.com/&#xD;
17
  &#xD;
18
  Note: Our extension is compatible with the LightCheckout module!</description>
19
+ <notes>Improvements in the widget.</notes>
20
  <authors><author><name>Digio Soluciones Digitales</name><user>digio</user><email>jose@digio.es</email></author><author><name>Mikael Baron</name><user>mikael_baron</user><email>mikael@nektria.com</email></author></authors>
21
+ <date>2016-01-21</date>
22
+ <time>07:47:47</time>
23
+ <contents><target name="magecommunity"><dir name="Nektria"><dir name="Nektria"><dir name="ReCS"><dir name="Block"><file name="Config.php" hash="605e2c38b2e96539f8c13bf487a873b4"/><file name="Registration.php" hash="8acd523335aac0a89f85a9285cd2d48e"/><file name="Testsdk.php" hash="264e4410d0d5895d03704a054b68a028"/></dir><dir name="Helper"><file name="Data.php" hash="1cd5e57d15505c83edde98a442d0a911"/></dir><dir name="Model"><file name="Carrier.php" hash="20e93b705634d09e60bf0c91d063014b"/><file name="Lastmile.php" hash="58800f6a1d6494cddf6c4a09712cb5b8"/><file name="Observer.php" hash="f20bfbb2caee4b53da7997478dd6420a"/><file name="Paymentmethods.php" hash="e74903910fb8b1d973914c5d007b0559"/><dir name="Resource"><dir name="Lastmile"><file name="Collection.php" hash="b3c178ac9e474b229dc92dda487496d1"/></dir><file name="Lastmile.php" hash="5deaf65f0a8701e63e291893e6414d83"/></dir><dir name="Sales"><file name="Order.php" hash="784b6ace35afbfb1c250ec4bdabb1b29"/></dir></dir><dir name="controllers"><file name="SdkController.php" hash="f49c902b27eba59d6b55f5e1b25ff266"/></dir><dir name="etc"><file name="config.xml" hash="e64f0266a0b2ff93a5bc7724f888b556"/><file name="system.xml" hash="207401993361affebe83669ab1997223"/></dir><dir name="lib"><dir name="Nektria"><file name="CHANGELOG.md" hash="3ed721937e4c4196c251ef03d36b4aff"/><file name="LICENSE.md" hash="f2c581eab0338cfc8dff951987bad127"/><file name="README.md" hash="93588bf1d91fdc0f90b3305a9e99063d"/><file name="composer.json" hash="722c6fb2f2299e94a37b3b5d151f6731"/><dir name="src"><file name="Address.php" hash="a06450f90a49e90b84689ed386110848"/><file name="Client.php" hash="a552803172ec4566e3caf6016754d12a"/><file name="Description.php" hash="5262a31bcaa75fb606bc931a3f7c8ed4"/><dir name="Exceptions"><file name="ApiClientException.php" hash="4a372b94fe96d57f00585964aa5de9ad"/><file name="ApiResponseException.php" hash="5766a0c8da908027f33fbbea5e54ca05"/></dir><file name="Price.php" hash="b71d5a4ae0ad93c082c77f71fe5ad08c"/><file name="Product.php" hash="383a4b33ad6667efc4d44f46340e60a2"/><dir name="Requests"><file name="BackendAccessRequest.php" hash="9a9f7b944a141baf6ae1726375d55315"/><file name="BaseRequest.php" hash="794a9b7886e93c43eb4068f06e087300"/><file name="ClassicAvailabilityRequest.php" hash="eeaff0374c838bcfb2e7bd1a7bc86647"/><file name="ClassicConfirmationRequest.php" hash="e6fa133a76cfcdc4224a54cf0c533c63"/><file name="CoverageRequest.php" hash="5423a200bb8c949ddb9ba6f9de56adfa"/><file name="KeepAliveRequest.php" hash="1dc5fa4916275f2c964c8951224235be"/><file name="LastMileAvailabilityRequest.php" hash="fa5ae9b6444d50a190841ff29992de1c"/><file name="LastMileBestPriceRequest.php" hash="b114666c2b2657ed92b0d13559abc410"/><file name="LastMileConfirmationRequest.php" hash="ed2c9ab713c659c1966d8bcd81aeafeb"/><file name="LastMileValidationRequest.php" hash="21cf5790f64052028eaca1077bfb0bcc"/><file name="RegistrationAccessRequest.php" hash="9b6d084ed813218fc5539681cf5f6956"/><file name="SandboxApiKeyRequest.php" hash="9e6de544d56e3e2d84fd03d05b5d029a"/><file name="ServiceCreationRequest.php" hash="b3caab93bc78dd62359e6cf5e260c23c"/><file name="ShowShippingRequest.php" hash="a45ce1bbeb9f42d4665ef1c029f26b82"/><file name="TestRequest.php" hash="5b4cb97c8d5975fe6367bfec96113926"/><file name="getAssetsRequest.php" hash="58aa8a75c2ea53eb1eebde566a7610c0"/></dir><dir name="Responses"><file name="BackendAccessResponse.php" hash="8c5b38813d387780b972c91207c31736"/><file name="BaseResponse.php" hash="33f3797e9c9e91b3a2a615ca85247977"/><file name="ClassicAvailabilityResponse.php" hash="773653c362001788e16ce128a90f2558"/><file name="ClassicConfirmationResponse.php" hash="5d9ed11dae8cb75e3c9960fb744736be"/><file name="CoverageResponse.php" hash="c38b3cc2bba948f16278f46ce15fe7f9"/><file name="LastMileAvailabilityResponse.php" hash="13e6615241f6c2a78d910af3b29b0f7f"/><file name="LastMileBestPriceResponse.php" hash="18aab01bc5bc4902f04ed94e038aa7ff"/><file name="LastMileConfirmationResponse.php" hash="71739279f5e9082e473546f5708351c8"/><file name="NullResponse.php" hash="93c8006a8cf5e0b9d11282d1eb82f245"/><file name="RegistrationAccessResponse.php" hash="0cb5636b0960b8957a5af6902beb4781"/><file name="ResponseBodyWrapper.php" hash="9f6a0a35632303e846d7454b7b54b1a5"/><file name="SandboxApiKeyResponse.php" hash="3880f31f66ca86850061ec5227f6c8d5"/><file name="ServiceCreationResponse.php" hash="f561c6c6897fb703d7965f6bbed8eb64"/><file name="ShowShippingResponse.php" hash="99baba4daec77cf260eb0e995639b726"/><file name="TransitAvailabilityResponse.php" hash="f6ee6023dba18b3dc5b86061b6d979ea"/><file name="TransitConfirmationResponse.php" hash="a6fe1cc1326d8f372b2e980b5a6ca2a4"/><file name="getAssetsResponse.php" hash="0c3d9b0c8497d41d7f170d7fb948443f"/></dir><file name="ShowShippingHelper.php" hash="5fd55ecebae8fdeea739ffd0a1cdde7b"/><file name="TimeWindow.php" hash="eee34cc65df56cea229cc06ff2ce0103"/><file name="TimeWindowPrice.php" hash="31a6698f74f341b6780956ba951b2731"/><dir name="services"><file name="services.json" hash="6c7add87d74e12167808faac012b9f60"/></dir></dir><file name=".editorconfig" hash="992eebd87865ed8081f2f65e2049cd7b"/><file name=".git" hash="ffafd865dc05f7a97a328e8da0a4f0c1"/><file name=".gitignore" hash="54e699d77045a737ccc746b8cc227162"/></dir><file name="Nektria.php" hash="35ec68758ec75b40e3aeccdbf67bd03e"/></dir><dir name="sql"><dir name="nektria_recs_setup"><file name="install-1.0.0.php" hash="8b9f2a7289187a054aa867aab397b24a"/><file name="install-1.0.1.php" hash="3685fc27ea718cbc5ca8e8269f6b078d"/></dir></dir></dir></dir><dir name="ReCS"><dir name="Block"><file name="Config.php" hash="605e2c38b2e96539f8c13bf487a873b4"/><file name="Registration.php" hash="8acd523335aac0a89f85a9285cd2d48e"/><file name="Testsdk.php" hash="264e4410d0d5895d03704a054b68a028"/></dir><dir name="Helper"><file name="Data.php" hash="1cd5e57d15505c83edde98a442d0a911"/></dir><dir name="Model"><file name="Carrier.php" hash="2b73d830ecc88e9ea30346e5a0f3475d"/><file name="Lastmile.php" hash="58800f6a1d6494cddf6c4a09712cb5b8"/><file name="Observer.php" hash="f20bfbb2caee4b53da7997478dd6420a"/><file name="Paymentmethods.php" hash="e74903910fb8b1d973914c5d007b0559"/><dir name="Resource"><dir name="Lastmile"><file name="Collection.php" hash="b3c178ac9e474b229dc92dda487496d1"/></dir><file name="Lastmile.php" hash="5deaf65f0a8701e63e291893e6414d83"/></dir><dir name="Sales"><file name="Order.php" hash="784b6ace35afbfb1c250ec4bdabb1b29"/></dir></dir><dir name="controllers"><file name="SdkController.php" hash="f49c902b27eba59d6b55f5e1b25ff266"/></dir><dir name="etc"><file name="config.xml" hash="e64f0266a0b2ff93a5bc7724f888b556"/><file name="system.xml" hash="207401993361affebe83669ab1997223"/></dir><dir name="lib"><dir name="Nektria"><file name="CHANGELOG.md" hash="3ed721937e4c4196c251ef03d36b4aff"/><file name="LICENSE.md" hash="f2c581eab0338cfc8dff951987bad127"/><file name="README.md" hash="93588bf1d91fdc0f90b3305a9e99063d"/><file name="composer.json" hash="722c6fb2f2299e94a37b3b5d151f6731"/><file name="composer.lock" hash="e1fee2cd5439111756d3930c7960b8f9"/><dir name="src"><file name="Address.php" hash="a06450f90a49e90b84689ed386110848"/><file name="Client.php" hash="a552803172ec4566e3caf6016754d12a"/><file name="Description.php" hash="5262a31bcaa75fb606bc931a3f7c8ed4"/><dir name="Exceptions"><file name="ApiClientException.php" hash="4a372b94fe96d57f00585964aa5de9ad"/><file name="ApiResponseException.php" hash="5766a0c8da908027f33fbbea5e54ca05"/></dir><file name="Price.php" hash="b71d5a4ae0ad93c082c77f71fe5ad08c"/><file name="Product.php" hash="383a4b33ad6667efc4d44f46340e60a2"/><dir name="Requests"><file name="BackendAccessRequest.php" hash="9a9f7b944a141baf6ae1726375d55315"/><file name="BaseRequest.php" hash="794a9b7886e93c43eb4068f06e087300"/><file name="ClassicAvailabilityRequest.php" hash="eeaff0374c838bcfb2e7bd1a7bc86647"/><file name="ClassicConfirmationRequest.php" hash="e6fa133a76cfcdc4224a54cf0c533c63"/><file name="CoverageRequest.php" hash="5423a200bb8c949ddb9ba6f9de56adfa"/><file name="KeepAliveRequest.php" hash="1dc5fa4916275f2c964c8951224235be"/><file name="LastMileAvailabilityRequest.php" hash="fa5ae9b6444d50a190841ff29992de1c"/><file name="LastMileBestPriceRequest.php" hash="b114666c2b2657ed92b0d13559abc410"/><file name="LastMileConfirmationRequest.php" hash="ed2c9ab713c659c1966d8bcd81aeafeb"/><file name="LastMileValidationRequest.php" hash="21cf5790f64052028eaca1077bfb0bcc"/><file name="RegistrationAccessRequest.php" hash="9b6d084ed813218fc5539681cf5f6956"/><file name="SandboxApiKeyRequest.php" hash="9e6de544d56e3e2d84fd03d05b5d029a"/><file name="ServiceCreationRequest.php" hash="b3caab93bc78dd62359e6cf5e260c23c"/><file name="ShowShippingRequest.php" hash="a45ce1bbeb9f42d4665ef1c029f26b82"/><file name="TestRequest.php" hash="5b4cb97c8d5975fe6367bfec96113926"/><file name="getAssetsRequest.php" hash="58aa8a75c2ea53eb1eebde566a7610c0"/></dir><dir name="Responses"><file name="BackendAccessResponse.php" hash="8c5b38813d387780b972c91207c31736"/><file name="BaseResponse.php" hash="33f3797e9c9e91b3a2a615ca85247977"/><file name="ClassicAvailabilityResponse.php" hash="773653c362001788e16ce128a90f2558"/><file name="ClassicConfirmationResponse.php" hash="5d9ed11dae8cb75e3c9960fb744736be"/><file name="CoverageResponse.php" hash="c38b3cc2bba948f16278f46ce15fe7f9"/><file name="LastMileAvailabilityResponse.php" hash="13e6615241f6c2a78d910af3b29b0f7f"/><file name="LastMileBestPriceResponse.php" hash="18aab01bc5bc4902f04ed94e038aa7ff"/><file name="LastMileConfirmationResponse.php" hash="71739279f5e9082e473546f5708351c8"/><file name="NullResponse.php" hash="93c8006a8cf5e0b9d11282d1eb82f245"/><file name="RegistrationAccessResponse.php" hash="0cb5636b0960b8957a5af6902beb4781"/><file name="ResponseBodyWrapper.php" hash="9f6a0a35632303e846d7454b7b54b1a5"/><file name="SandboxApiKeyResponse.php" hash="3880f31f66ca86850061ec5227f6c8d5"/><file name="ServiceCreationResponse.php" hash="f561c6c6897fb703d7965f6bbed8eb64"/><file name="ShowShippingResponse.php" hash="99baba4daec77cf260eb0e995639b726"/><file name="TransitAvailabilityResponse.php" hash="f6ee6023dba18b3dc5b86061b6d979ea"/><file name="TransitConfirmationResponse.php" hash="a6fe1cc1326d8f372b2e980b5a6ca2a4"/><file name="getAssetsResponse.php" hash="0c3d9b0c8497d41d7f170d7fb948443f"/></dir><file name="ShowShippingHelper.php" hash="5fd55ecebae8fdeea739ffd0a1cdde7b"/><file name="TimeWindow.php" hash="eee34cc65df56cea229cc06ff2ce0103"/><file name="TimeWindowPrice.php" hash="31a6698f74f341b6780956ba951b2731"/><dir name="services"><file name="services.json" hash="6c7add87d74e12167808faac012b9f60"/></dir></dir><dir name="vendor"><file name="autoload.php" hash="dad17efc2123b92b4afc05b3d69926f1"/><dir name="bin"><file name="phpunit" hash="a0a409545298664e3123f29654d4e350"/></dir><dir name="composer"><file name="ClassLoader.php" hash="c67ebce5ff31e99311ceb750202adf2e"/><file name="LICENSE" hash="084a034acbad39464e3df608c6dc064f"/><file name="autoload_classmap.php" hash="ff1b6df4943116e0d83350a0fc8c6c9c"/><file name="autoload_files.php" hash="7188a4e014c4c987b878e7db702a718e"/><file name="autoload_namespaces.php" hash="810e44ee9c7b0d26d0fee898764f63bd"/><file name="autoload_psr4.php" hash="0cd5c9a769d143f44c7ba6556c544f8d"/><file name="autoload_real.php" hash="ea9694b39fc32e8e10932f2a6be844e8"/><file name="installed.json" hash="9f5d8633ce1d4838d1afec18bae67e46"/></dir><dir name="doctrine"><dir name="instantiator"><file name="CONTRIBUTING.md" hash="cd27404e6ef5f16f527f86ee4cce6cc2"/><file name="LICENSE" hash="5129d172ff39ba8552667462c1ae9eee"/><file name="README.md" hash="203712290e0ed73ebc5ffd3a5d18ea27"/><file name="composer.json" hash="ffe535a074206a24cd60dbcf398cc0fc"/><file name="phpmd.xml.dist" hash="e2a7452cb0d9e1a3507e133773c14b3f"/><file name="phpunit.xml.dist" hash="a9df85d69657a89561c27122809f530d"/><dir name="src"><dir name="Doctrine"><dir name="Instantiator"><dir name="Exception"><file name="ExceptionInterface.php" hash="84ad24a17513e05bf401c66444cc71bd"/><file name="InvalidArgumentException.php" hash="742702056447aaef18b421465bec90c4"/><file name="UnexpectedValueException.php" hash="106a3afd02321d3ceac76f7093eebc72"/></dir><file name="Instantiator.php" hash="b471e9766e58011c7c53e5841ca6f536"/><file name="InstantiatorInterface.php" hash="e64f01113543f94d70f52cf68c0fb31d"/></dir></dir></dir><dir name="tests"><dir name="DoctrineTest"><dir name="InstantiatorPerformance"><file name="InstantiatorPerformanceEvent.php" hash="9e4a696bddafc38140e3999d1ff90b6c"/></dir><dir name="InstantiatorTest"><dir name="Exception"><file name="InvalidArgumentExceptionTest.php" hash="e968500e29d73f48f6edc75226520e7e"/><file name="UnexpectedValueExceptionTest.php" hash="cac7b001b3055008f5b822d435948857"/></dir><file name="InstantiatorTest.php" hash="9a233cb7c4591ed8b9de4b1ded86bc2b"/></dir><dir name="InstantiatorTestAsset"><file name="AbstractClassAsset.php" hash="9cf3ad170032ebe5b0a181b68b325c16"/><file name="ArrayObjectAsset.php" hash="b8b317463e96644974ff54feb34811c7"/><file name="ExceptionAsset.php" hash="8586be22617a057732bc47289483bf4f"/><file name="FinalExceptionAsset.php" hash="6f89c841d426f406725957cef0ac737b"/><file name="PharAsset.php" hash="b116a3a413543379fc2d39b7ffd3f35d"/><file name="PharExceptionAsset.php" hash="6a6e5735f1d499a45b7b1f18bc0aee82"/><file name="SerializableArrayObjectAsset.php" hash="41997bb9a9020dfe6b56a3ed55429723"/><file name="SimpleSerializableAsset.php" hash="aab2b889df9d2547d9ba953523215c19"/><file name="SimpleTraitAsset.php" hash="90f91f23568a1b63976636e6cd4360fa"/><file name="UnCloneableAsset.php" hash="9c22bc15f90bf454d99610a3ee2db51f"/><file name="UnserializeExceptionArrayObjectAsset.php" hash="7d588a23cdd439af61dd0f1daa8e2e5d"/><file name="WakeUpNoticesAsset.php" hash="800237f5f1caa0419ae8c4300b3afc47"/><file name="XMLReaderAsset.php" hash="74b4c88f0138319d3fe2e8912ffad4a5"/></dir></dir></dir><file name=".gitignore" hash="b72e2fc9bdf095edeb22e448b73adb3c"/><file name=".scrutinizer.yml" hash="218a0825aefed54c12e8f93d71ea355e"/><file name=".travis.install.sh" hash="79362d8d3d58340cb79d4390d6603678"/><file name=".travis.yml" hash="e4d8ee80b845a0bb7e4f41c917e9564b"/></dir></dir><dir name="guzzlehttp"><dir name="command"><file name="LICENSE" hash="582d7d97bab524143526a38575956e46"/><file name="composer.json" hash="6a4db1d61cf703bb376e300f2b8ff450"/><dir name="src"><file name="AbstractClient.php" hash="f9842d8b970876368f3c4cd44aab11b0"/><file name="Command.php" hash="47e1e4fe507c1e85fa02e75b635cfb7c"/><file name="CommandInterface.php" hash="3dae8f8358cc93fbe29de5b714cd704a"/><file name="CommandToRequestIterator.php" hash="e48d64affa57a6fd3eb0b5f6aa0d5434"/><file name="CommandTransaction.php" hash="ab514b3ff0099b1e463d35aead687611"/><file name="CommandUtils.php" hash="787e835f4660e46ab26445506f8c4ed0"/><dir name="Event"><file name="CommandEvent.php" hash="6c7fc87858a8584f5aebededd10c243f"/><file name="InitEvent.php" hash="108505d45ed7012583cfb543b777b1f2"/><file name="PreparedEvent.php" hash="aac473c4e68ade95452387d7069ddc36"/><file name="ProcessEvent.php" hash="4e50fd5e3861fe4a595e98b0ec3f16e4"/></dir><dir name="Exception"><file name="CommandClientException.php" hash="24e95664f5fa914d6ebf1a689de34c95"/><file name="CommandException.php" hash="48b60048c83f240c3babf0b27470b6b2"/><file name="CommandServerException.php" hash="588645616a623dfdf2c5e65e04c408aa"/></dir><file name="ServiceClientInterface.php" hash="eafcecbcaf8f1dce5b8cbe52b7321a1c"/><dir name="Subscriber"><file name="Debug.php" hash="2a7bc810a41587cfdc4f4a38c4e71029"/><file name="ResultMock.php" hash="e1d45561599e46b12918ad6732cf3e0e"/></dir></dir></dir><dir name="guzzle"><file name="CHANGELOG.md" hash="acc188c927e6bf09d6f9d018ca24d1e8"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="317955136cb3575149363d0b7174dbe5"/><file name="README.md" hash="d1df21412e1e3a6dd1d2d5b796db9be7"/><file name="UPGRADING.md" hash="8d0d9048e11ed2b5e79b1ad86db91d48"/><dir name="build"><file name="packager.php" hash="ab4669be9765aecb479f77c67b98b276"/></dir><file name="composer.json" hash="67f18c5c530a0534f1164fb1ff040444"/><dir name="docs"><file name="Makefile" hash="12a604d6e6b876e11714735cdc6403f1"/><dir name="_static"><file name="guzzle-icon.png" hash="18e05d325a1a51de498fc4a32b15ca48"/><file name="logo.png" hash="f87c876737dd9b36664e6055196c1341"/></dir><dir name="_templates"><file name="nav_links.html" hash="fb4639874978e92069d3d58405369a40"/></dir><file name="clients.rst" hash="f49ec91ff685e740a00dc295297a2660"/><file name="conf.py" hash="24f0dcb8445fe1e4f2c05aa782f9385e"/><file name="events.rst" hash="c1615c7cd00adb02cdebe755b7bb1b18"/><file name="faq.rst" hash="94e3a8cefa5068ebea9223b2ab9cb194"/><file name="handlers.rst" hash="e92fd255c14344536d326b19fcd6ae70"/><file name="http-messages.rst" hash="37e5a669761894e39e32f6cc6da9ede3"/><file name="index.rst" hash="ebb9c7abc88df5051c5eb2419fbb740a"/><file name="overview.rst" hash="0b8656757de9b8f5b0b4f3c6179755db"/><file name="quickstart.rst" hash="c8777d83b78d55453bf8c2ae22a9beb4"/><file name="requirements.txt" hash="444d2df1b594a091c02af61aa48e3ad9"/><file name="streams.rst" hash="c074299618766206fdf8273e89c36fe3"/><file name="testing.rst" hash="435bfaab2b1d85cc3f0e9895fb49ccb7"/></dir><file name="phpunit.xml.dist" hash="b9ae0ee5ca5b26ef09506f77bc93f8be"/><dir name="src"><file name="BatchResults.php" hash="9601ffcd97c39a60ccb6d14bb008bbb3"/><file name="Client.php" hash="637bba764765ed5e7684f35532c0a4ed"/><file name="ClientInterface.php" hash="b5137b3a2e3d26ce9be986dfd13499e6"/><file name="Collection.php" hash="431f847865c9621f926b35f91a85dd2c"/><dir name="Cookie"><file name="CookieJar.php" hash="2981ed1414b29b66426eece64865c3ab"/><file name="CookieJarInterface.php" hash="51fd9da76a30957b484296f452c1da42"/><file name="FileCookieJar.php" hash="4aa9c86927b79cf2d978253e0410fb78"/><file name="SessionCookieJar.php" hash="b6c5adee6743072b733a8f3dba43761b"/><file name="SetCookie.php" hash="00db8c8eb2182fddf8afadaaaff20460"/></dir><dir name="Event"><file name="AbstractEvent.php" hash="ce6fb61cd25791ac865d4e84cd9759fd"/><file name="AbstractRequestEvent.php" hash="b18f06f7d9c95a0cc3ef99fdbf4dc203"/><file name="AbstractRetryableEvent.php" hash="2d170945ffa71a89f384ec58078e0c19"/><file name="AbstractTransferEvent.php" hash="89813f179d9cd109a17bebc28494d773"/><file name="BeforeEvent.php" hash="f2cd9a9ac1070b718540129f5909402e"/><file name="CompleteEvent.php" hash="a2b9b8e1e58f198601c22a7f2708b2c1"/><file name="Emitter.php" hash="ad466ad06deedb7331ce7cbd7764f8d9"/><file name="EmitterInterface.php" hash="50d4ccf2a59c4d70b6134873f6934c6e"/><file name="EndEvent.php" hash="1f076fa17483b2dd92098023e78069b6"/><file name="ErrorEvent.php" hash="9d0eaa82626bccaffac0a5f978c13fd8"/><file name="EventInterface.php" hash="2cf7086b80fad54dd9fb1bd66bd3af95"/><file name="HasEmitterInterface.php" hash="aca299bf20f91968a149cb89e117ddc9"/><file name="HasEmitterTrait.php" hash="fceb27761c90d7704cfc2e7ab31651b0"/><file name="ListenerAttacherTrait.php" hash="e71a23d493f4af08228d061dab2ee118"/><file name="ProgressEvent.php" hash="92e78daf64260f604add6dc7ae6b1c4c"/><file name="RequestEvents.php" hash="21dcaf3d461607486b356042032ac74d"/><file name="SubscriberInterface.php" hash="399edbac1d85763544dc54c597194345"/></dir><dir name="Exception"><file name="BadResponseException.php" hash="5d502016856c146aa47d0bbed5106ee1"/><file name="ClientException.php" hash="d1c7f54a71cb105131c0c22b20619bcb"/><file name="ConnectException.php" hash="9ff38d10d12832a15172c72c086143a4"/><file name="CouldNotRewindStreamException.php" hash="d73abf147478558ed008bbffe9985780"/><file name="ParseException.php" hash="4cc7b783e1a68628a7a85f2ad163e775"/><file name="RequestException.php" hash="583ee428fc5aed66ee3b68d05acd967d"/><file name="ServerException.php" hash="36ecb7a8e416e9633b10e677fa5a639e"/><file name="StateException.php" hash="7ed449728b670500dcbde0fad3d2c0c8"/><file name="TooManyRedirectsException.php" hash="9952c5877077fad22bed15fbe04a1ca7"/><file name="TransferException.php" hash="42ffaf70cff001e7b0cfc42ce2e8f8dd"/><file name="XmlParseException.php" hash="77d95d8fa4fb670b348f9c0318a6e107"/></dir><file name="HasDataTrait.php" hash="fb294d4af626e5dd9cf4dec0a146ba0b"/><dir name="Message"><file name="AbstractMessage.php" hash="305754413e6ce7869b6d5c1d711d531b"/><file name="AppliesHeadersInterface.php" hash="8e21471c8384c82f9953a5f35a8c1aad"/><file name="FutureResponse.php" hash="f272567b867f4ac209dd6c92eaf19056"/><file name="MessageFactory.php" hash="a325ba562846468a6267fda2031c7cec"/><file name="MessageFactoryInterface.php" hash="72c981182dc3381da7e1d764745fb50f"/><file name="MessageInterface.php" hash="396bfc61fe4cebb62fa47524c772b513"/><file name="MessageParser.php" hash="a73a7ad08d219ccbd98679a31328d249"/><file name="Request.php" hash="69893f14e5f063861b7a9229cde5d741"/><file name="RequestInterface.php" hash="375992a94f5e9926801bff04d9a97c33"/><file name="Response.php" hash="a5fafa750b85c8bfc94c8ecf22d33fef"/><file name="ResponseInterface.php" hash="650349ea50ba9118c92e34fa95ff7e27"/></dir><file name="Mimetypes.php" hash="98c49c56940197e757af27bb7e13a89b"/><file name="Pool.php" hash="324bd717b59e8aab19b6047b5715e04f"/><dir name="Post"><file name="MultipartBody.php" hash="f33a49bd4efe5ea4685365600bd383d7"/><file name="PostBody.php" hash="bb0f2cf36086a5ab8c83907468472d7f"/><file name="PostBodyInterface.php" hash="6b2f4ea74647a3b5c122366b50fd4931"/><file name="PostFile.php" hash="855721b2dd955fab148b96f609d66349"/><file name="PostFileInterface.php" hash="125d790f2656efe2005a46d98bbf9ccd"/></dir><file name="Query.php" hash="87ec30bde4145bb5086b0f905a37acc7"/><file name="QueryParser.php" hash="e756aae39877cf8137a7d61731a96c5b"/><file name="RequestFsm.php" hash="53643f146ac4a8af437f985b56537cf3"/><file name="RingBridge.php" hash="f5a096b469ac183996a00ccbe59d2ff1"/><dir name="Subscriber"><file name="Cookie.php" hash="9da9bde856192c9588ba7288508fe57c"/><file name="History.php" hash="0b69411a23222125a63b1168e872e7d1"/><file name="HttpError.php" hash="54881525a1132d20b9c94d2263c74c3c"/><file name="Mock.php" hash="7e03e626b83424724aae8e3a6aaaac4a"/><file name="Prepare.php" hash="ea2f4fad216b1050c6bc69c6c9de28a6"/><file name="Redirect.php" hash="5937a24086742fe1d71f70632cf74626"/></dir><file name="ToArrayInterface.php" hash="d6f685d05271786954881729ea03acdf"/><file name="Transaction.php" hash="4b09f99ae5c89731dd0ded5c7e270fce"/><file name="UriTemplate.php" hash="d1eb1c8d5d8e952ec5ebc5ec229ebd8b"/><file name="Url.php" hash="5aedbcee0366876653ff7740928d0b7b"/><file name="Utils.php" hash="7bfdfed1cfceac8fb74825e2e7d58ca2"/></dir><dir name="tests"><file name="BatchResultsTest.php" hash="2bece7f1aab2b56c7d0a95044d364455"/><file name="ClientTest.php" hash="3bfe6825efd15d6d92d08914b5d3e9ec"/><file name="CollectionTest.php" hash="a12026f2f56133a78abc670cdbc41ef8"/><dir name="Cookie"><file name="CookieJarTest.php" hash="0b4f9c735a6777d87ca27a88adba5ade"/><file name="FileCookieJarTest.php" hash="a53871768dfbdd5fdd1c810bbbc97081"/><file name="SessionCookieJarTest.php" hash="e6b75dee2a71c1cf330b3dfaa8510234"/><file name="SetCookieTest.php" hash="9e89006d954368173e74dac68a2188fd"/></dir><dir name="Event"><file name="AbstractEventTest.php" hash="d6c4101eb6d4f9785710bb75faeb0b21"/><file name="AbstractRequestEventTest.php" hash="7d7e5da804db3051bd646058fdcec31b"/><file name="AbstractRetryableEventTest.php" hash="bc0811545d15c9749b03c954bc22dc4b"/><file name="AbstractTransferEventTest.php" hash="f7933c0b89a3697373fd3e926d1b29cc"/><file name="BeforeEventTest.php" hash="e1e03516a4eafbd9c0399ed07092dbeb"/><file name="EmitterTest.php" hash="ad7982eab84ad5ce11f1f8bd04a01cc6"/><file name="ErrorEventTest.php" hash="b6274e50ba68c65f4951780215ef9b5e"/><file name="HasEmitterTraitTest.php" hash="2d1716214cdf9d89e433706292754293"/><file name="ListenerAttacherTraitTest.php" hash="61f0139442059871254ce2e921b7b13b"/><file name="ProgressEventTest.php" hash="6c9bcc84308a5093dc2d90c02d0a00d1"/><file name="RequestEventsTest.php" hash="16a17dc96688fd52d8ebadb3743561a3"/></dir><dir name="Exception"><file name="ParseExceptionTest.php" hash="9ae68634df9b8bd4da10db3ae3c98240"/><file name="RequestExceptionTest.php" hash="02c354306343fc46aa523d6c22b6a363"/><file name="XmlParseExceptionTest.php" hash="0fa1390ebeb36ded883e0e9f67131710"/></dir><file name="IntegrationTest.php" hash="77ecb08442b3edaf4a17dbc3b5eb6645"/><dir name="Message"><file name="AbstractMessageTest.php" hash="4d28bffec70b45a77d5ca8e5c60f7013"/><file name="FutureResponseTest.php" hash="4ec0c219593360e97d539b98982875a9"/><file name="MessageFactoryTest.php" hash="4a4da3a4dcaea6e470f0db5f36aef037"/><file name="MessageParserTest.php" hash="61023f113eafb82e1c519d4e007df5c0"/><file name="RequestTest.php" hash="a213727539122149ba0ef29f43dd5ab1"/><file name="ResponseTest.php" hash="b2eee9848eb5753370156db659fea334"/></dir><file name="MimetypesTest.php" hash="b97bc6a576e373a0f9ea663c67994606"/><file name="PoolTest.php" hash="1c36bb95c48e06a8676869fe3a00efb9"/><dir name="Post"><file name="MultipartBodyTest.php" hash="2f5b276dc55f4e6acc353f15da893090"/><file name="PostBodyTest.php" hash="bd99b38841137550692b0f7758a91e5c"/><file name="PostFileTest.php" hash="61126cad841a60e81eb44a455c3a2468"/></dir><file name="QueryParserTest.php" hash="263e1bfbd5a62751d31b37b1f7b6a366"/><file name="QueryTest.php" hash="22f2d92e4861f452ff44c885ad606cc6"/><file name="RequestFsmTest.php" hash="a1e93b846366335645bdbb527ba5307b"/><file name="RingBridgeTest.php" hash="96b4a0305c26b445fd2a60b866893847"/><file name="Server.php" hash="5f48ad0972b3bebb9fc45b65c6495e49"/><dir name="Subscriber"><file name="CookieTest.php" hash="3d6f6925dcadba10ede56d56b920eac4"/><file name="HistoryTest.php" hash="7ad048226fb91b77be6a191fd7f4c4b6"/><file name="HttpErrorTest.php" hash="f7ef34e0b5cf44bc4274097ff1d3c7df"/><file name="MockTest.php" hash="bac3eebae3a935597e1721b06aea4164"/><file name="PrepareTest.php" hash="9e17a67eec520969e0f3ab550708735a"/><file name="RedirectTest.php" hash="c1d1e3980709198e3b1cb17bf8867046"/></dir><file name="TransactionTest.php" hash="880f3a2f0941a608b15de98231ad5e63"/><file name="UriTemplateTest.php" hash="896b5959837d4094ce45d3d4f1a0efc4"/><file name="UrlTest.php" hash="023ba3e99932d6427cfefea2a28825e6"/><file name="UtilsTest.php" hash="39002d5af09b85b2ec765e6e4698f94e"/><file name="bootstrap.php" hash="2485c354ba16ebdece68b7036a68d90a"/><file name="perf.php" hash="1f2e05c29dea96304aa4ff3f07480801"/></dir><file name=".editorconfig" hash="7e66193b631a146c4a293759de00bf55"/><file name=".gitignore" hash="98d0c9e025ddeaea0512712bf442e39f"/><file name=".travis.yml" hash="fc89cdb2bffb45541e0ab0eaa564b136"/></dir><dir name="guzzle-services"><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="f3364726c6c548160b4af524d7749226"/><file name="README.rst" hash="a5eb708dee2d36276d12ee97a2d855e1"/><file name="composer.json" hash="4dc80269f09ee9e68ca470fd22b75140"/><file name="phpunit.xml.dist" hash="0a0f7e08978d788bfe53c30fb8fea79a"/><dir name="src"><file name="Description.php" hash="18701338f73aab046e9dd1cc01c8464c"/><file name="DescriptionInterface.php" hash="5bf2e170c1713ca461527d92c4d11bcd"/><file name="GuzzleClient.php" hash="61c2e61eea4c23ac89fa5aa4b7000c76"/><file name="Operation.php" hash="b4414480b481e1fc112719ab7ceda602"/><file name="Parameter.php" hash="8679cca4a8a6eb02367c9f3791e14f39"/><dir name="RequestLocation"><file name="AbstractLocation.php" hash="b79e5e0ed31b444b6ff4db9c91010c9c"/><file name="BodyLocation.php" hash="bf342b2ec4e883b71cd17bc78d58d3db"/><file name="HeaderLocation.php" hash="6b08999b75d9685f11a478f2dc597137"/><file name="JsonLocation.php" hash="2d2b7f4e4406d3a2d300267d97d07037"/><file name="PostFieldLocation.php" hash="d3cddfd75a9d764f731a42ece5114ae0"/><file name="PostFileLocation.php" hash="cefdb773df7a8526adc5c9d3b2dd8b87"/><file name="QueryLocation.php" hash="e498fa726d6a31c1de051ad7cf0440d0"/><file name="RequestLocationInterface.php" hash="256addedd3129e536592959b5d15cec4"/><file name="XmlLocation.php" hash="e25fc2ae8b2f18a7e5cb74a15f6c4b78"/></dir><dir name="ResponseLocation"><file name="AbstractLocation.php" hash="7bf6c0ce0939cbad8e5a910c0c038c82"/><file name="BodyLocation.php" hash="cc1e61e02c3ec22e3a88bfdf1190a9a1"/><file name="HeaderLocation.php" hash="60e2afc6d54f6e7a287ae563cc8b5672"/><file name="JsonLocation.php" hash="401676e23362dd09f9f0dc6bcdcb22ea"/><file name="ReasonPhraseLocation.php" hash="e0e0614f7b150da17d0d599bfed7081a"/><file name="ResponseLocationInterface.php" hash="5c29ed2e157580f7576e59780f6e0e76"/><file name="StatusCodeLocation.php" hash="113889d6e28a5ef2e7a40818c3044b4b"/><file name="XmlLocation.php" hash="8589906cc9f5b3719166b5e7d77a51d3"/></dir><file name="SchemaFormatter.php" hash="cf5eb3ada11ce4ddad9971b7acd033a6"/><file name="SchemaValidator.php" hash="6c0f364d6b2d9d5b07cbc6e4d7350a6a"/><file name="Serializer.php" hash="3db6574d8e55ba6680cad7c9c0869786"/><dir name="Subscriber"><file name="ProcessResponse.php" hash="33ab7f4f0491dc8ed30f45b272d4f7a4"/><file name="ValidateInput.php" hash="22700d95812e1526e0ab070927de3c89"/></dir></dir><dir name="tests"><file name="DescriptionTest.php" hash="071edbc19de928c6647457ecb84a1d5c"/><file name="GuzzleClientTest.php" hash="283e621f79108b56a7801f3a64553fa8"/><file name="OperationTest.php" hash="37498b3bc3148f57c8b36cab08cc10d8"/><file name="ParameterTest.php" hash="c05f957913771df2fe88caa0c522c554"/><dir name="RequestLocation"><file name="BodyLocationTest.php" hash="48f98fef7f77deb609133eed3ff3915b"/><file name="HeaderLocationTest.php" hash="db169df2970e05556ab394141135025f"/><file name="JsonLocationTest.php" hash="202768cb03debf540bfe6c72d41ecf4c"/><file name="PostFieldLocationTest.php" hash="4f8fd5fa5a4a76e75f26345407b36309"/><file name="PostFileLocationTest.php" hash="7e632a6453f8224135cacb32a44128fa"/><file name="QueryLocationTest.php" hash="27a56d4d5a2350055123931ffa285696"/><file name="XmlLocationTest.php" hash="0f462e9e04d97c5ede2741740775fcc0"/></dir><dir name="ResponseLocation"><file name="BodyLocationTest.php" hash="79252c9ad9b4e50d51e12044e5f23e4a"/><file name="HeaderLocationTest.php" hash="958fd9ed78860b2299188c1cb636e081"/><file name="JsonLocationTest.php" hash="96c2d8042aeff4cbea9a78e1207bf8d7"/><file name="ReasonPhraseLocationTest.php" hash="542c13fa76ad9d3bf5a599de943c48d4"/><file name="StatusCodeLocationTest.php" hash="6d3a1070a4e41aa094a9279dd3493e76"/><file name="XmlLocationTest.php" hash="64813fceb6aa37497a774d2b9028ef5d"/></dir><file name="SchemaFormatterTest.php" hash="622c275fb473edfb92094e4929718195"/><file name="SchemaValidatorTest.php" hash="e875b51dbc49c18883d4431efbd9bb8a"/><file name="SerializerTest.php" hash="8ccac616b1ac162e4bfe70553318fd6f"/><dir name="Subscriber"><file name="ProcessResponseTest.php" hash="1dd8cdc678cae379bb83cc0b68f5d297"/><file name="ValidateInputTest.php" hash="88a77941ddd4020f8c545a23faf55b24"/></dir></dir><file name=".gitignore" hash="42681fa01a89f4be449cbee88066955c"/><file name=".travis.yml" hash="277b298f9d9212ade8c84fddf8d87561"/></dir><dir name="log-subscriber"><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="README.rst" hash="54c951dcdf7412ecb5a0c0cfe0f54d8e"/><file name="composer.json" hash="3b6b8e6f4120cec4148faecdca206153"/><file name="phpunit.xml.dist" hash="0a0f7e08978d788bfe53c30fb8fea79a"/><dir name="src"><file name="Formatter.php" hash="c5b9539c49d77dcab9ff952547bbe780"/><file name="LogSubscriber.php" hash="39b79bee16d09324cac27f5ffc686929"/><file name="SimpleLogger.php" hash="9d9e9d52c4b1a82df5f82a2386af75b4"/></dir><dir name="tests"><file name="FormatterTest.php" hash="3e9e0f1fb090a58d8b1227e81a3dcd20"/><file name="LogSubscriberTest.php" hash="2ccde676513a6cc22ade7eb44d1fb7c4"/><file name="SimpleLoggerTest.php" hash="8b3e0340b59a223a698eae26af24b3bd"/></dir><file name=".gitignore" hash="af19642b4a44a0330a47893c52d33a78"/><file name=".travis.yml" hash="e52939624b9ea1eff7db5a0737954162"/></dir><dir name="ringphp"><file name="CHANGELOG.md" hash="799347e9b288e0be8ea32f1a1abf8267"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="a17b9a1407c7959a90868c31f61e71f4"/><file name="README.rst" hash="e7a3f00179cfb4b0feee9f88b85e9fe9"/><file name="composer.json" hash="68665e93d1453df2865ed80265fff1ba"/><dir name="docs"><file name="Makefile" hash="777df5c7fafb2d6bfcb3c802e84adc3a"/><file name="client_handlers.rst" hash="6ca3e9e513f571032762133d8a162471"/><file name="client_middleware.rst" hash="681214a7d675a62a5ef3b86acfe37a20"/><file name="conf.py" hash="9f2affce54bd7d8c9a9007b59fc763e0"/><file name="futures.rst" hash="34a204df5751b48199926211066729eb"/><file name="index.rst" hash="a3671abf15c984498720c8899bb08394"/><file name="requirements.txt" hash="baa676171a96a28c1393d91384b1b7ef"/><file name="spec.rst" hash="a01eb587edb3e5114007cad16d235e02"/><file name="testing.rst" hash="6413148aac13954f10afe9f49312710d"/></dir><file name="phpunit.xml.dist" hash="a08ade01ef087db50589d228bb9eb420"/><dir name="src"><dir name="Client"><file name="ClientUtils.php" hash="0287d3512ac65d1f8e278e219274c847"/><file name="CurlFactory.php" hash="f909fb13038da4267441077c7b794500"/><file name="CurlHandler.php" hash="85e6686ed0f84679fc7e4f851c268b63"/><file name="CurlMultiHandler.php" hash="fc5c927d9981a88d28ec6071c437bfbf"/><file name="Middleware.php" hash="10b4e00d41ae53ab744c3df441813175"/><file name="MockHandler.php" hash="d9b3b00bd2e611076fb26f6706c6210c"/><file name="StreamHandler.php" hash="f7d46f8fe620052a8d45b454c42cedc0"/></dir><file name="Core.php" hash="f658655aef2402084df1ae4f1fe426aa"/><dir name="Exception"><file name="CancelledException.php" hash="b520e10d3139675532606f2a0334cca7"/><file name="CancelledFutureAccessException.php" hash="fa44e44ab519317596c0790a65d7bf38"/><file name="ConnectException.php" hash="de603e26f57a49cd5e4eab10e1686f15"/><file name="RingException.php" hash="965eeeb09364f0e0da13d094eefb4be3"/></dir><dir name="Future"><file name="BaseFutureTrait.php" hash="718e41c2d5cef401149c20ca371ad424"/><file name="CompletedFutureArray.php" hash="2ac2ca1892020c4608f2435fd0ebccd5"/><file name="CompletedFutureValue.php" hash="3c6ebdc379ed9af49fc185dd3d37c210"/><file name="FutureArray.php" hash="7f9b892d14899e73e491389c48301d4a"/><file name="FutureArrayInterface.php" hash="4871442a53bd711d89ac9823ee0d8df9"/><file name="FutureInterface.php" hash="eb26d9d532221a1425a8fac2aad96a9e"/><file name="FutureValue.php" hash="be5e06025b123a0d8a9acb8198c2f936"/><file name="MagicFutureTrait.php" hash="94f71a67eebbeaf6f85f778b73ae931d"/></dir></dir><dir name="tests"><dir name="Client"><file name="CurlFactoryTest.php" hash="acaa0fec3dcbc3128b80e020340ac669"/><file name="CurlHandlerTest.php" hash="21ec6983ba2f120240b61e9ab428198d"/><file name="CurlMultiHandlerTest.php" hash="06596c64487027c651f33b797e12a2f6"/><file name="MiddlewareTest.php" hash="100c93dbc7a3053493a42e3e42a244a5"/><file name="MockHandlerTest.php" hash="38eee76c7a84144938ad6704f87d805e"/><file name="Server.php" hash="fa6f211ad34231d3db7bd09a65e20669"/><file name="StreamHandlerTest.php" hash="29e30c9dbdd9728b000494d651e135cb"/><file name="server.js" hash="88d159b78be1b7fa9212209d4d38aef3"/></dir><file name="CoreTest.php" hash="5f7dca3a73b8831f4465fe8dab669118"/><dir name="Future"><file name="CompletedFutureArrayTest.php" hash="700f902ea1cce7e9001d01568ed581d8"/><file name="CompletedFutureValueTest.php" hash="f0f0fbd1dd1c4ac7c200cac5254f6cf8"/><file name="FutureArrayTest.php" hash="faa49dcfb801b774d54ee6c086011614"/><file name="FutureValueTest.php" hash="e7c40a1fd52bb1a58aaad00c8705b37f"/></dir><file name="bootstrap.php" hash="2b4a9ef0805593b41fc90c937437c53d"/></dir><file name=".gitignore" hash="2eb59fa71b9af27e9490e3f48045826d"/><file name=".travis.yml" hash="efa3829190500a4d0da1a423497a5cbe"/></dir><dir name="streams"><file name="CHANGELOG.rst" hash="4752dfe3eab49192fde530a2c2cdb4fe"/><file name="LICENSE" hash="f9ddfabead2127b089fa60b1cf462ad7"/><file name="Makefile" hash="648bf3b1ee188fe82ff842fbf8703ce6"/><file name="README.rst" hash="3e6fd1afbf41950f151ec71a248852ea"/><file name="composer.json" hash="b1a7224ca7d3dc8822599053a986ecb7"/><file name="phpunit.xml.dist" hash="2c20ff733adcdbfc654d37cd863c62a1"/><dir name="src"><file name="AppendStream.php" hash="6058885102fd00fb17b3ba541631bd07"/><file name="AsyncReadStream.php" hash="357a76d042d9f3e7aec1062f6e3a80d2"/><file name="BufferStream.php" hash="87ddb692697c7708e20e1145e7a63911"/><file name="CachingStream.php" hash="6fe89b215a313c235b9239e52378180b"/><file name="DroppingStream.php" hash="44a9450100c8a5f85f3b95563417ccf5"/><dir name="Exception"><file name="CannotAttachException.php" hash="ab4352ccfc2468697a1a86945bbdd1c8"/><file name="SeekException.php" hash="68575bcb6ba2622232ffe7e65450b165"/></dir><file name="FnStream.php" hash="d4bf7cd1da1124cf8c5a561cecdc5059"/><file name="GuzzleStreamWrapper.php" hash="048a82bcb138568e0bbbceaf5f886716"/><file name="InflateStream.php" hash="788a139a27c18d6bd886159e8ef8c10e"/><file name="LazyOpenStream.php" hash="2424456087e77c0cdf3ba02de4f15e9c"/><file name="LimitStream.php" hash="e2a9332833d878494ed30fb3d9f2b8a3"/><file name="MetadataStreamInterface.php" hash="802f0231c068d9f085f3c8653bb926d1"/><file name="NoSeekStream.php" hash="a35f7ea68c23cab4d246f7a2a0edcbe9"/><file name="NullStream.php" hash="a0b4395fc529242d414dd578c4c6f980"/><file name="PumpStream.php" hash="bb422e1161cc1ccf89951fea853f135a"/><file name="Stream.php" hash="f6efbdb369652e6351c8e837febe1795"/><file name="StreamDecoratorTrait.php" hash="775c6b0b12cec849cd1be3bab364006a"/><file name="StreamInterface.php" hash="4ed5919e395f7e4c568e600c800f378d"/><file name="Utils.php" hash="5ee03fd3c0c37082efab7dc213c9f455"/></dir><dir name="tests"><file name="AppendStreamTest.php" hash="7c1d5b1fd981a895240c532a3388cadd"/><file name="AsyncReadStreamTest.php" hash="3cf24da24619f99afd5361953a87a0c9"/><file name="BufferStreamTest.php" hash="e1dff59b71a28ca18f2bf64d88160f8e"/><file name="CachingStreamTest.php" hash="8857ec65fa6e1733a835d1bdecadf0df"/><file name="DroppingStreamTest.php" hash="cb27027850b6b6b87764e716f18568fc"/><dir name="Exception"><file name="SeekExceptionTest.php" hash="2396902960ff0282591d51fd5d40c2df"/></dir><file name="FnStreamTest.php" hash="10285ef01d4cdde83ee80b6132f05a30"/><file name="GuzzleStreamWrapperTest.php" hash="c3f6afb7e215827d5c02cc7ccb4a1848"/><file name="InflateStreamTest.php" hash="b34cbead206f2c39af9735299732b0c5"/><file name="LazyOpenStreamTest.php" hash="794d1631cdf4970a0e69d6ec18290b8a"/><file name="LimitStreamTest.php" hash="66aa7cda081a9d98b8520f942d8f959c"/><file name="NoSeekStreamTest.php" hash="23e203dceb9d70b248d9c3ff5a7aa19b"/><file name="NullStreamTest.php" hash="667a01a596537fe1743ccc237e29cb61"/><file name="PumpStreamTest.php" hash="4cfac47d1911e456bb024913883d675e"/><file name="StreamDecoratorTraitTest.php" hash="0a5247c33b45fd37eb6d4582fd33560e"/><file name="StreamTest.php" hash="a9651186306c293533de2c7d9575f23b"/><file name="UtilsTest.php" hash="f137bb850134805b09794ce79423d9ad"/></dir><file name=".gitignore" hash="af19642b4a44a0330a47893c52d33a78"/><file name=".travis.yml" hash="2559fbe72dc387ede606879bedf4a420"/></dir></dir><dir name="phpdocumentor"><dir name="reflection-docblock"><file name="LICENSE" hash="7bad6f67feb4324e1b8e6127e09194a3"/><file name="README.md" hash="d92974d09492a320006c71a2a22bded6"/><file name="composer.json" hash="a0dc317df7a3d4ac2ce8cb52a89a7018"/><file name="composer.lock" hash="3dc636f3f1b314cdb284893c34b3eec3"/><file name="phpunit.xml.dist" hash="10761d266e15b8d872f7ed2f72c933b0"/><dir name="src"><dir name="phpDocumentor"><dir name="Reflection"><dir name="DocBlock"><file name="Context.php" hash="023460319db12599993776196f7f07ff"/><file name="Description.php" hash="460d3287f305da6d31ecbcd809149fdd"/><file name="Location.php" hash="94d12b21e0885539e3b3d4d26b50f842"/><file name="Serializer.php" hash="511f2b153168a079aeb92b50939f3a74"/><dir name="Tag"><file name="AuthorTag.php" hash="1e452b0fbcc49b10e18e64781ee8aad1"/><file name="CoversTag.php" hash="0488d58968df7fd80d8ba789c5761ce9"/><file name="DeprecatedTag.php" hash="d87c2750a1f39c810eeccf74af44d079"/><file name="ExampleTag.php" hash="ffe8987acbd7a48f18faa6f1ad8b3cd1"/><file name="LinkTag.php" hash="36a7172b0f68c88114630eaf80640bfe"/><file name="MethodTag.php" hash="58e5453bc9326abd9c59abb4c7768b00"/><file name="ParamTag.php" hash="6926813cbdd03062a41c7295a725ef59"/><file name="PropertyReadTag.php" hash="d9897680c4463f3c41a47cad38c1b4b1"/><file name="PropertyTag.php" hash="518ca0b5784ea92ab439182b7fae73b9"/><file name="PropertyWriteTag.php" hash="0ce4d09a142007561892fefea55d8fa1"/><file name="ReturnTag.php" hash="056c76e2bda10f6dabd334b1f75572cb"/><file name="SeeTag.php" hash="73b83539556afc2c07100d0d015be7ca"/><file name="SinceTag.php" hash="f5ef0abbf2aa96786e017e166c4ca3b4"/><file name="SourceTag.php" hash="fde6ebe8020f00e1e4404f87aefd7e16"/><file name="ThrowsTag.php" hash="8c44ba12a10b8309b90f480f08ff9ac6"/><file name="UsesTag.php" hash="3ef66bbef2003f90129ffb06123edf17"/><file name="VarTag.php" hash="2e7119adc243fa12ca213804b2a60af6"/><file name="VersionTag.php" hash="9f19146d38b39ca7620ac36a081ed10d"/></dir><file name="Tag.php" hash="9ab289afc9ead1bbde6c27b1b3b2a83e"/><dir name="Type"><file name="Collection.php" hash="28fdce749327c1d70b754ad60ddecdee"/></dir></dir><file name="DocBlock.php" hash="8976a740885ffb90bf7e56ac153eaf98"/></dir></dir></dir><dir name="tests"><dir name="phpDocumentor"><dir name="Reflection"><dir name="DocBlock"><file name="DescriptionTest.php" hash="17134d7c2b2e4ee4386806dab8c1746a"/><dir name="Tag"><file name="CoversTagTest.php" hash="d66128d306b13cd3e70857f8a1dd4197"/><file name="DeprecatedTagTest.php" hash="1ce9c12117add9a14730f0b378ff043c"/><file name="ExampleTagTest.php" hash="d54b7792ea9d2eefd4a466bdd3e9980d"/><file name="LinkTagTest.php" hash="7332f028ca1fc27ceb0a27318ceba9db"/><file name="MethodTagTest.php" hash="dfba71ffb219b0f7c6909e264c58a9f9"/><file name="ParamTagTest.php" hash="fb0ec00c125d46328d4b2c4cc874ed80"/><file name="ReturnTagTest.php" hash="5e458cda9a3cea6717aebd9ad202b569"/><file name="SeeTagTest.php" hash="81e80ed4b306f1bc6941fc02970f9f12"/><file name="SinceTagTest.php" hash="41c419e12cc9eef6e3c7fca28cd1cfc7"/><file name="SourceTagTest.php" hash="2c86b8fef05dc174d2a711c7fc8369b6"/><file name="ThrowsTagTest.php" hash="431945abea7ffd7223aac3c98ee39cbb"/><file name="UsesTagTest.php" hash="e308e7967fbeec1a2cf95e40bff6cfa6"/><file name="VarTagTest.php" hash="14cff71ce8cfad799ac306330607397e"/><file name="VersionTagTest.php" hash="99a44c6701f15310bb60462e02c6185d"/></dir><file name="TagTest.php" hash="71ee84a8a82fd5c114cd5e791bbf0e8b"/><dir name="Type"><file name="CollectionTest.php" hash="34c6d5bff587cf0bdd5ff94aaa679a2f"/></dir></dir><file name="DocBlockTest.php" hash="4b047a19d0d69d30f3a6bf4d58556d08"/></dir></dir></dir><file name=".gitignore" hash="ada3b572897ab66697162ec5005ec0d1"/><file name=".travis.yml" hash="2e908edd9106037f53afe9a551e3992f"/></dir></dir><dir name="phpspec"><dir name="prophecy"><file name="CHANGES.md" hash="74a6f8081100ab00deecb12a50a0d487"/><file name="CONTRIBUTING.md" hash="ecc97bb69f5d523fce7fa9b7fd19d7f2"/><file name="LICENSE" hash="919ed3cf53f990487db45922626b96de"/><file name="README.md" hash="ab8190127e2ae48c7ef141e7cee3bc1b"/><file name="composer.json" hash="642fa332c5fa99e1d5086035641b5a74"/><file name="composer.lock" hash="619c15e6237393d98c3574facb657b6a"/><dir name="spec"><dir name="Prophecy"><dir name="Argument"><file name="ArgumentsWildcardSpec.php" hash="4a6ea9d02a9f7001715d5b9e4efc4c70"/><dir name="Token"><file name="AnyValueTokenSpec.php" hash="70a02114a985b57047fdfc7333379339"/><file name="AnyValuesTokenSpec.php" hash="cb38ed32526ac4b44c7d8c7a1b43c921"/><file name="ArrayCountTokenSpec.php" hash="c9131633e598c056395907c92563fb96"/><file name="ArrayEntryTokenSpec.php" hash="faffb33355b44058c47f9be7684c9128"/><file name="ArrayEveryEntryTokenSpec.php" hash="ce1b7e054abc233f171adcfdc5bed431"/><file name="CallbackTokenSpec.php" hash="43ad4ed339231f974ed603125dbe2879"/><file name="ExactValueTokenSpec.php" hash="4e08c4312b74347e2058c507d748a022"/><file name="IdenticalValueTokenSpec.php" hash="f44fd460b6142e8c24774373844b44bd"/><file name="LogicalAndTokenSpec.php" hash="bec75816e85c41d21ed119bd7b118c6e"/><file name="LogicalNotTokenSpec.php" hash="419959907c6610d787882faa550317b4"/><file name="ObjectStateTokenSpec.php" hash="440eb9e79046e3233871aad3bbac3434"/><file name="StringContainsTokenSpec.php" hash="09ad56adbe934f0d2fe2dde4e6c64cd3"/><file name="TypeTokenSpec.php" hash="b5a86f8decff1b9fb3c4a571e7c5c118"/></dir></dir><file name="ArgumentSpec.php" hash="57cb3b347f2c57f2e111c750f5559407"/><dir name="Call"><file name="CallCenterSpec.php" hash="f348ae7f5d6380a6580c1118834e31ed"/><file name="CallSpec.php" hash="6393808a8f191fada7adffbb1fa1beec"/></dir><dir name="Comparator"><file name="ClosureComparatorSpec.php" hash="e8d0fcd91e28fc6db0b26336eaab0181"/><file name="FactorySpec.php" hash="ace944d00bb0b3e9739d7fe7d00ad766"/></dir><dir name="Doubler"><dir name="ClassPatch"><file name="DisableConstructorPatchSpec.php" hash="cbc9f50796e55dd7e5d6d448ff95201d"/><file name="HhvmExceptionPatchSpec.php" hash="84cc0ff40b3db2192b9504a0481f0025"/><file name="KeywordPatchSpec.php" hash="5c1bd0e3078725aca714f2ec789172c3"/><file name="MagicCallPatchSpec.php" hash="893be1d6e860d879d69706ebf165724b"/><file name="ProphecySubjectPatchSpec.php" hash="aae4e8571ec35c24ed2a6568cba6dddc"/><file name="ReflectionClassNewInstancePatchSpec.php" hash="1c0f31e51d7ca727edd249238ed7331f"/><file name="SplFileInfoPatchSpec.php" hash="8d9604b542990e13071d32da62abe09c"/><file name="TraversablePatchSpec.php" hash="947742aabcdffa995dec7019dd53c083"/></dir><file name="DoublerSpec.php" hash="47dd02c1047f84a1db556128f6bcd298"/><dir name="Generator"><file name="ClassCodeGeneratorSpec.php" hash="daca08d075ee8277df43f433c7983194"/><file name="ClassCreatorSpec.php" hash="9f63541614299ec4f7879fa55d6294ff"/><file name="ClassMirrorSpec.php" hash="d4d975bc41ab05dd9a89c18a5e913d51"/><dir name="Node"><file name="ArgumentNodeSpec.php" hash="60827d985b7943826bec8bd340a524d3"/><file name="ClassNodeSpec.php" hash="0c995b00bc5d43663e4515723a6b38e4"/><file name="MethodNodeSpec.php" hash="8017dadf06cc86c148edbffa3140be38"/></dir></dir><file name="LazyDoubleSpec.php" hash="11e7e2dfc015cd2b824f5b741422e9c3"/><file name="NameGeneratorSpec.php" hash="2fc48ac6fd45eabcff361c21001a4c52"/></dir><dir name="Exception"><dir name="Call"><file name="UnexpectedCallExceptionSpec.php" hash="8a505a7c2b2db9f0e83e92a8dc273d84"/></dir><dir name="Doubler"><file name="ClassCreatorExceptionSpec.php" hash="f63eb6b199780eec5ac4d439e3317fb2"/><file name="ClassMirrorExceptionSpec.php" hash="9aa64b11387c15b9a2d37695e71ee8ea"/><file name="ClassNotFoundExceptionSpec.php" hash="d00eff3b7ad1507fdfd53f6bbba37335"/><file name="DoubleExceptionSpec.php" hash="56935e0474c8203b5e486b2b76c991c8"/><file name="InterfaceNotFoundExceptionSpec.php" hash="8946a0f8ce397e6ec115ddbbe68d36dd"/><file name="MethodNotFoundExceptionSpec.php" hash="97a24a63e003d1f01e946f501d760a1d"/></dir><dir name="Prediction"><file name="AggregateExceptionSpec.php" hash="57eb0117c6bf79027b5c0089dfb4de45"/><file name="NoCallsExceptionSpec.php" hash="9c518b57191d3eb4f2658dac9e7e0248"/><file name="UnexpectedCallsCountExceptionSpec.php" hash="f07a8276b11b5fc25de42aedf2bc980b"/><file name="UnexpectedCallsExceptionSpec.php" hash="47c7fd3523446d94f398566864f4917f"/></dir><dir name="Prophecy"><file name="MethodProphecyExceptionSpec.php" hash="ef8f2563cb2e5574ae29677c507c64a3"/><file name="ObjectProphecyExceptionSpec.php" hash="621e68c594d89e3981d8b9d0a114a382"/></dir></dir><dir name="Prediction"><file name="CallPredictionSpec.php" hash="2f47b35b870e90b4934b4b6c01c08b18"/><file name="CallTimesPredictionSpec.php" hash="87c3f4646d6abc6b56c4106ce315eefa"/><file name="CallbackPredictionSpec.php" hash="7f28947cd074850f2eb0c056b531e344"/><file name="NoCallsPredictionSpec.php" hash="1f45dd7fea04568a9900e64eb0833747"/></dir><dir name="Promise"><file name="CallbackPromiseSpec.php" hash="22e89a7519df518b530a6cf703696020"/><file name="ReturnArgumentPromiseSpec.php" hash="35ab534957dfd53e05f59c1fb955fcb9"/><file name="ReturnPromiseSpec.php" hash="571122677f1144d46c71bd20e761c588"/><file name="ThrowPromiseSpec.php" hash="2dfe9d131de22ee63d8c8944d03b41f6"/></dir><dir name="Prophecy"><file name="MethodProphecySpec.php" hash="8b5b1968d55c997fe4b5de83e9e11269"/><file name="ObjectProphecySpec.php" hash="fca18183e24e91f751b66460d3121dee"/><file name="RevealerSpec.php" hash="d47860550d707fc4bfba84ab31de5fc5"/></dir><file name="ProphetSpec.php" hash="5119ac6ffefff21334dadbda5c5bfd02"/><dir name="Util"><file name="StringUtilSpec.php" hash="904154b4244579fe18e1e1600263ab96"/></dir></dir></dir><dir name="src"><dir name="Prophecy"><dir name="Argument"><file name="ArgumentsWildcard.php" hash="a2752f7d812ec1afe49b5ad06046374c"/><dir name="Token"><file name="AnyValueToken.php" hash="c6e9b1489a9a2ecf3186e13ad4613ef4"/><file name="AnyValuesToken.php" hash="2b30b8634482f3658bbb0d85b9b11627"/><file name="ArrayCountToken.php" hash="bc55ee319544e31a5ea4d1a27743f429"/><file name="ArrayEntryToken.php" hash="6c7dc2aa692d3d235bfcfd31d7e7039f"/><file name="ArrayEveryEntryToken.php" hash="30fec959e702239a60fb1d09218dfa04"/><file name="CallbackToken.php" hash="4ab2d7ebda942ba3e3ca460c3f1af533"/><file name="ExactValueToken.php" hash="ecef482fae7271fb32c40d78f8cd5a50"/><file name="IdenticalValueToken.php" hash="d2ee5490e286d64a4e4d8be7309b0d71"/><file name="LogicalAndToken.php" hash="f70ad55d497f8a8c17a55603305101d2"/><file name="LogicalNotToken.php" hash="a06aed5b21a24c30ad57d24681f53111"/><file name="ObjectStateToken.php" hash="02c3ca2228ed337ad57ddb37007549c1"/><file name="StringContainsToken.php" hash="660125e94561554becef2a22d9bc5053"/><file name="TokenInterface.php" hash="941b2cfd84f218da6150a464bdb245f6"/><file name="TypeToken.php" hash="ea7ae855d1f286ebd81be4eb38a9e83e"/></dir></dir><file name="Argument.php" hash="61d73d3349e55559bd1cc26ee805762d"/><dir name="Call"><file name="Call.php" hash="0f98b2bcd0a539b162ca34d76020aa06"/><file name="CallCenter.php" hash="893933fb8a6248cdfc0333a455b8a7f4"/></dir><dir name="Comparator"><file name="ClosureComparator.php" hash="4bc7ba6bb46abc6b7b572f7d525f7af7"/><file name="Factory.php" hash="c8f7a324a0997eca585a463812ff29c5"/></dir><dir name="Doubler"><file name="CachedDoubler.php" hash="9b3b7f48f3b24640c811df2006939522"/><dir name="ClassPatch"><file name="ClassPatchInterface.php" hash="0b873f434af0e0c5ab3a62cbb017343d"/><file name="DisableConstructorPatch.php" hash="2b347ee4708a1f321350fb7aedd96236"/><file name="HhvmExceptionPatch.php" hash="7a247d98ecfb8d51d44b068ccd3225ca"/><file name="KeywordPatch.php" hash="c7af0785fced3518102446cbfa5cbdd5"/><file name="MagicCallPatch.php" hash="af60e931b6c7a9711717dfd0197b4e5c"/><file name="ProphecySubjectPatch.php" hash="6fa1a235fff80c4f3821ffa418687fe0"/><file name="ReflectionClassNewInstancePatch.php" hash="e8eb719b406b30991133025ad40bc715"/><file name="SplFileInfoPatch.php" hash="5c828770e275d3035c0c27a9122ddf0e"/><file name="TraversablePatch.php" hash="fd9aec94fddedde0d61ad2a3deee568e"/></dir><file name="DoubleInterface.php" hash="369868b9a1e9fab4189de24b8ea5839b"/><file name="Doubler.php" hash="fe225a7199c78fe6520fc639b31cd483"/><dir name="Generator"><file name="ClassCodeGenerator.php" hash="bf14c67454ad40c4f9235ca342473dde"/><file name="ClassCreator.php" hash="d1989f7ab452dbf19a377b34da4ceacf"/><file name="ClassMirror.php" hash="0c52ab8fa9632d590d070be758cdfeab"/><dir name="Node"><file name="ArgumentNode.php" hash="b618234aaa7a38c380dc87973076f4ab"/><file name="ClassNode.php" hash="6506c65c36bdf1802f6b692943d9fe0f"/><file name="MethodNode.php" hash="3deee6a847830f78f91593cdcdcbcafd"/></dir><file name="ReflectionInterface.php" hash="8b80045be0c63010c3f899ea445d3fa5"/></dir><file name="LazyDouble.php" hash="c8999a3aa65e0c40f031a620fe5d39b9"/><file name="NameGenerator.php" hash="675d79e3e73296fab242c55192764eca"/></dir><dir name="Exception"><dir name="Call"><file name="UnexpectedCallException.php" hash="ddf78c90b22dc5fe213b8317c7462298"/></dir><dir name="Doubler"><file name="ClassCreatorException.php" hash="171c1c34e223bbda73300a5a159f41c7"/><file name="ClassMirrorException.php" hash="354d46dc765fc4aabb05ee70e6dd3c11"/><file name="ClassNotFoundException.php" hash="889e683cdccabf66c6ac7ec1ab303b44"/><file name="DoubleException.php" hash="dfa65e87b9f7fb92116a3fed91c9a034"/><file name="DoublerException.php" hash="16d130d5f7ef4ae8d0e8043cb48810c0"/><file name="InterfaceNotFoundException.php" hash="9956f64cac35ddcd953b3bee60c915ca"/><file name="MethodNotFoundException.php" hash="135761777a5478f378375c4a2815e358"/><file name="ReturnByReferenceException.php" hash="89da440368b083e37dd7fe98b67368ec"/></dir><file name="Exception.php" hash="ce16b11ca21874b8793642cbabf44e8e"/><file name="InvalidArgumentException.php" hash="29a9b630e333b5285be597cd99670ddb"/><dir name="Prediction"><file name="AggregateException.php" hash="9b7c36fb107e13d31e6056965cb913c6"/><file name="FailedPredictionException.php" hash="85d1545624f43f9c953149c57ca27599"/><file name="NoCallsException.php" hash="b90a7dfdbddb3d5d0eaeb1a72e9213b5"/><file name="PredictionException.php" hash="86b8214d830276d5333a703419be9cff"/><file name="UnexpectedCallsCountException.php" hash="9c1e09104a30b8378e2f8e107250779e"/><file name="UnexpectedCallsException.php" hash="c3758e0bfce32841557c4ef457b52073"/></dir><dir name="Prophecy"><file name="MethodProphecyException.php" hash="c3d302ded3ee0ce6e9811f3e7705163c"/><file name="ObjectProphecyException.php" hash="bc622ffd56099eeb200f5f6874931450"/><file name="ProphecyException.php" hash="52ff2d1c5f3a8aa4a4401c6ebc9bed00"/></dir></dir><dir name="Prediction"><file name="CallPrediction.php" hash="67daacc4a6b9459c26296c802dc1deb9"/><file name="CallTimesPrediction.php" hash="0520ef717700b336a2bf0d22d70a8f45"/><file name="CallbackPrediction.php" hash="5d84ba63c7c89b9b98060732e0587a98"/><file name="NoCallsPrediction.php" hash="d9620665b37964272b78b4ad2168f827"/><file name="PredictionInterface.php" hash="4bfabdd011ab9f5e131513461434b65e"/></dir><dir name="Promise"><file name="CallbackPromise.php" hash="7a47d1a048617a92266a7d7c38a7a2d0"/><file name="PromiseInterface.php" hash="2953e6fabbc77033aeee7f0aa8ab0ed6"/><file name="ReturnArgumentPromise.php" hash="66b489f779499a91983afd39e017f6a9"/><file name="ReturnPromise.php" hash="6369ed3e29a23333e50af5d7673aec21"/><file name="ThrowPromise.php" hash="3600567d034093697a45e1bab2ad07c8"/></dir><dir name="Prophecy"><file name="MethodProphecy.php" hash="3a93fa04a61f2cef86ed4e6ac8f86660"/><file name="ObjectProphecy.php" hash="9b3489164cc4433f570e3e9f80b9aa2b"/><file name="ProphecyInterface.php" hash="aeb552a0e474ab59f2fb2d6abaa7ba83"/><file name="ProphecySubjectInterface.php" hash="7c766011d2b710488d762dad88591ed4"/><file name="Revealer.php" hash="ddc6c76e8e4e1c3fe089d9333e3aa696"/><file name="RevealerInterface.php" hash="3f18f735e13efc4fdb1ca069bb55fc2b"/></dir><file name="Prophet.php" hash="f76fca6cd9f03d5fb864d0524c2dc871"/><dir name="Util"><file name="ExportUtil.php" hash="e490bd70fde393e9d87770da3d631358"/><file name="StringUtil.php" hash="3d2eab568dcc8044fa11903c1fc0dd50"/></dir></dir></dir><file name=".gitignore" hash="f23f4ccd09b6b06a0ac80e8eb88599af"/><file name=".travis.yml" hash="49369432537d0b362af6e2c4001305f8"/></dir></dir><dir name="phpunit"><dir name="php-code-coverage"><file name="CONTRIBUTING.md" hash="4fadd77d541014c03e7d8644a2a9f81f"/><file name="ChangeLog-2.2.md" hash="5260a57175e43a182b812f8656812c96"/><file name="LICENSE" hash="867b7deb79978088daacdf21d0edbf2b"/><file name="README.md" hash="2d75438bcf5bcd6397f3c3820ec9b4a1"/><dir name="build"><file name="travis-ci.xml" hash="1176916b2733dda758e4a76938408493"/></dir><file name="build.xml" hash="018f91345ffa3f12ae812ef4133f7ddc"/><file name="composer.json" hash="aa87a8cd6ede8c419fa85cd46569d5a8"/><file name="phpunit.xml.dist" hash="7be2b25c9993369435eb187ea89bfa26"/><dir name="scripts"><file name="auto_append.php" hash="1f894beb45e5f1af9d3b3f2e770b8898"/><file name="auto_prepend.php" hash="3864daef243ecda1ad504069528ea5f0"/></dir><dir name="src"><dir name="CodeCoverage"><dir name="Driver"><file name="HHVM.php" hash="e13976cb29562db97ee7c1ecb9074dea"/><file name="PHPDBG.php" hash="69be060ff0748db5e771b6dd997011c9"/><file name="Xdebug.php" hash="39ddcb27f385329de70c2a7fd1a380b8"/></dir><file name="Driver.php" hash="506df8e1566386715cd354cafca76ce1"/><dir name="Exception"><file name="UnintentionallyCoveredCode.php" hash="26245a94eb787713993157c93cc5939d"/></dir><file name="Exception.php" hash="5551859cbb46a557cf61fe5c3ca14555"/><file name="Filter.php" hash="1a084f9ef8d28a0d070e13abee0f78d0"/><dir name="Report"><file name="Clover.php" hash="3d8676f18b867b8cadfd581179bbe439"/><file name="Crap4j.php" hash="14f40d5e1a0bd5af70edd5697d5facd4"/><file name="Factory.php" hash="b2eb20c097f79379029a13483df03208"/><dir name="HTML"><dir name="Renderer"><file name="Dashboard.php" hash="2e9014188032173ff79d11e2ad9a3630"/><file name="Directory.php" hash="635741ec9084e4ff4b37625bcaa2c386"/><file name="File.php" hash="812a381032c2c956847733ac48f29095"/><dir name="Template"><file name="coverage_bar.html.dist" hash="8d5207f9b047c474b0462694d1aa7472"/><dir name="css"><file name="bootstrap.min.css" hash="eedf9ee80c2faa4e1b9ab9017cdfcb88"/><file name="nv.d3.min.css" hash="9b3fa55fa15548f646827ff8351f6a3a"/><file name="style.css" hash="1c0bb4a912e02519d339f46ce2f21205"/></dir><file name="dashboard.html.dist" hash="1c27e95e1f17c653b54b72cf2b1e670a"/><file name="directory.html.dist" hash="52acdeb1a85b33f02de507381bca87ed"/><file name="directory_item.html.dist" hash="0c6a7df69c666ddfa176648f08f4d65f"/><file name="file.html.dist" hash="19529297978385c0517be3dde3fa8105"/><file name="file_item.html.dist" hash="e64a3f30539de5f72c6a1ba3ff21afef"/><dir name="fonts"><file name="glyphicons-halflings-regular.eot" hash="f4769f9bdb7466be65088239c12046d1"/><file name="glyphicons-halflings-regular.svg" hash="89889688147bd7575d6327160d64e760"/><file name="glyphicons-halflings-regular.ttf" hash="e18bbf611f2a2e43afc071aa2f4e1512"/><file name="glyphicons-halflings-regular.woff" hash="fa2772327f55d8198301fdb8bcfc8158"/><file name="glyphicons-halflings-regular.woff2" hash="448c34a56d699c29117adc64c43affeb"/></dir><dir name="js"><file name="bootstrap.min.js" hash="8c237312864d2e4c4f03544cd4f9b195"/><file name="d3.min.js" hash="5936da7688d010c60aaf8374f90fcc2b"/><file name="holder.min.js" hash="dc575f4af6aa1f9220acf8f206c1c8ec"/><file name="html5shiv.min.js" hash="3044234175ac91f49b03ff999c592b85"/><file name="jquery.min.js" hash="895323ed2f7258af4fae2c738c8aea49"/><file name="nv.d3.min.js" hash="b7dee5ded6402c555c411df56c4b16a3"/><file name="respond.min.js" hash="afc1984a3d17110449dc90cf22de0c27"/></dir><file name="method_item.html.dist" hash="e5e0b83fc92fc1f88a53b42b2ef1a561"/></dir></dir><file name="Renderer.php" hash="de21a510e5de184717e1e80c7a39726d"/></dir><file name="HTML.php" hash="4daa7b378cdfd8d55b44c81b52df3e68"/><dir name="Node"><file name="Directory.php" hash="0de76dffb80c0b992f93e9a929a10382"/><file name="File.php" hash="2b53005da550aed6abb990d9d0184dab"/><file name="Iterator.php" hash="7efb565beca9d34a756c9be41762517f"/></dir><file name="Node.php" hash="422619ba51fc72d62c421c248d6be1fb"/><file name="PHP.php" hash="c8306a1ab3aa3fbd0441a940d521e94c"/><file name="Text.php" hash="3fcec9caf3585aa8815aeb6ec736c5ed"/><dir name="XML"><file name="Directory.php" hash="e5e258a6bd4b703dcf130ee3f245d716"/><dir name="File"><file name="Coverage.php" hash="d85164e39cb0f2b6da3e2517619e8e57"/><file name="Method.php" hash="fe541aad6246655a8b7c5c0f8f925a57"/><file name="Report.php" hash="c8085242da1ba34c5481714dbabb7c4b"/><file name="Unit.php" hash="6b0505bd0c6558bbaf68df6e244e1c99"/></dir><file name="File.php" hash="8dc39e34b45e9b6015386ee785859424"/><file name="Node.php" hash="a4290554318aab84fe0eceba576297c8"/><file name="Project.php" hash="b7e5399e11a9b82b1c047757ab38cd4a"/><file name="Tests.php" hash="4de3958fc2935ad4a506fa513d9bbfb1"/><file name="Totals.php" hash="504d4da3dfd2994b452192ce724c33ec"/></dir><file name="XML.php" hash="34b570eb4a574658f68cd9a32eb76057"/></dir><dir name="Util"><file name="InvalidArgumentHelper.php" hash="49e4995373f201811fc3811cd117fbdf"/></dir><file name="Util.php" hash="34699504f6e71400fbe315e7b0d87707"/></dir><file name="CodeCoverage.php" hash="e5bb4dc3701f53dc8484e64234d83bfb"/></dir><dir name="tests"><dir name="PHP"><dir name="CodeCoverage"><file name="FilterTest.php" hash="1c0b8d42b7089a867a46d93cf5975f1a"/><dir name="Report"><file name="CloverTest.php" hash="f33f02ed90a54ca45e270b5f69632686"/><file name="FactoryTest.php" hash="b3902ac21c5f29ceab0745b895092863"/></dir><file name="UtilTest.php" hash="be3ca34762f174a781d1bc38cc9ea033"/></dir><file name="CodeCoverageTest.php" hash="4cf110010405cd85614998e1e66eaf54"/></dir><file name="TestCase.php" hash="d5f070df31ba4e4303859b5e928d4ed7"/><dir name="_files"><file name="BankAccount-clover.xml" hash="8fb2e8875a0519dfe41051766d4fa312"/><file name="BankAccount.php" hash="1fa57c931da01a8107b82bcf4b1fb15c"/><file name="BankAccountTest.php" hash="2f9dce84cfd563b443d2e0257e084f58"/><file name="CoverageClassExtendedTest.php" hash="ef2336d55ae02703b0c608e2c86a835a"/><file name="CoverageClassTest.php" hash="88af4d7c4b557e78f886453857b00612"/><file name="CoverageFunctionParenthesesTest.php" hash="c7fef2fb7f51150a660844b997ee4c37"/><file name="CoverageFunctionParenthesesWhitespaceTest.php" hash="ec5d778e1a37d1a190c40a9acec55a65"/><file name="CoverageFunctionTest.php" hash="39bec3b0b9db30f67bc23896018b7e15"/><file name="CoverageMethodOneLineAnnotationTest.php" hash="d229ea18df6ca5eabe0e9f42cdfec897"/><file name="CoverageMethodParenthesesTest.php" hash="889346c35550fe4a3f4caa0838136f9f"/><file name="CoverageMethodParenthesesWhitespaceTest.php" hash="79096a31b12bb716119c4ae5021114d5"/><file name="CoverageMethodTest.php" hash="736839b87afcbfa16f75a87170b2eaf2"/><file name="CoverageNoneTest.php" hash="1ef0636da95daaf6a8bda6991df078e4"/><file name="CoverageNotPrivateTest.php" hash="b64af610121292153da0681b2328e3ec"/><file name="CoverageNotProtectedTest.php" hash="d090bd61f1ddf98f5b1d5a4e9b74558a"/><file name="CoverageNotPublicTest.php" hash="fed43600690b9cdaba323037b43b47b4"/><file name="CoverageNothingTest.php" hash="64332f588c6c1a09651b9d54d0a90dd3"/><file name="CoveragePrivateTest.php" hash="fdd0b16f24305076c51df8781a9d788c"/><file name="CoverageProtectedTest.php" hash="c12e2728b065e19203543dfe515827b2"/><file name="CoveragePublicTest.php" hash="c2df1e89a58b9382dcddbc17280db2eb"/><file name="CoverageTwoDefaultClassAnnotations.php" hash="73657242a6cc3db3203540430eb5aea1"/><file name="CoveredClass.php" hash="3fb30247bee83f69ab4102b1debf0e3e"/><file name="CoveredFunction.php" hash="38958a75f33a86b704f96f50cbc6548d"/><file name="NamespaceCoverageClassExtendedTest.php" hash="6ee65961bef48fcbd29dc32c1cd1b214"/><file name="NamespaceCoverageClassTest.php" hash="303c79ca84dd5185cbe3523be856be76"/><file name="NamespaceCoverageCoversClassPublicTest.php" hash="196ba19fc47ab47727515c2378fb7673"/><file name="NamespaceCoverageCoversClassTest.php" hash="c8aca2dafd7f838c8ad3a1a37494b2b1"/><file name="NamespaceCoverageMethodTest.php" hash="65d34371a30cf070c32af9e748057cd7"/><file name="NamespaceCoverageNotPrivateTest.php" hash="72f092fa88a601e0c6b879e79f342ec7"/><file name="NamespaceCoverageNotProtectedTest.php" hash="6a4e3044f4170ae6526449bc31f04480"/><file name="NamespaceCoverageNotPublicTest.php" hash="3ef83ceab1ef56e48c564f53e5abc007"/><file name="NamespaceCoveragePrivateTest.php" hash="9db671d755ccc81cd789fd099404e634"/><file name="NamespaceCoverageProtectedTest.php" hash="e55f9e06a7ac37584bb21428023a3ecd"/><file name="NamespaceCoveragePublicTest.php" hash="cfb91dec22992ab23414c869055e4195"/><file name="NamespaceCoveredClass.php" hash="71017e733b94b3c63316bab6b4a3a405"/><file name="NotExistingCoveredElementTest.php" hash="6d7f8db98965f803878906e6510fe14a"/><file name="class-with-anonymous-function-clover.xml" hash="c324b59352780ed63811eeec343f5d72"/><file name="ignored-lines-clover.xml" hash="05add787a4062f527ba523ea53e59d43"/><file name="source_with_class_and_anonymous_function.php" hash="c713c0fce3b2753cdc6d91fef1bf89b8"/><file name="source_with_ignore.php" hash="0c13dc04fb19a7e9ba89d766ab9a18e4"/><file name="source_with_namespace.php" hash="329f39af4321bad66d28fbf11764e45a"/><file name="source_with_oneline_annotations.php" hash="e96b8b72e308bd417b6699fcbef673ac"/><file name="source_without_ignore.php" hash="04a707fa08b9df780bec3dbf2fc6b074"/><file name="source_without_namespace.php" hash="7316c8e4818931d5521a3c590b14f999"/></dir></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="af764bbd47d332bb257d91ed27620e7a"/><file name=".travis.yml" hash="a1e8e6b3e8e2dfef48c9ff69e70c81a0"/></dir><dir name="php-file-iterator"><file name="ChangeLog.md" hash="2e12c467e0899c3739eabc4c6a1ec4b2"/><file name="LICENSE" hash="3e71f43ff2c0d752dbd23c76da32a94f"/><file name="README.md" hash="5e672bf227e1bfb9c4a1001f456b68cf"/><file name="composer.json" hash="a4c765abf57e13cea89ffb36ae2c3694"/><dir name="src"><file name="Facade.php" hash="96877974aafc0e49033ce055c8cd2a1a"/><file name="Factory.php" hash="4334b71e5afe5091f3107d0475699fd6"/><file name="Iterator.php" hash="94ad0f39361843333f077a6ebfd6c332"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="7d546184afdfb50fac3c2ac149eb26d2"/></dir><dir name="php-text-template"><file name="LICENSE" hash="f49c9b8bb76bdccb7c22fbde6d22757f"/><file name="README.md" hash="5808c106de3fda4abf60f48b951ae997"/><file name="composer.json" hash="bd682e2f2339f962e5991fc90a52b67c"/><dir name="src"><file name="Template.php" hash="0543ca1facab9f263808a5f1f730f092"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="6c7475208ca90f89353dafbf6161264a"/></dir><dir name="php-timer"><file name="LICENSE" hash="481839914f345c664d5dea21b1d04c3f"/><file name="README.md" hash="388f9e0a76652e357d25300025dac515"/><file name="composer.json" hash="c225a8bceb8a840d2e76e0c7459f3a64"/><dir name="src"><file name="Timer.php" hash="16ac1873540ca928b9922751204042f8"/></dir><dir name="tests"><file name="TimerTest.php" hash="e2fe5cd0fa3cc6df2597ba33f224abaa"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="7d546184afdfb50fac3c2ac149eb26d2"/><file name=".travis.yml" hash="b89c1f14899203e92019c3a8d6535087"/></dir><dir name="php-token-stream"><file name="LICENSE" hash="b4f42b89683b8003b2041d565bf2c225"/><file name="README.md" hash="c048364d3bcfff33d0dee7518dfb8d29"/><dir name="build"><file name="phpunit.xml" hash="4de22e7e36999f962d1e8e5d7f735412"/></dir><file name="build.xml" hash="4707c6e9f86cae86bf16b561170cc060"/><file name="composer.json" hash="dfa10f4977d247d2ee0e8def26c5892f"/><dir name="src"><dir name="Token"><dir name="Stream"><file name="CachingFactory.php" hash="ae8459fadfe3ff3e4dfa1a51c15a3fc2"/></dir><file name="Stream.php" hash="fa4ca407084bd134aa3630a4aa412179"/></dir><file name="Token.php" hash="5a2550ab83f5420edc337c1ef8e6f780"/></dir><dir name="tests"><dir name="Token"><file name="ClassTest.php" hash="cc05517f09ba0a0a39b23bc43fdfcd07"/><file name="ClosureTest.php" hash="ced9ff421a6eac670f576fe5b0a2dcb6"/><file name="FunctionTest.php" hash="98c4a4b7bc21b159cd50f18f3582154a"/><file name="IncludeTest.php" hash="85b9a79f6bfce83bb8c3ce3af2b045c3"/><file name="InterfaceTest.php" hash="ed019913c65070d78abe99258a4a24be"/><file name="NamespaceTest.php" hash="863ca9edae472d00bfff63ce44ebdc84"/></dir><file name="TokenTest.php" hash="9d6b98c38a6354473a87f73fe4ee95bc"/><dir name="_fixture"><file name="classExtendsNamespacedClass.php" hash="22764f0b6de09293c3d4eaf55bc7163e"/><file name="classInNamespace.php" hash="1e6de40ec066648e61e0769485470523"/><file name="classInScopedNamespace.php" hash="49c3594e191b195f6c83ff1394bd1a81"/><file name="class_with_method_that_declares_anonymous_class.php" hash="329c904e158590b64cd11ce769953a74"/><file name="class_with_method_that_declares_anonymous_class2.php" hash="dcc6e71046486f885822d23060044f16"/><file name="closure.php" hash="5cdbae1c9428035a37488f32d17c0665"/><file name="issue19.php" hash="f5d881f3dc31f7ac2ae703f17056d753"/><file name="issue30.php" hash="19278ce048443a651605700d98456a06"/><file name="multipleNamespacesWithOneClassUsingBraces.php" hash="e8ac69199b7abd47aaf149846fe164c3"/><file name="multipleNamespacesWithOneClassUsingNonBraceSyntax.php" hash="6d1cf17489cd1307bd676d08a688b23a"/><file name="source.php" hash="1b601d088df48aa597db3a2503144ec1"/><file name="source2.php" hash="3536fd82479484d26d2cb47f28f21b5e"/><file name="source3.php" hash="a5cd42729c1bcb391a76f649774244db"/><file name="source4.php" hash="192c5f3fb62d9ec0a27b8946348038c7"/><file name="source5.php" hash="8f5de89985fc45a55da7a25a711f9969"/></dir><file name="bootstrap.php" hash="a49ea225267e4c24fcb24be989b3241d"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="36cf69e03afaa72b500778a987d5b0d7"/><file name=".travis.yml" hash="a3f0f14cf02c5d2f27c98c912337d10c"/></dir><dir name="phpunit"><file name="CODE_OF_CONDUCT.md" hash="da272677119b75b6c3317cec96c2256e"/><file name="CONTRIBUTING.md" hash="e364887c4075ef657050e966bf1d97d2"/><file name="ChangeLog-4.0.md" hash="35f79a5addfb4406d03bcf40cdefc363"/><file name="ChangeLog-4.1.md" hash="bc4af1436594670427d0fd69209fef65"/><file name="ChangeLog-4.2.md" hash="88b7e91af3b1c4ba2bb1a2d0f1eec2c9"/><file name="ChangeLog-4.3.md" hash="6f770f6bdd2d920f8db85ba16364d4b6"/><file name="ChangeLog-4.4.md" hash="96715ce3eed29f0aeb9d818f584c3d9c"/><file name="ChangeLog-4.5.md" hash="9b5ed1bd78c914fa4b3d8320945185bd"/><file name="ChangeLog-4.6.md" hash="e7659ffe60e9bf9d66708b4ed304cc39"/><file name="ChangeLog-4.7.md" hash="8bd8ed13e790792d877398eb26f8e1cc"/><file name="ChangeLog-4.8.md" hash="db9a66382681e4e8466e000323198bb3"/><file name="LICENSE" hash="61b8f921dcb4c23a050e7253cae57980"/><file name="README.md" hash="3ef91f17d44ecec49c60ff87023eb508"/><dir name="build"><dir name="bin"><file name="phpab" hash="67641190b5843bbf6318d6dacac0576f"/></dir><file name="binary-phar-autoload.php.in" hash="1b395ee032b6629cb0964184aa331027"/><file name="ca.pem" hash="51e14b4c734e450402ea2cf73f2aee0f"/><file name="library-phar-autoload.php.in" hash="be51ee431b0ae27ba9180fe087e15322"/><file name="phar-manifest.php" hash="e91533f535abcedf7a7a0ccf0edcacbd"/><file name="phar-version.php" hash="65cbf171d7d33952b233578be15e6483"/><file name="travis-ci-fail.xml" hash="5d1137a883285b19d0144ab2cbb69028"/></dir><file name="build.xml" hash="0bdd728de80f95b0155910265971c32e"/><file name="composer.json" hash="b2d1b485ac6b2acab626c00f334319c9"/><file name="phpdox.xml.dist" hash="707aaf3e01fa79fa753be0acb012a325"/><file name="phpunit" hash="a0a409545298664e3123f29654d4e350"/><file name="phpunit.xml.dist" hash="f411f04f681f3df76f47736e9bb0a18d"/><file name="phpunit.xsd" hash="29398a6017a3ee366e14a7aad75e385d"/><dir name="src"><file name="Exception.php" hash="6d0901a3d39c947efa435bcff77ce674"/><dir name="Extensions"><file name="GroupTestSuite.php" hash="f12b6a182fc01ffee9e0ec37bd065bd1"/><file name="PhptTestCase.php" hash="3ae757bdd71c74e39ea97b946a612cd4"/><file name="PhptTestSuite.php" hash="3b5d0f67b7694529c5e9372538ada473"/><file name="RepeatedTest.php" hash="625b224cfda7acebdc67dbe34a7ef60b"/><file name="TestDecorator.php" hash="94ea35f8f877180b4e6a493f11c55086"/><file name="TicketListener.php" hash="eaa0e7d4044c0ed4b1aa819b07e5aaa0"/></dir><dir name="Framework"><dir name="Assert"><file name="Functions.php" hash="ddd500c7299b71c818c5bdf369d2bfa0"/></dir><file name="Assert.php" hash="c7c09ff14917ecdfc6f5ad8bfd765213"/><file name="AssertionFailedError.php" hash="6d08a7f0b6ea30ef0e7898dc72204619"/><file name="BaseTestListener.php" hash="beef0cf010b5174b538cd293611c18ff"/><file name="CodeCoverageException.php" hash="8effab2316d70a17bd9afec758f541d0"/><dir name="Constraint"><file name="And.php" hash="07ca11a7735d26170a94c2cead8c32bc"/><file name="ArrayHasKey.php" hash="f3c0409d467682dfdd5f4f9042e528de"/><file name="ArraySubset.php" hash="828c61a5eaf3863af946d8c5b435bea2"/><file name="Attribute.php" hash="948a6cb40da67a9815ca845e3196dde0"/><file name="Callback.php" hash="e5bd619b183e24a4cda4270b24d1a7f9"/><file name="ClassHasAttribute.php" hash="7177a342d3f84b954f290d4559a5f2a7"/><file name="ClassHasStaticAttribute.php" hash="c7fc56b50e3926d6d034c9a8ba5efd7c"/><file name="Composite.php" hash="551aab050b0c4f0f846c62b49cef9acc"/><file name="Count.php" hash="926db5dfb9a0494f26c6878e0c1ed1cd"/><file name="Exception.php" hash="c992b9af5864643f5fc90927192c4050"/><file name="ExceptionCode.php" hash="f43e5868369ab7230483b46f9454c33b"/><file name="ExceptionMessage.php" hash="02e59a324f1368027468205d8163338d"/><file name="ExceptionMessageRegExp.php" hash="c18b12121ac14948bd7f2ff21d92a5e3"/><file name="FileExists.php" hash="7674b36899bc3feffc7ae963c225389c"/><file name="GreaterThan.php" hash="fca17ec93f66321cfacfdd9bcaf5a191"/><file name="IsAnything.php" hash="5cf02d4d961c556457f4aab14867ee16"/><file name="IsEmpty.php" hash="5a0cd67d3df6955f05dde94686dda1cd"/><file name="IsEqual.php" hash="870e782769ae1399a6a545eec832d6a1"/><file name="IsFalse.php" hash="1762858daa4894ccaa1387f08c832cab"/><file name="IsIdentical.php" hash="facb82816e405169722ce4ffe847d8e7"/><file name="IsInstanceOf.php" hash="e5b21790a2ac1add0305d5169d6d8b9c"/><file name="IsJson.php" hash="672e98649b18ff2ca7aeb8142307b2ce"/><file name="IsNull.php" hash="d85d6bcaa67d0b8d9de92b6dd8d85299"/><file name="IsTrue.php" hash="3dc0618444b495cbe9a242660f44cb0c"/><file name="IsType.php" hash="da5b829e3f2b830e1de8b55f1bb67d7e"/><dir name="JsonMatches"><file name="ErrorMessageProvider.php" hash="33b01ea8a6e4ab0f5b6da6e4d504cf2a"/></dir><file name="JsonMatches.php" hash="7211001fb8d188e48c7bbc69d0e9f6e6"/><file name="LessThan.php" hash="97d879d6943905d81d68d3145c263c49"/><file name="Not.php" hash="ecbfbaaec61a4a76664b55baa3d91340"/><file name="ObjectHasAttribute.php" hash="b1fb8494a9cffba0aa03c44370d2ca09"/><file name="Or.php" hash="7ec7e9e62153168563cda792eb4059eb"/><file name="PCREMatch.php" hash="312f28b7303f88db58041c37041713e4"/><file name="SameSize.php" hash="9236e23b510a98540e323ba0651204fb"/><file name="StringContains.php" hash="b6ed4431c163a1dd9fa34ac368c63339"/><file name="StringEndsWith.php" hash="ab79a5f49f5e00fe283c578031a4617c"/><file name="StringMatches.php" hash="2c7631a70cdf5872a6157d45219efda5"/><file name="StringStartsWith.php" hash="2abac2d8bcfea73a4e39c318e01fe672"/><file name="TraversableContains.php" hash="f401a50aae7417865cffc3e1843addc9"/><file name="TraversableContainsOnly.php" hash="97bfc0c3eb6d782b39f571557fcd8c91"/><file name="Xor.php" hash="24c63046a1329d9332ac6427b90cd062"/></dir><file name="Constraint.php" hash="9be646794eb34a6283cbea63ca4c18d9"/><dir name="Error"><file name="Deprecated.php" hash="b199c6c97e822f4a63552d21fd557ed3"/><file name="Notice.php" hash="448fff9194b06c5bccfacc3f8926ead0"/><file name="Warning.php" hash="ef6983832beab060a47e587d17318236"/></dir><file name="Error.php" hash="1a46753a43260a3c6cca9beb3041ea3f"/><file name="Exception.php" hash="6ab8d5c010d19a5cd362ac80b2ea0e17"/><file name="ExceptionWrapper.php" hash="96746f8c3b7d6d3e6e198cba52bc0514"/><file name="ExpectationFailedException.php" hash="bf627422d6cf4fd920907d9621ad141c"/><file name="IncompleteTest.php" hash="aea347db7fbc7fcc6addb7e3d40538fa"/><file name="IncompleteTestCase.php" hash="26aa675a2e392ec49c5ff87710a409a0"/><file name="IncompleteTestError.php" hash="09f74996d0dfe6aadc226065bbe3742b"/><file name="InvalidCoversTargetError.php" hash="2bd6eaa763fcb1e771ffabc8d517a13c"/><file name="InvalidCoversTargetException.php" hash="1f22663ee7c810b28eed42ab0ca41747"/><file name="OutputError.php" hash="a1ab2849d52729d8ebc1e6a59b24e348"/><file name="RiskyTest.php" hash="bcf7a99c0938116de8493769ad3d1284"/><file name="RiskyTestError.php" hash="0c1b78f2d9e211c93ee9a7008c755cd7"/><file name="SelfDescribing.php" hash="f4e4be0ba8fd637ee56e0033b53448ab"/><file name="SkippedTest.php" hash="acf2f8fbdc58184779d74c6bd7244a82"/><file name="SkippedTestCase.php" hash="bb53f6293d8445d88a0cba8c376139e7"/><file name="SkippedTestError.php" hash="36a8da359535c33a6110c97fbd63e06e"/><file name="SkippedTestSuiteError.php" hash="716c0040cd081b02b01ee6448f82bfad"/><file name="SyntheticError.php" hash="1e2e6f081e7f24abfeab225285afa0d5"/><file name="Test.php" hash="dae786e9d58f68dd5f8eb066de2841e9"/><file name="TestCase.php" hash="5cc45213f2c813ae3799f637f84c7f69"/><file name="TestFailure.php" hash="a811d8638ee6ccac237861048bd689f4"/><file name="TestListener.php" hash="cc1312df06fe1c096f8ad74e282e130b"/><file name="TestResult.php" hash="f01f5872e082455edf98ba9bdb5c131b"/><dir name="TestSuite"><file name="DataProvider.php" hash="36fc17f67adc17d2a1d46a08ef82547c"/></dir><file name="TestSuite.php" hash="26541f701fac4c5992f26d2e2ef351c9"/><file name="UnintentionallyCoveredCodeError.php" hash="beab3ae23f7f822b6937df4b22e9e451"/><file name="Warning.php" hash="d459d1b075c0f644734b392bd7beb81a"/></dir><dir name="Runner"><file name="BaseTestRunner.php" hash="2274d5111f9177aebd80b72b96d59836"/><file name="Exception.php" hash="f49bc91be91c32d573d977b002c8fd4d"/><dir name="Filter"><file name="Factory.php" hash="0d76510517f5ead5d8c092dc792eae1e"/><dir name="Group"><file name="Exclude.php" hash="6a18ba6d0a73586d61021ec4e5a0ce90"/><file name="Include.php" hash="f693455a891062efe058959167e01e41"/></dir><file name="Group.php" hash="a2cd7d5337b9e1f47cea378c96d59007"/><file name="Test.php" hash="075c9bf7fc13871cb419f473803e618b"/></dir><file name="StandardTestSuiteLoader.php" hash="cf1d590893d22a5a1b343d16b0d8997f"/><file name="TestSuiteLoader.php" hash="e98d44fe7dbcc15d8b47e49902d09fd6"/><file name="Version.php" hash="f4abe92317fa38fd3acabac15c1f6180"/></dir><dir name="TextUI"><file name="Command.php" hash="241aeceb45d6d609df5565f88fe75bae"/><file name="ResultPrinter.php" hash="cdbe6aa8ffc7a85f53f5b88130dbf189"/><file name="TestRunner.php" hash="e87b34adf7827a1e1fee8a0d848b84a8"/></dir><dir name="Util"><file name="Blacklist.php" hash="5e3587d230ae16d758a90032bdd09b4f"/><file name="Configuration.php" hash="ac9ad34ec6300e6812e7c5950ee26985"/><file name="ErrorHandler.php" hash="6b1078da1cfcbba0dc73412e9948d705"/><file name="Fileloader.php" hash="6520ba6efbabfd0407e3f774654ce9fa"/><file name="Filesystem.php" hash="1c1ab7020f15268d164c12d0f0e57be5"/><file name="Filter.php" hash="317782716120846b01392b11266c7a44"/><file name="Getopt.php" hash="42f53e3f03af6b361732bae8d71132fd"/><file name="GlobalState.php" hash="a196c15ed3efed57d67f23074389dfa8"/><file name="InvalidArgumentHelper.php" hash="2de830ec9daa15b0445979f65ea13589"/><dir name="Log"><file name="JSON.php" hash="968339cd420ecb7d11c8dd31194a73b9"/><file name="JUnit.php" hash="a8f56ad7c665c724d4a7e04a06427721"/><file name="TAP.php" hash="77407b5762c356250ab86c27c6defe8d"/></dir><dir name="PHP"><file name="Default.php" hash="16ab8deb53b7f4d06d117d93ead02682"/><dir name="Template"><file name="TestCaseMethod.tpl.dist" hash="e0a1fb8eb0630533607fea56d9af8ce6"/></dir><file name="Windows.php" hash="cda6f70d3037de6f23382296a0d67d67"/><file name="eval-stdin.php" hash="28af792cb38fc9a1b236b91c1aad2876"/></dir><file name="PHP.php" hash="b3ece2f9811e11b4fcb7be069a3c72d7"/><file name="Printer.php" hash="5d93e950bfbfd7e1eb3934e5687e5042"/><file name="Regex.php" hash="96920e8abeb6d124f5ad04b54ec45f78"/><file name="String.php" hash="a0ec4f40eb7e02a441d54dcfa912e75c"/><file name="Test.php" hash="2b2a46da1f564bcd6689286c46cb6aa4"/><dir name="TestDox"><file name="NamePrettifier.php" hash="07b3dd13bead964f44db42c66793b6fe"/><dir name="ResultPrinter"><file name="HTML.php" hash="91028e549a0457e7bef8f922fd175376"/><file name="Text.php" hash="b5010b94407923d7bb6abbf35b6c290c"/></dir><file name="ResultPrinter.php" hash="4a1c8be23c0ac132c94c3ec41dc21117"/></dir><file name="TestSuiteIterator.php" hash="032e8098534d0e4833c4976b65a7a86e"/><file name="Type.php" hash="35bb108ad6d9621aecb663929d6960d9"/><file name="XML.php" hash="50d9550be2cfd6997344d69ea9b24ee6"/></dir></dir><dir name="tests"><dir name="Extensions"><file name="PhptTestCaseTest.php" hash="a2e99c5d0924247781bc999870b42e36"/><file name="RepeatedTestTest.php" hash="971c702bdf6cb6c92c184261081f00fb"/></dir><dir name="Fail"><file name="fail.phpt" hash="2d7af6d43c5d4874c0d6b83e7becd959"/></dir><dir name="Framework"><file name="AssertTest.php" hash="9907f197b1aa386f1f0109467a354583"/><file name="BaseTestListenerTest.php" hash="4ffe4f146a2c7525366e437caa8b2bf8"/><dir name="Constraint"><file name="CountTest.php" hash="788bea391a6efd2ab01b37c146714c4d"/><file name="ExceptionMessageRegExpTest.php" hash="d5e6b946cab4a74f4459f0fcf0260ea6"/><file name="ExceptionMessageTest.php" hash="2b4828334f0a8210a5b7780734a19848"/><dir name="JsonMatches"><file name="ErrorMessageProviderTest.php" hash="7218def37e14c196b4045cb421d2f08f"/></dir><file name="JsonMatchesTest.php" hash="9174f7bfd7acf10766a65fcf6bb3ce87"/></dir><file name="ConstraintTest.php" hash="f3b436b5cd5b1ef4949d8190a5b73bd1"/><file name="SuiteTest.php" hash="3757df00d87902f99b75797d09439384"/><file name="TestCaseTest.php" hash="238e2b8774eafc901d998875238a2508"/><file name="TestFailureTest.php" hash="6127b62c702bf0eff8a4277a70aa30e6"/><file name="TestImplementorTest.php" hash="8e8705fc3161361b02cf43e4cf565ca8"/><file name="TestListenerTest.php" hash="86efb7d03940709e268d97bdc1e2155c"/></dir><dir name="Regression"><dir name="1021"><file name="Issue1021Test.php" hash="517a2792d6097c6236c5ef67fe0f95fd"/></dir><file name="1021.phpt" hash="36feb7cf05d3be3eb3d5de1fb00bf473"/><dir name="523"><file name="Issue523Test.php" hash="db3eda437d23db035506bc73f589dbb0"/></dir><file name="523.phpt" hash="c4b01ad00fc95d3911f7292e13781d1a"/><dir name="578"><file name="Issue578Test.php" hash="d07f31cc5c4455fc2c6dc138d93e6a73"/></dir><file name="578.phpt" hash="328bc4086f29c098e7236bf1d6c605e6"/><dir name="684"><file name="Issue684Test.php" hash="10c74e3921ca25f056407fa46d7c9b9b"/></dir><file name="684.phpt" hash="325f785dd18016eb795f4d3cfa5494d6"/><dir name="783"><file name="ChildSuite.php" hash="450f56f254fc68177bb1442dc454e487"/><file name="OneTest.php" hash="f558384784c314b9fd548624b065d0de"/><file name="ParentSuite.php" hash="1357c2cef604bfaec07e3a52cb6cd96d"/><file name="TwoTest.php" hash="80c0c32aae2300cc55754ac5757efc1a"/></dir><file name="783.phpt" hash="172d04899221c5127f289c8a55846e3c"/><dir name="GitHub"><dir name="1149"><file name="Issue1149Test.php" hash="425d9176092c931ba74590ac19c525d2"/></dir><file name="1149.phpt" hash="46a050d44537dc8bac7db6c77e824763"/><dir name="1216"><file name="Issue1216Test.php" hash="f7054d3483162ebfff9bb56cabd155ee"/><file name="bootstrap1216.php" hash="73053c8bd724afea9aa9912ce554b855"/><file name="phpunit1216.xml" hash="0f048580fbb0cf27279158557bb15561"/></dir><file name="1216.phpt" hash="e06388bad83fc850c5b14225767e058a"/><dir name="1265"><file name="Issue1265Test.php" hash="b21d6261042b448c2aa40c8cc9069c7e"/><file name="phpunit1265.xml" hash="a66e517dde190f30fc1b61216f7591a6"/></dir><file name="1265.phpt" hash="b8c1d056cf19b2ae0f2ce64616d1c6ac"/><dir name="1330"><file name="Issue1330Test.php" hash="7df5d2b128f6ee707928ddf594d85e1c"/><file name="phpunit1330.xml" hash="d1007e96e73c66b9e781e64e4f62ea45"/></dir><file name="1330.phpt" hash="48b1889efa0745e3f1b36e28ff0c4f9f"/><dir name="1335"><file name="Issue1335Test.php" hash="f2f331629d6d64a3f6a6508c08c84726"/><file name="bootstrap1335.php" hash="bfd3e2aa9100796977fb3547745b510c"/></dir><file name="1335.phpt" hash="f646133d44ee9b4ed27152051245bb60"/><dir name="1337"><file name="Issue1337Test.php" hash="e1a02679efacd3951a9d571b07bdee4a"/></dir><file name="1337.phpt" hash="f7466cc848f2adc2ce2a170499c9cfef"/><dir name="1348"><file name="Issue1348Test.php" hash="5a9fe5d48a217441707d4673b80741cc"/></dir><file name="1348.phpt" hash="53a112a1f0e993273697f99952c93cf1"/><dir name="1351"><file name="ChildProcessClass1351.php" hash="25d51d3aef75c8d96fdf307b4f10549a"/><file name="Issue1351Test.php" hash="cb94f6ecff4ebf6fba7670dc377400a1"/></dir><file name="1351.phpt" hash="52745f7448143a34110f2ed133e82377"/><dir name="1374"><file name="Issue1374Test.php" hash="3c49950d46659edb72a14aecb2d4fec5"/></dir><file name="1374.phpt" hash="8ca64ce16931096536de740a6091ea80"/><dir name="1437"><file name="Issue1437Test.php" hash="aa097597adc21b07c037582a9741360e"/></dir><file name="1437.phpt" hash="0ccf2a29ef84cb26a927a9f9eb941bf1"/><dir name="1468"><file name="Issue1468Test.php" hash="b8717c126177a99bc08c5593f931e83b"/></dir><file name="1468.phpt" hash="24d8fbbb67dc4ebce32a1ede1a36616b"/><dir name="1471"><file name="Issue1471Test.php" hash="8ed92f8a30b9c38b74edaf3698b87166"/></dir><file name="1471.phpt" hash="2df16a0b3123825f4986b453b7411896"/><dir name="1472"><file name="Issue1472Test.php" hash="90c76206932e387b6dc5a3fb05f9bfb2"/></dir><file name="1472.phpt" hash="86907dcf2b46d321ba852f509057d113"/><dir name="1570"><file name="Issue1570Test.php" hash="3dd90c04d8721e0742d87df4c5a867ae"/></dir><file name="1570.phpt" hash="3609694b673b66608b7e4f59c19d37e8"/><dir name="244"><file name="Issue244Test.php" hash="80e6b70b67d03b771034b31ba5e13975"/></dir><file name="244.phpt" hash="20be65c102b399dc2a795dbd751dd93c"/><dir name="322"><file name="Issue322Test.php" hash="f7ece9550d127a7db1e73371084b6cd5"/><file name="phpunit322.xml" hash="52740349f9157b4d562354eb7755fcb3"/></dir><file name="322.phpt" hash="4abe5b4750c2de4a39f5b5e227b78f89"/><dir name="433"><file name="Issue433Test.php" hash="750347290da446de684515ddd96b7326"/></dir><file name="433.phpt" hash="786410cb66077944478d301178c99e10"/><dir name="445"><file name="Issue445Test.php" hash="98dbf7dd7cbaf94df7e1bc21e90be5ea"/></dir><file name="445.phpt" hash="3c15d60486ebe7136515b47c43e316df"/><dir name="498"><file name="Issue498Test.php" hash="014237afc9ad878fda351f83566dc242"/></dir><file name="498.phpt" hash="f6a92731f2b18ff4debd28e27a8982ff"/><dir name="503"><file name="Issue503Test.php" hash="19a70deef0e66846ee17283aedf56a57"/></dir><file name="503.phpt" hash="10227c51797e5959b5ec44e3d96627fe"/><dir name="581"><file name="Issue581Test.php" hash="622071238e8de189dec3e6090bb4baae"/></dir><file name="581.phpt" hash="ed42bcf96956a361289dbe9fe250838e"/><dir name="74"><file name="Issue74Test.php" hash="46337a72d587a81d6b5cdbb8db8547a3"/><file name="NewException.php" hash="29206ae348775b94088f86e4402a20fe"/></dir><file name="74.phpt" hash="c90e37f3aaa9be3daff82b86ed3aac89"/><dir name="765"><file name="Issue765Test.php" hash="a5becadf84631e7c558b43689bfd9521"/></dir><file name="765.phpt" hash="c32381ba0ad5eefc66603f99bb10a624"/><dir name="797"><file name="Issue797Test.php" hash="909612e7522e3fab4cf922b84e847706"/><file name="bootstrap797.php" hash="21f60a4b50e4d3c8be040904243c07a0"/></dir><file name="797.phpt" hash="ac294f432ee2b58b95d3e3cd2dd0f972"/><file name="863.phpt" hash="697fe2404a6056d0d5d0278e6531f10d"/><dir name="873"><file name="Issue873Test.php" hash="859109524d432ea86e7ad0a15b27873e"/></dir><file name="873-php5.phpt" hash="c2e171c43a9f3a11b1b7bf4768cf24e3"/><file name="873-php7.phpt" hash="39e4bbc70765ae3018d61dde6adc2920"/></dir></dir><dir name="Runner"><file name="BaseTestRunnerTest.php" hash="86b93a9359e87bf7b3f7c696b8d8f8b6"/></dir><dir name="TextUI"><file name="abstract-test-class.phpt" hash="748602e179c09268db48042664118b89"/><file name="colors-always.phpt" hash="a958c2a4cbe25e79bbb589d986492f7e"/><file name="concrete-test-class.phpt" hash="0769bdb4715bb74554c7a432c0d4e12a"/><file name="custom-printer-debug.phpt" hash="423da2934b93fdcbc6153f28b71cfadc"/><file name="custom-printer-verbose.phpt" hash="01ddab741f3a92fea1288ae9a89e391d"/><file name="dataprovider-debug.phpt" hash="70c5d65b2cc8d7df142e1f322cfd7958"/><file name="dataprovider-log-xml-isolation.phpt" hash="858acef4e9077ff7ecc9d52964c38be8"/><file name="dataprovider-log-xml.phpt" hash="63c9c520cc96be9ef1cb06390031e65a"/><file name="dataprovider-testdox.phpt" hash="0e7e4429b1d84cd95dc29702f769150b"/><file name="debug.phpt" hash="8ecf6bd8db4fcf3dd25a7553ff383f16"/><file name="default-isolation.phpt" hash="cdc846b9609ac824b07315d59c246c90"/><file name="default.phpt" hash="02a890509a78c4bd6a3d39fa2c18e777"/><file name="dependencies-isolation.phpt" hash="906b8c6ce7d62f50d76c1743eb295478"/><file name="dependencies.phpt" hash="2863d4fe1888e306457dfbc31375b070"/><file name="dependencies2-isolation.phpt" hash="7e5d6b4353d8f9f7edbe8a821bb73d84"/><file name="dependencies2.phpt" hash="f594b80832d90ed44945c07c037b48c6"/><file name="dependencies3-isolation.phpt" hash="c4731282d85522a6f90f1415bb1c2233"/><file name="dependencies3.phpt" hash="cda8145b7621c6be4a12908343a6cb25"/><file name="empty-testcase.phpt" hash="97de374b8e14a54cfdb9659f65659260"/><file name="exception-stack.phpt" hash="716760aea8d89baa6b62954da9e41224"/><file name="exclude-group-isolation.phpt" hash="2a35f2d9582c768f07498a3ae2098894"/><file name="exclude-group.phpt" hash="5b052a39dcebc752ba7c5ab12112b0ea"/><file name="failure-isolation.phpt" hash="9edb93ea73f0db1093ce5ca9766803be"/><file name="failure.phpt" hash="2e278daab468cc1dd1e7a30c260bcd84"/><file name="fatal-isolation.phpt" hash="80a8ebbfb554e474c1a7f425580cb575"/><file name="filter-class-isolation.phpt" hash="2cf6d0c4e3f21ec0cea11d0ef7737ee6"/><file name="filter-class.phpt" hash="1e7cd03601f02d8b8894a68239cbda8e"/><file name="filter-dataprovider-by-classname-and-range-isolation.phpt" hash="9ce7c968cea21e02e841e429f4b7722c"/><file name="filter-dataprovider-by-classname-and-range.phpt" hash="1c753fffa20ea5d9703de5d551fd6fc6"/><file name="filter-dataprovider-by-number-isolation.phpt" hash="05d723a91342316dbe32e69264c8e1b1"/><file name="filter-dataprovider-by-number.phpt" hash="c6d12d6a18c1e147f85afaac622d0f2b"/><file name="filter-dataprovider-by-only-range-isolation.phpt" hash="dbf4bbf3f4b8d9960afbeea29f8e5d25"/><file name="filter-dataprovider-by-only-range.phpt" hash="055c203894b5671b90cb02fa2258b5bd"/><file name="filter-dataprovider-by-only-regexp-isolation.phpt" hash="f25979dfaa4ce99df97e9a2f0f74d5b5"/><file name="filter-dataprovider-by-only-regexp.phpt" hash="a594b4c1d03942160ddf6406f8c3b690"/><file name="filter-dataprovider-by-only-string-isolation.phpt" hash="9cc9f2483a30fc772912cc17b2342cad"/><file name="filter-dataprovider-by-only-string.phpt" hash="320f687d7aa8634b005105bc9b9a2949"/><file name="filter-dataprovider-by-range-isolation.phpt" hash="4d375f06474c7bb6972f701c0ed6162f"/><file name="filter-dataprovider-by-range.phpt" hash="14c4b9dc389a59c346c29863c6596b44"/><file name="filter-dataprovider-by-regexp-isolation.phpt" hash="a301c738bdaaa41c390fa27aa0304376"/><file name="filter-dataprovider-by-regexp.phpt" hash="63f44a4d1af9984d6b17cd3967b86348"/><file name="filter-dataprovider-by-string-isolation.phpt" hash="d3a0a8fb4f44a6d27a4b0c76c2931409"/><file name="filter-dataprovider-by-string.phpt" hash="5e785ef7cfba972cbf7a53fda7b451ee"/><file name="filter-method-case-insensitive.phpt" hash="1927ba70226f2654ba0ac34eac61ee36"/><file name="filter-method-case-sensitive-no-result.phpt" hash="19d771ea0e1db9e2d0f082dcf96383b0"/><file name="filter-method-isolation.phpt" hash="f0bd61ca065145abc042298e799f7142"/><file name="filter-method.phpt" hash="8137b205c4f1e2fb00551ba09a578ec0"/><file name="filter-no-results.phpt" hash="63f09c154f56fbc02f5b4e0ff598ce24"/><file name="group-isolation.phpt" hash="576954f1a27e0dae69bc238496f73cb0"/><file name="group.phpt" hash="d760d7f97889316bb9f01e5b592e7368"/><file name="help.phpt" hash="3cf98a3ef8ab91a021962188e8c4a4b9"/><file name="help2.phpt" hash="6d9ba5789d0bbb256bae12312eb55ae4"/><file name="ini-isolation.phpt" hash="20111f4485df25d896fb04e784257c33"/><file name="list-groups.phpt" hash="fb490e06eef8e850acf2984d3e52b587"/><file name="log-json-no-pretty-print.phpt" hash="bebd282b3d34754b4fbb74e174a61e67"/><file name="log-json-post-66021.phpt" hash="b0558a683265b3d866101c18726828c3"/><file name="log-json-pre-66021.phpt" hash="4a609d1fdcc416e9bac413d38734a9ba"/><file name="log-tap.phpt" hash="acd6c9dcc9ccb11a328b466d7dfcef69"/><file name="log-xml.phpt" hash="4431048edc40266266eac572a6112179"/><file name="options-after-arguments.phpt" hash="8b220d9a63470543c37b8cd31359a3b6"/><file name="output-isolation.phpt" hash="e393a144047c3c6deef0b020681c841f"/><file name="repeat.phpt" hash="010c2bea06a0cdd43f930635a4fe4ffd"/><file name="report-useless-tests-incomplete.phpt" hash="00b079309ed6725ae72415edb0555c9a"/><file name="report-useless-tests-isolation.phpt" hash="39d30a0e5a8548ea0bc0eb5bf5eac9d9"/><file name="report-useless-tests.phpt" hash="1ecd5b457cca40f26aa72142f55accc4"/><file name="tap.phpt" hash="c04d259d27a73a97ef92dde50e9e5b87"/><file name="test-suffix-multiple.phpt" hash="48232ae1d1236dfeb2e576a98e4a77d0"/><file name="test-suffix-single.phpt" hash="39ac0725ff452945269b5e5ca85c087e"/><file name="testdox-html.phpt" hash="cbe9340dc7a0b4bd32b8d1c7da0c2092"/><file name="testdox-text.phpt" hash="3fd0101c5e9fdcebe478f986b68a6b78"/><file name="testdox.phpt" hash="f02f5cfa6358fdc4ed8bc8d3a4ffea68"/></dir><dir name="Util"><file name="ConfigurationTest.php" hash="854d1af9ad783bafba40f1c5fe3826ef"/><file name="GetoptTest.php" hash="4c1c0f9590d979cc797d440337210bca"/><file name="GlobalStateTest.php" hash="01bb5f5843bef89fce211f3a8c098706"/><file name="RegexTest.php" hash="84622525342d41c471f1c3f2a3664174"/><dir name="TestDox"><file name="NamePrettifierTest.php" hash="91739a3b6cd85748c50247222e2799a1"/></dir><file name="TestTest.php" hash="7794eca3f07785b4c3ace0c2153afcdf"/><file name="XMLTest.php" hash="0e9b6302b9fc6bc1f0080cbf08864912"/></dir><dir name="_files"><file name="AbstractTest.php" hash="b214b8e36440dade916874968bbc5dde"/><file name="Author.php" hash="be706f3c088e397fc67243ef15d96a0c"/><file name="BankAccount.php" hash="82a7d0064f51e6ec53eb242b93d070ed"/><file name="BankAccountTest.php" hash="1ce8595363094c9bb5ce48fa63fdd2dc"/><file name="BankAccountTest.test.php" hash="7939a3e19b08f7742f025964c380a14f"/><file name="BaseTestListenerSample.php" hash="16485515e525af6e5cf4d23308a9b976"/><file name="BeforeAndAfterTest.php" hash="790b45e68f6158d385c51974d06a446b"/><file name="BeforeClassAndAfterClassTest.php" hash="0b41444e47a852b90902cb48aa68d359"/><file name="Book.php" hash="f930142c0f32c839ea9017038c2ccc0d"/><file name="Calculator.php" hash="ffa92baf6d960643de83e281f1d85d64"/><file name="ChangeCurrentWorkingDirectoryTest.php" hash="9c18721298bbc976324818ce860cdcc0"/><file name="ClassWithNonPublicAttributes.php" hash="12127968de01d0148fede477ee57f76d"/><file name="ClassWithScalarTypeDeclarations.php" hash="5d248adde3ecad99325ca74336293fc7"/><file name="ClassWithToString.php" hash="06f58ed408891137da51a78883b2d1d4"/><file name="ConcreteTest.my.php" hash="e1a6d6d9d960fc260cb531db19de6bc3"/><file name="ConcreteTest.php" hash="c787c7a653f4cd82028c8505571c77a1"/><file name="CoverageClassExtendedTest.php" hash="ef2336d55ae02703b0c608e2c86a835a"/><file name="CoverageClassTest.php" hash="88af4d7c4b557e78f886453857b00612"/><file name="CoverageFunctionParenthesesTest.php" hash="c7fef2fb7f51150a660844b997ee4c37"/><file name="CoverageFunctionParenthesesWhitespaceTest.php" hash="ec5d778e1a37d1a190c40a9acec55a65"/><file name="CoverageFunctionTest.php" hash="39bec3b0b9db30f67bc23896018b7e15"/><file name="CoverageMethodOneLineAnnotationTest.php" hash="d229ea18df6ca5eabe0e9f42cdfec897"/><file name="CoverageMethodParenthesesTest.php" hash="889346c35550fe4a3f4caa0838136f9f"/><file name="CoverageMethodParenthesesWhitespaceTest.php" hash="79096a31b12bb716119c4ae5021114d5"/><file name="CoverageMethodTest.php" hash="736839b87afcbfa16f75a87170b2eaf2"/><file name="CoverageNamespacedFunctionTest.php" hash="94b1a99f49a728beb3f6cc4505bd3bc1"/><file name="CoverageNoneTest.php" hash="1ef0636da95daaf6a8bda6991df078e4"/><file name="CoverageNotPrivateTest.php" hash="b64af610121292153da0681b2328e3ec"/><file name="CoverageNotProtectedTest.php" hash="d090bd61f1ddf98f5b1d5a4e9b74558a"/><file name="CoverageNotPublicTest.php" hash="fed43600690b9cdaba323037b43b47b4"/><file name="CoverageNothingTest.php" hash="64332f588c6c1a09651b9d54d0a90dd3"/><file name="CoveragePrivateTest.php" hash="fdd0b16f24305076c51df8781a9d788c"/><file name="CoverageProtectedTest.php" hash="c12e2728b065e19203543dfe515827b2"/><file name="CoveragePublicTest.php" hash="c2df1e89a58b9382dcddbc17280db2eb"/><file name="CoverageTwoDefaultClassAnnotations.php" hash="e2af1e81a66510b60a6f84a6ef7efb13"/><file name="CoveredClass.php" hash="3fb30247bee83f69ab4102b1debf0e3e"/><file name="CoveredFunction.php" hash="38958a75f33a86b704f96f50cbc6548d"/><file name="CustomPrinter.php" hash="24634a7c9ccdbfe77ecdceebb6af2244"/><file name="DataProviderDebugTest.php" hash="d7edadb2c0a244c5e670383af79f6ec0"/><file name="DataProviderFilterTest.php" hash="3af0ce5f78cff6863060b6f804724c2d"/><file name="DataProviderIncompleteTest.php" hash="a5dc2e65e1261c150a8feab781ae79e7"/><file name="DataProviderSkippedTest.php" hash="39d2e6d3b78d9a016503b2f66c0de6a0"/><file name="DataProviderTest.php" hash="7cc93cfb6373a6b70f7ac350e2b3dc9a"/><file name="DependencyFailureTest.php" hash="c49e12c51dae5719302f9e9ac75cda18"/><file name="DependencySuccessTest.php" hash="4e2269b8be0f1241680c099211e57350"/><file name="DependencyTestSuite.php" hash="95df3b858eb969088b2ab5537f89370d"/><file name="DoubleTestCase.php" hash="f73c285d2abfca3bbca26741ba4ab65a"/><file name="DummyException.php" hash="2b40784a6eecccc6aa4a4ad6939e03b1"/><file name="EmptyTestCaseTest.php" hash="5bcdd8467634e1d3cceae5a186fcba65"/><file name="ExceptionInAssertPostConditionsTest.php" hash="96d04422bd8461c8de4e06fc980cebf1"/><file name="ExceptionInAssertPreConditionsTest.php" hash="7635cf0be8d2014ceb85000257125295"/><file name="ExceptionInSetUpTest.php" hash="c7151cae94e1c4f87009584a8ce2396c"/><file name="ExceptionInTearDownTest.php" hash="c6caf158fb09b74e2d37542476205537"/><file name="ExceptionInTest.php" hash="7c735579ebf9f2a916783d6040544c5c"/><file name="ExceptionNamespaceTest.php" hash="1dd30049a11cb46a51b1b1a4be308e24"/><file name="ExceptionStackTest.php" hash="e83c1fd10cd94663d403c217beab2064"/><file name="ExceptionTest.php" hash="fd9481c29488adf3648053e59641c7f0"/><file name="Failure.php" hash="722d9b9984de429e5a00bee66f9921b1"/><file name="FailureTest.php" hash="f4e1c5c6822b43211a779beea0814c6b"/><file name="FatalTest.php" hash="3aa347a0e720bdcf5d4ff2ccb9296153"/><file name="IncompleteTest.php" hash="b55cc8065aa2470bd38b8698963a0cf7"/><dir name="Inheritance"><file name="InheritanceA.php" hash="372b4c24b47966058945522d54f4b4da"/><file name="InheritanceB.php" hash="f2b2e2fe1591129480dd79a636f61d89"/></dir><file name="InheritedTestCase.php" hash="7dbc55ca5ee12f637b99054aac9c0429"/><file name="IniTest.php" hash="85aae0b77bed7a2f7295599d6d412bc6"/><file name="IsolationTest.php" hash="77256f844519e8fb87ec32d35dab8834"/><dir name="JsonData"><file name="arrayObject.json" hash="f6b2b7c421a506e737101c79a24a0c60"/><file name="simpleObject.json" hash="74ae259131b0149d39ad5ae616eba1a2"/></dir><file name="MockRunner.php" hash="44c14a6f68e2cb5c6e98164e712a314d"/><file name="MultiDependencyTest.php" hash="03d7bde724945c8d20e5a7163451e92b"/><file name="NamespaceCoverageClassExtendedTest.php" hash="6ee65961bef48fcbd29dc32c1cd1b214"/><file name="NamespaceCoverageClassTest.php" hash="303c79ca84dd5185cbe3523be856be76"/><file name="NamespaceCoverageCoversClassPublicTest.php" hash="196ba19fc47ab47727515c2378fb7673"/><file name="NamespaceCoverageCoversClassTest.php" hash="c8aca2dafd7f838c8ad3a1a37494b2b1"/><file name="NamespaceCoverageMethodTest.php" hash="65d34371a30cf070c32af9e748057cd7"/><file name="NamespaceCoverageNotPrivateTest.php" hash="72f092fa88a601e0c6b879e79f342ec7"/><file name="NamespaceCoverageNotProtectedTest.php" hash="6a4e3044f4170ae6526449bc31f04480"/><file name="NamespaceCoverageNotPublicTest.php" hash="3ef83ceab1ef56e48c564f53e5abc007"/><file name="NamespaceCoveragePrivateTest.php" hash="9db671d755ccc81cd789fd099404e634"/><file name="NamespaceCoverageProtectedTest.php" hash="e55f9e06a7ac37584bb21428023a3ecd"/><file name="NamespaceCoveragePublicTest.php" hash="cfb91dec22992ab23414c869055e4195"/><file name="NamespaceCoveredClass.php" hash="71017e733b94b3c63316bab6b4a3a405"/><file name="NamespaceCoveredFunction.php" hash="4eeecb3276eb96e364947fa356245e2d"/><file name="NoArgTestCaseTest.php" hash="c613174d800fd0f49bb99afdbe325175"/><file name="NoTestCaseClass.php" hash="7a2c21727d50479fb3e0e41d4e7176e7"/><file name="NoTestCases.php" hash="1168a9dc8a919496ebe2d003bad835c3"/><file name="NonStatic.php" hash="7a0314ba220d574c11f5a51970d4db1f"/><file name="NotExistingCoveredElementTest.php" hash="6d7f8db98965f803878906e6510fe14a"/><file name="NotPublicTestCase.php" hash="3cdba76815fc7532acaacfdd8510e5f9"/><file name="NotVoidTestCase.php" hash="b2a6edb124c40382bd3abdd7aad1eb05"/><file name="NothingTest.php" hash="bdf24d52ec8d0e488979ab2b4f1fc06b"/><file name="OneTestCase.php" hash="d1432b0ea84652d459ebb15dc7ee1a1f"/><file name="OutputTestCase.php" hash="c5b91c92def1e7e93333efaabc40c015"/><file name="OverrideTestCase.php" hash="004508b3411d7cd867561b07c1728ab4"/><file name="RequirementsClassBeforeClassHookTest.php" hash="db60f9df7a37ca9f933955c176733f76"/><file name="RequirementsClassDocBlockTest.php" hash="99fa7bbd8e64ffe5dc8346fc52e592ef"/><file name="RequirementsTest.php" hash="e67ef866166f50a74962ce2d45e24a44"/><file name="SampleArrayAccess.php" hash="8a22b30ce4809428957a9c7a861f1a88"/><file name="SampleClass.php" hash="877a23a01d00bbaaeda465e319ba532e"/><file name="Singleton.php" hash="ebbb44327ce66688302c92929f1db82b"/><file name="StackTest.php" hash="62d0cd4a68a695db12c68e9152310bcd"/><file name="Struct.php" hash="d0fc80910c689080b730de1ed06d023d"/><file name="Success.php" hash="6d8c9cabf978b37c7ceab68c51f1cc51"/><file name="TemplateMethodsTest.php" hash="746da1d305e89affe78639816c28bc16"/><file name="TestIncomplete.php" hash="940646a713ad8de9e3f02cc621ed1462"/><file name="TestIterator.php" hash="1830ce69c4f0f247ba3c152e1f413a70"/><file name="TestIterator2.php" hash="090d404be671b40c0ad90ae25e4ca468"/><file name="TestSkipped.php" hash="64d0562b5092260fdd016a2343388fd9"/><file name="TestTestError.php" hash="577074d252db3f8889dc25a67fa48be2"/><file name="TestWithTest.php" hash="1df7eba63583c6aecb62d228f1e3c36a"/><file name="ThrowExceptionTestCase.php" hash="51d96ab5e83c068c75f26af6a3c509a7"/><file name="ThrowNoExceptionTestCase.php" hash="3b230ab7500f6ba330f60ac190da52ae"/><file name="WasRun.php" hash="58530a9993e9894187a2c3f27aca0be6"/><file name="bar.xml" hash="1581f4e291c6d8f83330ab8b98a33b4c"/><file name="configuration.colors.empty.xml" hash="99c749f2a9721cb588a728fb82baf8b4"/><file name="configuration.colors.false.xml" hash="d81f2932ca545fa7cafaeae5f216fc28"/><file name="configuration.colors.invalid.xml" hash="af0e8998a9bb3fc68845b67f9a377ac2"/><file name="configuration.colors.true.xml" hash="ebc67f5fe55baf211cbb3f7323958ab4"/><file name="configuration.custom-printer.xml" hash="b01b0c4380dd368d68fd0c305e552185"/><file name="configuration.xml" hash="7cd523b24e2c6f855b6a063aa8a8cef2"/><file name="configuration_empty.xml" hash="3d557deca210d3523e511449f9b1894a"/><file name="configuration_xinclude.xml" hash="8b9e58651b86f41f7e430ecab42e0d0b"/><file name="expectedFileFormat.txt" hash="702970b5f7da2b2f718d31ac4f046f5e"/><file name="foo.xml" hash="6dc4cf0f198581bd6b4e6943a95c32a1"/><file name="structureAttributesAreSameButValuesAreNot.xml" hash="57fe4c6bc049415200ea4c3cbc93cbca"/><file name="structureExpected.xml" hash="22373573c8f5f9675a96029ece9ec857"/><file name="structureIgnoreTextNodes.xml" hash="22ae55cb8cfee800ba8e4830538be251"/><file name="structureIsSameButDataIsNot.xml" hash="8569dc65fc416a7a40a4dd1136f3be51"/><file name="structureWrongNumberOfAttributes.xml" hash="0faafcc0b086de6cabce4aed14592ffc"/><file name="structureWrongNumberOfNodes.xml" hash="5bb939be9c9105fdf25d8d9b5a2a9487"/></dir><file name="bootstrap.php" hash="138b94451592c0b3fdf5664b02efbc0d"/></dir><file name=".gitattributes" hash="d7f2757e16cf99d7f2c4a2fa34cbb3f8"/><file name=".gitignore" hash="e9a65d1ad17cffe4dd9f6865dc5d5645"/><file name=".php_cs" hash="7383fe829a424e77676e5eb40b7e9fb1"/><file name=".travis.yml" hash="3c20dd59bf3833224434417fe01e65be"/></dir><dir name="phpunit-mock-objects"><file name="CONTRIBUTING.md" hash="149ad32bc7cc38dfe8daef9e7969812e"/><file name="LICENSE" hash="da658d4f706c367641055579050c99c3"/><file name="README.md" hash="1fdf261027c33e510051976e7c6d8bc8"/><dir name="build"><file name="travis-ci.xml" hash="591eba48dc5657a7da46d96a93f0ef64"/></dir><file name="build.xml" hash="d06f51d617153002f7eb2e58c6aeeded"/><file name="composer.json" hash="aeb7480d149884d1147139eaf84b0863"/><file name="phpunit.xml.dist" hash="5a24d450e5fd33b7d3ba94534760aec7"/><dir name="src"><dir name="Framework"><dir name="MockObject"><dir name="Builder"><file name="Identity.php" hash="51cb171c7bc0a1d08b9e3d7c82ffb50b"/><file name="InvocationMocker.php" hash="f3265feaac2b407f10ac7c8bf9580ed3"/><file name="Match.php" hash="d8c90156a1c7604b41f95114ae4a750d"/><file name="MethodNameMatch.php" hash="87502f374289f5b7c6d43f899e26663e"/><file name="Namespace.php" hash="87d1cd6b72224a4dec697a27dda36bd6"/><file name="ParametersMatch.php" hash="ad92cb20c0a6dfa72f060f3ce6f8bf46"/><file name="Stub.php" hash="35bc9d96217cadc1f062cfc32d2a8ea0"/></dir><dir name="Exception"><file name="BadMethodCallException.php" hash="8f712b7f04ffabc963a15653ec472c09"/><file name="Exception.php" hash="b47ad9ec7d35b76eec99e315463a8b7a"/><file name="RuntimeException.php" hash="6512a1dccf5bfd861205be86cfd6c598"/></dir><dir name="Generator"><file name="mocked_class.tpl.dist" hash="55f676a312cc45c42a7691c4d4351118"/><file name="mocked_class_method.tpl.dist" hash="acb8585a1bce4ab386e86c3353dd9480"/><file name="mocked_clone.tpl.dist" hash="2f0b14324e73b77dd1315736e1e11498"/><file name="mocked_method.tpl.dist" hash="3daec0214ac48f0e43966cf5b46dd8f2"/><file name="mocked_static_method.tpl.dist" hash="75846eefc31428191eb943baf618be3f"/><file name="proxied_method.tpl.dist" hash="6928d80250e73f04ab832498c480a1f2"/><file name="trait_class.tpl.dist" hash="d0a66ce2e7335ef792a63cbfed42eaef"/><file name="unmocked_clone.tpl.dist" hash="2d78ddcca5eedf55d33c562ef3adb100"/><file name="wsdl_class.tpl.dist" hash="86502f9e14bf669aeff396de4fcbf6d0"/><file name="wsdl_method.tpl.dist" hash="b87ff1b355250565af7d5ec7c877c8d7"/></dir><file name="Generator.php" hash="ad9ad1e9482674fdeea731b115b1fc0a"/><dir name="Invocation"><file name="Object.php" hash="0696f9fcdfde9becefb0e6ab04dfea15"/><file name="Static.php" hash="01ae5321bdf4b68bd9820e83c6be6647"/></dir><file name="Invocation.php" hash="e0ad1d1167c0903575209cba5747b71a"/><file name="InvocationMocker.php" hash="39d234813a778c12c54c05bb1a90cc5f"/><file name="Invokable.php" hash="e8567f90f69216f5dbe188d8ece33f8d"/><dir name="Matcher"><file name="AnyInvokedCount.php" hash="e4443681be94e8b9a9eca0bc1d2e20a7"/><file name="AnyParameters.php" hash="583f41e61c642cbc5a549e7b49eec172"/><file name="ConsecutiveParameters.php" hash="2bd0078a243dfc97829b96e0edf287e9"/><file name="Invocation.php" hash="28b2c504eaf21da3b243e874ef5ce0c6"/><file name="InvokedAtIndex.php" hash="f05bdcd91f906af3eee267faef86657f"/><file name="InvokedAtLeastCount.php" hash="e4a5e570bacdc2f64fa92614693c5c63"/><file name="InvokedAtLeastOnce.php" hash="781dc917cc98695850eb578374eb4d4f"/><file name="InvokedAtMostCount.php" hash="a65f6687be6edba862b937bfba8b481e"/><file name="InvokedCount.php" hash="2cc0078bc0b8db1b6cb6cd3cf21c19f9"/><file name="InvokedRecorder.php" hash="0c9469efd068d09d1d8b535f4454af6e"/><file name="MethodName.php" hash="e32b3130fa9509fd75e40cc2ad9cbaa7"/><file name="Parameters.php" hash="2f3005941d64fb24400a3c1f2dd54037"/><file name="StatelessInvocation.php" hash="b27122ae04b52af26ac9e728afdc6002"/></dir><file name="Matcher.php" hash="6d2e29b4b5e07a6c350ff86fe8c0a062"/><file name="MockBuilder.php" hash="064431c1a63f936cd738196c65cd448b"/><file name="MockObject.php" hash="2c834a37485edbdd0aaf924e3b9e06a1"/><dir name="Stub"><file name="ConsecutiveCalls.php" hash="ce2be776f266f68030c02b6ae44c09a1"/><file name="Exception.php" hash="9309a901f89bb19a9f6e0456faf997a9"/><file name="MatcherCollection.php" hash="63ff40fa34de3e6a6a3a454ec62334ee"/><file name="Return.php" hash="52eae36d9354ee75cdef671438472187"/><file name="ReturnArgument.php" hash="474f49c77b6f30a4ef94f5adb3fd3dcb"/><file name="ReturnCallback.php" hash="ac7e41fec3c8f6cdffd847a09ef53669"/><file name="ReturnSelf.php" hash="eb79bc9db4000280d71f5a6a29a08571"/><file name="ReturnValueMap.php" hash="a7829768a90e5a9508f8edb4a1d33919"/></dir><file name="Stub.php" hash="c7db02488916a49d3c140889291eb318"/><file name="Verifiable.php" hash="f18efaaa2e2a64ee1e241e51875c8a92"/></dir></dir></dir><dir name="tests"><file name="GeneratorTest.php" hash="0792dcee9830234bed5a1b38b5fae5e2"/><file name="MockBuilderTest.php" hash="fe018bdb2662daff6cf77932e2b470cc"/><dir name="MockObject"><file name="232.phpt" hash="cd9ebb49be1aa79733322e1d89c2a157"/><dir name="Invocation"><file name="ObjectTest.php" hash="f630a224bb271d9eaf8d4bd145bf08ca"/><file name="StaticTest.php" hash="f1ccc7529510510769614b6151cd24ff"/></dir><dir name="Matcher"><file name="ConsecutiveParametersTest.php" hash="e937dca04b77763e46a8a98caab7d19c"/></dir><file name="abstract_class.phpt" hash="eb2ee3074a1b8aab9728b8aec6bcd26d"/><file name="class.phpt" hash="d482887d24472554666f496741d0da6b"/><file name="class_call_parent_clone.phpt" hash="30b4b8790aa06b2eea28c1854136f779"/><file name="class_call_parent_constructor.phpt" hash="71d9b383e8440a344fc4b51505c05931"/><file name="class_dont_call_parent_clone.phpt" hash="6fa2aa214bcba0b7e5fb0fa0fa2bd153"/><file name="class_dont_call_parent_constructor.phpt" hash="71d9b383e8440a344fc4b51505c05931"/><file name="class_implementing_interface_call_parent_constructor.phpt" hash="cdce78f696999058a868e93c399a7746"/><file name="class_implementing_interface_dont_call_parent_constructor.phpt" hash="cdce78f696999058a868e93c399a7746"/><file name="class_partial.phpt" hash="5fbe11ef4bc425679da8e96205496b40"/><file name="class_with_method_named_method.phpt" hash="3ca57395dbd174909fb04726200c55fd"/><file name="class_with_method_with_variadic_arguments.phpt" hash="89ca2423578551d876f3aff661048b9e"/><file name="interface.phpt" hash="095f08957eaacdfd4f5da5df11b4fd73"/><file name="invocation_object_clone_object.phpt" hash="726e8539dca51b6e0f23fb8ba21cf563"/><file name="namespaced_class.phpt" hash="157355e4024d7a361d49313dcadbbb9d"/><file name="namespaced_class_call_parent_clone.phpt" hash="f2393554b5aab6820b5175e66afbd79d"/><file name="namespaced_class_call_parent_constructor.phpt" hash="7a1d3cd13b25e8d12bf79548d116d65f"/><file name="namespaced_class_dont_call_parent_clone.phpt" hash="09471b5a615d43048ccc467da0c50620"/><file name="namespaced_class_dont_call_parent_constructor.phpt" hash="7a1d3cd13b25e8d12bf79548d116d65f"/><file name="namespaced_class_implementing_interface_call_parent_constructor.phpt" hash="418d7bbd655faf5d849a3163a2e217e3"/><file name="namespaced_class_implementing_interface_dont_call_parent_constructor.phpt" hash="418d7bbd655faf5d849a3163a2e217e3"/><file name="namespaced_class_partial.phpt" hash="f0d6dd819189f537be8387bc48c9195f"/><file name="namespaced_interface.phpt" hash="73b11ee902fdead39677845213c34cb8"/><file name="nonexistent_class.phpt" hash="279d36c88ee270cfe273f396e9f5dd1e"/><file name="nonexistent_class_with_namespace.phpt" hash="ceaffb80bf14788c981197f2db77d247"/><file name="nonexistent_class_with_namespace_starting_with_separator.phpt" hash="55f7304da089ae0c3e79704117e6c28a"/><file name="proxy.phpt" hash="20ea05e2d411298ebb324c91da632cd2"/><file name="scalar_type_declarations.phpt" hash="24e7188f668aeede4830d6893083b4f8"/><file name="wsdl_class.phpt" hash="33b7044efd7e586bcc8e41e66758188c"/><file name="wsdl_class_namespace.phpt" hash="20125ff707c4652ca8f66583a3d8ccff"/><file name="wsdl_class_partial.phpt" hash="4640a82f3dcd2f4a68105e7a37140cc9"/></dir><file name="MockObjectTest.php" hash="44e8d97c90e23259528a1dd3b7de52ff"/><file name="ProxyObjectTest.php" hash="db29eb5fe880acb825da6f580ec0bd81"/><dir name="_fixture"><file name="AbstractMockTestClass.php" hash="7fedbceab74d50c0389173b2750bc8b6"/><file name="AbstractTrait.php" hash="a569607ba756ad04c9eb54418629274d"/><file name="AnInterface.php" hash="3fbb32606c934d3b2cf9269279e17bdb"/><file name="AnotherInterface.php" hash="7e39c0d6c02f842746b83ab2bee70083"/><file name="Bar.php" hash="e121d3ccf5d91a9b7f58bfa0c6d65170"/><file name="ClassThatImplementsSerializable.php" hash="098715b44124928aacbdc2461952da79"/><file name="ClassWithStaticMethod.php" hash="9d842f43adcf7bf0b2cfd3720b9fbcbf"/><file name="Foo.php" hash="4f99cf6e1e068c9e84f2105dc6696679"/><file name="FunctionCallback.php" hash="909f1cbeb89e59eb4060d11d7e8630dd"/><file name="GoogleSearch.wsdl" hash="309c4d0f17b641f7d768eba5c3e6d201"/><file name="InterfaceWithStaticMethod.php" hash="5dcbb878c5e0e737997e0b14e9d7d75c"/><file name="MethodCallback.php" hash="b2a5220f5b70d0d4f89556d2b9785398"/><file name="MethodCallbackByReference.php" hash="4696b7840f03b6bec046eaafe50a4c65"/><file name="MockTestInterface.php" hash="2feeed1fbe7ad7ec9cf61c870c00c78c"/><file name="Mockable.php" hash="2cae810a709eb96c1e48b8dbd7ca4a98"/><file name="PartialMockTestClass.php" hash="080ad9c31520f0e33a7e08a2ac283ae2"/><file name="SingletonClass.php" hash="c3cacebec6a1c3c6c82ee6cacaa154ce"/><file name="SomeClass.php" hash="43b6974b319e49c0e66d37b0861f1a38"/><file name="StaticMockTestClass.php" hash="bded1ca716f19816a676ecb1684383ed"/><file name="TraversableMockTestInterface.php" hash="cbd71e09a26e622036b18b7848c71939"/></dir><file name="bootstrap.php" hash="2e1e3f6846591e5ac2054446ee487432"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="0d705da550468e75879d49de19f97233"/><file name=".travis.yml" hash="ffc81be284a658c7908fa7770d914827"/></dir></dir><dir name="psr"><dir name="log"><file name="LICENSE" hash="1a74629072fd794937be394ab689327e"/><dir name="Psr"><dir name="Log"><file name="AbstractLogger.php" hash="a57c1be541193b72d09307bb0dfb9ed2"/><file name="InvalidArgumentException.php" hash="7d2f0bd1583524d739fff12f0507de65"/><file name="LogLevel.php" hash="19ab55cc711ed2f3ab2ec72e7f0600cb"/><file name="LoggerAwareInterface.php" hash="3ba5ffac8108e1da7657b1fad8651900"/><file name="LoggerAwareTrait.php" hash="5b3adf6c4f09c61d7488b0f9ac2c696a"/><file name="LoggerInterface.php" hash="023885df6a26d8137d5a13da51f066d2"/><file name="LoggerTrait.php" hash="1cb8db6d0b81cf85f81b6c7c09db7a9a"/><file name="NullLogger.php" hash="e71559fea0239b7441d221f8c7beae5b"/><dir name="Test"><file name="LoggerInterfaceTest.php" hash="867f36a94c35322470458f4eba246458"/></dir></dir></dir><file name="README.md" hash="144a71a4e1f9c67ac79751acc37614c4"/><file name="composer.json" hash="de1539d2aa7830d13a968d33d1039f1a"/><file name=".gitignore" hash="e8a346051f935e6cb104e1dc40998a91"/></dir></dir><dir name="react"><dir name="promise"><file name="CHANGELOG.md" hash="2b1f02283ecd949264f900170ea8b3fc"/><file name="LICENSE" hash="e46a0a186cdc556ce7574113f2653180"/><file name="README.md" hash="bbcb0875dc0201cdfe6573443d2bea14"/><file name="composer.json" hash="0ca73967404075ef80fc494b370ddefc"/><file name="phpunit.xml.dist" hash="7d9482f8cd074b464c0f57496e727d5e"/><dir name="src"><file name="CancellablePromiseInterface.php" hash="1d8feeea39ac3cd66f2c041f0f6589f0"/><file name="Deferred.php" hash="a922b6f8f9d7f8525ddc2c5704eb1377"/><file name="ExtendedPromiseInterface.php" hash="1a287908208d527bbbe6e3128af84d26"/><file name="FulfilledPromise.php" hash="773d525b931f7ceb4e1cfa1fec923462"/><file name="LazyPromise.php" hash="a34e5f6bbc510757cb2d41ca41b846e5"/><file name="Promise.php" hash="f7ff3401d5f36e6e4bd613c859fd8d76"/><file name="PromiseInterface.php" hash="488da4a38d218ba8fb3eaea05dd1c264"/><file name="PromisorInterface.php" hash="d7bf061df9395a7cf5fd082805e42c7a"/><file name="RejectedPromise.php" hash="55b2be16604c09ed1add52d1c49dc56c"/><file name="UnhandledRejectionException.php" hash="b814c8ef9bd08d1d41782104aa6ef8f9"/><file name="functions.php" hash="ce714c7d1e64104fa43c043555078a8f"/><file name="functions_include.php" hash="4da7302e4ed0862c6fa885a3c66bcd01"/></dir><dir name="tests"><file name="DeferredTest.php" hash="5fb76a8bd96a79598d69afb9bcc8c1e1"/><file name="FulfilledPromiseTest.php" hash="20e21c11b19ec8b46a47fc072e7a9e0c"/><file name="FunctionAllTest.php" hash="c2ee53ecc37d95fc55c57912477c215a"/><file name="FunctionAnyTest.php" hash="23565b2dfd5969a213862a7f061b2e03"/><file name="FunctionCheckTypehintTest.php" hash="b48395c507606f68d32150ddfc28ae0d"/><file name="FunctionMapTest.php" hash="287d180adefce847aa222bdb05025eb9"/><file name="FunctionRaceTest.php" hash="3d9edf2ca2f2253496c8cf0ecba7c5d6"/><file name="FunctionReduceTest.php" hash="1b9bc983e9900e29f187475072d10cd9"/><file name="FunctionRejectTest.php" hash="4209c5e6b051b3c065b4a8e1e32949dd"/><file name="FunctionResolveTest.php" hash="4836614d978e9b75b8857ed92e837468"/><file name="FunctionSomeTest.php" hash="78c1ad99506be879d910617d744274c0"/><file name="LazyPromiseTest.php" hash="f3f8f1e47ebf5097d726086c785a7b20"/><dir name="PromiseAdapter"><file name="CallbackPromiseAdapter.php" hash="3429d665b2a9dd4a9d3606af69db5c17"/><file name="PromiseAdapterInterface.php" hash="a02b0b5e52a71149688f7bef8894fcda"/></dir><dir name="PromiseTest"><file name="CancelTestTrait.php" hash="eab33b77dca722a733911b1e94ffb16c"/><file name="FullTestTrait.php" hash="e82099e47b8fe984b7f5ff832c811b9b"/><file name="NotifyTestTrait.php" hash="314ba252939f84fd2885064409d4247d"/><file name="PromiseFulfilledTestTrait.php" hash="d83a22d7b2792a2e067447533ef80598"/><file name="PromisePendingTestTrait.php" hash="ca94a285a8ac4b0f402f9915025997a9"/><file name="PromiseRejectedTestTrait.php" hash="286f6bd7327a649c553096b4cb899642"/><file name="PromiseSettledTestTrait.php" hash="2b4de2fa354193aa5d577d2996713eb0"/><file name="RejectTestTrait.php" hash="11d13fb0d33113764df7ad81981e3ff5"/><file name="ResolveTestTrait.php" hash="e8786f5b09a518feb6cb991ec28093df"/></dir><file name="PromiseTest.php" hash="7bbbd1f2acb6e6187b42751a093fb057"/><file name="RejectedPromiseTest.php" hash="e72e7e3d7bc3e7779ea1b8383604a263"/><dir name="Stub"><file name="CallableStub.php" hash="aa2c5ca5528276a340c013c950c3c792"/></dir><file name="TestCase.php" hash="4c1e0a05effe1354008b82a9c903b5b9"/><file name="bootstrap.php" hash="ac271c71e8caa31202d61356508b7c32"/></dir><file name=".gitignore" hash="dbc957e3a33427be6ecce1f274683ed4"/><file name=".travis.yml" hash="ae054f04b30abca8bfdb9f0726d02c2d"/></dir></dir><dir name="sebastian"><dir name="comparator"><file name="LICENSE" hash="6d9e4164842194f3678065ca96aafc2b"/><file name="README.md" hash="806ffa51e11e5999d44b661cccfa4ae1"/><dir name="build"><file name="travis-ci.xml" hash="fc882618ee88ff07ab7e7fe54d499c8f"/></dir><file name="build.xml" hash="41f209813c40420d64a73845995ff5b9"/><file name="composer.json" hash="88c3437b68f86bd2e0e2d11c7f177ac8"/><file name="phpunit.xml.dist" hash="6b15adabab03c37ac9db087bd6c8616e"/><dir name="src"><file name="ArrayComparator.php" hash="459e9490fe7cd2e17dd3b0d997668a61"/><file name="Comparator.php" hash="e9623dc7fee4b1d5c9338f05cacea7ce"/><file name="ComparisonFailure.php" hash="4986c4af7c70c0ae76c85a9f4bfd13f8"/><file name="DOMNodeComparator.php" hash="9453d7665e2604be7fcfdd0889547eae"/><file name="DateTimeComparator.php" hash="2b028fdc63a6dc0c29f7c8b411bc78a3"/><file name="DoubleComparator.php" hash="9db2a68fa6377cdad8dbaac986a5dd7e"/><file name="ExceptionComparator.php" hash="6ae21adbbe27c150f3d13eb75b9ae9aa"/><file name="Factory.php" hash="f6e31cb4b7d9ae836fc8544198070511"/><file name="MockObjectComparator.php" hash="87c16d2472e6b233238d4c8c045758f0"/><file name="NumericComparator.php" hash="3f9f22c36d1ebd9960f2b0398f7bf63c"/><file name="ObjectComparator.php" hash="3c545b47390cf8b4f7056a07c7f16f06"/><file name="ResourceComparator.php" hash="c7404f4cc5a704b1e2ff8dace4d5789b"/><file name="ScalarComparator.php" hash="8bb2fd1ddac0bf843983364cea637936"/><file name="SplObjectStorageComparator.php" hash="eeb68e7a1b65c009a45957c872bed7e2"/><file name="TypeComparator.php" hash="00a006ce4ddaa8f6158da379e1a8ff07"/></dir><dir name="tests"><file name="ArrayComparatorTest.php" hash="5a56e596907fa051183487b591eaea45"/><file name="DOMNodeComparatorTest.php" hash="f2aaae72f57407fa217f7add0e9e393a"/><file name="DateTimeComparatorTest.php" hash="bccce0914fdfbe59b4a6d53dfe0e3cd3"/><file name="DoubleComparatorTest.php" hash="2310a6497dc5defa4c90dfd3a1c304e7"/><file name="ExceptionComparatorTest.php" hash="aaad1c445f068174239a646394a66ea7"/><file name="FactoryTest.php" hash="7f3b61dc86a5210313cf7ded3f09a04d"/><file name="MockObjectComparatorTest.php" hash="7c68197da379b65e76ca7aa1fe4b7c9c"/><file name="NumericComparatorTest.php" hash="ee98c54e7c1ac614fbb34f612906433c"/><file name="ObjectComparatorTest.php" hash="3d7a781401f1bc54934fe0d9f7b85ba1"/><file name="ResourceComparatorTest.php" hash="6649cc00c890f2afa4f55a39c416c9b2"/><file name="ScalarComparatorTest.php" hash="d3036a537ea89ae23370f3e72910e341"/><file name="SplObjectStorageComparatorTest.php" hash="d542ebae4527a3b7bc20dade8af3cbde"/><file name="TypeComparatorTest.php" hash="d78b4e6c380ae8bc338d8cd50a40b2ed"/><dir name="_files"><file name="Author.php" hash="bd551237dbd13ad6e98245f83a12f1ec"/><file name="Book.php" hash="fe14f4d0318259bf566d8866991bd4ec"/><file name="ClassWithToString.php" hash="ac27ddf96f7fd8626a46ce4ee3993f81"/><file name="SampleClass.php" hash="46c89df9fdfae7dc574287eda28eb6a3"/><file name="Struct.php" hash="913bf3b33bfff6a1626481d44a9b7f33"/><file name="TestClass.php" hash="ebcf3cf1a7b37fbf68cab0d3679b324a"/><file name="TestClassComparator.php" hash="a8fb9aaf92b9ede1fa149840d03771d4"/></dir><file name="autoload.php" hash="9cce468ff2690d0297beee40726b1030"/><file name="bootstrap.php" hash="236e083331e4efbb858c8da45fb5a5ea"/></dir><file name=".gitignore" hash="6688911322aac3a70b11a38dad9e5bee"/><file name=".travis.yml" hash="386c3106699df022ab3bc0d33eabb5e0"/></dir><dir name="diff"><file name="LICENSE" hash="ca6d5850c9cb3496928f50964fac3bbe"/><file name="README.md" hash="deda2c28563bfd81de81ebb1370252e5"/><file name="build.xml" hash="bd8c09cdf0c219d2306df98aa01fc82f"/><file name="composer.json" hash="73b8b9ce272e5895c019b77f5dde35ef"/><file name="phpunit.xml.dist" hash="4ada0ec19d14c052fddc93e8acce9e37"/><dir name="src"><file name="Chunk.php" hash="48aff449fd592e8cfd828e1320732218"/><file name="Diff.php" hash="767c2f6c24f92573138bb97147d083dc"/><file name="Differ.php" hash="e7b046e3b830cbb3238bc07cd8562649"/><dir name="LCS"><file name="LongestCommonSubsequence.php" hash="9c88dd5715c0e060df9721f4e0eca9ff"/><file name="MemoryEfficientLongestCommonSubsequenceImplementation.php" hash="db896c39093c2e2b13868df3b36f4473"/><file name="TimeEfficientLongestCommonSubsequenceImplementation.php" hash="556fa3911d1d845d182ab728d2b0db98"/></dir><file name="Line.php" hash="d2df085fbc6a2d5140c4e91ae31a9326"/><file name="Parser.php" hash="d611eabd628ad0bb99b4e09acca42fb3"/></dir><dir name="tests"><file name="DifferTest.php" hash="67430770efa2b3068fb6f74ff17c1735"/><dir name="LCS"><file name="TimeEfficientImplementationTest.php" hash="552b8927d6d9e35ab546853b281047ad"/></dir><file name="ParserTest.php" hash="b18c7a3bce69004ce424e25500b3ce69"/><dir name="fixtures"><file name="patch.txt" hash="aaf128a73cff1714cd5c6d0a89e76fcd"/><file name="patch2.txt" hash="3fd15fc72b373fe05f91b4299ab2742e"/></dir></dir><file name=".gitignore" hash="58796666bf28f25566f3600e965a82c4"/><file name=".php_cs" hash="77b172af028295312321c8c33de28155"/><file name=".travis.yml" hash="24c8c43884cc8c08e5f49a0bfe5fe304"/></dir><dir name="environment"><file name="LICENSE" hash="dbf0045647f54a51ab90ec8b006cff3f"/><file name="README.md" hash="2d76476b44815d03c0809ec5146a1dd5"/><file name="build.xml" hash="26e9c4c6b6377625a25ce5190158a271"/><file name="composer.json" hash="a13f45d616763f168fa1925ba2758a20"/><file name="phpunit.xml.dist" hash="b524b6ec5845c443d28fb1f2c0986fb5"/><dir name="src"><file name="Console.php" hash="0475dc9afa131b584f8cfefc386d0928"/><file name="Runtime.php" hash="1a467540e595b546906eae11651e6b84"/></dir><dir name="tests"><file name="ConsoleTest.php" hash="82cf1178f74353a49879b5fcd4b18032"/><file name="RuntimeTest.php" hash="e2c3aac76daf7143cccdfcb8c3fac4c5"/></dir><file name=".gitignore" hash="5ab608598439cb53483864b7650d93d9"/><file name=".travis.yml" hash="87e6036734954fccced4646f76c42451"/></dir><dir name="exporter"><file name="LICENSE" hash="ca5308c75c627563e786a486b66b58d5"/><file name="README.md" hash="9731148da5ff0ca1ad7925fbf1b0c5c9"/><file name="build.xml" hash="049acac14b593bbbf793d4d831f68143"/><file name="composer.json" hash="72c0c763840a7dccaad448c83eda49a4"/><file name="phpunit.xml.dist" hash="c83bc64a2b552d037530e57760cc6470"/><dir name="src"><file name="Exporter.php" hash="ce95b0d2dcbeafb7e6b608791d4dc8d2"/></dir><dir name="tests"><file name="ExporterTest.php" hash="5cb9d4418a67d5da0bc15d3f13589672"/></dir><file name=".gitignore" hash="d57866403d240c90949b91ac746df06d"/><file name=".travis.yml" hash="c304e66ee9f79a8e983fd9cb5e88f86e"/></dir><dir name="global-state"><file name="LICENSE" hash="6c65a6464f0d7d694c3ffc09d0d0c319"/><file name="README.md" hash="abb7bf8924e43274b107ac482af2fa2d"/><file name="build.xml" hash="6984ca27d9261a7d15f6062d68f9917f"/><file name="composer.json" hash="1fa2aabf6d581180599e5005b48a1d22"/><file name="phpunit.xml.dist" hash="7c7c435927d78945b7ca4ec1d6dadb2d"/><dir name="src"><file name="Blacklist.php" hash="7ac61709615673f33c042470bf098fd3"/><file name="CodeExporter.php" hash="7a8ce26c56cf4435bf9378ade094ddae"/><file name="Exception.php" hash="e5e040acdd60402728fa7222f784946b"/><file name="Restorer.php" hash="ff082139937d7ac654dc00aca4048522"/><file name="RuntimeException.php" hash="157c6e7d8fa97749d30807c5db4a71f7"/><file name="Snapshot.php" hash="e9a33047d2225395575291d0630be9c2"/></dir><dir name="tests"><file name="BlacklistTest.php" hash="950104eb10dd9f8686729da9d989a51d"/><file name="SnapshotTest.php" hash="9f68892b53fbf3e412bf5fe7cecc365e"/><dir name="_fixture"><file name="BlacklistedChildClass.php" hash="89c4830f5056b641bf1d0e397b193108"/><file name="BlacklistedClass.php" hash="e2f5de9a4cf6de3942b105df12a20a31"/><file name="BlacklistedImplementor.php" hash="9103e52d8cd91e7a6771999f01a34683"/><file name="BlacklistedInterface.php" hash="f452c1ee77cba262d99d534d384f064e"/><file name="SnapshotClass.php" hash="9267f3a300d464721992fb3de35f23ea"/><file name="SnapshotDomDocument.php" hash="7ed58da936892662ab37922107b274db"/><file name="SnapshotFunctions.php" hash="f01959a08b45cf051f6dd07be2e8d131"/><file name="SnapshotTrait.php" hash="a54916b8b8f9dbfa7b5123fbed35e513"/></dir></dir><file name=".gitignore" hash="a61ea0cf9eab158a6f63ff536744746a"/><file name=".travis.yml" hash="54683a386bf74e6ccd12040370c4db79"/></dir><dir name="recursion-context"><file name="LICENSE" hash="72511fcbecf891440f34e9dcd3c995c9"/><file name="README.md" hash="dc962844e83d16aa4cc9f4acb5209f0b"/><file name="build.xml" hash="3f9fe7c26b37319cb257a6ca2a5e0d93"/><file name="composer.json" hash="e96087f0cd3f427ac07c1f2d5e32686b"/><file name="phpunit.xml.dist" hash="44782f10d1ae1d0ab67e03be2068549f"/><dir name="src"><file name="Context.php" hash="9a18077776c911f0a1325f4c15c60378"/><file name="Exception.php" hash="0f84fba818b684c3163ffdfd1754f6d8"/><file name="InvalidArgumentException.php" hash="4babb8647d1e938e8e37fddcf465ce03"/></dir><dir name="tests"><file name="ContextTest.php" hash="1ac8f07d1fe1f162741f161e27df5c63"/></dir><file name=".gitignore" hash="d57866403d240c90949b91ac746df06d"/><file name=".travis.yml" hash="fa3ba0b60448f6c880a66f4bb4260a5e"/></dir><dir name="version"><file name="LICENSE" hash="4ce80303f482fe6c5a07929ddbc80147"/><file name="README.md" hash="69d774cde2e397a13078fbaf108caaf8"/><file name="composer.json" hash="2d145b55932ff4596f23a37053712e5b"/><dir name="src"><file name="Version.php" hash="852905ae26e23d94e8d92781f4acc746"/></dir><file name=".gitattributes" hash="4925aa0fa603ab62f1b327710cc9b790"/><file name=".gitignore" hash="9c5d192e07030c7f565a5e83e5443df2"/></dir></dir><dir name="symfony"><dir name="yaml"><file name="CHANGELOG.md" hash="180ec3a49e06553fc15a2788ee1138a7"/><file name="Dumper.php" hash="da5f26a9f132aa1c83996767cde64e5c"/><file name="Escaper.php" hash="1f0b3fb9ff6a529e0473826d6b63faa8"/><dir name="Exception"><file name="DumpException.php" hash="dc67a59a9101373a0a0aab4d1a37406b"/><file name="ExceptionInterface.php" hash="55d4a87d030efc9426685250882fdf25"/><file name="ParseException.php" hash="50daf187d037034a0f2bd6897fe1aeba"/><file name="RuntimeException.php" hash="14010c4f6f5c12606dd5e00ef5855fdc"/></dir><file name="Inline.php" hash="5c1a90eceacbb2c1378e32f25646f880"/><file name="LICENSE" hash="56dedd4bd25ecd034ac4e1c17ebba0cc"/><file name="Parser.php" hash="a7afd4316f5eab38af31d0ebd3c9a659"/><file name="README.md" hash="323b328917558713567b091575524ec8"/><dir name="Tests"><file name="DumperTest.php" hash="260d21e44f6c92c27e05aaa4647ccc1f"/><dir name="Fixtures"><file name="YtsAnchorAlias.yml" hash="073781a1d2c37127a4296e9af7616624"/><file name="YtsBasicTests.yml" hash="d2ac58481f14d39084c02832571ca937"/><file name="YtsBlockMapping.yml" hash="4c1744b763fce82db7d4e20c469b20cd"/><file name="YtsDocumentSeparator.yml" hash="7bf3dfb1f027f72bd399f8fd3064eb8e"/><file name="YtsErrorTests.yml" hash="1a6d2fa2a7f53d4657b35baf4ecf67c6"/><file name="YtsFlowCollections.yml" hash="326c09dd8c5de226c680154c39206647"/><file name="YtsFoldedScalars.yml" hash="bf21b6ca89e2aea63b62f60448b841b4"/><file name="YtsNullsAndEmpties.yml" hash="fda05f67ca13f8d50cb904b191039c04"/><file name="YtsSpecificationExamples.yml" hash="1b9be3fd8c275fdc8352ca3c3d4ede66"/><file name="YtsTypeTransfers.yml" hash="359b6d26b73597096784bc481887d8d7"/><file name="embededPhp.yml" hash="52dbe7660c58107077d0e7069fe43498"/><file name="escapedCharacters.yml" hash="1b1c84936520b957fff90f3d2cb53f59"/><file name="index.yml" hash="809db138c609075657d8d2e81fabaa5c"/><file name="sfComments.yml" hash="95949da86fadd7120426e391ab6d1b9a"/><file name="sfCompact.yml" hash="835842c734605efa1665b90ccb266b97"/><file name="sfMergeKey.yml" hash="c36291acfb95652bdac59b19f09f4a5d"/><file name="sfObjects.yml" hash="886595fda5f2aa969a232045dbd4941c"/><file name="sfQuotes.yml" hash="49f68edbfc666cc4aaaafce9751a70c2"/><file name="sfTests.yml" hash="3ddc049f3e1ba28a057a4f36703f227f"/><file name="unindentedCollections.yml" hash="cb3d5592f820280da7f1fb6ae74f01f6"/></dir><file name="InlineTest.php" hash="76efebc4ce3aa35f8ef6df62e61c0444"/><file name="ParseExceptionTest.php" hash="e8916519f64728b33913edce29bdc70e"/><file name="ParserTest.php" hash="7f33a473c9b186132ea4f140afc63c1c"/><file name="YamlTest.php" hash="0b07da4943a1c380c45d272526d58e7a"/></dir><file name="Unescaper.php" hash="ebd79ff968445ef4284ce7428fe697f3"/><file name="Yaml.php" hash="700f55efb480e2888039aed31745d8a8"/><file name="composer.json" hash="71bf021c3db6fcfb1b2c6a8763cdeb4e"/><file name="phpunit.xml.dist" hash="21b267525440a2988848538342afefac"/><file name=".gitignore" hash="a1155c508134e9bda943ae266aee1819"/></dir></dir></dir><file name=".editorconfig" hash="992eebd87865ed8081f2f65e2049cd7b"/><file name=".gitignore" hash="54e699d77045a737ccc746b8cc227162"/></dir><file name="Nektria.php" hash="35ec68758ec75b40e3aeccdbf67bd03e"/></dir><dir name="sql"><dir name="nektria_recs_setup"><file name="install-1.0.0.php" hash="8b9f2a7289187a054aa867aab397b24a"/><file name="install-1.0.1.php" hash="3685fc27ea718cbc5ca8e8269f6b078d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="recs"><dir name="email"><file name="lastmile.phtml" hash="adc5efe4a3744744c5999e93db9a0b07"/></dir><dir name="progress"><file name="shipping_method.phtml" hash="835b3cad28fce0565efb56b7be052d47"/></dir><dir name="shipping_method"><file name="available.phtml" hash="605c16e60b7460fa8af95132b0bc5561"/></dir><dir name="totals"><file name="gomage.phtml" hash="0f7c34bcf53e50868f368945df74ebc3"/><file name="lastmile.phtml" hash="d2451456d9395971d3c9f3371809112e"/><file name="onepage.phtml" hash="ef089e02099d64ddb8634a4fb53b8398"/><file name="success.phtml" hash="d41fb8bc248a8516cc51825b0c4b8d4f"/></dir></dir></dir><dir name="layout"><file name="recs.xml" hash="c671b7f667b38d62564d435493ca031c"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="recs"><dir name="sales"><dir name="order"><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="dab64339a84f4ff7f5d85b5fd8ee46ea"/></dir><dir name="view"><file name="form.phtml" hash="93b8200fecb0e2b5226b2763ac5d97db"/></dir></dir><dir name="invoice"><dir name="create"><file name="form.phtml" hash="40ded721298719c36a0eba62db5cc3b3"/></dir><dir name="view"><file name="form.phtml" hash="c57e9f594cac34fd7a465eefe3671d22"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="e05472213fdc397e09311bdc3e0b856d"/></dir><dir name="view"><file name="form.phtml" hash="5a4ba9ac376a5e753e61808b33ac7902"/></dir></dir><dir name="view"><file name="info.phtml" hash="ba408dd6e2ebec0a3ec7f4af115b7631"/><file name="lastmile.phtml" hash="6694b381456a14886fdcb75bcbb69274"/></dir></dir></dir></dir></dir><dir name="layout"><file name="recs.xml" hash="2ee79c0a8a9435bf9fe36467d2990a30"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="es_ES"><file name="Nektria_Translations.csv" hash="eab165d15e55471e043966ab2856ec43"/></dir></target><target name="mageetc"><dir name="modules"><file name="Nektria_ReCS.xml" hash="9003ab46f73920faa5daf6b7f8c5288e"/></dir></target></contents>
24
  <compatible/>
25
+ <dependencies><required><php><min>5.4.0</min><max>7.0.1</max></php><extension><name>curl</name><min/><max/></extension></required></dependencies>
26
  </package>