Version Notes
Third release, that includes various improvements and bug fixes.
Download this release
Release Info
Developer | Speedy JSC |
Extension | Speedy_Shipping |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Grid.php +65 -18
- app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Renderer/Created.php +2 -7
- app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Renderer/Datecreated.php +28 -0
- app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Requestcontainer.php +5 -2
- app/code/community/Speedy/Speedyshipping/Block/Onepage/Paymentinfo.php +15 -0
- app/code/community/Speedy/Speedyshipping/Model/Autocomplete/Address.php +15 -7
- app/code/community/Speedy/Speedyshipping/Model/Carrier/Shippingmethod.php +183 -148
- app/code/community/Speedy/Speedyshipping/Model/Observer.php +13 -4
- app/code/community/Speedy/Speedyshipping/controllers/Adminhtml/PrintController.php +6 -4
- app/code/community/Speedy/Speedyshipping/etc/config.xml +1 -1
- app/code/community/Speedy/Speedyshipping/sql/speedyshippingmodule_setup/mysql4-install-1.0.3.php +1 -1
- app/code/community/Speedy/Speedyshipping/sql/speedyshippingmodule_setup/mysql4-upgrade-1.0.7-1.0.8.php +9 -0
- app/design/adminhtml/default/default/template/speedy_speedyshipping/sales/order/create/form/address.phtml +189 -84
- app/design/frontend/base/default/template/speedy_speedyshipping/checkout/onepage/billing.phtml +589 -542
- app/design/frontend/base/default/template/speedy_speedyshipping/checkout/onepage/shipping.phtml +676 -631
- app/design/frontend/base/default/template/speedy_speedyshipping/customer/address/edit.phtml +25 -3
- app/etc/modules/Speedyshipping.xml +1 -1
- app/locale/bg_BG/speedyTranslate.csv +1 -0
- lib/SpeedyEPS/util/Util.class.php +86 -86
- lib/SpeedyEPS/ver01/AddrNomen.class.php +51 -51
- lib/SpeedyEPS/ver01/ClientException.class.php +14 -14
- lib/SpeedyEPS/ver01/ComplementaryServiceAllowance.class.php +51 -51
- lib/SpeedyEPS/ver01/EPSFacade.class.php +773 -718
- lib/SpeedyEPS/ver01/EPSInterface.class.php +544 -497
- lib/SpeedyEPS/ver01/FixedDiscountCardId.class.php +62 -62
- lib/SpeedyEPS/ver01/ParamAddress.class.php +405 -405
- lib/SpeedyEPS/ver01/ParamAddressSearch.class.php +183 -183
- lib/SpeedyEPS/ver01/ParamBarcodeInfo.class.php +66 -66
- lib/SpeedyEPS/ver01/ParamCalculation.class.php +646 -646
- lib/SpeedyEPS/ver01/ParamClientData.class.php +216 -187
- lib/SpeedyEPS/ver01/ParamClientSearch.class.php +160 -160
- lib/SpeedyEPS/ver01/ParamFilterSite.class.php +135 -135
- lib/SpeedyEPS/ver01/ParamLanguage.class.php +46 -46
- lib/SpeedyEPS/ver01/ParamOrder.class.php +218 -218
- lib/SpeedyEPS/ver01/ParamPDF.class.php +241 -241
- lib/SpeedyEPS/ver01/ParamParcel.class.php +140 -140
- lib/SpeedyEPS/ver01/ParamParcelInfo.class.php +87 -87
- lib/SpeedyEPS/ver01/ParamPhoneNumber.class.php +65 -65
- lib/SpeedyEPS/ver01/ParamPicking.class.php +1000 -1000
- lib/SpeedyEPS/ver01/ParamSearchByRefNum.class.php +129 -129
- lib/SpeedyEPS/ver01/ResultAddress.class.php +313 -313
- lib/SpeedyEPS/ver01/ResultAddressEx.class.php +319 -0
- lib/SpeedyEPS/ver01/ResultAddressSearch.class.php +133 -133
- lib/SpeedyEPS/ver01/ResultAmounts.class.php +515 -515
- lib/SpeedyEPS/ver01/ResultBOL.class.php +71 -71
- lib/SpeedyEPS/ver01/ResultCalculation.class.php +80 -80
- lib/SpeedyEPS/ver01/ResultCalculationMS.class.php +58 -58
- lib/SpeedyEPS/ver01/ResultClientData.class.php +117 -117
- lib/SpeedyEPS/ver01/ResultCommonObject.class.php +74 -74
- lib/SpeedyEPS/ver01/ResultCourierService.class.php +136 -136
- lib/SpeedyEPS/ver01/ResultCourierServiceExt.class.php +32 -32
- lib/SpeedyEPS/ver01/ResultLogin.class.php +46 -46
- lib/SpeedyEPS/ver01/ResultMinMaxReal.class.php +44 -44
- lib/SpeedyEPS/ver01/ResultOffice.class.php +136 -136
- lib/SpeedyEPS/ver01/ResultOfficeEx.class.php +137 -0
- lib/SpeedyEPS/ver01/ResultOrderPickingInfo.class.php +53 -53
- lib/SpeedyEPS/ver01/ResultParcelInfo.class.php +43 -43
- lib/SpeedyEPS/ver01/ResultPhoneNumber.class.php +43 -43
- lib/SpeedyEPS/ver01/ResultQuarter.class.php +74 -74
- lib/SpeedyEPS/ver01/ResultSite.class.php +129 -129
- lib/SpeedyEPS/ver01/ResultSiteEx.class.php +48 -48
- lib/SpeedyEPS/ver01/ResultSpecialDeliveryRequirement.class.php +61 -0
- lib/SpeedyEPS/ver01/ResultStreet.class.php +74 -74
- lib/SpeedyEPS/ver01/ResultTrackPicking.class.php +118 -118
- lib/SpeedyEPS/ver01/ResultTrackPickingEx.class.php +150 -150
- lib/SpeedyEPS/ver01/ServerException.class.php +14 -14
- lib/SpeedyEPS/ver01/Size.class.php +87 -87
- lib/SpeedyEPS/ver01/ValueAddress.class.php +433 -433
- lib/SpeedyEPS/ver01/soap/EPSSOAPInterfaceImpl.class.php +1077 -983
- package.xml +7 -7
- skin/adminhtml/default/default/speedy/js/office_pickup.js +46 -0
- skin/adminhtml/default/default/speedy/js/validateAddress.js +1 -1
- skin/frontend/base/default/speedy/js/office_pickup.js +18 -15
app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Grid.php
CHANGED
@@ -18,19 +18,43 @@ Mage_Adminhtml_Block_Widget_Grid {
|
|
18 |
public function __construct() {
|
19 |
parent::__construct();
|
20 |
$this->setId('BolGrid');
|
21 |
-
$this->setDefaultSort('
|
22 |
-
$this->setDefaultDir('
|
23 |
-
$this->setSaveParametersInSession(true);
|
24 |
}
|
25 |
|
26 |
protected function _prepareCollection() {
|
27 |
|
28 |
$dateInfo = getdate(time());
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$collection = Mage::getModel('speedyshippingmodule/saveorder')->getCollection();
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
$this->setCollection($collection);
|
35 |
return parent::_prepareCollection();
|
36 |
}
|
@@ -41,50 +65,65 @@ Mage_Adminhtml_Block_Widget_Grid {
|
|
41 |
|
42 |
$this->addColumn('bol_id', array(
|
43 |
'header' => $this->__("View Bill of lading number"),
|
44 |
-
'align' => '
|
45 |
'width' => '10px',
|
46 |
'index' => 'bol_id',
|
|
|
47 |
));
|
48 |
|
49 |
$this->addColumn('bol_created_at', array(
|
50 |
-
'header' => $this->__("
|
51 |
-
'align' => '
|
52 |
'index' => 'bol_created_at',
|
53 |
'width' => '50px',
|
54 |
-
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_created'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
));
|
56 |
|
57 |
$this->addColumn('image', array(
|
58 |
'header' => '',
|
59 |
-
'align' => '
|
60 |
'index' => 'image',
|
61 |
-
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_cancelbutton'
|
|
|
62 |
));
|
63 |
|
64 |
if (!Mage::getStoreConfig('carriers/speedyshippingmodule/bring_to_office') ||
|
65 |
!Mage::getStoreConfig('carriers/speedyshippingmodule/choose_office')) {
|
66 |
$this->addColumn('images', array(
|
67 |
'header' => '',
|
68 |
-
'align' => '
|
69 |
'index' => 'images',
|
70 |
-
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_requestbutton'
|
|
|
71 |
));
|
72 |
}
|
73 |
|
74 |
$this->addColumn('view_bol', array(
|
75 |
'header' => '',
|
76 |
-
'align' => '
|
77 |
'index' => 'view_bol',
|
78 |
-
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_viewbol'
|
|
|
79 |
));
|
80 |
|
81 |
|
82 |
|
83 |
$this->addColumn('order', array(
|
84 |
'header' => '',
|
85 |
-
'align' => '
|
86 |
'index' => 'order',
|
87 |
-
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_vieworder'
|
|
|
88 |
));
|
89 |
|
90 |
return parent::_prepareColumns();
|
@@ -107,6 +146,14 @@ Mage_Adminhtml_Block_Widget_Grid {
|
|
107 |
return $this;
|
108 |
}
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
?>
|
18 |
public function __construct() {
|
19 |
parent::__construct();
|
20 |
$this->setId('BolGrid');
|
21 |
+
$this->setDefaultSort('bol_id');
|
22 |
+
$this->setDefaultDir('DESC');
|
23 |
+
// $this->setSaveParametersInSession(true);
|
24 |
}
|
25 |
|
26 |
protected function _prepareCollection() {
|
27 |
|
28 |
$dateInfo = getdate(time());
|
29 |
|
30 |
+
$filter = $this->getParam('filter');
|
31 |
+
$filter_data = Mage::helper('adminhtml')->prepareFilterString($filter);
|
32 |
+
|
33 |
+
$skipDefaultFilter = false;
|
34 |
+
|
35 |
+
if (array_key_exists('bol_takingdate', $filter_data)) {
|
36 |
+
if (is_array($filter_data['bol_takingdate'])) {
|
37 |
+
if (array_key_exists('from', $filter_data['bol_takingdate']) ||
|
38 |
+
array_key_exists('to', $filter_data['bol_takingdate'])) {
|
39 |
+
$skipDefaultFilter = TRUE;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
if (array_key_exists('bol_id', $filter_data)) {
|
45 |
+
$skipDefaultFilter = TRUE;
|
46 |
+
}
|
47 |
+
|
48 |
$collection = Mage::getModel('speedyshippingmodule/saveorder')->getCollection();
|
49 |
+
/*
|
50 |
+
if (!$skipDefaultFilter) {
|
51 |
+
$collection->addFieldToFilter('bol_created_day', $dateInfo['mday']);
|
52 |
+
$collection->addFieldToFilter('bol_created_month', $dateInfo['mon']);
|
53 |
+
$collection->addFieldToFilter('bol_created_year', $dateInfo['year']);
|
54 |
+
}
|
55 |
+
*
|
56 |
+
*/
|
57 |
+
$collection->addFieldToFilter('bol_id', array("notnull" => true));
|
58 |
$this->setCollection($collection);
|
59 |
return parent::_prepareCollection();
|
60 |
}
|
65 |
|
66 |
$this->addColumn('bol_id', array(
|
67 |
'header' => $this->__("View Bill of lading number"),
|
68 |
+
'align' => 'center',
|
69 |
'width' => '10px',
|
70 |
'index' => 'bol_id',
|
71 |
+
'type'=>'number'
|
72 |
));
|
73 |
|
74 |
$this->addColumn('bol_created_at', array(
|
75 |
+
'header' => $this->__("Taking time courier"),
|
76 |
+
'align' => 'center',
|
77 |
'index' => 'bol_created_at',
|
78 |
'width' => '50px',
|
79 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_created',
|
80 |
+
'filter' => false
|
81 |
+
));
|
82 |
+
|
83 |
+
$this->addColumn('bol_takingdate', array(
|
84 |
+
'header' => $this->__("Time and creation date"),
|
85 |
+
'align' => 'center',
|
86 |
+
'index' => 'bol_datetime',
|
87 |
+
'type' => 'datetime',
|
88 |
+
'width' => '50px',
|
89 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_datecreated'
|
90 |
));
|
91 |
|
92 |
$this->addColumn('image', array(
|
93 |
'header' => '',
|
94 |
+
'align' => 'center',
|
95 |
'index' => 'image',
|
96 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_cancelbutton',
|
97 |
+
'filter' => false
|
98 |
));
|
99 |
|
100 |
if (!Mage::getStoreConfig('carriers/speedyshippingmodule/bring_to_office') ||
|
101 |
!Mage::getStoreConfig('carriers/speedyshippingmodule/choose_office')) {
|
102 |
$this->addColumn('images', array(
|
103 |
'header' => '',
|
104 |
+
'align' => 'center',
|
105 |
'index' => 'images',
|
106 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_requestbutton',
|
107 |
+
'filter' => false
|
108 |
));
|
109 |
}
|
110 |
|
111 |
$this->addColumn('view_bol', array(
|
112 |
'header' => '',
|
113 |
+
'align' => 'center',
|
114 |
'index' => 'view_bol',
|
115 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_viewbol',
|
116 |
+
'filter' => false
|
117 |
));
|
118 |
|
119 |
|
120 |
|
121 |
$this->addColumn('order', array(
|
122 |
'header' => '',
|
123 |
+
'align' => 'center',
|
124 |
'index' => 'order',
|
125 |
+
'renderer' => 'speedyshippingmodule/adminhtml_requestcourier_renderer_vieworder',
|
126 |
+
'filter' => false
|
127 |
));
|
128 |
|
129 |
return parent::_prepareColumns();
|
146 |
return $this;
|
147 |
}
|
148 |
|
149 |
+
protected function _prepareLayout() {
|
150 |
+
parent::_prepareLayout();
|
151 |
+
|
152 |
+
//Remove unneeded buttons
|
153 |
+
//$this->unsetChild('search_button');
|
154 |
+
$this->unsetChild('reset_filter_button');
|
155 |
+
}
|
156 |
+
|
157 |
}
|
158 |
|
159 |
?>
|
app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Renderer/Created.php
CHANGED
@@ -18,13 +18,8 @@ extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
|
18 |
public function render(Varien_Object $row)
|
19 |
{
|
20 |
//if($row->getBolCreatedTime()){
|
21 |
-
|
22 |
-
|
23 |
-
$row->getBolCreatedMonth().
|
24 |
-
'/'.
|
25 |
-
$row->getBolCreatedYear().
|
26 |
-
'/'.
|
27 |
-
$row->getBolCreatedTime();
|
28 |
// }
|
29 |
}
|
30 |
}
|
18 |
public function render(Varien_Object $row)
|
19 |
{
|
20 |
//if($row->getBolCreatedTime()){
|
21 |
+
$generatedTimestamp = mktime(0, 0, 0, $row->getBolCreatedMonth(), $row->getBolCreatedDay(), $row->getBolCreatedYear());
|
22 |
+
return date('d-m-Y', $generatedTimestamp );
|
|
|
|
|
|
|
|
|
|
|
23 |
// }
|
24 |
}
|
25 |
}
|
app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Renderer/Datecreated.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this license header, choose License Headers in Project Properties.
|
5 |
+
* To change this template file, choose Tools | Templates
|
6 |
+
* and open the template in the editor.
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Description of Speedy_Speedyshipping_Block_Adminhtml_Requestcourier_Renderer_Datecreated
|
11 |
+
*
|
12 |
+
* @author killer
|
13 |
+
*/
|
14 |
+
class Speedy_Speedyshipping_Block_Adminhtml_Requestcourier_Renderer_Datecreated
|
15 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
16 |
+
{
|
17 |
+
public function render(Varien_Object $row)
|
18 |
+
{
|
19 |
+
//if($row->getBolCreatedTime()){
|
20 |
+
if($row->getBolDatetime()){
|
21 |
+
return date('d-m-Y H:i:s', strtotime($row->getBolDatetime()));
|
22 |
+
}else{
|
23 |
+
return '';
|
24 |
+
}
|
25 |
+
|
26 |
+
// }
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Speedy/Speedyshipping/Block/Adminhtml/Requestcourier/Requestcontainer.php
CHANGED
@@ -15,13 +15,16 @@ Mage_Adminhtml_Block_Widget_Grid_Container{
|
|
15 |
//put your code here
|
16 |
|
17 |
public function __construct() {
|
18 |
-
|
19 |
$this->_controller = 'adminhtml_requestcourier';
|
20 |
$this->_blockGroup = 'speedyshippingmodule';
|
21 |
$this->_headerText = $this->__("Speedy Bill of lading");
|
22 |
//$this->_addButtonLabel = $this->__("Add bill of lading");
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
parent::__construct();
|
25 |
}
|
26 |
}
|
27 |
|
15 |
//put your code here
|
16 |
|
17 |
public function __construct() {
|
18 |
+
parent::__construct();
|
19 |
$this->_controller = 'adminhtml_requestcourier';
|
20 |
$this->_blockGroup = 'speedyshippingmodule';
|
21 |
$this->_headerText = $this->__("Speedy Bill of lading");
|
22 |
//$this->_addButtonLabel = $this->__("Add bill of lading");
|
23 |
+
//
|
24 |
+
//Remove unnecessary button
|
25 |
+
$this->removeButton('add');
|
26 |
+
|
27 |
|
|
|
28 |
}
|
29 |
}
|
30 |
|
app/code/community/Speedy/Speedyshipping/Block/Onepage/Paymentinfo.php
CHANGED
@@ -132,6 +132,19 @@ class Speedy_Speedyshipping_Block_Onepage_Paymentinfo extends Mage_Payment_Block
|
|
132 |
}
|
133 |
}
|
134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
//Is free shipping enabled
|
136 |
if (Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable')) {
|
137 |
|
@@ -147,6 +160,8 @@ class Speedy_Speedyshipping_Block_Onepage_Paymentinfo extends Mage_Payment_Block
|
|
147 |
}
|
148 |
}
|
149 |
}
|
|
|
|
|
150 |
}
|
151 |
|
152 |
if (Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml') {
|
132 |
}
|
133 |
}
|
134 |
}
|
135 |
+
|
136 |
+
if (!$isAdmin) {
|
137 |
+
$shippingAmount = Mage::getSingleton('checkout/session')
|
138 |
+
->getQuote()
|
139 |
+
->getShippingAddress()
|
140 |
+
->getShippingAmount();
|
141 |
+
} else {
|
142 |
+
$shippingAmount = Mage::getSingleton('adminhtml/session_quote')
|
143 |
+
->getQuote()
|
144 |
+
->getShippingAddress()
|
145 |
+
->getShippingAmount();
|
146 |
+
}
|
147 |
+
|
148 |
//Is free shipping enabled
|
149 |
if (Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable')) {
|
150 |
|
160 |
}
|
161 |
}
|
162 |
}
|
163 |
+
}else if($shippingAmount == 0.000){
|
164 |
+
$this->_isFreeMethod = TRUE;
|
165 |
}
|
166 |
|
167 |
if (Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml') {
|
app/code/community/Speedy/Speedyshipping/Model/Autocomplete/Address.php
CHANGED
@@ -111,7 +111,7 @@ class Speedy_Speedyshipping_Model_Autocomplete_Address extends Mage_Core_Model_A
|
|
111 |
$officeName = Mage::helper('speedyshippingmodule/transliterate')->transliterate($officeName);
|
112 |
if($cityId){
|
113 |
try {
|
114 |
-
$offices = $this->_speedyEPS->
|
115 |
} catch (Exception $e) {
|
116 |
|
117 |
}
|
@@ -121,7 +121,7 @@ class Speedy_Speedyshipping_Model_Autocomplete_Address extends Mage_Core_Model_A
|
|
121 |
|
122 |
foreach ($offices as $office) {
|
123 |
|
124 |
-
|
125 |
$label = '';
|
126 |
|
127 |
$city = '';
|
@@ -130,9 +130,10 @@ class Speedy_Speedyshipping_Model_Autocomplete_Address extends Mage_Core_Model_A
|
|
130 |
|
131 |
$label .= $office->getId() . ' ' . $office->getName();
|
132 |
|
|
|
133 |
$city .= $office->getAddress()->getSiteType() . ' ' .
|
134 |
$office->getAddress()->getSiteName();
|
135 |
-
|
136 |
if ($office->getAddress()->getQuarterType()) {
|
137 |
|
138 |
|
@@ -181,12 +182,12 @@ class Speedy_Speedyshipping_Model_Autocomplete_Address extends Mage_Core_Model_A
|
|
181 |
|
182 |
$note .= $office->getAddress()->getAddressNote();
|
183 |
}
|
184 |
-
|
185 |
if ($city != '') {
|
186 |
|
187 |
$label = $label . ', ' . $city;
|
188 |
}
|
189 |
-
|
190 |
if ($address != '') {
|
191 |
$label = $label . ', ' . $address;
|
192 |
}
|
@@ -194,9 +195,16 @@ class Speedy_Speedyshipping_Model_Autocomplete_Address extends Mage_Core_Model_A
|
|
194 |
$label = $label . ', ' . $note;
|
195 |
}
|
196 |
|
197 |
-
$tpl[] = array('label'
|
198 |
'value' => $office->getId(),
|
199 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
}
|
201 |
|
202 |
$jsonData = json_encode($tpl);
|
111 |
$officeName = Mage::helper('speedyshippingmodule/transliterate')->transliterate($officeName);
|
112 |
if($cityId){
|
113 |
try {
|
114 |
+
$offices = $this->_speedyEPS->listOfficesEx($officeName, $cityId);
|
115 |
} catch (Exception $e) {
|
116 |
|
117 |
}
|
121 |
|
122 |
foreach ($offices as $office) {
|
123 |
|
124 |
+
|
125 |
$label = '';
|
126 |
|
127 |
$city = '';
|
130 |
|
131 |
$label .= $office->getId() . ' ' . $office->getName();
|
132 |
|
133 |
+
/*
|
134 |
$city .= $office->getAddress()->getSiteType() . ' ' .
|
135 |
$office->getAddress()->getSiteName();
|
136 |
+
*/
|
137 |
if ($office->getAddress()->getQuarterType()) {
|
138 |
|
139 |
|
182 |
|
183 |
$note .= $office->getAddress()->getAddressNote();
|
184 |
}
|
185 |
+
/*
|
186 |
if ($city != '') {
|
187 |
|
188 |
$label = $label . ', ' . $city;
|
189 |
}
|
190 |
+
*/
|
191 |
if ($address != '') {
|
192 |
$label = $label . ', ' . $address;
|
193 |
}
|
195 |
$label = $label . ', ' . $note;
|
196 |
}
|
197 |
|
198 |
+
$tpl[] = array('label' =>$office->getId().' '.$office->getName().', '. $office->getAddress()->getFullAddressString(),
|
199 |
'value' => $office->getId(),
|
200 |
+
'street_label'=>$label,
|
201 |
+
'site_id' => $office->getAddress()->getResultSite()->getId(),
|
202 |
+
'site_name'=> $office->getAddress()->getResultSite()->getType() . ' ' . $office->getAddress()->getResultSite()->getName() .
|
203 |
+
', общ. ' . $office->getAddress()->getResultSite()->getMunicipality() . ', обл. ' . $office->getAddress()->getResultSite()->getRegion(),
|
204 |
+
'site_municipality'=>$office->getAddress()->getResultSite()->getMunicipality(),
|
205 |
+
'post_code'=>$office->getAddress()->getPostCode(),
|
206 |
+
'region'=>$office->getAddress()->getResultSite()->getRegion(),
|
207 |
+
'is_full_nomenclature' =>$office->getAddress()->getResultSite()->getAddrNomen()->getValue());
|
208 |
}
|
209 |
|
210 |
$jsonData = json_encode($tpl);
|
app/code/community/Speedy/Speedyshipping/Model/Carrier/Shippingmethod.php
CHANGED
@@ -5,7 +5,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
5 |
protected $_code = 'speedyshippingmodule';
|
6 |
protected $_request = null;
|
7 |
protected $_rawRequest = null;
|
8 |
-
|
9 |
/**
|
10 |
* A boolean property that indicates whether the current execution context
|
11 |
* is the admin area. This is used and set in various methods in this class
|
@@ -20,8 +20,8 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
20 |
* @var Mage_Shipping_Model_Rate_Result|null
|
21 |
*/
|
22 |
protected $_result = null;
|
23 |
-
|
24 |
protected $_speedyRates = array();
|
|
|
25 |
/**
|
26 |
* A property that holds the picking data about particular Magento order, in
|
27 |
* format that Speedy expects. This data is extracted mainly in setUpOrderData()
|
@@ -29,6 +29,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
29 |
* @var type
|
30 |
*/
|
31 |
protected $_pickingData;
|
|
|
32 |
/**
|
33 |
* A property that holds data about the sender (the data about the online
|
34 |
* shop). This is received after a successful authentication. The data is
|
@@ -36,6 +37,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
36 |
* @var type
|
37 |
*/
|
38 |
protected $_senderData;
|
|
|
39 |
/**
|
40 |
* A property that holds data about the receiver (the customer of the online
|
41 |
* shop).
|
@@ -48,15 +50,10 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
48 |
protected $_receiverData;
|
49 |
protected $_orderData;
|
50 |
protected $_checkoutSession;
|
51 |
-
|
52 |
protected $_city_id;
|
53 |
-
|
54 |
protected $_codAmount = null;
|
55 |
-
|
56 |
protected $_speedyServiceInfo = array();
|
57 |
-
|
58 |
protected $_CODPrices = array();
|
59 |
-
|
60 |
protected $_doesRequestContainExactHour;
|
61 |
|
62 |
/**
|
@@ -114,8 +111,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
114 |
|
115 |
try {
|
116 |
|
117 |
-
$this->_speedyEPSInterfaceImplementaion =
|
118 |
-
new EPSSOAPInterfaceImpl(Mage::getStoreConfig('carriers/' . $this->_code . '/server'));
|
119 |
|
120 |
$this->_speedyEPS = new EPSFacade($this->_speedyEPSInterfaceImplementaion, $user, $pass);
|
121 |
|
@@ -571,6 +567,20 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
571 |
$pickingData->documents = Mage::getStoreConfig('carriers/speedyshippingmodule/isDocuments');
|
572 |
$pickingData->palletized = false; // Флаг дали пратката се състои от палети
|
573 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
if (Mage::getStoreConfig('carriers/speedyshippingmodule/add_insurance')) {
|
575 |
|
576 |
|
@@ -583,7 +593,10 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
583 |
}
|
584 |
|
585 |
|
586 |
-
|
|
|
|
|
|
|
587 |
|
588 |
|
589 |
$pickingData->payerTypeInsurance = ParamCalculation::PAYER_TYPE_RECEIVER;
|
@@ -620,8 +633,21 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
620 |
// $pickingData->amountCODBase = $this->_request->getBaseSubtotalInclTax() - $sumOfVirtualProducts;
|
621 |
|
622 |
|
623 |
-
$pickingData->amountCODBase = $this->_request->getBaseSubtotalInclTax();
|
624 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
625 |
|
626 |
$isEnabled = Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable');
|
627 |
|
@@ -752,7 +778,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
752 |
*
|
753 |
*/
|
754 |
//$allowedMethods = $this->_filterShippingMethods($methods);
|
755 |
-
|
756 |
if (isset($allowedMethods)) {
|
757 |
|
758 |
$priceForMethod = $this->_calculatePrices($allowedMethods);
|
@@ -901,170 +927,166 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
901 |
protected function _filterShippingMethods($arrAvailableServices) {
|
902 |
|
903 |
|
904 |
-
|
905 |
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
|
911 |
|
912 |
-
|
913 |
-
|
914 |
|
915 |
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
|
920 |
-
|
921 |
|
922 |
-
|
923 |
|
924 |
-
|
925 |
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
|
931 |
|
932 |
|
933 |
-
|
934 |
|
935 |
-
|
936 |
-
|
937 |
-
if($service->getErrorDescription()){
|
938 |
-
unset($arrAvailableServices[$counter]);
|
939 |
-
$counter++;
|
940 |
-
continue;
|
941 |
-
}else{
|
942 |
-
$counter++;
|
943 |
-
}
|
944 |
-
}
|
945 |
-
/*
|
946 |
-
$serviceId = $service->getTypeId();
|
947 |
-
$this->_speedyServiceInfo[$serviceId] = array();
|
948 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
|
950 |
-
$this->_speedyServiceInfo[$serviceId]['fixed_hour'] =
|
951 |
-
$service->getAllowanceFixedTimeDelivery()->getValue();
|
952 |
|
953 |
-
|
954 |
-
|
955 |
|
956 |
-
|
957 |
-
|
958 |
|
959 |
-
|
960 |
-
|
961 |
|
|
|
|
|
962 |
|
963 |
-
$this->_speedyServiceInfo[$serviceId]['back_receipt'] =
|
964 |
-
$service->getAllowanceBackReceiptRequest();
|
965 |
|
966 |
-
|
967 |
-
|
968 |
|
|
|
|
|
969 |
|
970 |
-
$removeServiceFromList = FALSE;
|
971 |
|
972 |
-
|
973 |
-
($this->_speedyServiceInfo[$serviceId]['fixed_hour'] == 'REQUIRED')) {
|
974 |
|
|
|
|
|
975 |
|
976 |
-
$removeServiceFromList = TRUE;
|
977 |
-
}
|
978 |
|
979 |
-
|
980 |
-
|
981 |
|
982 |
-
|
983 |
-
|
984 |
|
985 |
-
|
986 |
-
|
987 |
|
988 |
-
|
989 |
-
|
990 |
-
($this->_speedyServiceInfo[$serviceId]['back_documents'] == 'REQUIRED')) {
|
991 |
|
992 |
-
|
993 |
-
|
|
|
994 |
|
|
|
|
|
995 |
|
996 |
-
if ($isBackReceiptAllowed &&
|
997 |
-
$this->_speedyServiceInfo[$serviceId]['back_documents'] == 'BANNED') {
|
998 |
|
999 |
-
|
1000 |
-
|
1001 |
-
$this->_speedyServiceInfo[$serviceId]['back_documents'] == 'REQUIRED') {
|
1002 |
|
1003 |
-
|
1004 |
-
|
|
|
1005 |
|
|
|
|
|
1006 |
|
1007 |
-
if (!$isInsuranceAllowed &&
|
1008 |
-
($this->_speedyServiceInfo[$serviceId]['insurance'] == 'REQUIRED')) {
|
1009 |
|
1010 |
-
|
1011 |
-
|
1012 |
-
($this->_speedyServiceInfo[$serviceId]['insurance'] == 'BANNED')) {
|
1013 |
|
1014 |
-
|
1015 |
-
|
|
|
1016 |
|
1017 |
-
|
1018 |
-
|
1019 |
|
1020 |
-
|
1021 |
-
|
1022 |
|
1023 |
-
|
1024 |
-
|
1025 |
|
1026 |
-
|
1027 |
-
|
1028 |
-
($this->_speedyServiceInfo[$serviceId]['to_be_called'] == 'BANNED')) {
|
1029 |
-
$removeServiceFromList = TRUE;
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
|
1033 |
-
if ($removeServiceFromList) {
|
1034 |
-
unset($arrAvailableServices[$counter]);
|
1035 |
-
}
|
1036 |
-
$counter++;
|
1037 |
-
}
|
1038 |
-
*/
|
1039 |
-
|
1040 |
-
//reindex $arrAvailableServices
|
1041 |
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
|
|
|
|
1045 |
|
1046 |
-
|
1047 |
|
1048 |
-
|
1049 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1050 |
|
1051 |
-
/*
|
1052 |
-
$availableDates = array();
|
1053 |
-
//Retrieve the list of available days for picking
|
1054 |
-
foreach ($arrSelectedServices as $service) {
|
1055 |
-
$availableDates[$service] = $this->_speedyEPS->getAllowedDaysForTaking(
|
1056 |
-
$service, !isset($this->_pickingData->bringToOfficeId) ? $this->_senderData->address->siteID : null, $this->_pickingData->bringToOfficeId, null
|
1057 |
-
);
|
1058 |
-
}
|
1059 |
-
*/
|
1060 |
-
//Get the first available date for picking
|
1061 |
-
//$firstAvailableDate = array_shift($availableDates);
|
1062 |
-
//$this->_pickingData->takingDate = $firstAvailableDate[0];
|
1063 |
|
1064 |
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1068 |
}
|
1069 |
|
1070 |
/**
|
@@ -1085,12 +1107,12 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1085 |
$paramCalculation->setBroughtToOffice($this->_pickingData->bringToOfficeId);
|
1086 |
|
1087 |
$paramCalculation->setAutoAdjustTakingDate(1);
|
1088 |
-
|
1089 |
-
if(Mage::getStoreConfig('carriers/speedyshippingmodule/deferredDays')){
|
1090 |
$paramCalculation->setDeferredDeliveryWorkDays(Mage::getStoreConfig('carriers/speedyshippingmodule/deferredDays'));
|
1091 |
}
|
1092 |
-
|
1093 |
-
|
1094 |
$paramCalculation->setToBeCalled(isset($this->_pickingData->takeFromOfficeId));
|
1095 |
|
1096 |
$paramCalculation->setParcelsCount($this->_pickingData->parcelsCount);
|
@@ -1147,8 +1169,6 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1147 |
|
1148 |
$resultCalculation = $this->_speedyEPS->calculateMultipleServices($paramCalculation, $methods);
|
1149 |
$resultCalculation = $this->_filterShippingMethods($resultCalculation);
|
1150 |
-
|
1151 |
-
|
1152 |
} catch (ServerException $se) {
|
1153 |
|
1154 |
Mage::log($se->getMessage(), null, 'speedyLog.log');
|
@@ -1290,9 +1310,9 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1290 |
|
1291 |
$this->_CODPrices[$code] = $method->getResultInfo()->getAmounts()->getCodPremium();
|
1292 |
|
1293 |
-
|
1294 |
$taxCalculator = Mage::helper('tax');
|
1295 |
-
|
1296 |
|
1297 |
$isFixed = Mage::getStoreConfig('carriers/speedyshippingmodule/fixed_pricing_enable');
|
1298 |
|
@@ -1302,19 +1322,19 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1302 |
|
1303 |
|
1304 |
$total = $fixedPrice;
|
1305 |
-
}else if($isFixed == 3){
|
1306 |
$handlingAmount = Mage::getStoreConfig('carriers/speedyshippingmodule/handlingCharge');
|
1307 |
$total = $total + $taxCalculator->getShippingPrice($handlingAmount, FALSE);
|
1308 |
}
|
1309 |
|
1310 |
//Is fixed hour allowed for this particular service
|
1311 |
-
if(array_key_exists($method->getServiceTypeId(), $this->_speedyServiceInfo)){
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
}
|
1316 |
-
|
1317 |
-
|
1318 |
|
1319 |
if (!isset($this->_pickingData->fixedTimeDelivery)) {
|
1320 |
|
@@ -1341,7 +1361,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1341 |
$methodData = array();
|
1342 |
}
|
1343 |
|
1344 |
-
|
1345 |
|
1346 |
$fixed_time_amount = $method->getResultInfo()->getAmounts()->getFixedTimeDelivery();
|
1347 |
|
@@ -1389,7 +1409,7 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1389 |
|
1390 |
$isEnabled = Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable');
|
1391 |
|
1392 |
-
if (!(boolean) $isEnabled) {
|
1393 |
|
1394 |
return;
|
1395 |
}
|
@@ -1407,13 +1427,29 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1407 |
$freeMethod = 'speedy_fixed_price';
|
1408 |
}
|
1409 |
|
1410 |
-
|
1411 |
|
1412 |
-
|
|
|
|
|
|
|
1413 |
|
|
|
|
|
|
|
|
|
|
|
1414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1415 |
|
1416 |
-
|
|
|
1417 |
|
1418 |
$request->setFreeShipping(1);
|
1419 |
}
|
@@ -1688,4 +1724,3 @@ class Speedy_Speedyshipping_Model_Carrier_Shippingmethod extends Mage_Shipping_M
|
|
1688 |
}
|
1689 |
|
1690 |
}
|
1691 |
-
|
5 |
protected $_code = 'speedyshippingmodule';
|
6 |
protected $_request = null;
|
7 |
protected $_rawRequest = null;
|
8 |
+
|
9 |
/**
|
10 |
* A boolean property that indicates whether the current execution context
|
11 |
* is the admin area. This is used and set in various methods in this class
|
20 |
* @var Mage_Shipping_Model_Rate_Result|null
|
21 |
*/
|
22 |
protected $_result = null;
|
|
|
23 |
protected $_speedyRates = array();
|
24 |
+
|
25 |
/**
|
26 |
* A property that holds the picking data about particular Magento order, in
|
27 |
* format that Speedy expects. This data is extracted mainly in setUpOrderData()
|
29 |
* @var type
|
30 |
*/
|
31 |
protected $_pickingData;
|
32 |
+
|
33 |
/**
|
34 |
* A property that holds data about the sender (the data about the online
|
35 |
* shop). This is received after a successful authentication. The data is
|
37 |
* @var type
|
38 |
*/
|
39 |
protected $_senderData;
|
40 |
+
|
41 |
/**
|
42 |
* A property that holds data about the receiver (the customer of the online
|
43 |
* shop).
|
50 |
protected $_receiverData;
|
51 |
protected $_orderData;
|
52 |
protected $_checkoutSession;
|
|
|
53 |
protected $_city_id;
|
|
|
54 |
protected $_codAmount = null;
|
|
|
55 |
protected $_speedyServiceInfo = array();
|
|
|
56 |
protected $_CODPrices = array();
|
|
|
57 |
protected $_doesRequestContainExactHour;
|
58 |
|
59 |
/**
|
111 |
|
112 |
try {
|
113 |
|
114 |
+
$this->_speedyEPSInterfaceImplementaion = new EPSSOAPInterfaceImpl(Mage::getStoreConfig('carriers/' . $this->_code . '/server'));
|
|
|
115 |
|
116 |
$this->_speedyEPS = new EPSFacade($this->_speedyEPSInterfaceImplementaion, $user, $pass);
|
117 |
|
567 |
$pickingData->documents = Mage::getStoreConfig('carriers/speedyshippingmodule/isDocuments');
|
568 |
$pickingData->palletized = false; // Флаг дали пратката се състои от палети
|
569 |
|
570 |
+
|
571 |
+
if (Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml') {
|
572 |
+
|
573 |
+
$quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();
|
574 |
+
} else {
|
575 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
576 |
+
}
|
577 |
+
|
578 |
+
$totals = $quote->getTotals();
|
579 |
+
$discount = null;
|
580 |
+
if (!is_null($totals) && array_key_exists('discount', $totals)) {
|
581 |
+
$discount = $totals["discount"]->getValue();
|
582 |
+
}
|
583 |
+
|
584 |
if (Mage::getStoreConfig('carriers/speedyshippingmodule/add_insurance')) {
|
585 |
|
586 |
|
593 |
}
|
594 |
|
595 |
|
596 |
+
|
597 |
+
|
598 |
+
|
599 |
+
$pickingData->amountInsuranceBase = ($this->_request->getBaseSubtotalInclTax() - abs($discount)) - $sumOfVirtualProducts;
|
600 |
|
601 |
|
602 |
$pickingData->payerTypeInsurance = ParamCalculation::PAYER_TYPE_RECEIVER;
|
633 |
// $pickingData->amountCODBase = $this->_request->getBaseSubtotalInclTax() - $sumOfVirtualProducts;
|
634 |
|
635 |
|
|
|
636 |
|
637 |
+
if (!is_null($discount)) {
|
638 |
+
$pickingData->amountCODBase = $this->_request->getBaseSubtotalInclTax() - abs($discount);
|
639 |
+
} else {
|
640 |
+
$pickingData->amountCODBase = $this->_request->getBaseSubtotalInclTax();
|
641 |
+
}
|
642 |
+
$isFixed = $isFixed = Mage::getStoreConfig('carriers/speedyshippingmodule/fixed_pricing_enable');
|
643 |
+
|
644 |
+
//Speedy calculator plus fixed handling charge
|
645 |
+
if ($isFixed == 3) {
|
646 |
+
$taxCalculator = Mage::helper('tax');
|
647 |
+
$chargeAmount = Mage::getStoreConfig('carriers/speedyshippingmodule/handlingCharge');
|
648 |
+
$chargeWithTaxApplied = $taxCalculator->getShippingPrice($chargeAmount, true);
|
649 |
+
$pickingData->amountCODBase += $chargeWithTaxApplied;
|
650 |
+
}
|
651 |
|
652 |
$isEnabled = Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable');
|
653 |
|
778 |
*
|
779 |
*/
|
780 |
//$allowedMethods = $this->_filterShippingMethods($methods);
|
781 |
+
$allowedMethods = $methods;
|
782 |
if (isset($allowedMethods)) {
|
783 |
|
784 |
$priceForMethod = $this->_calculatePrices($allowedMethods);
|
927 |
protected function _filterShippingMethods($arrAvailableServices) {
|
928 |
|
929 |
|
930 |
+
//GET CONFIG OPTIONS
|
931 |
|
932 |
+
$isFixedHourAllowed = Mage::getStoreConfig('carriers/speedyshippingmodule/add_fixed_hour');
|
933 |
+
$isBackDocumentsAllowed = Mage::getStoreConfig('carriers/speedyshippingmodule/back_documents');
|
934 |
+
$isBackReceiptAllowed = Mage::getStoreConfig('carriers/speedyshippingmodule/back_receipt');
|
935 |
+
$isInsuranceAllowed = Mage::getStoreConfig('carriers/speedyshippingmodule/add_insurance');
|
936 |
|
937 |
|
938 |
+
//CHECK IF DELIVERY ADDRESS IS AN OFFICE
|
939 |
+
$isCurrentAddressOffice = $this->_pickingData->takeFromOfficeId;
|
940 |
|
941 |
|
942 |
+
//Check if Speedy COD is available as a payment method
|
943 |
+
$isSpeedyCODAvailable = null;
|
944 |
+
$_speedy_payment_code = 'cashondelivery';
|
945 |
|
946 |
+
$allActivePaymentMethods = Mage::getModel('payment/config')->getActiveMethods();
|
947 |
|
948 |
+
foreach ($allActivePaymentMethods as $method) {
|
949 |
|
950 |
+
if ($method->getId() == $_speedy_payment_code) {
|
951 |
|
952 |
+
$isSpeedyCODAvailable = true;
|
953 |
+
break;
|
954 |
+
}
|
955 |
+
}
|
956 |
|
957 |
|
958 |
|
959 |
+
$counter = 0;
|
960 |
|
961 |
+
foreach ($arrAvailableServices as $service) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
962 |
|
963 |
+
if ($service->getErrorDescription()) {
|
964 |
+
unset($arrAvailableServices[$counter]);
|
965 |
+
$counter++;
|
966 |
+
continue;
|
967 |
+
} else {
|
968 |
+
$counter++;
|
969 |
+
}
|
970 |
+
}
|
971 |
+
/*
|
972 |
+
$serviceId = $service->getTypeId();
|
973 |
+
$this->_speedyServiceInfo[$serviceId] = array();
|
974 |
|
|
|
|
|
975 |
|
976 |
+
$this->_speedyServiceInfo[$serviceId]['fixed_hour'] =
|
977 |
+
$service->getAllowanceFixedTimeDelivery()->getValue();
|
978 |
|
979 |
+
$this->_speedyServiceInfo[$serviceId]['cod'] =
|
980 |
+
$service->getAllowanceCashOnDelivery()->getValue();
|
981 |
|
982 |
+
$this->_speedyServiceInfo[$serviceId]['insurance'] =
|
983 |
+
$service->getAllowanceInsurance()->getValue();
|
984 |
|
985 |
+
$this->_speedyServiceInfo[$serviceId]['to_be_called'] =
|
986 |
+
$service->getAllowanceToBeCalled()->getValue();
|
987 |
|
|
|
|
|
988 |
|
989 |
+
$this->_speedyServiceInfo[$serviceId]['back_receipt'] =
|
990 |
+
$service->getAllowanceBackReceiptRequest();
|
991 |
|
992 |
+
$this->_speedyServiceInfo[$serviceId]['back_documents'] =
|
993 |
+
$service->getAllowanceBackDocumentsRequest();
|
994 |
|
|
|
995 |
|
996 |
+
$removeServiceFromList = FALSE;
|
|
|
997 |
|
998 |
+
if ((!$isFixedHourAllowed || !isset($this->_pickingData->fixedTimeDelivery)) &&
|
999 |
+
($this->_speedyServiceInfo[$serviceId]['fixed_hour'] == 'REQUIRED')) {
|
1000 |
|
|
|
|
|
1001 |
|
1002 |
+
$removeServiceFromList = TRUE;
|
1003 |
+
}
|
1004 |
|
1005 |
+
if (!empty($this->_pickingData->fixedTimeDelivery) &&
|
1006 |
+
$this->_speedyServiceInfo[$serviceId]['fixed_hour'] == 'BANNED') {
|
1007 |
|
1008 |
+
$removeServiceFromList = TRUE;
|
1009 |
+
}
|
1010 |
|
1011 |
+
if ($isBackDocumentsAllowed &&
|
1012 |
+
($this->_speedyServiceInfo[$serviceId]['back_documents'] == 'BANNED')) {
|
|
|
1013 |
|
1014 |
+
$removeServiceFromList = TRUE;
|
1015 |
+
} else if (!$isBackDocumentsAllowed &&
|
1016 |
+
($this->_speedyServiceInfo[$serviceId]['back_documents'] == 'REQUIRED')) {
|
1017 |
|
1018 |
+
$removeServiceFromList = TRUE;
|
1019 |
+
}
|
1020 |
|
|
|
|
|
1021 |
|
1022 |
+
if ($isBackReceiptAllowed &&
|
1023 |
+
$this->_speedyServiceInfo[$serviceId]['back_documents'] == 'BANNED') {
|
|
|
1024 |
|
1025 |
+
$removeServiceFromList = TRUE;
|
1026 |
+
} else if (!$isBackReceiptAllowed &&
|
1027 |
+
$this->_speedyServiceInfo[$serviceId]['back_documents'] == 'REQUIRED') {
|
1028 |
|
1029 |
+
$removeServiceFromList = TRUE;
|
1030 |
+
}
|
1031 |
|
|
|
|
|
1032 |
|
1033 |
+
if (!$isInsuranceAllowed &&
|
1034 |
+
($this->_speedyServiceInfo[$serviceId]['insurance'] == 'REQUIRED')) {
|
|
|
1035 |
|
1036 |
+
$removeServiceFromList = TRUE;
|
1037 |
+
} else if ($isInsuranceAllowed &&
|
1038 |
+
($this->_speedyServiceInfo[$serviceId]['insurance'] == 'BANNED')) {
|
1039 |
|
1040 |
+
$removeServiceFromList = TRUE;
|
1041 |
+
}
|
1042 |
|
1043 |
+
if (!$isSpeedyCODAvailable &&
|
1044 |
+
($this->_speedyServiceInfo[$serviceId]['cod'] == 'REQUIRED')) {
|
1045 |
|
1046 |
+
$removeServiceFromList = TRUE;
|
1047 |
+
}
|
1048 |
|
1049 |
+
if (!$this->_pickingData->takeFromOfficeId &&
|
1050 |
+
($this->_speedyServiceInfo[$serviceId]['to_be_called'] == 'REQUIRED')) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1051 |
|
1052 |
+
$removeServiceFromList = TRUE;
|
1053 |
+
} else if ($this->_pickingData->takeFromOfficeId &&
|
1054 |
+
($this->_speedyServiceInfo[$serviceId]['to_be_called'] == 'BANNED')) {
|
1055 |
+
$removeServiceFromList = TRUE;
|
1056 |
+
}
|
1057 |
|
|
|
1058 |
|
1059 |
+
if ($removeServiceFromList) {
|
1060 |
+
unset($arrAvailableServices[$counter]);
|
1061 |
+
}
|
1062 |
+
$counter++;
|
1063 |
+
}
|
1064 |
+
*/
|
1065 |
+
|
1066 |
+
//reindex $arrAvailableServices
|
1067 |
+
|
1068 |
+
$arrAvailableServices = array_values($arrAvailableServices);
|
1069 |
+
|
1070 |
+
return $arrAvailableServices;
|
1071 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
|
1073 |
|
1074 |
+
// Определеляне на сечението между възможните услуги и конфигурираните за клиента услуги (списъка с услуги, с които клиента работи)
|
1075 |
+
//$arrSelectedServices = Util::serviceIntersection($arrAvailableServices, $methods);
|
1076 |
+
|
1077 |
+
/*
|
1078 |
+
$availableDates = array();
|
1079 |
+
//Retrieve the list of available days for picking
|
1080 |
+
foreach ($arrSelectedServices as $service) {
|
1081 |
+
$availableDates[$service] = $this->_speedyEPS->getAllowedDaysForTaking(
|
1082 |
+
$service, !isset($this->_pickingData->bringToOfficeId) ? $this->_senderData->address->siteID : null, $this->_pickingData->bringToOfficeId, null
|
1083 |
+
);
|
1084 |
+
}
|
1085 |
+
*/
|
1086 |
+
//Get the first available date for picking
|
1087 |
+
//$firstAvailableDate = array_shift($availableDates);
|
1088 |
+
//$this->_pickingData->takingDate = $firstAvailableDate[0];
|
1089 |
+
// Филтриране на списъка от възможни услуги според възможните стойности за тегло
|
1090 |
}
|
1091 |
|
1092 |
/**
|
1107 |
$paramCalculation->setBroughtToOffice($this->_pickingData->bringToOfficeId);
|
1108 |
|
1109 |
$paramCalculation->setAutoAdjustTakingDate(1);
|
1110 |
+
|
1111 |
+
if (Mage::getStoreConfig('carriers/speedyshippingmodule/deferredDays')) {
|
1112 |
$paramCalculation->setDeferredDeliveryWorkDays(Mage::getStoreConfig('carriers/speedyshippingmodule/deferredDays'));
|
1113 |
}
|
1114 |
+
|
1115 |
+
|
1116 |
$paramCalculation->setToBeCalled(isset($this->_pickingData->takeFromOfficeId));
|
1117 |
|
1118 |
$paramCalculation->setParcelsCount($this->_pickingData->parcelsCount);
|
1169 |
|
1170 |
$resultCalculation = $this->_speedyEPS->calculateMultipleServices($paramCalculation, $methods);
|
1171 |
$resultCalculation = $this->_filterShippingMethods($resultCalculation);
|
|
|
|
|
1172 |
} catch (ServerException $se) {
|
1173 |
|
1174 |
Mage::log($se->getMessage(), null, 'speedyLog.log');
|
1310 |
|
1311 |
$this->_CODPrices[$code] = $method->getResultInfo()->getAmounts()->getCodPremium();
|
1312 |
|
1313 |
+
|
1314 |
$taxCalculator = Mage::helper('tax');
|
1315 |
+
|
1316 |
|
1317 |
$isFixed = Mage::getStoreConfig('carriers/speedyshippingmodule/fixed_pricing_enable');
|
1318 |
|
1322 |
|
1323 |
|
1324 |
$total = $fixedPrice;
|
1325 |
+
} else if ($isFixed == 3) {
|
1326 |
$handlingAmount = Mage::getStoreConfig('carriers/speedyshippingmodule/handlingCharge');
|
1327 |
$total = $total + $taxCalculator->getShippingPrice($handlingAmount, FALSE);
|
1328 |
}
|
1329 |
|
1330 |
//Is fixed hour allowed for this particular service
|
1331 |
+
if (array_key_exists($method->getServiceTypeId(), $this->_speedyServiceInfo)) {
|
1332 |
+
$_fixedHour = $this->_speedyServiceInfo[$method->getServiceTypeId()]['fixed_hour'];
|
1333 |
+
//Is cash on delivery allowed for this particular service
|
1334 |
+
$_cod = $this->_speedyServiceInfo[$method->getServiceTypeId()]['cod'];
|
1335 |
}
|
1336 |
+
|
1337 |
+
|
1338 |
|
1339 |
if (!isset($this->_pickingData->fixedTimeDelivery)) {
|
1340 |
|
1361 |
$methodData = array();
|
1362 |
}
|
1363 |
|
1364 |
+
|
1365 |
|
1366 |
$fixed_time_amount = $method->getResultInfo()->getAmounts()->getFixedTimeDelivery();
|
1367 |
|
1409 |
|
1410 |
$isEnabled = Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_enable');
|
1411 |
|
1412 |
+
if (!(boolean) $isEnabled && !$request->getFreeShipping()) {
|
1413 |
|
1414 |
return;
|
1415 |
}
|
1427 |
$freeMethod = 'speedy_fixed_price';
|
1428 |
}
|
1429 |
|
1430 |
+
if (Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml') {
|
1431 |
|
1432 |
+
$quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();
|
1433 |
+
} else {
|
1434 |
+
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
1435 |
+
}
|
1436 |
|
1437 |
+
$totals = $quote->getTotals();
|
1438 |
+
$discount = null;
|
1439 |
+
if (!is_null($totals) && array_key_exists('discount', $totals)) {
|
1440 |
+
$discount = $totals["discount"]->getValue();
|
1441 |
+
}
|
1442 |
|
1443 |
+
$freeMethodSubtotal = Mage::getStoreConfig('carriers/speedyshippingmodule/free_shipping_subtotal');
|
1444 |
+
|
1445 |
+
if (!is_null($discount)) {
|
1446 |
+
$orderValue = $request->getBaseSubtotalInclTax() - abs($discount);
|
1447 |
+
} else {
|
1448 |
+
$orderValue = $request->getBaseSubtotalInclTax();
|
1449 |
+
}
|
1450 |
|
1451 |
+
|
1452 |
+
if ($orderValue >= $freeMethodSubtotal || $request->getFreeShipping()) {
|
1453 |
|
1454 |
$request->setFreeShipping(1);
|
1455 |
}
|
1724 |
}
|
1725 |
|
1726 |
}
|
|
app/code/community/Speedy/Speedyshipping/Model/Observer.php
CHANGED
@@ -378,6 +378,7 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
378 |
public function saveOrderAfter($evt) {
|
379 |
|
380 |
$order = $evt->getOrder();
|
|
|
381 |
$address = $order->getShippingAddress();
|
382 |
$session = Mage::getSingleton('checkout/session');
|
383 |
$paymentMethod = $order->getPayment()->getMethodInstance()->getInfoInstance()->getMethod();
|
@@ -468,7 +469,9 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
468 |
|
469 |
$freeInterCityMethod = Mage::getStoreConfig('carriers/speedyshippingmodule/free_method_intercity');
|
470 |
|
471 |
-
if (($code[1] == $freeCityMethod) ||
|
|
|
|
|
472 |
$isFreeShippingChoosen = TRUE;
|
473 |
}
|
474 |
}
|
@@ -478,7 +481,8 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
478 |
|
479 |
//Determine who should pay the price for the shipment
|
480 |
|
481 |
-
if ($isEnabled && ($order->getSubtotal() >= (float) $freeMethodSubtotal) && $isFreeShippingChoosen)
|
|
|
482 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_SENDER); //SENDER
|
483 |
} else {
|
484 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_RECEIVER); //RECEIVER
|
@@ -530,6 +534,7 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
530 |
}
|
531 |
$order = $evt->getOrder();
|
532 |
$address = $order->getShippingAddress();
|
|
|
533 |
$session = Mage::getSingleton('checkout/session');
|
534 |
$paymentMethod = $order->getPayment()->getMethodInstance()->getInfoInstance()->getMethod();
|
535 |
$carrierCode = $order->getShippingCarrier()->getCarrierCode();
|
@@ -611,7 +616,9 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
611 |
|
612 |
$freeInterCityMethod = Mage::getStoreConfig('carriers/speedyshippingmodule/free_method_intercity');
|
613 |
|
614 |
-
if (($code[1] == $freeCityMethod) ||
|
|
|
|
|
615 |
$isFreeShippingChoosen = TRUE;
|
616 |
}
|
617 |
}
|
@@ -619,7 +626,8 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
619 |
|
620 |
|
621 |
|
622 |
-
if ($isEnabled && ($order->getSubtotal() >= (float) $freeMethodSubtotal) && $isFreeShippingChoosen)
|
|
|
623 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_SENDER); //SENDER
|
624 |
} else {
|
625 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_RECEIVER); //RECEIVER
|
@@ -709,6 +717,7 @@ class Speedy_Speedyshipping_Model_Observer extends Varien_Object {
|
|
709 |
$speedyData->setBolCreatedMonth(null);
|
710 |
$speedyData->setBolCreatedYear(null);
|
711 |
$speedyData->setBolCreatedTime(null);
|
|
|
712 |
|
713 |
$transactionSave = Mage::getModel('core/resource_transaction');
|
714 |
|
378 |
public function saveOrderAfter($evt) {
|
379 |
|
380 |
$order = $evt->getOrder();
|
381 |
+
$shippingAmount = $order->getShippingAmount();
|
382 |
$address = $order->getShippingAddress();
|
383 |
$session = Mage::getSingleton('checkout/session');
|
384 |
$paymentMethod = $order->getPayment()->getMethodInstance()->getInfoInstance()->getMethod();
|
469 |
|
470 |
$freeInterCityMethod = Mage::getStoreConfig('carriers/speedyshippingmodule/free_method_intercity');
|
471 |
|
472 |
+
if (($code[1] == $freeCityMethod) ||
|
473 |
+
($code[1] == $freeInterCityMethod) ||
|
474 |
+
($shippingAmount == 0.000)) {
|
475 |
$isFreeShippingChoosen = TRUE;
|
476 |
}
|
477 |
}
|
481 |
|
482 |
//Determine who should pay the price for the shipment
|
483 |
|
484 |
+
if ( ($isEnabled && ($order->getSubtotal() >= (float) $freeMethodSubtotal) && $isFreeShippingChoosen) ||
|
485 |
+
$shippingAmount == 0.000) {
|
486 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_SENDER); //SENDER
|
487 |
} else {
|
488 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_RECEIVER); //RECEIVER
|
534 |
}
|
535 |
$order = $evt->getOrder();
|
536 |
$address = $order->getShippingAddress();
|
537 |
+
$shippingAmount = $order->getShippingAmount();
|
538 |
$session = Mage::getSingleton('checkout/session');
|
539 |
$paymentMethod = $order->getPayment()->getMethodInstance()->getInfoInstance()->getMethod();
|
540 |
$carrierCode = $order->getShippingCarrier()->getCarrierCode();
|
616 |
|
617 |
$freeInterCityMethod = Mage::getStoreConfig('carriers/speedyshippingmodule/free_method_intercity');
|
618 |
|
619 |
+
if (($code[1] == $freeCityMethod) ||
|
620 |
+
($code[1] == $freeInterCityMethod) ||
|
621 |
+
($shippingAmount == 0.000)) {
|
622 |
$isFreeShippingChoosen = TRUE;
|
623 |
}
|
624 |
}
|
626 |
|
627 |
|
628 |
|
629 |
+
if ( ($isEnabled && ($order->getSubtotal() >= (float) $freeMethodSubtotal) && $isFreeShippingChoosen) ||
|
630 |
+
$shippingAmount == 0.000) {
|
631 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_SENDER); //SENDER
|
632 |
} else {
|
633 |
$saveSpeedyData->setPayerType(ParamCalculation::PAYER_TYPE_RECEIVER); //RECEIVER
|
717 |
$speedyData->setBolCreatedMonth(null);
|
718 |
$speedyData->setBolCreatedYear(null);
|
719 |
$speedyData->setBolCreatedTime(null);
|
720 |
+
$speedyData->setBolDatetime(null);
|
721 |
|
722 |
$transactionSave = Mage::getModel('core/resource_transaction');
|
723 |
|
app/code/community/Speedy/Speedyshipping/controllers/Adminhtml/PrintController.php
CHANGED
@@ -662,10 +662,9 @@ $successString = '';
|
|
662 |
}
|
663 |
|
664 |
|
665 |
-
|
666 |
-
$this->_codAmount = $order->getBaseSubtotalInclTax();
|
667 |
//Substract the amount of virtual products from insurance premium sum
|
668 |
-
$this->_insuranceAmount = $order->getBaseSubtotalInclTax() - $sumOfVirtualProducts;
|
669 |
|
670 |
$totalWeight = $this->getRealWeight();
|
671 |
$receiverName = $this->_shippingAddress->getFirstname() . ' ' . $this->_shippingAddress->getLastname();
|
@@ -734,6 +733,7 @@ $successString = '';
|
|
734 |
$this->_speedyData->setBolCreatedDay($dateInfo['mday']);
|
735 |
$this->_speedyData->setBolCreatedMonth($dateInfo['mon']);
|
736 |
$this->_speedyData->setBolCreatedYear($dateInfo['year']);
|
|
|
737 |
|
738 |
|
739 |
|
@@ -764,9 +764,10 @@ $successString = '';
|
|
764 |
$currentHour = $this->_magentoTime->timestamp(strtotime("now"));
|
765 |
}
|
766 |
|
767 |
-
|
768 |
$currentHour = date('G:i:s', $currentHour);
|
769 |
|
|
|
770 |
$this->_speedyData->setBolCreatedTime($currentHour);
|
771 |
/*
|
772 |
$timeParts = $timeInfo ['hours'] .
|
@@ -919,6 +920,7 @@ $successString = '';
|
|
919 |
$speedyData->setBolCreatedMonth(null);
|
920 |
$speedyData->setBolCreatedYear(null);
|
921 |
$speedyData->setBolCreatedTime(null);
|
|
|
922 |
$speedyData->save();
|
923 |
|
924 |
$this->_speedyEPS->invalidatePicking($bolID);
|
662 |
}
|
663 |
|
664 |
|
665 |
+
$this->_codAmount = $order->getBaseSubtotalInclTax() - abs($order->getBaseDiscountAmount());
|
|
|
666 |
//Substract the amount of virtual products from insurance premium sum
|
667 |
+
$this->_insuranceAmount = ($order->getBaseSubtotalInclTax() - abs($order->getBaseDiscountAmount())) - $sumOfVirtualProducts;
|
668 |
|
669 |
$totalWeight = $this->getRealWeight();
|
670 |
$receiverName = $this->_shippingAddress->getFirstname() . ' ' . $this->_shippingAddress->getLastname();
|
733 |
$this->_speedyData->setBolCreatedDay($dateInfo['mday']);
|
734 |
$this->_speedyData->setBolCreatedMonth($dateInfo['mon']);
|
735 |
$this->_speedyData->setBolCreatedYear($dateInfo['year']);
|
736 |
+
$this->_speedyData->setBolDatetime(date("Y-m-d H:i:s"));
|
737 |
|
738 |
|
739 |
|
764 |
$currentHour = $this->_magentoTime->timestamp(strtotime("now"));
|
765 |
}
|
766 |
|
767 |
+
$this->_speedyData->setBolDatetime(date("Y-m-d H:i:s", $currentHour));
|
768 |
$currentHour = date('G:i:s', $currentHour);
|
769 |
|
770 |
+
|
771 |
$this->_speedyData->setBolCreatedTime($currentHour);
|
772 |
/*
|
773 |
$timeParts = $timeInfo ['hours'] .
|
920 |
$speedyData->setBolCreatedMonth(null);
|
921 |
$speedyData->setBolCreatedYear(null);
|
922 |
$speedyData->setBolCreatedTime(null);
|
923 |
+
$speedyData->setBolDatetime(null);
|
924 |
$speedyData->save();
|
925 |
|
926 |
$this->_speedyEPS->invalidatePicking($bolID);
|
app/code/community/Speedy/Speedyshipping/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Speedy_Speedyshipping>
|
5 |
-
<version>1.0.
|
6 |
<depends>
|
7 |
<Mage_Payment />
|
8 |
<Mage_Shipping />
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Speedy_Speedyshipping>
|
5 |
+
<version>1.0.8</version>
|
6 |
<depends>
|
7 |
<Mage_Payment />
|
8 |
<Mage_Shipping />
|
app/code/community/Speedy/Speedyshipping/sql/speedyshippingmodule_setup/mysql4-install-1.0.3.php
CHANGED
@@ -255,7 +255,7 @@ Mage::getSingleton('eav/config')
|
|
255 |
|
256 |
|
257 |
|
258 |
-
$order_address_table = $this->getTable('sales/order_address')
|
259 |
$quote_address_table = $this->getTable('sales/quote_address');
|
260 |
|
261 |
|
255 |
|
256 |
|
257 |
|
258 |
+
$order_address_table = $this->getTable('sales/order_address');
|
259 |
$quote_address_table = $this->getTable('sales/quote_address');
|
260 |
|
261 |
|
app/code/community/Speedy/Speedyshipping/sql/speedyshippingmodule_setup/mysql4-upgrade-1.0.7-1.0.8.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
$this->getConnection()->disallowDdlCache();
|
5 |
+
$this->getConnection()->resetDdlCache();
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$installer->run("ALTER TABLE `{$installer->getTable('speedyshippingmodule/saveorder')}` ADD COLUMN bol_datetime DATETIME DEFAULT NULL");
|
9 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/speedy_speedyshipping/sales/order/create/form/address.phtml
CHANGED
@@ -74,10 +74,10 @@ else:
|
|
74 |
<?php $hideElement = 'address-' . ($this->getIsShipping() ? 'shipping' : 'billing') . '-overlay'; ?>
|
75 |
<div style="display:none;" id="<?php echo $hideElement ?>" class="overlay"><span><?php echo $this->__('Shipping address selection is not applicable') ?></span></div>
|
76 |
<script type="text/javascript">
|
77 |
-
|
78 |
-
|
79 |
<?php if ($this->getIsShipping() && $this->getIsAsBilling()): ?>
|
80 |
-
|
81 |
<?php endif; ?>
|
82 |
</script>
|
83 |
</fieldset>
|
@@ -93,35 +93,87 @@ else:
|
|
93 |
var allowForcedOfficeChoice = 0;
|
94 |
|
95 |
$j('document').ready(function() {
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
<?php if ($this->getIsShipping()): ?>
|
99 |
var target = 'shipping';
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
106 |
|
107 |
-
|
108 |
<?php $reqData = Mage::app()->getRequest()->getPost('order'); ?>
|
109 |
|
110 |
<?php $currentAction = Mage::app()->getRequest()->getActionName(); ?>
|
111 |
-
<?php if (isset($reqData['shipping_address']['speedy_office_chooser'])
|
112 |
-
|
113 |
|
114 |
//document.getElementById('order-shipping_address_speedy_office_id').value = '';
|
115 |
|
116 |
-
<?php elseif (isset($reqData['shipping_address']['speedy_office_chooser'])
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
<?php endif; ?>
|
126 |
|
127 |
<?php else: ?>
|
@@ -130,13 +182,13 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
130 |
var shippingSiteNomenclature = null;
|
131 |
<?php endif; ?>
|
132 |
|
133 |
-
$j('#order-'+target+'_address_street0').parentsUntil('tr').parent().hide()
|
134 |
var isFullNomenclature = 0;
|
135 |
|
136 |
var isShippingSameAsBilling = $j('#order-shipping_same_as_billing').is(':checked');
|
137 |
-
|
138 |
-
$j('#order-shipping_same_as_billing').change(function(evt){
|
139 |
-
if(isFirstPageLoad == 0){
|
140 |
isFirstPageLoad = 2;
|
141 |
}
|
142 |
})
|
@@ -144,19 +196,19 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
144 |
var shouldAddressBeDisabled = $j('#order-' + target + '_address_customer_address_id').val();
|
145 |
if (shouldAddressBeDisabled) {
|
146 |
updateForm(target, null, true);
|
147 |
-
|
148 |
-
$j('#order-'+target+'_address_city').attr('readonly','readonly');
|
149 |
-
$j('#order-'+target+'_address_speedy_office_chooser').attr('disabled','disabled')
|
150 |
-
}else{
|
151 |
-
if(target== 'shipping' && !isShippingSameAsBilling){
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
}else{
|
156 |
updateForm(target, null, true);
|
157 |
}
|
158 |
}
|
159 |
-
|
160 |
/*
|
161 |
if(isShippingSameAsBilling){
|
162 |
updateForm(target,true)
|
@@ -168,10 +220,10 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
168 |
|
169 |
|
170 |
function checkIsOffice() {
|
171 |
-
|
172 |
-
|
173 |
if ($j('#' + baseFieldSelector + 'speedy_office_id').val() != false) {
|
174 |
-
|
175 |
$j('#' + baseFieldSelector + 'speedy_office_chooser').val(1)
|
176 |
officeName = $j('#' + baseFieldSelector + 'speedy_street_name').val();
|
177 |
$j('#' + baseFieldSelector + 'speedy_office_name').val($j('#' + baseFieldSelector + 'speedy_street_name').val())
|
@@ -229,7 +281,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
229 |
|
230 |
$j('#order-' + target + '_address_customer_address_id').change(function(evt) {
|
231 |
|
232 |
-
if(this.id == 'order-billing_address_customer_address_id' && isFirstPageLoad == 0){
|
233 |
isFirstPageLoad = 1;
|
234 |
}
|
235 |
|
@@ -255,11 +307,11 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
255 |
} else {
|
256 |
hideSpeedyAddressFields();
|
257 |
}
|
258 |
-
|
259 |
-
if(!$j(this).val()){
|
260 |
-
$j('#order-'+target+'_address_city').removeAttr('readonly');
|
261 |
-
}else{
|
262 |
-
$j('#order-'+target+'_address_city').attr('readonly','readonly');
|
263 |
}
|
264 |
|
265 |
|
@@ -278,8 +330,8 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
278 |
|
279 |
|
280 |
var evtTarget = $j(evt.target);
|
281 |
-
|
282 |
-
|
283 |
|
284 |
if (target == 'shipping') {
|
285 |
isFullNomenclature = shippingNomenclature;
|
@@ -308,6 +360,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
308 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
309 |
order.changeAddressField(event)
|
310 |
} else {
|
|
|
311 |
evtTarget.val(evtTarget.val().toUpperCase())
|
312 |
concatenateStreetAddress();
|
313 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
@@ -382,8 +435,17 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
382 |
}
|
383 |
|
384 |
} else if (evtTarget.attr('id') != baseFieldSelector + 'city' && evtTarget.attr('id') != baseFieldSelector + 'speedy_office_chooser') {
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
-
|
|
|
|
|
|
|
387 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
388 |
order.changeAddressField(event)
|
389 |
}
|
@@ -397,7 +459,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
397 |
evtTarget.val('')
|
398 |
$j('#' + baseFieldSelector + 'speedy_street_id').val('');
|
399 |
concatenateStreetAddress();
|
400 |
-
|
401 |
order.changeAddressField(event)
|
402 |
}
|
403 |
|
@@ -482,6 +544,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
482 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
483 |
order.changeAddressField(event)
|
484 |
} else {
|
|
|
485 |
evtTarget.val(evtTarget.val().toUpperCase())
|
486 |
concatenateStreetAddress();
|
487 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
@@ -489,7 +552,16 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
489 |
}
|
490 |
|
491 |
} else if (evtTarget.attr('id') != baseFieldSelector + 'city' && evtTarget.attr('id') != baseFieldSelector + 'speedy_office_chooser') {
|
492 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
494 |
order.changeAddressField(event)
|
495 |
}
|
@@ -560,6 +632,9 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
560 |
|
561 |
|
562 |
_initListeners(target);
|
|
|
|
|
|
|
563 |
|
564 |
initOfficeChooser(target);
|
565 |
|
@@ -594,14 +669,14 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
594 |
if ($j(this).val() != false) {
|
595 |
|
596 |
hideSpeedyAddressFields()
|
597 |
-
|
598 |
-
var zipCode = $j('#order-'+target+'_address_postcode').val();
|
599 |
-
var regionCode = $j('#order-'+target+'_address_region').val();
|
600 |
-
|
601 |
updateForm(target)
|
602 |
-
$j('#order-'+target+'_address_postcode').val(zipCode)
|
603 |
-
$j('#order-'+target+'_address_region').val(regionCode);
|
604 |
-
|
605 |
$j(this).removeAttr('disabled')
|
606 |
$j('#order-' + target + '_address_speedy_office_name').removeAttr('readonly')
|
607 |
|
@@ -610,23 +685,23 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
610 |
$j('#order-' + target + '_address_speedy_street_name').val('');
|
611 |
$j('#order-' + target + '_address_speedy_office_name').val('')
|
612 |
$j('#order-' + target + '_address_speedy_office_id').val('');
|
613 |
-
|
614 |
-
|
615 |
-
var regionCode = $j('#order-'+target+'_address_region').val();
|
616 |
-
|
617 |
-
updateForm(target,true);
|
618 |
-
$j('#order-'+target+'_address_postcode').val(zipCode)
|
619 |
-
$j('#order-'+target+'_address_region').val(regionCode);
|
620 |
-
|
621 |
showSpeedyAddressFields();
|
622 |
concatenateStreetAddress();
|
623 |
-
|
624 |
-
|
625 |
|
626 |
}
|
627 |
|
628 |
-
|
629 |
-
|
630 |
|
631 |
});
|
632 |
}
|
@@ -650,7 +725,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
650 |
$j('#order-' + activeTarget + '_address_customer_address_id').change(function(evt) {
|
651 |
isValidAddress = $j(this).val();
|
652 |
if (isValidAddress) {
|
653 |
-
|
654 |
updateForm(activeTarget, null, true)
|
655 |
} else {
|
656 |
updateForm(activeTarget, true)
|
@@ -676,8 +751,8 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
676 |
});
|
677 |
}
|
678 |
, minLength: 1
|
679 |
-
|
680 |
-
|
681 |
updateForm(activeTarget)
|
682 |
updateForm(activeTarget, true);
|
683 |
// clearForm();
|
@@ -699,7 +774,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
699 |
if (ui.item.is_full_nomenclature == 'NO') {
|
700 |
if (target == 'shipping') {
|
701 |
|
702 |
-
shippingNomenclature
|
703 |
}
|
704 |
isFullNomenclature = 'NO';
|
705 |
disableAutocomplete()
|
@@ -736,25 +811,26 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
736 |
cityid: $j('#order-' + activeTarget + '_address_speedy_site_id').val()
|
737 |
},
|
738 |
success: function(data) {
|
739 |
-
|
740 |
|
741 |
-
|
|
|
742 |
response(data);
|
743 |
}
|
744 |
});
|
745 |
}
|
746 |
-
,response: function(event, ui){
|
747 |
-
|
748 |
|
749 |
}
|
750 |
, minLength: 0
|
751 |
-
|
752 |
$j(this).val(ui.item.label);
|
753 |
officeName = ui.item.label;
|
754 |
concatenateStreetAddress();
|
755 |
$j('#order-' + activeTarget + '_address_speedy_office_id').val(ui.item.value);
|
756 |
$j('#order-' + activeTarget + '_address_speedy_street_name').val(ui.item.label).attr('readonly', 'readonly');
|
757 |
$j('#order-' + activeTarget + '_address_street0').val(ui.item.label)
|
|
|
758 |
// concatenateStreetAddress();
|
759 |
|
760 |
//do not delete this
|
@@ -790,7 +866,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
790 |
});
|
791 |
}
|
792 |
, minLength: 1
|
793 |
-
|
794 |
$j(this).val(ui.item.label);
|
795 |
concatenateStreetAddress();
|
796 |
quarterName = ui.item.label;
|
@@ -816,7 +892,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
816 |
});
|
817 |
}
|
818 |
, minLength: 1
|
819 |
-
|
820 |
$j(this).val(ui.item.label);
|
821 |
concatenateStreetAddress();
|
822 |
streetName = ui.item.label;
|
@@ -846,7 +922,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
846 |
});
|
847 |
}
|
848 |
, minLength: 1
|
849 |
-
|
850 |
$j(this).val(ui.item.label);
|
851 |
concatenateStreetAddress();
|
852 |
// $j('#order-' + activeTarget + '_address_speedy_street_id').val(ui.item.value)
|
@@ -869,6 +945,35 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
869 |
|
870 |
}
|
871 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
872 |
|
873 |
$j('#order-' + target + '_address_speedy_office_chooser').change(function(evt) {
|
874 |
if (isShippingSameAsBilling) {
|
@@ -982,7 +1087,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
982 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
983 |
#order-' + activeTarget + '_address_speedy_office_id')
|
984 |
.removeAttr('readonly');
|
985 |
-
$j('#order-'+activeTarget+'_address_speedy_office_chooser').removeAttr('disabled')
|
986 |
} else if (clear) {
|
987 |
$j('#order-' + activeTarget + '_address_speedy_street_name,#order-' + activeTarget + '_address_street1,\n\
|
988 |
#order-' + activeTarget + '_address_speedy_street_id,#order-' + activeTarget + '_address_speedy_quarter_name,\n\
|
@@ -999,7 +1104,7 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
999 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
1000 |
#order-' + activeTarget + '_address_speedy_office_id')
|
1001 |
.attr('readonly', 'readonly');
|
1002 |
-
$j('#order-'+activeTarget+'_address_speedy_office_chooser').attr('disabled','disabled')
|
1003 |
}
|
1004 |
else {
|
1005 |
|
@@ -1018,8 +1123,8 @@ $j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').
|
|
1018 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
1019 |
#order-' + activeTarget + '_address_speedy_office_id')
|
1020 |
.attr('readonly', 'readonly').val('');
|
1021 |
-
$j('#order-'+activeTarget+'_address_speedy_office_chooser').attr('disabled','disabled')
|
1022 |
-
|
1023 |
}
|
1024 |
|
1025 |
}
|
74 |
<?php $hideElement = 'address-' . ($this->getIsShipping() ? 'shipping' : 'billing') . '-overlay'; ?>
|
75 |
<div style="display:none;" id="<?php echo $hideElement ?>" class="overlay"><span><?php echo $this->__('Shipping address selection is not applicable') ?></span></div>
|
76 |
<script type="text/javascript">
|
77 |
+
// order.bindAddressFields('<?php echo $_fieldsContainerId ?>');
|
78 |
+
order.bindAddressFields('<?php echo $_addressChoiceContainerId ?>');
|
79 |
<?php if ($this->getIsShipping() && $this->getIsAsBilling()): ?>
|
80 |
+
order.disableShippingAddress(true);
|
81 |
<?php endif; ?>
|
82 |
</script>
|
83 |
</fieldset>
|
93 |
var allowForcedOfficeChoice = 0;
|
94 |
|
95 |
$j('document').ready(function() {
|
96 |
+
|
97 |
+
//<?php if (Mage::getVersion() == '1.8.0.0' || Mage::getVersion() == '1.8.1.0'): ?>
|
98 |
+
|
99 |
+
// AdminOrder.addMethods({
|
100 |
+
// resetShippingMethod : function(data){
|
101 |
+
// data['reset_shipping'] = 1;
|
102 |
+
// this.isShippingMethodReseted = true;
|
103 |
+
// this.loadArea(['shipping_method', 'billing_method', 'shipping_address', 'totals', 'giftmessage', 'items'], true, data);
|
104 |
+
// },
|
105 |
+
// changeAddressField : function(event){
|
106 |
+
// var field = Event.element(event);
|
107 |
+
// var re = /[^\[]*\[([^\]]*)_address\]\[([^\]]*)\](\[(\d)\])?/;
|
108 |
+
// var matchRes = field.name.match(re);
|
109 |
+
//
|
110 |
+
// if (!matchRes) {
|
111 |
+
// return;
|
112 |
+
// }
|
113 |
+
//
|
114 |
+
// var type = matchRes[1];
|
115 |
+
// var name = matchRes[2];
|
116 |
+
// var data;
|
117 |
+
//
|
118 |
+
// if(this.isBillingField(field.id)){
|
119 |
+
// data = this.serializeData(this.billingAddressContainer)
|
120 |
+
// }
|
121 |
+
// else{
|
122 |
+
// data = this.serializeData(this.shippingAddressContainer)
|
123 |
+
// }
|
124 |
+
// data = data.toObject();
|
125 |
+
//
|
126 |
+
// if( (type == 'billing' && this.shippingAsBilling)
|
127 |
+
// || (type == 'shipping' && !this.shippingAsBilling) ) {
|
128 |
+
// data['reset_shipping'] = true;
|
129 |
+
// }
|
130 |
+
//
|
131 |
+
// data['order['+type+'_address][customer_address_id]'] = $('order-'+type+'_address_customer_address_id').value;
|
132 |
+
//
|
133 |
+
// if (data['reset_shipping']) {
|
134 |
+
// this.resetShippingMethod(data);
|
135 |
+
// }
|
136 |
+
// else {
|
137 |
+
// this.saveData(data);
|
138 |
+
// if (name == 'country_id' || name == 'customer_address_id') {
|
139 |
+
// this.loadArea(['shipping_method', 'billing_method', 'totals', 'items'], true, data);
|
140 |
+
// }
|
141 |
+
// // added for reloading of default sender and default recipient for giftmessages
|
142 |
+
// //this.loadArea(['giftmessage'], true, data);
|
143 |
+
// }
|
144 |
+
// }
|
145 |
+
// });
|
146 |
+
//<?php endif; ?>
|
147 |
+
|
148 |
+
$j('button#submit_order_top_button,button.save[id!="submit_order_top_button"]').removeAttr('onclick');
|
149 |
|
150 |
<?php if ($this->getIsShipping()): ?>
|
151 |
var target = 'shipping';
|
152 |
|
153 |
+
if (isFirstPageLoad <= 1) {
|
154 |
+
var billingAddressId = $j('#order-billing_address_customer_address_id').val()
|
155 |
+
$j('#order-shipping_address_customer_address_id').val(billingAddressId);
|
156 |
+
isFirstPageLoad++;
|
157 |
+
}
|
158 |
+
|
159 |
|
|
|
160 |
<?php $reqData = Mage::app()->getRequest()->getPost('order'); ?>
|
161 |
|
162 |
<?php $currentAction = Mage::app()->getRequest()->getActionName(); ?>
|
163 |
+
<?php if (isset($reqData['shipping_address']['speedy_office_chooser']) && $reqData['shipping_address']['speedy_office_chooser'] == 0 && $currentAction == 'loadBlock' && !$this->getIsAsBilling()):
|
164 |
+
?>
|
165 |
|
166 |
//document.getElementById('order-shipping_address_speedy_office_id').value = '';
|
167 |
|
168 |
+
<?php elseif (isset($reqData['shipping_address']['speedy_office_chooser']) && $reqData['shipping_address']['speedy_office_chooser'] == 1):
|
169 |
+
?>
|
170 |
+
|
171 |
+
<?php if (array_key_exists('customer_address_id', $reqData['shipping_address'])): ?>
|
172 |
+
<?php if (!$reqData['shipping_address']['customer_address_id']): ?>
|
173 |
+
allowForcedOfficeChoice = 1;
|
174 |
+
<?php endif; ?>
|
175 |
+
|
176 |
+
<?php endif; ?>
|
177 |
<?php endif; ?>
|
178 |
|
179 |
<?php else: ?>
|
182 |
var shippingSiteNomenclature = null;
|
183 |
<?php endif; ?>
|
184 |
|
185 |
+
$j('#order-' + target + '_address_street0').parentsUntil('tr').parent().hide()
|
186 |
var isFullNomenclature = 0;
|
187 |
|
188 |
var isShippingSameAsBilling = $j('#order-shipping_same_as_billing').is(':checked');
|
189 |
+
|
190 |
+
$j('#order-shipping_same_as_billing').change(function(evt) {
|
191 |
+
if (isFirstPageLoad == 0) {
|
192 |
isFirstPageLoad = 2;
|
193 |
}
|
194 |
})
|
196 |
var shouldAddressBeDisabled = $j('#order-' + target + '_address_customer_address_id').val();
|
197 |
if (shouldAddressBeDisabled) {
|
198 |
updateForm(target, null, true);
|
199 |
+
|
200 |
+
$j('#order-' + target + '_address_city').attr('readonly', 'readonly');
|
201 |
+
$j('#order-' + target + '_address_speedy_office_chooser').attr('disabled', 'disabled')
|
202 |
+
} else {
|
203 |
+
if (target == 'shipping' && !isShippingSameAsBilling) {
|
204 |
+
|
205 |
+
updateForm(target, true);
|
206 |
+
$j('#order-' + target + '_address_city').removeAttr('readonly');
|
207 |
+
} else {
|
208 |
updateForm(target, null, true);
|
209 |
}
|
210 |
}
|
211 |
+
|
212 |
/*
|
213 |
if(isShippingSameAsBilling){
|
214 |
updateForm(target,true)
|
220 |
|
221 |
|
222 |
function checkIsOffice() {
|
223 |
+
|
224 |
+
|
225 |
if ($j('#' + baseFieldSelector + 'speedy_office_id').val() != false) {
|
226 |
+
|
227 |
$j('#' + baseFieldSelector + 'speedy_office_chooser').val(1)
|
228 |
officeName = $j('#' + baseFieldSelector + 'speedy_street_name').val();
|
229 |
$j('#' + baseFieldSelector + 'speedy_office_name').val($j('#' + baseFieldSelector + 'speedy_street_name').val())
|
281 |
|
282 |
$j('#order-' + target + '_address_customer_address_id').change(function(evt) {
|
283 |
|
284 |
+
if (this.id == 'order-billing_address_customer_address_id' && isFirstPageLoad == 0) {
|
285 |
isFirstPageLoad = 1;
|
286 |
}
|
287 |
|
307 |
} else {
|
308 |
hideSpeedyAddressFields();
|
309 |
}
|
310 |
+
|
311 |
+
if (!$j(this).val()) {
|
312 |
+
$j('#order-' + target + '_address_city').removeAttr('readonly');
|
313 |
+
} else {
|
314 |
+
$j('#order-' + target + '_address_city').attr('readonly', 'readonly');
|
315 |
}
|
316 |
|
317 |
|
330 |
|
331 |
|
332 |
var evtTarget = $j(evt.target);
|
333 |
+
|
334 |
+
|
335 |
|
336 |
if (target == 'shipping') {
|
337 |
isFullNomenclature = shippingNomenclature;
|
360 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
361 |
order.changeAddressField(event)
|
362 |
} else {
|
363 |
+
|
364 |
evtTarget.val(evtTarget.val().toUpperCase())
|
365 |
concatenateStreetAddress();
|
366 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
435 |
}
|
436 |
|
437 |
} else if (evtTarget.attr('id') != baseFieldSelector + 'city' && evtTarget.attr('id') != baseFieldSelector + 'speedy_office_chooser') {
|
438 |
+
|
439 |
+
var skipElements = ['order-shipping_address_firstname',
|
440 |
+
'order-shipping_address_lastname',
|
441 |
+
'order-shipping_address_middlename',
|
442 |
+
'order-shipping_address_company'];
|
443 |
+
|
444 |
|
445 |
+
|
446 |
+
if (skipElements.indexOf(evt.target.id) == -1) {
|
447 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
448 |
+
}
|
449 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
450 |
order.changeAddressField(event)
|
451 |
}
|
459 |
evtTarget.val('')
|
460 |
$j('#' + baseFieldSelector + 'speedy_street_id').val('');
|
461 |
concatenateStreetAddress();
|
462 |
+
var event = {type: 'change', target: this, srcElement: evt.target}
|
463 |
order.changeAddressField(event)
|
464 |
}
|
465 |
|
544 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
545 |
order.changeAddressField(event)
|
546 |
} else {
|
547 |
+
|
548 |
evtTarget.val(evtTarget.val().toUpperCase())
|
549 |
concatenateStreetAddress();
|
550 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
552 |
}
|
553 |
|
554 |
} else if (evtTarget.attr('id') != baseFieldSelector + 'city' && evtTarget.attr('id') != baseFieldSelector + 'speedy_office_chooser') {
|
555 |
+
var skipElements = ['order-billing_address_firstname',
|
556 |
+
'order-billing_address_lastname',
|
557 |
+
'order-billing_address_middlename',
|
558 |
+
'order-billing_address_company'];
|
559 |
+
|
560 |
+
|
561 |
+
|
562 |
+
if (skipElements.indexOf(evt.target.id) == -1) {
|
563 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
564 |
+
}
|
565 |
var event = {type: 'change', target: this, srcElement: evt.target}
|
566 |
order.changeAddressField(event)
|
567 |
}
|
632 |
|
633 |
|
634 |
_initListeners(target);
|
635 |
+
if (shippingNomenclature == 'NO') {
|
636 |
+
disableAutocomplete();
|
637 |
+
}
|
638 |
|
639 |
initOfficeChooser(target);
|
640 |
|
669 |
if ($j(this).val() != false) {
|
670 |
|
671 |
hideSpeedyAddressFields()
|
672 |
+
|
673 |
+
var zipCode = $j('#order-' + target + '_address_postcode').val();
|
674 |
+
var regionCode = $j('#order-' + target + '_address_region').val();
|
675 |
+
|
676 |
updateForm(target)
|
677 |
+
$j('#order-' + target + '_address_postcode').val(zipCode)
|
678 |
+
$j('#order-' + target + '_address_region').val(regionCode);
|
679 |
+
|
680 |
$j(this).removeAttr('disabled')
|
681 |
$j('#order-' + target + '_address_speedy_office_name').removeAttr('readonly')
|
682 |
|
685 |
$j('#order-' + target + '_address_speedy_street_name').val('');
|
686 |
$j('#order-' + target + '_address_speedy_office_name').val('')
|
687 |
$j('#order-' + target + '_address_speedy_office_id').val('');
|
688 |
+
|
689 |
+
var zipCode = $j('#order-' + target + '_address_postcode').val();
|
690 |
+
var regionCode = $j('#order-' + target + '_address_region').val();
|
691 |
+
|
692 |
+
updateForm(target, true);
|
693 |
+
$j('#order-' + target + '_address_postcode').val(zipCode)
|
694 |
+
$j('#order-' + target + '_address_region').val(regionCode);
|
695 |
+
|
696 |
showSpeedyAddressFields();
|
697 |
concatenateStreetAddress();
|
698 |
+
|
699 |
+
|
700 |
|
701 |
}
|
702 |
|
703 |
+
var event = {type: 'change', target: this, srcElement: evt.target}
|
704 |
+
order.changeAddressField(event)
|
705 |
|
706 |
});
|
707 |
}
|
725 |
$j('#order-' + activeTarget + '_address_customer_address_id').change(function(evt) {
|
726 |
isValidAddress = $j(this).val();
|
727 |
if (isValidAddress) {
|
728 |
+
|
729 |
updateForm(activeTarget, null, true)
|
730 |
} else {
|
731 |
updateForm(activeTarget, true)
|
751 |
});
|
752 |
}
|
753 |
, minLength: 1
|
754 |
+
, select: function(event, ui) {
|
755 |
+
|
756 |
updateForm(activeTarget)
|
757 |
updateForm(activeTarget, true);
|
758 |
// clearForm();
|
774 |
if (ui.item.is_full_nomenclature == 'NO') {
|
775 |
if (target == 'shipping') {
|
776 |
|
777 |
+
shippingNomenclature = 'NO';
|
778 |
}
|
779 |
isFullNomenclature = 'NO';
|
780 |
disableAutocomplete()
|
811 |
cityid: $j('#order-' + activeTarget + '_address_speedy_site_id').val()
|
812 |
},
|
813 |
success: function(data) {
|
|
|
814 |
|
815 |
+
|
816 |
+
|
817 |
response(data);
|
818 |
}
|
819 |
});
|
820 |
}
|
821 |
+
, response: function(event, ui) {
|
822 |
+
$j(this).autocomplete("option", "disabled", false);
|
823 |
|
824 |
}
|
825 |
, minLength: 0
|
826 |
+
, select: function(event, ui) {
|
827 |
$j(this).val(ui.item.label);
|
828 |
officeName = ui.item.label;
|
829 |
concatenateStreetAddress();
|
830 |
$j('#order-' + activeTarget + '_address_speedy_office_id').val(ui.item.value);
|
831 |
$j('#order-' + activeTarget + '_address_speedy_street_name').val(ui.item.label).attr('readonly', 'readonly');
|
832 |
$j('#order-' + activeTarget + '_address_street0').val(ui.item.label)
|
833 |
+
initSiteData(ui, activeTarget);
|
834 |
// concatenateStreetAddress();
|
835 |
|
836 |
//do not delete this
|
866 |
});
|
867 |
}
|
868 |
, minLength: 1
|
869 |
+
, select: function(event, ui) {
|
870 |
$j(this).val(ui.item.label);
|
871 |
concatenateStreetAddress();
|
872 |
quarterName = ui.item.label;
|
892 |
});
|
893 |
}
|
894 |
, minLength: 1
|
895 |
+
, select: function(event, ui) {
|
896 |
$j(this).val(ui.item.label);
|
897 |
concatenateStreetAddress();
|
898 |
streetName = ui.item.label;
|
922 |
});
|
923 |
}
|
924 |
, minLength: 1
|
925 |
+
, select: function(event, ui) {
|
926 |
$j(this).val(ui.item.label);
|
927 |
concatenateStreetAddress();
|
928 |
// $j('#order-' + activeTarget + '_address_speedy_street_id').val(ui.item.value)
|
945 |
|
946 |
}
|
947 |
|
948 |
+
function initSiteData(jsonResponse, target) {
|
949 |
+
$j('#order-' + target + '_address_speedy_site_id').val(jsonResponse.item.site_id)
|
950 |
+
|
951 |
+
$j('#order-' + target + '_address_postcode').val(jsonResponse.item.post_code)
|
952 |
+
|
953 |
+
//$j('#order-' + target + '_address_country_id').val('BG');
|
954 |
+
$j('#order-' + target + '_address_city').val(jsonResponse.item.site_name);
|
955 |
+
$j('#order-' + target + '_address_region_id').removeClass('required-entry validate-select validation-failed').hide();
|
956 |
+
|
957 |
+
$j('#order-' + target + '_address_region').show().val(jsonResponse.item.region)
|
958 |
+
|
959 |
+
|
960 |
+
siteName = jsonResponse.item.site_name;
|
961 |
+
$j('#city').val(siteName);
|
962 |
+
if (jsonResponse.item.is_full_nomenclature == 'NO') {
|
963 |
+
isFullNomenclature = 'NO';
|
964 |
+
disableAutocomplete()
|
965 |
+
} else if (jsonResponse.item.is_full_nomenclature == 'PARTIAL') {
|
966 |
+
|
967 |
+
isFullNomenclature = 'PARTIAL';
|
968 |
+
enableAutocomplete();
|
969 |
+
} else {
|
970 |
+
isFullNomenclature = 'FULL';
|
971 |
+
enableAutocomplete();
|
972 |
+
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
|
977 |
|
978 |
$j('#order-' + target + '_address_speedy_office_chooser').change(function(evt) {
|
979 |
if (isShippingSameAsBilling) {
|
1087 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
1088 |
#order-' + activeTarget + '_address_speedy_office_id')
|
1089 |
.removeAttr('readonly');
|
1090 |
+
$j('#order-' + activeTarget + '_address_speedy_office_chooser').removeAttr('disabled')
|
1091 |
} else if (clear) {
|
1092 |
$j('#order-' + activeTarget + '_address_speedy_street_name,#order-' + activeTarget + '_address_street1,\n\
|
1093 |
#order-' + activeTarget + '_address_speedy_street_id,#order-' + activeTarget + '_address_speedy_quarter_name,\n\
|
1104 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
1105 |
#order-' + activeTarget + '_address_speedy_office_id')
|
1106 |
.attr('readonly', 'readonly');
|
1107 |
+
$j('#order-' + activeTarget + '_address_speedy_office_chooser').attr('disabled', 'disabled')
|
1108 |
}
|
1109 |
else {
|
1110 |
|
1123 |
#order-' + activeTarget + '_address_speedy_office_name,\n\
|
1124 |
#order-' + activeTarget + '_address_speedy_office_id')
|
1125 |
.attr('readonly', 'readonly').val('');
|
1126 |
+
$j('#order-' + activeTarget + '_address_speedy_office_chooser').attr('disabled', 'disabled')
|
1127 |
+
|
1128 |
}
|
1129 |
|
1130 |
}
|
app/design/frontend/base/default/template/speedy_speedyshipping/checkout/onepage/billing.phtml
CHANGED
@@ -70,39 +70,39 @@
|
|
70 |
</div>
|
71 |
</li>
|
72 |
<li>
|
73 |
-
|
74 |
</li>
|
75 |
<li>
|
76 |
-
|
77 |
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
<ul>
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
|
100 |
</ul>
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
107 |
|
108 |
<div id="billing:speedy_normal_address" style="display: none">
|
@@ -110,76 +110,76 @@
|
|
110 |
<div id="billing:speedy_normal_address">
|
111 |
|
112 |
<?php endif; ?>
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
<div class="input-box">
|
129 |
-
<input type="text" name="billing[speedy_street_name]" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedyStreetName()) ?>" id="billing:speedy_street" class="input-text" />
|
130 |
-
</div>
|
131 |
-
<div class="street_holder" style="display: none">
|
132 |
-
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
133 |
<div class="input-box">
|
134 |
-
<input type="text"
|
135 |
</div>
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
|
153 |
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
</div>
|
161 |
-
<div class="field">
|
162 |
-
<label for=""><?php echo $this->__("Floor") ?></label>
|
163 |
-
<div class="input-box">
|
164 |
-
<input type="text" name="billing[speedy_floor]" id="billing:speedy_floor" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyFloor()) ?>"/></div>
|
165 |
-
</div>
|
166 |
-
</li>
|
167 |
-
<li class="fields">
|
168 |
-
<div class="field">
|
169 |
-
<label for=""><?php echo $this->__("Apartment") ?></label>
|
170 |
-
<div class="input-box">
|
171 |
-
<input type="text" name="billing[speedy_apartment]" id="billing:speedy_apartment" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyApartment()) ?>" /></div>
|
172 |
-
</div>
|
173 |
-
</li>
|
174 |
-
<li class="wide">
|
175 |
-
<div class="field">
|
176 |
-
<label for=""><?php echo $this->__("Address note") ?></label>
|
177 |
-
<div class="input-box">
|
178 |
-
<input class="input-text" id="billing:speedy_address_note" type="text" name="billing[speedy_address_note]" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyAddressNote()) ?>" />
|
179 |
</div>
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
</div>
|
184 |
<li class="fields">
|
185 |
<div class="field">
|
@@ -270,7 +270,7 @@
|
|
270 |
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()): ?>
|
271 |
|
272 |
<li class="control">
|
273 |
-
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping)
|
274 |
shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
275 |
</li>
|
276 |
<?php else: ?>
|
@@ -301,582 +301,629 @@
|
|
301 |
</span>
|
302 |
</div>
|
303 |
|
304 |
-
</ul>
|
305 |
-
|
306 |
|
307 |
-
</form>
|
308 |
-
<script type="text/javascript">
|
309 |
-
//<![CDATA[
|
310 |
-
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
311 |
-
var billingForm = new VarienForm('co-billing-form');
|
312 |
|
313 |
-
|
314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
|
316 |
-
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
|
317 |
-
//]]>
|
318 |
-
var isNewBillingAddress = false;
|
319 |
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
$j('document').ready(function() {
|
324 |
|
|
|
|
|
|
|
|
|
325 |
|
326 |
|
327 |
-
var siteName = '';
|
328 |
-
var quarterName = '';
|
329 |
-
var streetName = '';
|
330 |
-
var blokName = '';
|
331 |
-
var officeName = '';
|
332 |
|
|
|
333 |
|
334 |
-
function initFields() {
|
335 |
|
336 |
-
if ($j('#billing\\:speedy_quarter_name').val() != '') {
|
337 |
-
quarterName = $j('#billing\\:speedy_quarter_name').val();
|
338 |
-
}
|
339 |
|
|
|
|
|
|
|
340 |
|
341 |
-
|
342 |
-
streetName = $j('#billing\\:street_1').val();
|
343 |
-
}
|
344 |
|
|
|
345 |
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
349 |
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
354 |
|
355 |
|
|
|
356 |
|
357 |
-
|
|
|
|
|
|
|
358 |
|
359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
|
361 |
-
function checkFields(evt) {
|
362 |
-
var evtTarget = $j(evt.target);
|
363 |
-
if (evtTarget.attr('id') == 'billing:city') {
|
364 |
|
365 |
-
if (siteName != evtTarget.val()) {
|
366 |
|
367 |
-
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
updateForm();
|
374 |
-
} else if (evtTarget.val() == "") {
|
375 |
|
376 |
-
updateForm();
|
377 |
-
$j('#billing\\:speedy_site_id').val('')
|
378 |
-
$j('#zip').val('')
|
379 |
-
} else {
|
380 |
-
// updateForm(true);
|
381 |
-
}
|
382 |
-
}
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
|
385 |
-
if (evtTarget.attr('id') == 'billing:speedy_street') {
|
386 |
|
387 |
-
|
388 |
-
evtTarget.val('')
|
389 |
-
$j('#billing\\:speedy_street_id').val('');
|
390 |
-
}
|
391 |
|
392 |
|
393 |
-
|
394 |
-
|
395 |
-
$j('#billing\\:speedy_street_id').val('');
|
396 |
-
} else if ($j('#billing\\:speedy_street_id').val() != '' && isFullNomenclature != 'FULL' && evtTarget.val() != streetName) {
|
397 |
-
evtTarget.val('')
|
398 |
-
$j('#billing\\:speedy_street_id').val('');
|
399 |
-
} else if (isFullNomenclature == 'NO' || isFullNomenclature == 'PARTIAL') {
|
400 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
401 |
-
}
|
402 |
|
|
|
|
|
|
|
403 |
|
404 |
|
405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
|
|
|
412 |
|
413 |
-
else if (evtTarget.val() != quarterName && isFullNomenclature == 'FULL') {
|
414 |
-
evtTarget.val('')
|
415 |
-
$j('#billing\\:speedy_quarter_id').val('');
|
416 |
-
} else if ($j('#billing\\:speedy_quarter_id').val() != '' && isFullNomenclature != 'FULL' && evtTarget.val() != quarterName) {
|
417 |
-
evtTarget.val('')
|
418 |
-
$j('#billing\\:speedy_quarter_id').val('');
|
419 |
-
} else if (isFullNomenclature == 'NO' || isFullNomenclature == 'PARTIAL') {
|
420 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
421 |
-
}
|
422 |
|
|
|
423 |
|
424 |
-
} else if (evtTarget.attr('id') == 'billing:speedy_office_locator') {
|
425 |
|
|
|
|
|
426 |
|
427 |
-
if ($j('#billing\\:speedy_office_id').val() == false) {
|
428 |
-
evtTarget.val('')
|
429 |
|
430 |
-
$j('#billing\\:speedy_office_id').val('');
|
431 |
-
$j('#billing\\:speedy_street').val('')
|
432 |
-
}
|
433 |
|
|
|
434 |
|
435 |
-
else if (evtTarget.val() != officeName) {
|
436 |
-
evtTarget.val('')
|
437 |
-
//$j('#billing\\:speedy_office_chooser').removeAttr('checked')
|
438 |
-
$j('#billing\\:speedy_office_id').val('');
|
439 |
-
$j('#billing\\:speedy_street').val('')
|
440 |
-
} else if ($j('#billing\\:speedy_office_id').val() != '' && evtTarget.val() != officeName) {
|
441 |
-
evtTarget.val('')
|
442 |
-
$j('#billing\\:speedy_office_id').val('');
|
443 |
-
$j('#billing\\:speedy_street').val('')
|
444 |
-
}
|
445 |
|
446 |
-
|
447 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
448 |
-
} else if (evtTarget.attr('id') == 'billing:speedy_entrance') {
|
449 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
450 |
-
} else if (evtTarget.attr('id') == 'billing:speedy_floor') {
|
451 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
452 |
-
} else if (evtTarget.attr('id') == 'billing:speedy_apartment') {
|
453 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
454 |
-
} else if (evtTarget.attr('id') == 'billing:speedy_address_note') {
|
455 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
456 |
-
}
|
457 |
|
458 |
-
|
459 |
|
|
|
460 |
|
461 |
-
|
462 |
|
463 |
|
464 |
-
|
465 |
-
})
|
466 |
|
|
|
|
|
|
|
|
|
|
|
467 |
|
|
|
468 |
|
469 |
-
|
470 |
|
|
|
|
|
471 |
|
472 |
-
|
473 |
|
474 |
-
|
475 |
|
476 |
-
var showError = true;
|
477 |
|
478 |
-
for (var i = 0; i < test.length; i++) {
|
479 |
|
|
|
480 |
|
481 |
-
if (test[i] == isValidAddress || isValidAddress == "") {
|
482 |
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
|
|
|
|
488 |
|
489 |
-
|
|
|
490 |
|
491 |
-
if (showError) {
|
492 |
|
493 |
-
|
494 |
-
$j('#speedy_shipping_address_error').show()
|
495 |
|
496 |
-
|
497 |
|
498 |
-
|
|
|
|
|
|
|
|
|
|
|
499 |
|
|
|
500 |
|
|
|
501 |
|
502 |
-
|
503 |
|
|
|
504 |
|
505 |
-
|
506 |
-
$j('#billing\\:speedy_normal_address').hide().find('input').val('');
|
507 |
-
$j('#billing\\:speedy_office_address').show().find('input').show();
|
508 |
-
} else {
|
509 |
-
$j('#billing\\:speedy_normal_address').show();
|
510 |
-
$j('#billing\\:speedy_office_address').hide().find('input').val('');
|
511 |
-
$j('#billing\\:speedy_office_id,#billing\\:street_0,#billing\\:speedy_street ,#billing\\:street_1,#billing\\:speedy_office_locator').val('');
|
512 |
|
513 |
-
|
514 |
-
|
515 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
516 |
|
517 |
-
|
|
|
|
|
|
|
518 |
|
519 |
-
|
|
|
|
|
|
|
520 |
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
|
|
|
|
|
|
527 |
|
528 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
|
530 |
-
|
|
|
|
|
|
|
531 |
|
532 |
-
|
|
|
533 |
|
534 |
-
|
|
|
|
|
535 |
|
536 |
-
|
|
|
537 |
|
538 |
-
|
539 |
-
|
540 |
|
541 |
-
|
542 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getSite"); ?>",
|
543 |
-
dataType: "json",
|
544 |
-
data: {
|
545 |
-
term: request.term
|
546 |
-
},
|
547 |
-
success: function(data) {
|
548 |
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
}
|
553 |
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
558 |
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
isFullNomenclature = 'FULL';
|
573 |
-
enableAutocomplete();
|
574 |
-
|
575 |
-
}
|
576 |
-
|
577 |
-
// clearForm();
|
578 |
-
// updateForm(true);
|
579 |
-
return false;
|
580 |
-
}});
|
581 |
-
|
582 |
-
$j('#billing\\:speedy_office_locator').autocomplete({
|
583 |
-
source: function(request, response) {
|
584 |
-
|
585 |
-
$j.ajax({
|
586 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getOffices"); ?>",
|
587 |
-
dataType: "json",
|
588 |
-
data: {
|
589 |
-
term: request.term,
|
590 |
-
cityid: $j('#billing\\:speedy_site_id').val()
|
591 |
-
},
|
592 |
-
success: function(data) {
|
593 |
-
|
594 |
-
response(data);
|
595 |
-
}
|
596 |
-
});
|
597 |
-
}
|
598 |
-
, response: function(event, ui) {
|
599 |
-
$j(this).autocomplete("option", "disabled", false);
|
600 |
-
|
601 |
-
}
|
602 |
-
|
603 |
-
, minLength: 0
|
604 |
-
, select: function(event, ui) {
|
605 |
-
$j(this).val(ui.item.label);
|
606 |
-
officeName = ui.item.label;
|
607 |
-
$j('#billing\\:speedy_office_id').val(ui.item.value);
|
608 |
-
$j('#billing\\:speedy_street').val(ui.item.label)
|
609 |
-
return false;
|
610 |
-
}}).focus(function() {
|
611 |
-
if ($j('#billing\\:speedy_site_id').val()) {
|
612 |
-
//Use the below line instead of triggering keydown
|
613 |
-
$j(this).autocomplete("search", '')
|
614 |
-
return false;
|
615 |
-
}
|
616 |
-
});
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
$j('#billing\\:speedy_quarter_name').autocomplete({
|
621 |
-
source: function(request, response) {
|
622 |
-
|
623 |
-
$j.ajax({
|
624 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getQuarter"); ?>",
|
625 |
-
dataType: "json",
|
626 |
-
data: {
|
627 |
-
term: request.term,
|
628 |
-
cityid: $j('#billing\\:speedy_site_id').val()
|
629 |
-
},
|
630 |
-
success: function(data) {
|
631 |
-
response(data);
|
632 |
-
}
|
633 |
-
});
|
634 |
-
}
|
635 |
-
, minLength: 1
|
636 |
-
, select: function(event, ui) {
|
637 |
-
$j(this).val(ui.item.label);
|
638 |
-
quarterName = ui.item.label;
|
639 |
-
$j('#billing\\:speedy_quarter_id').val(ui.item.value)
|
640 |
-
return false;
|
641 |
-
}});
|
642 |
-
|
643 |
-
$j('#billing\\:speedy_street').autocomplete({
|
644 |
-
source: function(request, response) {
|
645 |
-
|
646 |
-
$j.ajax({
|
647 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getStreets"); ?>",
|
648 |
-
dataType: "json",
|
649 |
-
data: {
|
650 |
-
term: request.term,
|
651 |
-
cityid: $j('#billing\\:speedy_site_id').val()
|
652 |
-
},
|
653 |
-
success: function(data) {
|
654 |
-
response(data);
|
655 |
-
}
|
656 |
-
});
|
657 |
-
}
|
658 |
-
, minLength: 1
|
659 |
-
, select: function(event, ui) {
|
660 |
-
$j(this).val(ui.item.label);
|
661 |
-
streetName = ui.item.label;
|
662 |
-
$j('#billing\\:speedy_street_id').val(ui.item.value)
|
663 |
-
return false;
|
664 |
-
}});
|
665 |
-
|
666 |
-
function updateForm(enable) {
|
667 |
-
|
668 |
-
if (enable) {
|
669 |
-
|
670 |
-
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
671 |
-
.removeAttr('disabled').val('');
|
672 |
-
|
673 |
-
} else {
|
674 |
-
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
675 |
-
.attr('disabled', 'disabled').val('');
|
676 |
-
}
|
677 |
-
|
678 |
-
|
679 |
-
}
|
680 |
-
|
681 |
-
|
682 |
-
}
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
function validateAddress() {
|
687 |
-
$j('div#speedyBillingError').hide();
|
688 |
-
//evt.preventDefault();
|
689 |
-
// var baseForm = '#co-billing-form';
|
690 |
-
var prefix = ' #billing\\:';
|
691 |
-
var quarter = $j(prefix + 'speedy_quarter_name').val();
|
692 |
-
var quarter_id = $j(prefix + 'speedy_quarter_id').val();
|
693 |
-
var street = $j(prefix + 'speedy_street').val();
|
694 |
-
var street_id = $j(prefix + 'speedy_street_id').val();
|
695 |
-
var number = $j(prefix + 'speedy_street_number').val();
|
696 |
-
var blockNo = $j(prefix + 'speedy_block_number').val();
|
697 |
-
var address_note = $j(prefix + 'speedy_address_note').val();
|
698 |
-
|
699 |
-
var floor_no = $j(prefix + 'speedy_floor').val();
|
700 |
-
var entrance = $j(prefix + 'speedy_entrance').val();
|
701 |
-
var apartment = $j(prefix + 'speedy_apartment').val();
|
702 |
-
|
703 |
-
var speedy_pick_from_office = $j(prefix + 'speedy_office_chooser').is(':checked');
|
704 |
-
var speedy_office_name = $j(prefix + 'speedy_office_locator').val();
|
705 |
-
var speedy_office_id = $j(prefix + 'speedy_office_id').val();
|
706 |
-
|
707 |
-
|
708 |
-
var isBillingSameAsShipping = $j('#billing\\:use_for_shipping_yes').is(':checked');
|
709 |
-
var isNewAddress = $j('#billing-address-select').val();
|
710 |
-
|
711 |
-
var isValid = 0;
|
712 |
-
|
713 |
-
if (!isNewAddress) {
|
714 |
-
if (quarter || quarter_id) {
|
715 |
-
if ((street || street_id && number) || blockNo) {
|
716 |
-
isValid = true;
|
717 |
-
}
|
718 |
-
|
719 |
-
} else if (speedy_pick_from_office && speedy_office_name && speedy_office_id) {
|
720 |
-
isValid = true;
|
721 |
-
} else if ((street || street_id)) {
|
722 |
-
if (number || blockNo) {
|
723 |
-
isValid = true;
|
724 |
-
}
|
725 |
-
|
726 |
-
} else if (address_note && address_note.length > 4) {
|
727 |
-
isValid = true;
|
728 |
-
}
|
729 |
-
|
730 |
-
if (isValid) {
|
731 |
-
var streetAddress = '';
|
732 |
-
|
733 |
-
var address = '';
|
734 |
-
var note = '';
|
735 |
-
|
736 |
-
var streetAddress = '';
|
737 |
-
|
738 |
-
if (speedy_office_name.length > 1) {
|
739 |
-
// address += speedy_office_name;
|
740 |
-
}
|
741 |
-
|
742 |
-
if (quarter.length > 1) {
|
743 |
-
address += ' ' + quarter;
|
744 |
-
}
|
745 |
-
if (street.length > 1) {
|
746 |
-
address += ' ' + street;
|
747 |
-
}
|
748 |
-
if (number.length >= 1) {
|
749 |
-
address += " <?php echo $this->__("Street Number") ?>" + number;
|
750 |
-
}
|
751 |
-
if (blockNo.length >= 1) {
|
752 |
-
address += " <?php echo $this->__("Blok") ?>" + blockNo;
|
753 |
-
}
|
754 |
|
755 |
-
|
756 |
-
address += " <?php echo $this->__("Entrance") ?>" + entrance;
|
757 |
-
}
|
758 |
-
if (floor_no.length >= 1) {
|
759 |
-
address += " <?php echo $this->__("Floor") ?>" + floor_no;
|
760 |
-
}
|
761 |
-
if (apartment.length >= 1) {
|
762 |
-
address += " <?php echo $this->__("Apartment") ?>" + apartment;
|
763 |
-
}
|
764 |
|
765 |
-
|
766 |
-
|
767 |
-
|
|
|
|
|
|
|
768 |
|
769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
|
771 |
-
|
772 |
-
streetAddress += ', ' + note;
|
773 |
-
}
|
774 |
-
$j('#billing\\:street1').val(streetAddress);
|
775 |
-
return true;
|
776 |
-
} else {
|
777 |
|
778 |
-
|
779 |
-
billing.newAddress(true);
|
780 |
-
$j('#billing-new-address-form').show();
|
781 |
-
return false;
|
782 |
-
}
|
783 |
-
} else {
|
784 |
-
$j('#billing\\:street1').val(quarter + street + number + blockNo + entrance + floor_no + apartment + address_note);
|
785 |
-
return true;
|
786 |
|
787 |
-
|
|
|
|
|
|
|
|
|
788 |
|
789 |
-
|
|
|
|
|
|
|
|
|
790 |
|
791 |
-
|
792 |
-
$j("#billing\\:speedy_quarter_name, \n\
|
793 |
-
#billing\\:speedy_street,\n\
|
794 |
-
#billing\\:speedy_office_locator ").autocomplete("option", "disabled", false);
|
795 |
-
}
|
796 |
|
797 |
-
|
798 |
-
$j("#billing\\:speedy_quarter_name, \n\
|
799 |
-
#billing\\:speedy_street,\n\
|
800 |
-
#billing\\:speedy_office_locator ").autocomplete("option", "disabled", true);
|
801 |
-
}
|
802 |
|
803 |
-
$j('#billing-buttons-container button.button ').click(function(evt) {
|
804 |
|
805 |
-
|
806 |
-
|
807 |
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
freezeShippingForm(true);
|
814 |
-
}
|
815 |
|
816 |
|
817 |
-
|
818 |
-
|
819 |
|
820 |
|
821 |
-
|
822 |
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
|
827 |
-
|
828 |
|
829 |
-
|
830 |
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
|
842 |
-
|
843 |
-
|
844 |
|
845 |
|
846 |
-
|
847 |
|
848 |
-
|
849 |
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
|
858 |
-
|
859 |
-
|
860 |
|
861 |
|
862 |
-
|
863 |
|
864 |
|
865 |
-
|
866 |
-
|
867 |
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
|
879 |
|
880 |
|
881 |
-
|
882 |
-
|
70 |
</div>
|
71 |
</li>
|
72 |
<li>
|
73 |
+
<input type="hidden" name="billing[speedy_site_id]" id="billing:speedy_site_id" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedySiteId()) ?>" />
|
74 |
</li>
|
75 |
<li>
|
76 |
+
|
77 |
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
78 |
+
<div id="billing:speedy_office_address">
|
79 |
+
<?php else: ?>
|
80 |
+
<div id="billing:speedy_office_address" style="display: none">
|
81 |
+
<?php endif; ?>
|
82 |
<ul>
|
83 |
+
<li class="wide" id="billing:speedy_office_textbox">
|
84 |
+
<div class="field">
|
85 |
+
<label for=""></label>
|
86 |
+
<div class="input-box">
|
87 |
+
|
88 |
+
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
89 |
+
<input type="text" name="billing[speedy_office_locator]" id="billing:speedy_office_locator" class="input-text" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>"/>
|
90 |
+
<input type="hidden" name="billing[speedy_office_id]" id="billing:speedy_office_id" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedyOfficeId()) ?>" />
|
91 |
+
<?php else: ?>
|
92 |
+
|
93 |
+
<input type="text" name="billing[speedy_office_locator]" id="billing:speedy_office_locator" class="input-text" />
|
94 |
+
<input type="hidden" name="billing[speedy_office_id]" id="billing:speedy_office_id" />
|
95 |
+
<?php endif; ?>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
</li>
|
99 |
|
100 |
</ul>
|
101 |
|
102 |
+
|
103 |
+
</div>
|
104 |
+
</li>
|
105 |
+
<li>
|
106 |
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
107 |
|
108 |
<div id="billing:speedy_normal_address" style="display: none">
|
110 |
<div id="billing:speedy_normal_address">
|
111 |
|
112 |
<?php endif; ?>
|
113 |
+
<ul>
|
114 |
+
<li class="wide">
|
115 |
+
<div class="field">
|
116 |
|
117 |
+
<label class="required" for="speedy_quarter_name"><?php echo $this->__('Quarter') ?></label>
|
118 |
+
<div class="input-box">
|
119 |
+
<input type="text" class="input-text" name="billing[speedy_quarter_name]" id="billing:speedy_quarter_name" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyQuarterName()) ?>"/><br />
|
120 |
+
<input type="hidden" name="billing[speedy_quarter_id]" id="billing:speedy_quarter_id" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyQuarterId()) ?>"/></div></div>
|
121 |
|
122 |
|
123 |
+
<input type="hidden" name="billing[speedy_street_id]" id="billing:speedy_street_id" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyStreetId()) ?>" />
|
124 |
+
</li>
|
125 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
126 |
+
<li class="wide">
|
127 |
+
<label for="speedy_street">Улица:</label>
|
|
|
|
|
|
|
|
|
|
|
128 |
<div class="input-box">
|
129 |
+
<input type="text" name="billing[speedy_street_name]" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedyStreetName()) ?>" id="billing:speedy_street" class="input-text" />
|
130 |
</div>
|
131 |
+
<div class="street_holder" style="display: none">
|
132 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
133 |
+
<div class="input-box">
|
134 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
</li>
|
138 |
+
<li class="fields">
|
139 |
|
140 |
+
<div class="field">
|
141 |
+
<label class="required" for="speedy_street_number"><?php echo $this->__('Street Number') ?></label>
|
142 |
+
<div class="input-box">
|
143 |
|
144 |
+
<input type="text" class="input-text" name="billing[speedy_street_number]" id="billing:speedy_street_number" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyStreetNumber()) ?>" /></div>
|
145 |
+
</div>
|
146 |
+
<div class="field">
|
147 |
+
<label class="required" for="speedy_block_number"><?php echo $this->__('Blok') ?></label>
|
148 |
+
<div class="input-box">
|
149 |
+
<input type="text" class="input-text" name="billing[speedy_block_number]" id="billing:speedy_block_number" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyBlockNumber()) ?>" /></div>
|
150 |
+
</div>
|
151 |
+
</li>
|
152 |
|
153 |
|
154 |
|
155 |
+
<li class="fields">
|
156 |
+
<div class="field">
|
157 |
+
<label for=""><?php echo $this->__("Entrance") ?></label>
|
158 |
+
<div class="input-box">
|
159 |
+
<input type="text" name="billing[speedy_entrance]" id="billing:speedy_entrance" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyEntrance()) ?>" /></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
</div>
|
161 |
+
<div class="field">
|
162 |
+
<label for=""><?php echo $this->__("Floor") ?></label>
|
163 |
+
<div class="input-box">
|
164 |
+
<input type="text" name="billing[speedy_floor]" id="billing:speedy_floor" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyFloor()) ?>"/></div>
|
165 |
+
</div>
|
166 |
+
</li>
|
167 |
+
<li class="fields">
|
168 |
+
<div class="field">
|
169 |
+
<label for=""><?php echo $this->__("Apartment") ?></label>
|
170 |
+
<div class="input-box">
|
171 |
+
<input type="text" name="billing[speedy_apartment]" id="billing:speedy_apartment" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyApartment()) ?>" /></div>
|
172 |
+
</div>
|
173 |
+
</li>
|
174 |
+
<li class="wide">
|
175 |
+
<div class="field">
|
176 |
+
<label for=""><?php echo $this->__("Address note") ?></label>
|
177 |
+
<div class="input-box">
|
178 |
+
<input class="input-text" id="billing:speedy_address_note" type="text" name="billing[speedy_address_note]" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyAddressNote()) ?>" />
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
</li>
|
182 |
+
</ul>
|
183 |
</div>
|
184 |
<li class="fields">
|
185 |
<div class="field">
|
270 |
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()): ?>
|
271 |
|
272 |
<li class="control">
|
273 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if (window.shipping)
|
274 |
shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
275 |
</li>
|
276 |
<?php else: ?>
|
301 |
</span>
|
302 |
</div>
|
303 |
|
304 |
+
</ul>
|
|
|
305 |
|
|
|
|
|
|
|
|
|
|
|
306 |
|
307 |
+
</form>
|
308 |
+
<script type="text/javascript">
|
309 |
+
//<![CDATA[
|
310 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
311 |
+
var billingForm = new VarienForm('co-billing-form');
|
312 |
+
|
313 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
314 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
315 |
+
|
316 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
|
317 |
+
//]]>
|
318 |
+
var isNewBillingAddress = false;
|
319 |
+
|
320 |
+
//This variable is necessary in the adjecent shipping address block
|
321 |
+
//var shippingSiteNomenclature = null;
|
322 |
+
var isFullNomenclature = 0;
|
323 |
+
$j('document').ready(function() {
|
324 |
+
|
325 |
+
|
326 |
+
|
327 |
+
var siteName = '';
|
328 |
+
var quarterName = '';
|
329 |
+
var streetName = '';
|
330 |
+
var blokName = '';
|
331 |
+
var officeName = '';
|
332 |
+
|
333 |
+
|
334 |
+
function initFields() {
|
335 |
+
|
336 |
+
if ($j('#billing\\:speedy_quarter_name').val() != '') {
|
337 |
+
quarterName = $j('#billing\\:speedy_quarter_name').val();
|
338 |
+
}
|
339 |
+
|
340 |
+
|
341 |
+
if ($j('#billing\\:street_1').val() != '') {
|
342 |
+
streetName = $j('#billing\\:street_1').val();
|
343 |
+
}
|
344 |
|
|
|
|
|
|
|
345 |
|
346 |
+
if ($j('#billing\\:speedy_block_number').val() != '') {
|
347 |
+
blokName = $j('#billing\\:speedy_block_number').val();
|
348 |
+
}
|
|
|
349 |
|
350 |
+
if ($j('#billing\\:speedy_office_locator').val() != '') {
|
351 |
+
officeName = $j('#billing\\:speedy_office_locator').val();
|
352 |
+
}
|
353 |
+
}
|
354 |
|
355 |
|
|
|
|
|
|
|
|
|
|
|
356 |
|
357 |
+
initFields();
|
358 |
|
|
|
359 |
|
|
|
|
|
|
|
360 |
|
361 |
+
function checkFields(evt) {
|
362 |
+
var evtTarget = $j(evt.target);
|
363 |
+
if (evtTarget.attr('id') == 'billing:city') {
|
364 |
|
365 |
+
if (siteName != evtTarget.val()) {
|
|
|
|
|
366 |
|
367 |
+
evtTarget.val('')
|
368 |
|
369 |
+
// $j('#billing\\:speedy_office_chooser').removeAttr('checked');
|
370 |
+
$j('#billing\\:speedy_site_id').val('');
|
371 |
+
$j('#billing\\:postcode').val('');
|
372 |
+
$j('#billing\\:region').val('')
|
373 |
+
updateForm();
|
374 |
+
} else if (evtTarget.val() == "") {
|
375 |
|
376 |
+
updateForm();
|
377 |
+
$j('#billing\\:speedy_site_id').val('')
|
378 |
+
$j('#zip').val('')
|
379 |
+
} else {
|
380 |
+
// updateForm(true);
|
381 |
+
}
|
382 |
+
}
|
383 |
|
384 |
|
385 |
+
if (evtTarget.attr('id') == 'billing:speedy_street') {
|
386 |
|
387 |
+
if (isFullNomenclature == 'FULL' && $j('#billing\\:speedy_street_id').val() == false) {
|
388 |
+
evtTarget.val('')
|
389 |
+
$j('#billing\\:speedy_street_id').val('');
|
390 |
+
}
|
391 |
|
392 |
|
393 |
+
else if (evtTarget.val() != streetName && isFullNomenclature == 'FULL') {
|
394 |
+
evtTarget.val('')
|
395 |
+
$j('#billing\\:speedy_street_id').val('');
|
396 |
+
} else if ($j('#billing\\:speedy_street_id').val() != '' && isFullNomenclature != 'FULL' && evtTarget.val() != streetName) {
|
397 |
+
evtTarget.val('')
|
398 |
+
$j('#billing\\:speedy_street_id').val('');
|
399 |
+
} else if (isFullNomenclature == 'NO' || isFullNomenclature == 'PARTIAL') {
|
400 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
401 |
+
}
|
402 |
|
|
|
|
|
|
|
403 |
|
|
|
404 |
|
405 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_quarter_name') {
|
406 |
|
407 |
+
if (isFullNomenclature == 'FULL' && $j('#billing\\:speedy_quarter_id').val() == false) {
|
408 |
+
evtTarget.val('')
|
409 |
+
$j('#billing\\:speedy_quarter_id').val('');
|
410 |
+
}
|
|
|
|
|
411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
+
else if (evtTarget.val() != quarterName && isFullNomenclature == 'FULL') {
|
414 |
+
evtTarget.val('')
|
415 |
+
$j('#billing\\:speedy_quarter_id').val('');
|
416 |
+
} else if ($j('#billing\\:speedy_quarter_id').val() != '' && isFullNomenclature != 'FULL' && evtTarget.val() != quarterName) {
|
417 |
+
evtTarget.val('')
|
418 |
+
$j('#billing\\:speedy_quarter_id').val('');
|
419 |
+
} else if (isFullNomenclature == 'NO' || isFullNomenclature == 'PARTIAL') {
|
420 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
421 |
+
}
|
422 |
|
|
|
423 |
|
424 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_office_locator') {
|
|
|
|
|
|
|
425 |
|
426 |
|
427 |
+
if ($j('#billing\\:speedy_office_id').val() == false) {
|
428 |
+
evtTarget.val('')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
|
430 |
+
$j('#billing\\:speedy_office_id').val('');
|
431 |
+
$j('#billing\\:speedy_street').val('')
|
432 |
+
}
|
433 |
|
434 |
|
435 |
+
else if (evtTarget.val() != officeName) {
|
436 |
+
evtTarget.val('')
|
437 |
+
//$j('#billing\\:speedy_office_chooser').removeAttr('checked')
|
438 |
+
$j('#billing\\:speedy_office_id').val('');
|
439 |
+
$j('#billing\\:speedy_street').val('')
|
440 |
+
} else if ($j('#billing\\:speedy_office_id').val() != '' && evtTarget.val() != officeName) {
|
441 |
+
evtTarget.val('')
|
442 |
+
$j('#billing\\:speedy_office_id').val('');
|
443 |
+
$j('#billing\\:speedy_street').val('')
|
444 |
+
}
|
445 |
|
446 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_block_number') {
|
447 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
448 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_entrance') {
|
449 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
450 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_floor') {
|
451 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
452 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_apartment') {
|
453 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
454 |
+
} else if (evtTarget.attr('id') == 'billing:speedy_address_note') {
|
455 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
456 |
+
}
|
457 |
|
458 |
+
}
|
459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
|
461 |
+
$j('#billing\\:city,div#billing\\:speedy_normal_address input, div#billing\\:speedy_office_address input').blur(function(evt) {
|
462 |
|
|
|
463 |
|
464 |
+
checkFields(evt)
|
465 |
+
})
|
466 |
|
|
|
|
|
467 |
|
|
|
|
|
|
|
468 |
|
469 |
+
var isValidAddress = $j('#billing-address-select').val();
|
470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
|
472 |
+
checkAddress();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
|
474 |
+
function checkAddress() {
|
475 |
|
476 |
+
var showError = true;
|
477 |
|
478 |
+
for (var i = 0; i < test.length; i++) {
|
479 |
|
480 |
|
481 |
+
if (test[i] == isValidAddress || isValidAddress == "") {
|
|
|
482 |
|
483 |
+
$j('#speedy_address_error').hide();
|
484 |
+
$j('#speedy_shipping_address_error').hide()
|
485 |
+
showError = false;
|
486 |
+
break;
|
487 |
+
}
|
488 |
|
489 |
+
}
|
490 |
|
491 |
+
if (showError) {
|
492 |
|
493 |
+
$j('#speedy_address_error').show();
|
494 |
+
$j('#speedy_shipping_address_error').show()
|
495 |
|
496 |
+
}
|
497 |
|
498 |
+
}
|
499 |
|
|
|
500 |
|
|
|
501 |
|
502 |
+
$j('#billing\\:speedy_office_chooser').change(function(evt) {
|
503 |
|
|
|
504 |
|
505 |
+
if ($j(this).is(':checked')) {
|
506 |
+
$j('#billing\\:speedy_normal_address').hide().find('input').val('');
|
507 |
+
$j('#billing\\:speedy_office_address').show().find('input').show();
|
508 |
+
} else {
|
509 |
+
$j('#billing\\:speedy_normal_address').show();
|
510 |
+
$j('#billing\\:speedy_office_address').hide().find('input').val('');
|
511 |
+
$j('#billing\\:speedy_office_id,#billing\\:street_0,#billing\\:speedy_street ,#billing\\:street_1,#billing\\:speedy_office_locator').val('');
|
512 |
|
513 |
+
}
|
514 |
+
});
|
515 |
|
|
|
516 |
|
517 |
+
$j('#billing-address-select').change(function(evt) {
|
|
|
518 |
|
519 |
+
if (!$j(this).val()) {
|
520 |
|
521 |
+
isNewBillingAddress = 1;
|
522 |
+
$j('#sameBillingBox').hide();
|
523 |
+
} else {
|
524 |
+
$j('#sameBillingBox').show();
|
525 |
+
isNewBillingAddress = 0;
|
526 |
+
}
|
527 |
|
528 |
+
isValidAddress = $j(this).val();
|
529 |
|
530 |
+
checkAddress();
|
531 |
|
532 |
+
})
|
533 |
|
534 |
+
_initListeners();
|
535 |
|
536 |
+
function _initListeners() {
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
|
538 |
+
$j('#billing\\:city').autocomplete({
|
539 |
+
source: function(request, response) {
|
540 |
|
541 |
+
$j.ajax({
|
542 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getSite"); ?>",
|
543 |
+
dataType: "json",
|
544 |
+
data: {
|
545 |
+
term: request.term
|
546 |
+
},
|
547 |
+
success: function(data) {
|
548 |
|
549 |
+
response(data);
|
550 |
+
}
|
551 |
+
});
|
552 |
+
}
|
553 |
|
554 |
+
, minLength: 1
|
555 |
+
, select: function(event, ui) {
|
556 |
+
updateForm(true);
|
557 |
+
$j(this).val(ui.item.label);
|
558 |
|
559 |
+
$j('#billing\\:speedy_site_id').val(ui.item.value)
|
560 |
+
$j('#billing\\:postcode').val(ui.item.post_code)
|
561 |
+
$j('#billing\\:region').val(ui.item.region)
|
562 |
+
$j('#billing\\:country_id').val('BG');
|
563 |
+
siteName = ui.item.label;
|
564 |
+
if (ui.item.is_full_nomenclature == 'NO') {
|
565 |
+
isFullNomenclature = 'NO';
|
566 |
+
disableAutocomplete()
|
567 |
+
} else if (ui.item.is_full_nomenclature == 'PARTIAL') {
|
568 |
|
569 |
+
isFullNomenclature = 'PARTIAL';
|
570 |
+
enableAutocomplete();
|
571 |
+
} else {
|
572 |
+
isFullNomenclature = 'FULL';
|
573 |
+
enableAutocomplete();
|
574 |
+
|
575 |
+
}
|
576 |
+
|
577 |
+
// clearForm();
|
578 |
+
// updateForm(true);
|
579 |
+
return false;
|
580 |
+
}});
|
581 |
+
|
582 |
+
$j('#billing\\:speedy_office_locator').autocomplete({
|
583 |
+
source: function(request, response) {
|
584 |
+
|
585 |
+
$j.ajax({
|
586 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getOffices"); ?>",
|
587 |
+
dataType: "json",
|
588 |
+
data: {
|
589 |
+
term: request.term,
|
590 |
+
cityid: $j('#billing\\:speedy_site_id').val()
|
591 |
+
},
|
592 |
+
success: function(data) {
|
593 |
+
|
594 |
+
response(data);
|
595 |
+
}
|
596 |
+
});
|
597 |
+
}
|
598 |
+
, response: function(event, ui) {
|
599 |
+
$j(this).autocomplete("option", "disabled", false);
|
600 |
+
|
601 |
+
}
|
602 |
+
|
603 |
+
, minLength: 0
|
604 |
+
, select: function(event, ui) {
|
605 |
+
$j(this).val(ui.item.label);
|
606 |
+
officeName = ui.item.label;
|
607 |
+
$j('#billing\\:speedy_office_id').val(ui.item.value);
|
608 |
+
$j('#billing\\:speedy_street').val(ui.item.street_label)
|
609 |
+
initSiteData(ui);
|
610 |
+
return false;
|
611 |
+
}}).focus(function() {
|
612 |
+
if ($j('#billing\\:speedy_site_id').val()) {
|
613 |
+
//Use the below line instead of triggering keydown
|
614 |
+
$j(this).autocomplete("search", '')
|
615 |
+
return false;
|
616 |
+
}
|
617 |
+
});
|
618 |
+
|
619 |
+
|
620 |
+
|
621 |
+
$j('#billing\\:speedy_quarter_name').autocomplete({
|
622 |
+
source: function(request, response) {
|
623 |
+
|
624 |
+
$j.ajax({
|
625 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getQuarter"); ?>",
|
626 |
+
dataType: "json",
|
627 |
+
data: {
|
628 |
+
term: request.term,
|
629 |
+
cityid: $j('#billing\\:speedy_site_id').val()
|
630 |
+
},
|
631 |
+
success: function(data) {
|
632 |
+
response(data);
|
633 |
+
}
|
634 |
+
});
|
635 |
+
}
|
636 |
+
, minLength: 1
|
637 |
+
, select: function(event, ui) {
|
638 |
+
$j(this).val(ui.item.label);
|
639 |
+
quarterName = ui.item.label;
|
640 |
+
$j('#billing\\:speedy_quarter_id').val(ui.item.value)
|
641 |
+
return false;
|
642 |
+
}});
|
643 |
+
|
644 |
+
$j('#billing\\:speedy_street').autocomplete({
|
645 |
+
source: function(request, response) {
|
646 |
+
|
647 |
+
$j.ajax({
|
648 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getStreets"); ?>",
|
649 |
+
dataType: "json",
|
650 |
+
data: {
|
651 |
+
term: request.term,
|
652 |
+
cityid: $j('#billing\\:speedy_site_id').val()
|
653 |
+
},
|
654 |
+
success: function(data) {
|
655 |
+
response(data);
|
656 |
+
}
|
657 |
+
});
|
658 |
+
}
|
659 |
+
, minLength: 1
|
660 |
+
, select: function(event, ui) {
|
661 |
+
$j(this).val(ui.item.label);
|
662 |
+
streetName = ui.item.label;
|
663 |
+
$j('#billing\\:speedy_street_id').val(ui.item.value)
|
664 |
+
return false;
|
665 |
+
}});
|
666 |
+
|
667 |
+
|
668 |
+
$j('#billing\\:speedy_block_number').autocomplete({
|
669 |
+
source: function(request, response) {
|
670 |
+
|
671 |
+
$j.ajax({
|
672 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getBlock"); ?>",
|
673 |
+
dataType: "json",
|
674 |
+
data: {
|
675 |
+
term: request.term,
|
676 |
+
cityid: $j('#billing\\:speedy_site_id').val()
|
677 |
+
},
|
678 |
+
success: function(data) {
|
679 |
+
response(data);
|
680 |
+
}
|
681 |
+
});
|
682 |
+
}
|
683 |
+
, minLength: 1
|
684 |
+
, select: function(event, ui) {
|
685 |
+
$j(this).val(ui.item.label);
|
686 |
+
|
687 |
+
return false;
|
688 |
+
}});
|
689 |
+
|
690 |
+
function initSiteData(jsonResponse) {
|
691 |
+
$j('#billing\\:speedy_site_id').val(jsonResponse.item.site_id)
|
692 |
+
$j('#billing\\:postcode').val(jsonResponse.item.post_code)
|
693 |
+
$j('#billing\\:region').val(jsonResponse.item.region)
|
694 |
+
|
695 |
+
siteName = jsonResponse.item.site_name;
|
696 |
+
$j('#billing\\:city').val(siteName);
|
697 |
+
if (jsonResponse.item.is_full_nomenclature == 'NO') {
|
698 |
+
isFullNomenclature = 'NO';
|
699 |
+
disableAutocomplete()
|
700 |
+
} else if (jsonResponse.item.is_full_nomenclature == 'PARTIAL') {
|
701 |
+
|
702 |
+
isFullNomenclature = 'PARTIAL';
|
703 |
+
enableAutocomplete();
|
704 |
+
} else {
|
705 |
+
isFullNomenclature = 'FULL';
|
706 |
+
enableAutocomplete();
|
707 |
+
|
708 |
+
}
|
709 |
+
}
|
710 |
+
|
711 |
+
function updateForm(enable) {
|
712 |
+
|
713 |
+
if (enable) {
|
714 |
+
|
715 |
+
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
716 |
+
.removeAttr('disabled').val('');
|
717 |
+
|
718 |
+
} else {
|
719 |
+
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
720 |
+
.attr('disabled', 'disabled').val('');
|
721 |
+
}
|
722 |
+
|
723 |
+
|
724 |
+
}
|
725 |
+
|
726 |
+
|
727 |
+
}
|
728 |
+
|
729 |
+
|
730 |
+
|
731 |
+
function validateAddress() {
|
732 |
+
$j('div#speedyBillingError').hide();
|
733 |
+
//evt.preventDefault();
|
734 |
+
// var baseForm = '#co-billing-form';
|
735 |
+
var prefix = ' #billing\\:';
|
736 |
+
var quarter = $j(prefix + 'speedy_quarter_name').val();
|
737 |
+
var quarter_id = $j(prefix + 'speedy_quarter_id').val();
|
738 |
+
var street = $j(prefix + 'speedy_street').val();
|
739 |
+
var street_id = $j(prefix + 'speedy_street_id').val();
|
740 |
+
var number = $j(prefix + 'speedy_street_number').val();
|
741 |
+
var blockNo = $j(prefix + 'speedy_block_number').val();
|
742 |
+
var address_note = $j(prefix + 'speedy_address_note').val();
|
743 |
+
|
744 |
+
var floor_no = $j(prefix + 'speedy_floor').val();
|
745 |
+
var entrance = $j(prefix + 'speedy_entrance').val();
|
746 |
+
var apartment = $j(prefix + 'speedy_apartment').val();
|
747 |
+
|
748 |
+
var speedy_pick_from_office = $j(prefix + 'speedy_office_chooser').is(':checked');
|
749 |
+
var speedy_office_name = $j(prefix + 'speedy_office_locator').val();
|
750 |
+
var speedy_office_id = $j(prefix + 'speedy_office_id').val();
|
751 |
+
|
752 |
+
|
753 |
+
var isBillingSameAsShipping = $j('#billing\\:use_for_shipping_yes').is(':checked');
|
754 |
+
var isNewAddress = $j('#billing-address-select').val();
|
755 |
+
|
756 |
+
var isValid = 0;
|
757 |
+
|
758 |
+
if (!isNewAddress) {
|
759 |
+
if (quarter || quarter_id) {
|
760 |
+
if ((street && number) || blockNo || number) {
|
761 |
+
|
762 |
+
isValid = true;
|
763 |
+
}
|
764 |
|
765 |
+
} else if (speedy_pick_from_office && speedy_office_name && speedy_office_id) {
|
766 |
+
isValid = true;
|
767 |
+
} else if ((street || street_id)) {
|
768 |
+
if (number || blockNo) {
|
769 |
|
770 |
+
isValid = true;
|
771 |
+
}
|
772 |
|
773 |
+
} else if (address_note && address_note.length > 4) {
|
774 |
+
isValid = true;
|
775 |
+
}
|
776 |
|
777 |
+
if (isValid) {
|
778 |
+
var streetAddress = '';
|
779 |
|
780 |
+
var address = '';
|
781 |
+
var note = '';
|
782 |
|
783 |
+
var streetAddress = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
784 |
|
785 |
+
if (speedy_office_name.length > 1) {
|
786 |
+
// address += speedy_office_name;
|
787 |
+
}
|
|
|
788 |
|
789 |
+
if (quarter.length > 1) {
|
790 |
+
address += ' ' + quarter;
|
791 |
+
}
|
792 |
+
if (street.length > 1) {
|
793 |
+
address += ' ' + street;
|
794 |
+
}
|
795 |
+
if (number.length >= 1) {
|
796 |
+
address += " <?php echo $this->__("Street Number") ?>" + number;
|
797 |
+
}
|
798 |
+
if (blockNo.length >= 1) {
|
799 |
+
address += " <?php echo $this->__("Blok") ?>" + blockNo;
|
800 |
+
}
|
801 |
|
802 |
+
if (entrance.length >= 1) {
|
803 |
+
address += " <?php echo $this->__("Entrance") ?>" + entrance;
|
804 |
+
}
|
805 |
+
if (floor_no.length >= 1) {
|
806 |
+
address += " <?php echo $this->__("Floor") ?>" + floor_no;
|
807 |
+
}
|
808 |
+
if (apartment.length >= 1) {
|
809 |
+
address += " <?php echo $this->__("Apartment") ?>" + apartment;
|
810 |
+
}
|
811 |
|
812 |
+
if (address_note.length > 3) {
|
813 |
+
note += " " + address_note;
|
814 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
815 |
|
816 |
+
streetAddress = address;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
|
818 |
+
if (note != '') {
|
819 |
+
streetAddress += ', ' + note;
|
820 |
+
}
|
821 |
+
$j('#billing\\:street1').val(streetAddress);
|
822 |
+
return true;
|
823 |
+
} else {
|
824 |
|
825 |
+
$j('div#speedyBillingError').show();
|
826 |
+
billing.newAddress(true);
|
827 |
+
$j('#billing-new-address-form').show();
|
828 |
+
return false;
|
829 |
+
}
|
830 |
+
} else {
|
831 |
+
$j('#billing\\:street1').val(quarter + street + number + blockNo + entrance + floor_no + apartment + address_note);
|
832 |
+
return true;
|
833 |
|
834 |
+
}
|
|
|
|
|
|
|
|
|
|
|
835 |
|
836 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
837 |
|
838 |
+
function enableAutocomplete() {
|
839 |
+
$j("#billing\\:speedy_quarter_name, \n\
|
840 |
+
#billing\\:speedy_street,\n\
|
841 |
+
#billing\\:speedy_office_locator ").autocomplete("option", "disabled", false);
|
842 |
+
}
|
843 |
|
844 |
+
function disableAutocomplete() {
|
845 |
+
$j("#billing\\:speedy_quarter_name, \n\
|
846 |
+
#billing\\:speedy_street,\n\
|
847 |
+
#billing\\:speedy_office_locator ").autocomplete("option", "disabled", true);
|
848 |
+
}
|
849 |
|
850 |
+
$j('#billing-buttons-container button.button ').click(function(evt) {
|
|
|
|
|
|
|
|
|
851 |
|
852 |
+
var isBillingSameForShipping = $j('#billing\\:use_for_shipping_yes').is(':checked');
|
|
|
|
|
|
|
|
|
853 |
|
|
|
854 |
|
855 |
+
if (isNewBillingAddress && isBillingSameForShipping) {
|
|
|
856 |
|
857 |
+
isShippingFullNomenclature = isFullNomenclature;
|
858 |
+
freezeShippingForm();
|
859 |
+
} else if (!isBillingSameForShipping) {
|
860 |
+
freezeShippingForm(true);
|
861 |
+
}
|
|
|
|
|
862 |
|
863 |
|
864 |
+
$j('div#speedyBillingError').hide();
|
865 |
+
evt.preventDefault();
|
866 |
|
867 |
|
868 |
+
var isValid = validateAddress();
|
869 |
|
870 |
+
if (isValid) {
|
871 |
+
billing.save();
|
872 |
+
} else {
|
873 |
|
874 |
+
}
|
875 |
|
876 |
+
})
|
877 |
|
878 |
+
$j('#billing-address-select').change(function(evt) {
|
879 |
+
$j('#billing\\:city').val('');
|
880 |
+
$j('#billing\\:speedy_site_id,#billing\\:postcode, #billing\\:region').val('');
|
881 |
|
882 |
+
var isOfficeSelected = $j('#billing\\:speedy_office_chooser').is(':checked');
|
883 |
+
if (isOfficeSelected) {
|
884 |
+
$j('#billing\\:speedy_office_chooser').removeAttr('checked');
|
885 |
+
$j('#billing\\:speedy_normal_address').show();
|
886 |
+
$j('#billing\\:speedy_office_locator').hide();
|
887 |
+
}
|
888 |
|
889 |
+
updateForm();
|
890 |
+
})
|
891 |
|
892 |
|
893 |
+
function updateForm(enable) {
|
894 |
|
895 |
+
if (enable) {
|
896 |
|
897 |
+
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
898 |
+
.removeAttr('disabled').val('');
|
899 |
+
//$j('#billing\\:speedy_office_chooser').removeAttr('disabled')
|
900 |
|
901 |
+
} else {
|
902 |
+
$j('div#billing\\:speedy_normal_address input, #billing\\:speedy_office_address input')
|
903 |
+
.attr('disabled', 'disabled').val('');
|
904 |
|
905 |
+
//$j('#billing\\:speedy_office_chooser').removeAttr('checked').attr('disabled', 'disabled');
|
906 |
+
}
|
907 |
|
908 |
|
909 |
+
}
|
910 |
|
911 |
|
912 |
+
function freezeShippingForm(enable) {
|
913 |
+
if (enable) {
|
914 |
|
915 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input,shipping\\:speedy_office_chooser')
|
916 |
+
.removeAttr('readonly');
|
917 |
+
$j('#shipping\\:speedy_office_chooser').removeAttr('disabled')
|
918 |
|
919 |
+
} else {
|
920 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input, shipping\\:speedy_office_chooser')
|
921 |
+
.attr('readonly', 'readonly')
|
922 |
+
$j('#shipping\\:speedy_office_chooser').attr('disabled', 'disabled')
|
923 |
+
}
|
924 |
+
}
|
925 |
|
926 |
|
927 |
|
928 |
+
})
|
929 |
+
</script>
|
app/design/frontend/base/default/template/speedy_speedyshipping/checkout/onepage/shipping.phtml
CHANGED
@@ -22,15 +22,15 @@
|
|
22 |
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
|
23 |
</div>
|
24 |
</div>
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
31 |
</div>
|
32 |
-
|
33 |
-
<?php endif; ?>
|
34 |
</li>
|
35 |
<li class="wide">
|
36 |
<div class="field" style="width: 100%">
|
@@ -69,773 +69,818 @@
|
|
69 |
</div>
|
70 |
</li>
|
71 |
<li>
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
<ul>
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
|
96 |
|
97 |
</ul>
|
98 |
-
|
99 |
|
100 |
<li>
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
-
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
|
266 |
-
//]]>
|
267 |
|
|
|
268 |
|
269 |
-
var isShippingFullNomenclature = 0;
|
270 |
|
271 |
-
$j('document').ready(function() {
|
272 |
|
273 |
|
274 |
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
|
277 |
-
|
278 |
-
if ($j('#shipping\\:same_as_billing').is(':checked')) {
|
279 |
-
$j('#shipping\\:same_as_billing').removeAttr('checked')
|
280 |
-
}
|
281 |
-
}
|
282 |
|
|
|
|
|
|
|
283 |
|
284 |
-
var isShippingValidAddress = $j('#shipping-address-select').val();
|
285 |
|
|
|
|
|
|
|
286 |
|
287 |
|
288 |
-
|
|
|
|
|
289 |
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
var officeName = '';
|
295 |
|
296 |
|
297 |
-
function initFields() {
|
298 |
|
299 |
-
|
300 |
-
quarterName = $j('#billing\\:speedy_quarter_name').val();
|
301 |
-
}
|
302 |
|
303 |
|
304 |
-
|
305 |
-
|
306 |
-
}
|
307 |
|
|
|
308 |
|
309 |
-
|
310 |
-
blokName = $j('#billing\\:speedy_block_number').val();
|
311 |
-
}
|
312 |
|
313 |
-
|
314 |
-
officeName = $j('#billing\\:speedy_office_locator').val();
|
315 |
-
}
|
316 |
-
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
|
320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
|
|
|
322 |
|
323 |
-
|
324 |
-
|
|
|
325 |
|
326 |
-
|
327 |
|
328 |
-
if (siteName != evtTarget.val()) {
|
329 |
|
330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
-
$j('#shipping\\:speedy_site_id').val('')
|
333 |
-
$j('#shipping\\:postcode').val('');
|
334 |
-
$j('#shipping\\:region').val('')
|
335 |
-
updateShippingForm();
|
336 |
-
$j('#shipping\\:speedy_normal_address').show();
|
337 |
-
$j('#shipping\\:speedy_office_address').hide();
|
338 |
|
339 |
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
$j('#zip').val('')
|
346 |
-
} else {
|
347 |
-
// updateForm(true);
|
348 |
-
}
|
349 |
-
}
|
350 |
|
351 |
-
if (evtTarget.attr('id') == 'shipping:speedy_street') {
|
352 |
|
353 |
-
|
354 |
-
|
355 |
-
|
|
|
|
|
|
|
356 |
|
357 |
-
|
|
|
|
|
358 |
|
359 |
|
360 |
-
else if (evtTarget.val() != streetName && isShippingFullNomenclature == 'FULL') {
|
361 |
-
evtTarget.val('')
|
362 |
-
$j('#shipping\\:speedy_street_id').val('');
|
363 |
-
} else if ($j('#shipping\\:speedy_street_id').val() != '' && isShippingFullNomenclature != 'FULL' && evtTarget.val() != streetName) {
|
364 |
-
evtTarget.val('')
|
365 |
-
$j('#shipping\\:speedy_street_id').val('');
|
366 |
-
} else if (isShippingFullNomenclature == 'NO' || isShippingFullNomenclature == 'PARTIAL') {
|
367 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
368 |
-
}
|
369 |
|
|
|
370 |
|
371 |
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
|
378 |
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
385 |
|
386 |
-
|
387 |
-
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
|
|
390 |
|
391 |
|
392 |
-
|
393 |
|
|
|
|
|
394 |
|
395 |
-
|
396 |
-
evtTarget.val('')
|
397 |
-
$j('#shipping\\:speedy_office_id').val('');
|
398 |
-
$j('#shipping\\:speedy_street').val('')
|
399 |
-
}
|
400 |
|
401 |
|
402 |
-
else if (evtTarget.val() != officeName) {
|
403 |
-
evtTarget.val('')
|
404 |
-
//$j('#shipping\\:speedy_office_chooser').removeAttr('checked')
|
405 |
-
$j('#shipping\\:speedy_office_id').val('');
|
406 |
-
$j('#shipping\\:speedy_street').val('')
|
407 |
-
} else if ($j('#shipping\\:speedy_office_id').val() != '' && evtTarget.val() != officeName) {
|
408 |
-
evtTarget.val('')
|
409 |
-
$j('#shipping\\:speedy_office_id').val('');
|
410 |
-
$j('#shipping\\:speedy_street').val('')
|
411 |
-
}
|
412 |
|
413 |
-
|
414 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
415 |
-
} else if (evtTarget.attr('id') == 'shipping:speedy_entrance') {
|
416 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
417 |
-
} else if (evtTarget.attr('id') == 'shipping:speedy_floor') {
|
418 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
419 |
-
} else if (evtTarget.attr('id') == 'shipping:speedy_apartment') {
|
420 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
421 |
-
} else if (evtTarget.attr('id') == 'shipping:speedy_address_note') {
|
422 |
-
evtTarget.val(evtTarget.val().toUpperCase())
|
423 |
-
}
|
424 |
|
425 |
-
}
|
426 |
|
|
|
|
|
427 |
|
428 |
-
|
429 |
|
430 |
-
|
431 |
-
synchronizeSameAddress();
|
432 |
|
433 |
-
|
|
|
434 |
|
|
|
|
|
435 |
|
|
|
|
|
|
|
436 |
|
437 |
-
$j('#opc-shipping div.step-title').click(function(evt) {
|
438 |
|
|
|
439 |
|
440 |
-
|
441 |
-
})
|
442 |
|
443 |
-
|
|
|
444 |
|
445 |
-
|
446 |
|
447 |
-
var showShippingError = true;
|
448 |
-
var isShippingValidAddress = $j('#shipping-address-select').val();
|
449 |
|
450 |
-
for (var i = 0; i < test.length; i++) {
|
451 |
-
if (test[i] == isShippingValidAddress || isShippingValidAddress == "") {
|
452 |
|
453 |
-
$j('#
|
454 |
-
showShippingError = false;
|
455 |
-
}
|
456 |
|
|
|
|
|
|
|
457 |
|
458 |
-
|
|
|
|
|
459 |
|
460 |
-
|
|
|
|
|
|
|
461 |
|
462 |
-
|
463 |
-
|
464 |
|
465 |
-
}
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
|
468 |
|
469 |
-
|
|
|
|
|
|
|
470 |
|
471 |
-
|
472 |
-
|
473 |
-
|
|
|
|
|
|
|
474 |
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
$j('#shipping\\:speedy_office_address').hide().find('input').val('');
|
482 |
-
$j('#shipping\\:speedy_office_id, #shipping\\:street_0,#shipping\\:speedy_street,#shipping\\:street_1,#shipping\\:speedy_office_locator').val('');
|
483 |
|
484 |
-
}
|
485 |
-
});
|
486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
|
488 |
-
_initListeners();
|
489 |
|
490 |
-
|
491 |
-
|
|
|
492 |
|
493 |
-
|
494 |
-
|
|
|
|
|
495 |
|
|
|
496 |
|
|
|
497 |
|
|
|
|
|
498 |
|
|
|
|
|
499 |
|
500 |
-
|
501 |
-
source: function(request, response) {
|
502 |
|
503 |
-
|
504 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getSite"); ?>",
|
505 |
-
dataType: "json",
|
506 |
-
data: {
|
507 |
-
term: request.term
|
508 |
-
},
|
509 |
-
success: function(data) {
|
510 |
-
response(data);
|
511 |
-
}
|
512 |
-
});
|
513 |
-
}
|
514 |
-
, minLength: 1
|
515 |
-
, select: function(event, ui) {
|
516 |
-
updateShippingForm(true);
|
517 |
-
synchronizeSameAddress();
|
518 |
-
$j(this).val(ui.item.label);
|
519 |
-
$j('#shipping\\:speedy_site_id').val(ui.item.value)
|
520 |
-
$j('#shipping\\:postcode').val(ui.item.post_code)
|
521 |
-
$j('#shipping\\:region').val(ui.item.region)
|
522 |
-
$j('#shipping\\:country_id').val('BG');
|
523 |
-
siteName = ui.item.label;
|
524 |
-
if (ui.item.is_full_nomenclature == 'NO') {
|
525 |
-
isShippingFullNomenclature = 'NO'
|
526 |
-
disableAutocomplete()
|
527 |
-
} else if (ui.item.is_full_nomenclature == 'PARTIAL') {
|
528 |
-
|
529 |
-
isShippingFullNomenclature = 'PARTIAL';
|
530 |
-
enableAutocomplete();
|
531 |
-
} else {
|
532 |
-
isShippingFullNomenclature = 'FULL';
|
533 |
-
enableAutocomplete();
|
534 |
|
535 |
-
}
|
536 |
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
$j('#shipping\\:speedy_office_locator').autocomplete({
|
542 |
-
source: function(request, response) {
|
543 |
-
|
544 |
-
$j.ajax({
|
545 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getOffices"); ?>",
|
546 |
-
dataType: "json",
|
547 |
-
data: {
|
548 |
-
term: request.term,
|
549 |
-
cityid: $j('#shipping\\:speedy_site_id').val()
|
550 |
-
},
|
551 |
-
success: function(data) {
|
552 |
-
response(data);
|
553 |
-
}
|
554 |
-
});
|
555 |
-
}
|
556 |
-
, response: function(event, ui) {
|
557 |
-
$j(this).autocomplete("option", "disabled", false);
|
558 |
-
|
559 |
-
}
|
560 |
-
, minLength: 0
|
561 |
-
, select: function(event, ui) {
|
562 |
-
$j(this).val(ui.item.label);
|
563 |
-
officeName = ui.item.label;
|
564 |
-
$j('#shipping\\:speedy_office_id').val(ui.item.value);
|
565 |
-
$j('#shipping\\:speedy_street').val(ui.item.label)
|
566 |
-
return false;
|
567 |
-
}}).focus(function() {
|
568 |
-
if ($j('#shipping\\:speedy_site_id').val()) {
|
569 |
-
//Use the below line instead of triggering keydown
|
570 |
-
$j(this).autocomplete("search")
|
571 |
-
}
|
572 |
-
});
|
573 |
-
|
574 |
-
|
575 |
-
$j('#shipping\\:speedy_quarter_name').autocomplete({
|
576 |
-
source: function(request, response) {
|
577 |
-
|
578 |
-
$j.ajax({
|
579 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getQuarter"); ?>",
|
580 |
-
dataType: "json",
|
581 |
-
data: {
|
582 |
-
term: request.term,
|
583 |
-
cityid: $j('#shipping\\:speedy_site_id').val()
|
584 |
-
},
|
585 |
-
success: function(data) {
|
586 |
-
response(data);
|
587 |
-
}
|
588 |
-
});
|
589 |
-
}
|
590 |
-
, minLength: 1
|
591 |
-
, select: function(event, ui) {
|
592 |
-
$j(this).val(ui.item.label);
|
593 |
-
quarterName = ui.item.label;
|
594 |
-
$j('#shipping\\:speedy_quarter_id').val(ui.item.value)
|
595 |
-
return false;
|
596 |
-
}});
|
597 |
-
|
598 |
-
$j('#shipping\\:speedy_street').autocomplete({
|
599 |
-
source: function(request, response) {
|
600 |
-
|
601 |
-
$j.ajax({
|
602 |
-
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getStreets"); ?>",
|
603 |
-
dataType: "json",
|
604 |
-
data: {
|
605 |
-
term: request.term,
|
606 |
-
cityid: $j('#shipping\\:speedy_site_id').val()
|
607 |
-
},
|
608 |
-
success: function(data) {
|
609 |
-
response(data);
|
610 |
-
}
|
611 |
-
});
|
612 |
-
}
|
613 |
-
, minLength: 1
|
614 |
-
, select: function(event, ui) {
|
615 |
-
$j(this).val(ui.item.label);
|
616 |
-
streetName = ui.item.label;
|
617 |
-
$j('#shipping\\:speedy_street_id').val(ui.item.value)
|
618 |
-
return false;
|
619 |
-
}});
|
620 |
-
}
|
621 |
-
|
622 |
-
|
623 |
-
function validateAddress() {
|
624 |
-
$j('div#speedyShippingError').hide();
|
625 |
-
var prefix = ' #shipping\\:';
|
626 |
-
var quarter = $j(prefix + 'speedy_quarter_name').val();
|
627 |
-
var quarter_id = $j(prefix + 'speedy_quarter_id').val();
|
628 |
-
var street = $j(prefix + 'speedy_street').val();
|
629 |
-
var street_id = $j(prefix + 'speedy_street_id').val();
|
630 |
-
var number = $j(prefix + 'speedy_street_number').val();
|
631 |
-
var blockNo = $j(prefix + 'speedy_block_number').val();
|
632 |
-
var address_note = $j(prefix + 'speedy_address_note').val();
|
633 |
-
|
634 |
-
|
635 |
-
var floor_no = $j(prefix + 'speedy_floor').val();
|
636 |
-
var entrance = $j(prefix + 'speedy_entrance').val();
|
637 |
-
var apartment = $j(prefix + 'speedy_apartment').val();
|
638 |
-
|
639 |
-
var speedy_pick_from_office = $j(prefix + 'speedy_office_chooser').is(':checked');
|
640 |
-
var speedy_office_name = $j(prefix + 'speedy_office_locator').val();
|
641 |
-
var speedy_office_id = $j(prefix + 'speedy_office_id').val();
|
642 |
-
var isNewAddress = $j('#shipping-address-select').val();
|
643 |
-
|
644 |
-
var isValidTest = null;
|
645 |
-
|
646 |
-
if (!isNewAddress) {
|
647 |
-
|
648 |
-
if (quarter != false || quarter_id != false) {
|
649 |
-
if ((street != false || street_id != false && number != false) || blockNo != false) {
|
650 |
-
|
651 |
-
isValidTest = 1;
|
652 |
-
}
|
653 |
|
654 |
-
|
655 |
|
656 |
-
|
657 |
|
|
|
658 |
|
659 |
-
|
660 |
-
|
661 |
-
|
|
|
|
|
|
|
662 |
|
663 |
-
isValidTest = 1;
|
664 |
|
665 |
-
|
666 |
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
$j('#shipping\\:street1').val(quarter + street + number + blockNo + entrance + floor_no + apartment + address_note);
|
673 |
-
return true;
|
674 |
-
}
|
675 |
-
|
676 |
-
|
677 |
-
if (isValidTest) {
|
678 |
-
|
679 |
-
if ($j('div#speedyShippingError').is(':visible')) {
|
680 |
-
$j('div#speedyShippingError').hide();
|
681 |
-
}
|
682 |
-
$j('#shipping-please-wait').show();
|
683 |
-
var streetAddress = '';
|
684 |
-
|
685 |
-
var address = '';
|
686 |
-
var note = '';
|
687 |
-
|
688 |
-
var streetAddress = '';
|
689 |
-
|
690 |
-
if (speedy_office_name.length > 1) {
|
691 |
-
//address += speedy_office_name;
|
692 |
-
}
|
693 |
-
|
694 |
-
if (quarter.length > 1) {
|
695 |
-
address += ' ' + quarter;
|
696 |
-
}
|
697 |
-
if (street.length > 1) {
|
698 |
-
address += ' ' + street;
|
699 |
-
}
|
700 |
-
if (number.length >= 1) {
|
701 |
-
address += " <?php echo $this->__("Street Number") ?>" + number;
|
702 |
-
}
|
703 |
-
if (blockNo.length >= 1) {
|
704 |
-
address += " <?php echo $this->__("Blok") ?>" + blockNo;
|
705 |
-
}
|
706 |
|
707 |
-
|
708 |
-
|
709 |
-
}
|
710 |
-
if (floor_no.length >= 1) {
|
711 |
-
address += " <?php echo $this->__("Floor") ?>" + floor_no;
|
712 |
-
}
|
713 |
-
if (apartment.length >= 1) {
|
714 |
-
address += " <?php echo $this->__("Apartment") ?>" + apartment;
|
715 |
-
}
|
716 |
|
717 |
-
|
718 |
-
note += " " + address_note;
|
719 |
-
}
|
720 |
|
721 |
-
|
|
|
|
|
722 |
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
|
728 |
-
|
729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
-
|
732 |
-
|
|
|
733 |
|
734 |
-
|
735 |
-
}
|
736 |
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
freezeShippingForm(true);
|
742 |
-
}
|
743 |
-
})
|
744 |
|
745 |
-
|
|
|
746 |
|
747 |
-
|
748 |
-
|
749 |
|
750 |
-
|
751 |
-
|
752 |
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
|
|
|
|
758 |
|
759 |
-
|
760 |
-
checkShippingAddress();
|
761 |
-
//updateShippingForm();
|
762 |
-
$j('#shipping\\:city').val('');
|
763 |
-
$j('#shipping\\:speedy_site_id,#shipping\\:postcode, #shipping\\:region').val('');
|
764 |
-
//var isOfficeSelected = $j('#shipping\\:speedy_office_chooser').is(':checked');
|
765 |
-
//if (isOfficeSelected) {
|
766 |
-
$j('#shipping\\:speedy_office_chooser').removeAttr('checked');
|
767 |
-
$j('#shipping\\:speedy_normal_address').show();
|
768 |
-
$j('#shipping\\:speedy_office_locator').hide();
|
769 |
-
//}
|
770 |
|
771 |
-
|
772 |
-
|
773 |
-
//}
|
774 |
-
})
|
775 |
|
|
|
|
|
776 |
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
788 |
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
|
793 |
-
|
794 |
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
|
799 |
-
|
800 |
|
801 |
-
|
802 |
|
803 |
|
804 |
|
805 |
|
806 |
-
|
807 |
-
|
808 |
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
|
820 |
-
|
821 |
|
822 |
-
|
823 |
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
|
832 |
-
|
833 |
-
|
834 |
|
835 |
|
836 |
-
|
837 |
|
838 |
-
|
839 |
|
840 |
|
841 |
-
|
22 |
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
|
23 |
</div>
|
24 |
</div>
|
25 |
+
|
26 |
+
<?php if (!$this->isCustomerLoggedIn()): ?>
|
27 |
+
<div class="field">
|
28 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
29 |
+
<div class="input-box">
|
30 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
31 |
+
</div>
|
32 |
</div>
|
33 |
+
<?php endif; ?>
|
|
|
34 |
</li>
|
35 |
<li class="wide">
|
36 |
<div class="field" style="width: 100%">
|
69 |
</div>
|
70 |
</li>
|
71 |
<li>
|
72 |
+
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
73 |
+
<div id="shipping:speedy_office_address">
|
74 |
+
<?php else: ?>
|
75 |
+
<div id="shipping:speedy_office_address" style="display: none">
|
76 |
+
<?php endif; ?>
|
77 |
<ul>
|
78 |
+
<li class="wide" id="shipping:speedy_office_textbox">
|
79 |
+
<div class="field">
|
80 |
+
<label for=""></label>
|
81 |
+
<div class="input-box">
|
82 |
+
|
83 |
+
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
84 |
+
<input type="text" name="shipping[speedy_office_locator]" id="shipping:speedy_office_locator" class="input-text" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>"/>
|
85 |
+
<input type="hidden" name="shipping[speedy_office_id]" id="shipping:speedy_office_id" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedyOfficeId()) ?>" />
|
86 |
+
<?php else: ?>
|
87 |
+
|
88 |
+
<input type="text" name="shipping[speedy_office_locator]" id="shipping:speedy_office_locator" class="input-text" />
|
89 |
+
<input type="hidden" name="shipping[speedy_office_id]" id="shipping:speedy_office_id" />
|
90 |
+
<?php endif; ?>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
</li>
|
94 |
|
95 |
|
96 |
|
97 |
</ul>
|
98 |
+
</div>
|
99 |
|
100 |
<li>
|
101 |
+
<?php if ($this->getAddress()->getSpeedyOfficeId()): ?>
|
102 |
|
103 |
+
<div id="shipping:speedy_normal_address" style="display: none">
|
104 |
+
<?php else: ?>
|
105 |
+
<div id="shipping:speedy_normal_address">
|
106 |
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul>
|
109 |
+
<li class="wide">
|
110 |
+
<div class="field">
|
111 |
+
|
112 |
+
<label class="required" for="shipping:speedy_quarter_name"><?php echo $this->__('Quarter') ?></label>
|
113 |
+
<div class="input-box">
|
114 |
+
<input type="text" class="input-text" name="shipping[speedy_quarter_name]" id="shipping:speedy_quarter_name" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyQuarterName()) ?>"/><br />
|
115 |
+
<input type="hidden" name="shipping[speedy_quarter_id]" id="shipping:speedy_quarter_id" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyQuarterId()) ?>"/></div></div>
|
116 |
+
|
117 |
+
<input type="hidden" name="shipping[speedy_street_id]" id="shipping:speedy_street_id" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyStreetId()) ?>" />
|
118 |
+
</li>
|
119 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
120 |
+
<li class="wide">
|
121 |
+
<label for="speedy_street">Улица:</label>
|
122 |
+
<div class="input-box">
|
123 |
+
<input type="text" name="shipping[speedy_street_name]" value="<?php echo $this->escapeHtml($this->getAddress()->getSpeedyStreetName()) ?>" id="shipping:speedy_street" class="input-text" />
|
124 |
+
</div>
|
125 |
+
<div class="street_holder" style="display: none">
|
126 |
+
<label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
127 |
+
<div class="input-box">
|
128 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</li>
|
132 |
+
|
133 |
+
|
134 |
+
<li class="fields">
|
135 |
+
<div class="field">
|
136 |
+
<label class="required" for="speedy_street_number"><?php echo $this->__('Street Number') ?></label>
|
137 |
+
<div class="input-box">
|
138 |
+
|
139 |
+
<input type="text" class="input-text" name="shipping[speedy_street_number]" id="shipping:speedy_street_number" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyStreetNumber()) ?>" /></div>
|
140 |
+
</div>
|
141 |
+
<div class="field">
|
142 |
+
<label class="required" for="speedy_block_number"><?php echo $this->__('Blok') ?></label>
|
143 |
+
<div class="input-box">
|
144 |
+
<input type="text" class="input-text" name="shipping[speedy_block_number]" id="shipping:speedy_block_number" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyBlockNumber()) ?>" /></div>
|
145 |
+
</div>
|
146 |
+
|
147 |
+
</li>
|
148 |
+
<li class="fields">
|
149 |
+
<div class="field">
|
150 |
+
<label for=""><?php echo $this->__("Entrance") ?></label>
|
151 |
+
<div class="input-box">
|
152 |
+
<input type="text" name="shipping[speedy_entrance]" id="shipping:speedy_entrance" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyEntrance()) ?>" /></div>
|
153 |
+
</div>
|
154 |
+
<div class="field">
|
155 |
+
<label for=""><?php echo $this->__("Floor") ?></label>
|
156 |
+
<div class="input-box">
|
157 |
+
<input type="text" name="shipping[speedy_floor]" id="shipping:speedy_floor" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyFloor()) ?>"/></div>
|
158 |
+
</div>
|
159 |
+
</li>
|
160 |
+
<li class="fields">
|
161 |
+
<div class="field">
|
162 |
+
<label for=""><?php echo $this->__("Apartment") ?></label>
|
163 |
+
<div class="input-box">
|
164 |
+
<input type="text" name="shipping[speedy_apartment]" id="shipping:speedy_apartment" class="input-text" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyApartment()) ?>" /></div>
|
165 |
+
</div>
|
166 |
+
</li>
|
167 |
+
<li class="wide">
|
168 |
+
<div class="field">
|
169 |
+
<label for=""><?php echo $this->__("Address note") ?></label>
|
170 |
+
<div class="input-box">
|
171 |
+
<input class="input-text" id="shipping:speedy_address_note" type="text" name="shipping[speedy_address_note]" value="<?php echo $this->htmlEscape($this->getAddress()->getSpeedyAddressNote()) ?>" />
|
172 |
+
|
173 |
+
</div>
|
174 |
+
</div>
|
175 |
+
</li>
|
176 |
+
<ul>
|
177 |
+
</div>
|
178 |
+
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
179 |
+
<li class="wide">
|
180 |
+
<label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
|
181 |
+
<div class="input-box">
|
182 |
+
<input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
183 |
+
</div>
|
184 |
+
</li>
|
185 |
+
<?php endif; ?>
|
186 |
+
<li class="fields">
|
187 |
+
|
188 |
+
<div class="field">
|
189 |
+
<label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
190 |
+
<div class="input-box">
|
191 |
+
<select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
192 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
193 |
+
</select>
|
194 |
+
<script type="text/javascript">
|
195 |
+
//<![CDATA[
|
196 |
+
$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
197 |
+
//]]>
|
198 |
+
</script>
|
199 |
+
<input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
</li>
|
203 |
+
<li class="fields">
|
204 |
+
<div class="field">
|
205 |
+
<label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
206 |
+
<div class="input-box">
|
207 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
|
208 |
+
</div>
|
209 |
+
</div>
|
210 |
+
<div class="field">
|
211 |
+
<label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
212 |
+
<div class="input-box">
|
213 |
+
<?php echo $this->getCountryHtmlSelect('shipping') ?>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
</li>
|
217 |
+
<li class="fields">
|
218 |
+
<div class="field">
|
219 |
+
<label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
220 |
+
<div class="input-box">
|
221 |
+
<input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
<div class="field">
|
225 |
+
<label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
|
226 |
+
<div class="input-box">
|
227 |
+
<input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
+
</li>
|
231 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()): ?>
|
232 |
+
<li class="control">
|
233 |
+
<input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()): ?> checked="checked"<?php endif; ?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
|
234 |
+
<?php else: ?>
|
235 |
+
<li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
|
236 |
+
<?php endif; ?>
|
237 |
+
|
238 |
+
</fieldset>
|
239 |
+
</li>
|
240 |
+
<li class="control" id="sameBillingBox">
|
241 |
+
<input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if ($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
|
242 |
+
</li>
|
243 |
+
<li>
|
244 |
+
<div class="buttons-set" id="shipping-buttons-container">
|
245 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
246 |
+
<p class="back-link"><a href="#" onclick="checkout.back();
|
247 |
return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
248 |
+
<button type="button" class="button" title="<?php echo $this->__('Continue') ?>" ><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
249 |
+
<span id="shipping-please-wait" class="please-wait" style="display:none;">
|
250 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
251 |
+
</span>
|
252 |
+
</div>
|
253 |
+
</li>
|
254 |
+
</ul>
|
255 |
+
</form>
|
256 |
+
<script type="text/javascript">
|
257 |
+
//<![CDATA[
|
258 |
+
var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
|
259 |
+
'<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
|
260 |
+
var shippingForm = new VarienForm('co-shipping-form');
|
261 |
+
shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
|
262 |
+
//shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
263 |
+
$('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
|
264 |
+
|
265 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
|
266 |
+
//]]>
|
267 |
+
|
268 |
+
|
269 |
+
var isShippingFullNomenclature = 0;
|
270 |
+
|
271 |
+
$j('document').ready(function() {
|
272 |
+
|
273 |
+
|
274 |
+
|
275 |
+
|
276 |
+
|
277 |
+
function synchronizeSameAddress() {
|
278 |
+
if ($j('#shipping\\:same_as_billing').is(':checked')) {
|
279 |
+
$j('#shipping\\:same_as_billing').removeAttr('checked')
|
280 |
+
}
|
281 |
+
}
|
282 |
|
|
|
|
|
283 |
|
284 |
+
var isShippingValidAddress = $j('#shipping-address-select').val();
|
285 |
|
|
|
286 |
|
|
|
287 |
|
288 |
|
289 |
|
290 |
+
var siteName = '';
|
291 |
+
var quarterName = '';
|
292 |
+
var streetName = '';
|
293 |
+
var blokName = '';
|
294 |
+
var officeName = '';
|
295 |
|
296 |
|
297 |
+
function initFields() {
|
|
|
|
|
|
|
|
|
298 |
|
299 |
+
if ($j('#billing\\:speedy_quarter_name').val() != '') {
|
300 |
+
quarterName = $j('#billing\\:speedy_quarter_name').val();
|
301 |
+
}
|
302 |
|
|
|
303 |
|
304 |
+
if ($j('#billing\\:street_1').val() != '') {
|
305 |
+
streetName = $j('#billing\\:street_1').val();
|
306 |
+
}
|
307 |
|
308 |
|
309 |
+
if ($j('#billing\\:speedy_block_number').val() != '') {
|
310 |
+
blokName = $j('#billing\\:speedy_block_number').val();
|
311 |
+
}
|
312 |
|
313 |
+
if ($j('#billing\\:speedy_office_locator').val() != '') {
|
314 |
+
officeName = $j('#billing\\:speedy_office_locator').val();
|
315 |
+
}
|
316 |
+
}
|
|
|
317 |
|
318 |
|
|
|
319 |
|
320 |
+
initFields();
|
|
|
|
|
321 |
|
322 |
|
323 |
+
function checkFields(evt) {
|
324 |
+
var evtTarget = $j(evt.target);
|
|
|
325 |
|
326 |
+
if (evtTarget.attr('id') == 'shipping:city') {
|
327 |
|
328 |
+
if (siteName != evtTarget.val()) {
|
|
|
|
|
329 |
|
330 |
+
evtTarget.val('')
|
|
|
|
|
|
|
331 |
|
332 |
+
$j('#shipping\\:speedy_site_id').val('')
|
333 |
+
$j('#shipping\\:postcode').val('');
|
334 |
+
$j('#shipping\\:region').val('')
|
335 |
+
updateShippingForm();
|
336 |
+
$j('#shipping\\:speedy_normal_address').show();
|
337 |
+
$j('#shipping\\:speedy_office_address').hide();
|
338 |
|
339 |
|
340 |
+
} else if (evtTarget.val() == "") {
|
341 |
+
updateShippingForm();
|
342 |
+
$j('#shipping\\:speedy_normal_address').show();
|
343 |
+
$j('#shipping\\:speedy_office_address').hide();
|
344 |
+
$j('#shipping\\:speedy_site_id').val('')
|
345 |
+
$j('#zip').val('')
|
346 |
+
} else {
|
347 |
+
// updateForm(true);
|
348 |
+
}
|
349 |
+
}
|
350 |
|
351 |
+
if (evtTarget.attr('id') == 'shipping:speedy_street') {
|
352 |
|
353 |
+
if (isShippingFullNomenclature == 'FULL' && $j('#shipping\\:speedy_street_id').val() == false) {
|
354 |
+
evtTarget.val('')
|
355 |
+
$j('#shipping\\:speedy_street_id').val('');
|
356 |
|
357 |
+
}
|
358 |
|
|
|
359 |
|
360 |
+
else if (evtTarget.val() != streetName && isShippingFullNomenclature == 'FULL') {
|
361 |
+
evtTarget.val('')
|
362 |
+
$j('#shipping\\:speedy_street_id').val('');
|
363 |
+
} else if ($j('#shipping\\:speedy_street_id').val() != '' && isShippingFullNomenclature != 'FULL' && evtTarget.val() != streetName) {
|
364 |
+
evtTarget.val('')
|
365 |
+
$j('#shipping\\:speedy_street_id').val('');
|
366 |
+
} else if (isShippingFullNomenclature == 'NO' || isShippingFullNomenclature == 'PARTIAL') {
|
367 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
368 |
+
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
|
371 |
|
372 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_quarter_name') {
|
373 |
+
if (isShippingFullNomenclature == 'FULL' && $j('#shipping\\:speedy_quarter_id').val() == false) {
|
374 |
+
evtTarget.val('')
|
375 |
+
$j('#shipping\\:speedy_quarter_id').val('');
|
376 |
+
}
|
|
|
|
|
|
|
|
|
|
|
377 |
|
|
|
378 |
|
379 |
+
else if (evtTarget.val() != quarterName && isShippingFullNomenclature == 'FULL') {
|
380 |
+
evtTarget.val('')
|
381 |
+
$j('#shipping\\:speedy_quarter_id').val('');
|
382 |
+
} else if ($j('#shipping\\:speedy_quarter_id').val() != '' && isShippingFullNomenclature != 'FULL' && evtTarget.val() != quarterName) {
|
383 |
+
evtTarget.val('')
|
384 |
+
$j('#shipping\\:speedy_quarter_id').val('');
|
385 |
|
386 |
+
} else if (isShippingFullNomenclature == 'NO' || isShippingFullNomenclature == 'PARTIAL') {
|
387 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
388 |
+
}
|
389 |
|
390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
|
392 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_office_locator') {
|
393 |
|
394 |
|
395 |
+
if ($j('#shipping\\:speedy_office_id').val() == false) {
|
396 |
+
evtTarget.val('')
|
397 |
+
$j('#shipping\\:speedy_office_id').val('');
|
398 |
+
$j('#shipping\\:speedy_street').val('')
|
399 |
+
}
|
400 |
|
401 |
|
402 |
+
else if (evtTarget.val() != officeName) {
|
403 |
+
evtTarget.val('')
|
404 |
+
//$j('#shipping\\:speedy_office_chooser').removeAttr('checked')
|
405 |
+
$j('#shipping\\:speedy_office_id').val('');
|
406 |
+
$j('#shipping\\:speedy_street').val('')
|
407 |
+
} else if ($j('#shipping\\:speedy_office_id').val() != '' && evtTarget.val() != officeName) {
|
408 |
+
evtTarget.val('')
|
409 |
+
$j('#shipping\\:speedy_office_id').val('');
|
410 |
+
$j('#shipping\\:speedy_street').val('')
|
411 |
+
}
|
412 |
|
413 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_block_number') {
|
414 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
415 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_entrance') {
|
416 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
417 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_floor') {
|
418 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
419 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_apartment') {
|
420 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
421 |
+
} else if (evtTarget.attr('id') == 'shipping:speedy_address_note') {
|
422 |
+
evtTarget.val(evtTarget.val().toUpperCase())
|
423 |
+
}
|
424 |
|
425 |
+
}
|
426 |
|
427 |
|
428 |
+
$j('#shipping\\:city,div#shipping\\:speedy_normal_address input, div#shipping\\:speedy_office_address input').change(function(evt) {
|
429 |
|
430 |
+
checkFields(evt);
|
431 |
+
synchronizeSameAddress();
|
432 |
|
433 |
+
})
|
|
|
|
|
|
|
|
|
434 |
|
435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
+
$j('#opc-shipping div.step-title').click(function(evt) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
|
|
|
439 |
|
440 |
+
checkShippingAddress();
|
441 |
+
})
|
442 |
|
443 |
+
checkShippingAddress();
|
444 |
|
445 |
+
function checkShippingAddress() {
|
|
|
446 |
|
447 |
+
var showShippingError = true;
|
448 |
+
var isShippingValidAddress = $j('#shipping-address-select').val();
|
449 |
|
450 |
+
for (var i = 0; i < test.length; i++) {
|
451 |
+
if (test[i] == isShippingValidAddress || isShippingValidAddress == "") {
|
452 |
|
453 |
+
$j('#speedy_shipping_address_error').hide();
|
454 |
+
showShippingError = false;
|
455 |
+
}
|
456 |
|
|
|
457 |
|
458 |
+
}
|
459 |
|
460 |
+
if (showShippingError) {
|
|
|
461 |
|
462 |
+
$j('#speedy_shipping_address_error').show();
|
463 |
+
}
|
464 |
|
465 |
+
}
|
466 |
|
|
|
|
|
467 |
|
|
|
|
|
468 |
|
469 |
+
$j('#shipping\\:speedy_office_chooser').change(function(evt) {
|
|
|
|
|
470 |
|
471 |
+
if ($j('#shipping\\:same_as_billing').is(':checked')) {
|
472 |
+
$j('#shipping\\:same_as_billing').prop('checked', false);
|
473 |
+
}
|
474 |
|
475 |
+
if ($j(this).is(':checked')) {
|
476 |
+
$j('#shipping\\:speedy_normal_address').hide().find('input').val('');
|
477 |
+
$j('#shipping\\:speedy_office_address').show().find('input').show();
|
478 |
|
479 |
+
} else {
|
480 |
+
$j('#shipping\\:speedy_normal_address').show().find('input');
|
481 |
+
$j('#shipping\\:speedy_office_address').hide().find('input').val('');
|
482 |
+
$j('#shipping\\:speedy_office_id, #shipping\\:street_0,#shipping\\:speedy_street,#shipping\\:street_1,#shipping\\:speedy_office_locator').val('');
|
483 |
|
484 |
+
}
|
485 |
+
});
|
486 |
|
|
|
487 |
|
488 |
+
_initListeners();
|
489 |
+
|
490 |
+
function _initListeners() {
|
491 |
+
// var city_id = $j('#city_id').val();
|
492 |
+
|
493 |
+
var cityToIDMap = [];
|
494 |
+
var streetToID = [];
|
495 |
+
|
496 |
+
|
497 |
+
|
498 |
+
|
499 |
+
|
500 |
+
$j('#shipping\\:city').autocomplete({
|
501 |
+
source: function(request, response) {
|
502 |
+
|
503 |
+
$j.ajax({
|
504 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getSite"); ?>",
|
505 |
+
dataType: "json",
|
506 |
+
data: {
|
507 |
+
term: request.term
|
508 |
+
},
|
509 |
+
success: function(data) {
|
510 |
+
response(data);
|
511 |
+
}
|
512 |
+
});
|
513 |
+
}
|
514 |
+
, minLength: 1
|
515 |
+
, select: function(event, ui) {
|
516 |
+
updateShippingForm(true);
|
517 |
+
synchronizeSameAddress();
|
518 |
+
$j(this).val(ui.item.label);
|
519 |
+
$j('#shipping\\:speedy_site_id').val(ui.item.value)
|
520 |
+
$j('#shipping\\:postcode').val(ui.item.post_code)
|
521 |
+
$j('#shipping\\:region').val(ui.item.region)
|
522 |
+
$j('#shipping\\:country_id').val('BG');
|
523 |
+
siteName = ui.item.label;
|
524 |
+
if (ui.item.is_full_nomenclature == 'NO') {
|
525 |
+
isShippingFullNomenclature = 'NO'
|
526 |
+
disableAutocomplete()
|
527 |
+
} else if (ui.item.is_full_nomenclature == 'PARTIAL') {
|
528 |
+
|
529 |
+
isShippingFullNomenclature = 'PARTIAL';
|
530 |
+
enableAutocomplete();
|
531 |
+
} else {
|
532 |
+
isShippingFullNomenclature = 'FULL';
|
533 |
+
enableAutocomplete();
|
534 |
+
|
535 |
+
}
|
536 |
+
|
537 |
+
// clearForm();
|
538 |
+
return false;
|
539 |
+
}});
|
540 |
+
|
541 |
+
$j('#shipping\\:speedy_office_locator').autocomplete({
|
542 |
+
source: function(request, response) {
|
543 |
+
|
544 |
+
$j.ajax({
|
545 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getOffices"); ?>",
|
546 |
+
dataType: "json",
|
547 |
+
data: {
|
548 |
+
term: request.term,
|
549 |
+
cityid: $j('#shipping\\:speedy_site_id').val()
|
550 |
+
},
|
551 |
+
success: function(data) {
|
552 |
+
response(data);
|
553 |
+
}
|
554 |
+
});
|
555 |
+
}
|
556 |
+
, response: function(event, ui) {
|
557 |
+
$j(this).autocomplete("option", "disabled", false);
|
558 |
+
|
559 |
+
}
|
560 |
+
, minLength: 0
|
561 |
+
, select: function(event, ui) {
|
562 |
+
$j(this).val(ui.item.label);
|
563 |
+
officeName = ui.item.label;
|
564 |
+
$j('#shipping\\:speedy_office_id').val(ui.item.value);
|
565 |
+
$j('#shipping\\:speedy_street').val(ui.item.label)
|
566 |
+
initShippingSiteData(ui);
|
567 |
+
return false;
|
568 |
+
}}).focus(function() {
|
569 |
+
if ($j('#shipping\\:speedy_site_id').val()) {
|
570 |
+
//Use the below line instead of triggering keydown
|
571 |
+
$j(this).autocomplete("search")
|
572 |
+
}
|
573 |
+
});
|
574 |
+
|
575 |
+
|
576 |
+
$j('#shipping\\:speedy_quarter_name').autocomplete({
|
577 |
+
source: function(request, response) {
|
578 |
+
|
579 |
+
$j.ajax({
|
580 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getQuarter"); ?>",
|
581 |
+
dataType: "json",
|
582 |
+
data: {
|
583 |
+
term: request.term,
|
584 |
+
cityid: $j('#shipping\\:speedy_site_id').val()
|
585 |
+
},
|
586 |
+
success: function(data) {
|
587 |
+
response(data);
|
588 |
+
}
|
589 |
+
});
|
590 |
+
}
|
591 |
+
, minLength: 1
|
592 |
+
, select: function(event, ui) {
|
593 |
+
$j(this).val(ui.item.label);
|
594 |
+
quarterName = ui.item.label;
|
595 |
+
$j('#shipping\\:speedy_quarter_id').val(ui.item.value)
|
596 |
+
return false;
|
597 |
+
}});
|
598 |
+
|
599 |
+
$j('#shipping\\:speedy_street').autocomplete({
|
600 |
+
source: function(request, response) {
|
601 |
+
|
602 |
+
$j.ajax({
|
603 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getStreets"); ?>",
|
604 |
+
dataType: "json",
|
605 |
+
data: {
|
606 |
+
term: request.term,
|
607 |
+
cityid: $j('#shipping\\:speedy_site_id').val()
|
608 |
+
},
|
609 |
+
success: function(data) {
|
610 |
+
response(data);
|
611 |
+
}
|
612 |
+
});
|
613 |
+
}
|
614 |
+
, minLength: 1
|
615 |
+
, select: function(event, ui) {
|
616 |
+
$j(this).val(ui.item.label);
|
617 |
+
streetName = ui.item.label;
|
618 |
+
$j('#shipping\\:speedy_street_id').val(ui.item.value)
|
619 |
+
return false;
|
620 |
+
}});
|
621 |
+
|
622 |
+
$j('#shipping\\:speedy_block_number').autocomplete({
|
623 |
+
source: function(request, response) {
|
624 |
+
|
625 |
+
$j.ajax({
|
626 |
+
url: "<?php echo Mage::getUrl("speedyshippingfront/address/getBlock"); ?>",
|
627 |
+
dataType: "json",
|
628 |
+
data: {
|
629 |
+
term: request.term,
|
630 |
+
cityid: $j('#shipping\\:speedy_site_id').val()
|
631 |
+
},
|
632 |
+
success: function(data) {
|
633 |
+
response(data);
|
634 |
+
}
|
635 |
+
});
|
636 |
+
}
|
637 |
+
, minLength: 1
|
638 |
+
, select: function(event, ui) {
|
639 |
+
$j(this).val(ui.item.label);
|
640 |
+
|
641 |
+
return false;
|
642 |
+
}});
|
643 |
+
}
|
644 |
|
645 |
|
646 |
+
function initShippingSiteData(jsonResponse) {
|
647 |
+
$j('#shipping\\:speedy_site_id').val(jsonResponse.item.site_id)
|
648 |
+
$j('#shipping\\:postcode').val(jsonResponse.item.post_code)
|
649 |
+
$j('#shipping\\:region').val(jsonResponse.item.region)
|
650 |
|
651 |
+
siteName = jsonResponse.item.site_name;
|
652 |
+
$j('#shipping\\:city').val(siteName);
|
653 |
+
if (jsonResponse.item.is_full_nomenclature == 'NO') {
|
654 |
+
isShippingFullNomenclature = 'NO';
|
655 |
+
disableAutocomplete()
|
656 |
+
} else if (jsonResponse.item.is_full_nomenclature == 'PARTIAL') {
|
657 |
|
658 |
+
isShippingFullNomenclature = 'PARTIAL';
|
659 |
+
enableAutocomplete();
|
660 |
+
} else {
|
661 |
+
isShippingFullNomenclature = 'FULL';
|
662 |
+
enableAutocomplete();
|
663 |
|
664 |
+
}
|
665 |
+
}
|
|
|
|
|
666 |
|
|
|
|
|
667 |
|
668 |
+
function validateAddress() {
|
669 |
+
$j('div#speedyShippingError').hide();
|
670 |
+
var prefix = ' #shipping\\:';
|
671 |
+
var quarter = $j(prefix + 'speedy_quarter_name').val();
|
672 |
+
var quarter_id = $j(prefix + 'speedy_quarter_id').val();
|
673 |
+
var street = $j(prefix + 'speedy_street').val();
|
674 |
+
var street_id = $j(prefix + 'speedy_street_id').val();
|
675 |
+
var number = $j(prefix + 'speedy_street_number').val();
|
676 |
+
var blockNo = $j(prefix + 'speedy_block_number').val();
|
677 |
+
var address_note = $j(prefix + 'speedy_address_note').val();
|
678 |
|
|
|
679 |
|
680 |
+
var floor_no = $j(prefix + 'speedy_floor').val();
|
681 |
+
var entrance = $j(prefix + 'speedy_entrance').val();
|
682 |
+
var apartment = $j(prefix + 'speedy_apartment').val();
|
683 |
|
684 |
+
var speedy_pick_from_office = $j(prefix + 'speedy_office_chooser').is(':checked');
|
685 |
+
var speedy_office_name = $j(prefix + 'speedy_office_locator').val();
|
686 |
+
var speedy_office_id = $j(prefix + 'speedy_office_id').val();
|
687 |
+
var isNewAddress = $j('#shipping-address-select').val();
|
688 |
|
689 |
+
var isValidTest = null;
|
690 |
|
691 |
+
if (!isNewAddress) {
|
692 |
|
693 |
+
if (quarter != false || quarter_id != false) {
|
694 |
+
if ((street && number) || blockNo || number) {
|
695 |
|
696 |
+
isValidTest = 1;
|
697 |
+
}
|
698 |
|
699 |
+
} else if (speedy_pick_from_office != false && speedy_office_name != false && speedy_office_id != false) {
|
|
|
700 |
|
701 |
+
isValidTest = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
|
|
|
703 |
|
704 |
+
}
|
705 |
+
else if ((street != false || street_id != false)) {
|
706 |
+
if (number != false || blockNo != false) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
|
708 |
+
isValidTest = 1;
|
709 |
|
710 |
+
}
|
711 |
|
712 |
+
} else if (address_note != false && address_note.length > 4) {
|
713 |
|
714 |
+
isValidTest = 1;
|
715 |
+
}
|
716 |
+
} else {
|
717 |
+
$j('#shipping\\:street1').val(quarter + street + number + blockNo + entrance + floor_no + apartment + address_note);
|
718 |
+
return true;
|
719 |
+
}
|
720 |
|
|
|
721 |
|
722 |
+
if (isValidTest) {
|
723 |
|
724 |
+
if ($j('div#speedyShippingError').is(':visible')) {
|
725 |
+
$j('div#speedyShippingError').hide();
|
726 |
+
}
|
727 |
+
$j('#shipping-please-wait').show();
|
728 |
+
var streetAddress = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
729 |
|
730 |
+
var address = '';
|
731 |
+
var note = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
732 |
|
733 |
+
var streetAddress = '';
|
|
|
|
|
734 |
|
735 |
+
if (speedy_office_name.length > 1) {
|
736 |
+
//address += speedy_office_name;
|
737 |
+
}
|
738 |
|
739 |
+
if (quarter.length > 1) {
|
740 |
+
address += ' ' + quarter;
|
741 |
+
}
|
742 |
+
if (street.length > 1) {
|
743 |
+
address += ' ' + street;
|
744 |
+
}
|
745 |
+
if (number.length >= 1) {
|
746 |
+
address += " <?php echo $this->__("Street Number") ?>" + number;
|
747 |
+
}
|
748 |
+
if (blockNo.length >= 1) {
|
749 |
+
address += " <?php echo $this->__("Blok") ?>" + blockNo;
|
750 |
+
}
|
751 |
|
752 |
+
if (entrance.length >= 1) {
|
753 |
+
address += " <?php echo $this->__("Entrance") ?>" + entrance;
|
754 |
+
}
|
755 |
+
if (floor_no.length >= 1) {
|
756 |
+
address += " <?php echo $this->__("Floor") ?>" + floor_no;
|
757 |
+
}
|
758 |
+
if (apartment.length >= 1) {
|
759 |
+
address += " <?php echo $this->__("Apartment") ?>" + apartment;
|
760 |
+
}
|
761 |
|
762 |
+
if (address_note.length > 3) {
|
763 |
+
note += " " + address_note;
|
764 |
+
}
|
765 |
|
766 |
+
streetAddress = address;
|
|
|
767 |
|
768 |
+
if (note != '') {
|
769 |
+
streetAddress += ', ' + note;
|
770 |
+
}
|
771 |
+
$j('#shipping\\:street1').val(streetAddress);
|
|
|
|
|
|
|
772 |
|
773 |
+
return true;
|
774 |
+
} else {
|
775 |
|
776 |
+
$j('div#speedyShippingError').show();
|
777 |
+
return false;
|
778 |
|
779 |
+
}
|
780 |
+
}
|
781 |
|
782 |
+
$j('#shipping\\:same_as_billing').change(function(evt) {
|
783 |
+
if ($j(this).is(':checked')) {
|
784 |
+
freezeShippingForm()
|
785 |
+
} else {
|
786 |
+
freezeShippingForm(true);
|
787 |
+
}
|
788 |
+
})
|
789 |
|
790 |
+
$j('#shipping-address-select').change(function(evt) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
791 |
|
792 |
+
isShippingValidAddress = $j(this).val();
|
793 |
+
//We have a new billing address
|
|
|
|
|
794 |
|
795 |
+
$j('#shipping\\:same_as_billing').attr('checked', false);
|
796 |
+
shipping.setSameAsBilling($j('#shipping\\:same_as_billing').is(':checked'));
|
797 |
|
798 |
+
if (!isShippingValidAddress || isNewBillingAddress) {
|
799 |
+
$j('#sameBillingBox').hide();
|
800 |
+
} else {
|
801 |
+
$j('#sameBillingBox').show();
|
802 |
+
}
|
803 |
|
804 |
+
shipping.newAddress(!$j(this).val())
|
805 |
+
checkShippingAddress();
|
806 |
+
//updateShippingForm();
|
807 |
+
$j('#shipping\\:city').val('');
|
808 |
+
$j('#shipping\\:speedy_site_id,#shipping\\:postcode, #shipping\\:region').val('');
|
809 |
+
//var isOfficeSelected = $j('#shipping\\:speedy_office_chooser').is(':checked');
|
810 |
+
//if (isOfficeSelected) {
|
811 |
+
$j('#shipping\\:speedy_office_chooser').removeAttr('checked');
|
812 |
+
$j('#shipping\\:speedy_normal_address').show();
|
813 |
+
$j('#shipping\\:speedy_office_locator').hide();
|
814 |
+
//}
|
815 |
+
|
816 |
+
// if ($j('#shipping\\:same_as_billing').is(':checked')) {
|
817 |
+
updateShippingForm();
|
818 |
+
//}
|
819 |
+
})
|
820 |
+
|
821 |
+
|
822 |
+
function enableAutocomplete() {
|
823 |
+
$j("#shipping\\:speedy_quarter_name, \n\
|
824 |
+
#shipping\\:speedy_street,\n\
|
825 |
+
#shipping\\:speedy_office_locator ").autocomplete("option", "disabled", false);
|
826 |
+
}
|
827 |
+
|
828 |
+
function disableAutocomplete() {
|
829 |
+
$j("#shipping\\:speedy_quarter_name, \n\
|
830 |
+
#shipping\\:speedy_street,\n\
|
831 |
+
#shipping\\:speedy_office_locator ").autocomplete("option", "disabled", true);
|
832 |
+
}
|
833 |
|
834 |
+
$j('#shipping-buttons-container button.button ').click(function(evt) {
|
835 |
+
$j('div#speedyShippingError').hide();
|
836 |
+
evt.preventDefault();
|
837 |
|
838 |
+
var isValid = validateAddress();
|
839 |
|
840 |
+
if (isValid) {
|
841 |
+
shipping.save();
|
842 |
+
} else {
|
843 |
|
844 |
+
}
|
845 |
|
846 |
+
})
|
847 |
|
848 |
|
849 |
|
850 |
|
851 |
+
function freezeShippingForm(enable) {
|
852 |
+
if (enable) {
|
853 |
|
854 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input,shipping\\:speedy_office_chooser')
|
855 |
+
.removeAttr('readonly');
|
856 |
+
$j('#shipping\\:speedy_office_chooser').removeAttr('disabled')
|
857 |
|
858 |
+
} else {
|
859 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input, shipping\\:speedy_office_chooser')
|
860 |
+
.attr('readonly', 'readonly')
|
861 |
+
$j('#shipping\\:speedy_office_chooser').attr('disabled', 'disabled')
|
862 |
+
}
|
863 |
+
}
|
864 |
|
865 |
+
function updateShippingForm(enable) {
|
866 |
|
867 |
+
if (enable) {
|
868 |
|
869 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input')
|
870 |
+
.removeAttr('readonly').val('');
|
871 |
+
$j('#shipping\\:speedy_office_chooser').removeAttr('disabled')
|
872 |
|
873 |
+
} else {
|
874 |
+
$j('div#shipping\\:speedy_normal_address input, #shipping\\:speedy_office_address input')
|
875 |
+
.attr('readonly', 'readonly').val('');
|
876 |
|
877 |
+
$j('#shipping\\:speedy_office_chooser').removeAttr('checked').attr('disabled', 'disabled');
|
878 |
+
}
|
879 |
|
880 |
|
881 |
+
}
|
882 |
|
883 |
+
})
|
884 |
|
885 |
|
886 |
+
</script>
|
app/design/frontend/base/default/template/speedy_speedyshipping/customer/address/edit.phtml
CHANGED
@@ -528,7 +528,8 @@
|
|
528 |
$j(this).val(ui.item.label);
|
529 |
officeName = ui.item.label;
|
530 |
$j('#speedy_office_id').val(ui.item.value);
|
531 |
-
$j('#speedy_street').val(ui.item.label)
|
|
|
532 |
return false;
|
533 |
}}).focus(function() {
|
534 |
if ($j('#speedy_site_id').val()) {
|
@@ -606,12 +607,33 @@
|
|
606 |
, minLength: 1
|
607 |
, select: function(event, ui) {
|
608 |
$j(this).val(ui.item.label);
|
609 |
-
$j('#speedy_block_id').val(ui.item.value)
|
610 |
|
611 |
return false;
|
612 |
}});
|
613 |
|
614 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
function updateForm(enable) {
|
616 |
|
617 |
if (enable) {
|
@@ -672,7 +694,7 @@
|
|
672 |
}
|
673 |
|
674 |
if (quarter || quarter_id) {
|
675 |
-
if ((street
|
676 |
isValid = 1;
|
677 |
}
|
678 |
|
528 |
$j(this).val(ui.item.label);
|
529 |
officeName = ui.item.label;
|
530 |
$j('#speedy_office_id').val(ui.item.value);
|
531 |
+
$j('#speedy_street').val(ui.item.label);
|
532 |
+
initSiteData(ui);
|
533 |
return false;
|
534 |
}}).focus(function() {
|
535 |
if ($j('#speedy_site_id').val()) {
|
607 |
, minLength: 1
|
608 |
, select: function(event, ui) {
|
609 |
$j(this).val(ui.item.label);
|
|
|
610 |
|
611 |
return false;
|
612 |
}});
|
613 |
|
614 |
|
615 |
+
function initSiteData(jsonResponse){
|
616 |
+
$j('#speedy_site_id').val(jsonResponse.item.site_id)
|
617 |
+
$j('#zip').val(jsonResponse.item.post_code)
|
618 |
+
$j('#region').val(jsonResponse.item.region)
|
619 |
+
|
620 |
+
siteName = jsonResponse.item.site_name;
|
621 |
+
$j('#city').val(siteName);
|
622 |
+
if (jsonResponse.item.is_full_nomenclature == 'NO') {
|
623 |
+
isFullNomenclature = 'NO';
|
624 |
+
disableAutocomplete()
|
625 |
+
} else if (jsonResponse.item.is_full_nomenclature == 'PARTIAL') {
|
626 |
+
|
627 |
+
isFullNomenclature = 'PARTIAL';
|
628 |
+
enableAutocomplete();
|
629 |
+
} else {
|
630 |
+
isFullNomenclature = 'FULL';
|
631 |
+
enableAutocomplete();
|
632 |
+
|
633 |
+
}
|
634 |
+
}
|
635 |
+
|
636 |
+
|
637 |
function updateForm(enable) {
|
638 |
|
639 |
if (enable) {
|
694 |
}
|
695 |
|
696 |
if (quarter || quarter_id) {
|
697 |
+
if ((street && number) || blockNo || number) {
|
698 |
isValid = 1;
|
699 |
}
|
700 |
|
app/etc/modules/Speedyshipping.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<Speedy_Speedyshipping>
|
4 |
<active>true</active>
|
5 |
<codePool>community</codePool>
|
6 |
-
<version>1.0.
|
7 |
</Speedy_Speedyshipping>
|
8 |
</modules>
|
9 |
</config>
|
3 |
<Speedy_Speedyshipping>
|
4 |
<active>true</active>
|
5 |
<codePool>community</codePool>
|
6 |
+
<version>1.0.8</version>
|
7 |
</Speedy_Speedyshipping>
|
8 |
</modules>
|
9 |
</config>
|
app/locale/bg_BG/speedyTranslate.csv
CHANGED
@@ -20,6 +20,7 @@
|
|
20 |
"View order","Преглед на поръчката"
|
21 |
"View Bill of lading number","Номер на товарителницата"
|
22 |
"Time and creation date","Час и дата на създаване"
|
|
|
23 |
"Speedy Bill of lading","Спиди товарителници"
|
24 |
"Add bill of lading","Добави товарителница"
|
25 |
"Create Bill of lading","Създай товарителница"
|
20 |
"View order","Преглед на поръчката"
|
21 |
"View Bill of lading number","Номер на товарителницата"
|
22 |
"Time and creation date","Час и дата на създаване"
|
23 |
+
"Taking time courier","Дата за вземане от куриер"
|
24 |
"Speedy Bill of lading","Спиди товарителници"
|
25 |
"Add bill of lading","Добави товарителница"
|
26 |
"Create Bill of lading","Създай товарителница"
|
lib/SpeedyEPS/util/Util.class.php
CHANGED
@@ -1,87 +1,87 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This class provides static utility functions
|
4 |
-
*/
|
5 |
-
class Util {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Sepeedy time zone
|
9 |
-
* @var string
|
10 |
-
*/
|
11 |
-
const SPEEDY_TIME_ZONE = "Europe/Sofia";
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Return intersection of two services list
|
15 |
-
* @param array $arrAvailableServices Array of ResultCourierServiceExt instances for available services
|
16 |
-
* @param array $arrEnabledServices Array of integers for enabled client services
|
17 |
-
* @return array Array if integers - intersection
|
18 |
-
*/
|
19 |
-
public static function serviceIntersection($arrAvailableServices, $arrEnabledServices) {
|
20 |
-
$arrResult = array();
|
21 |
-
if (isset($arrEnabledServices) && is_array($arrEnabledServices) && isset($arrAvailableServices) && is_array($arrAvailableServices)) {
|
22 |
-
$k = 0;
|
23 |
-
for($i = 0; $i < count($arrEnabledServices); ++$i) {
|
24 |
-
for($j = 0; $j < count($arrAvailableServices); ++$j) {
|
25 |
-
if ($arrEnabledServices[$i] == $arrAvailableServices[$j]->getTypeId()) {
|
26 |
-
$arrResult[$k] = $arrEnabledServices[$i];
|
27 |
-
$k++;
|
28 |
-
break;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
}
|
33 |
-
return $arrResult;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Returns filtered list of services which may process pickings with provided declared weight
|
38 |
-
* @param array $arrSelectedServices Selected list service identofiers - integers
|
39 |
-
* @param double $weightDeclared Declared weight of picking
|
40 |
-
* @param EPSFacade $eps EPS client instance
|
41 |
-
* @param integer $senderSiteId Sender site ID
|
42 |
-
* @param integer $receiverSiteId Receiver site Id
|
43 |
-
* @param date $date Date
|
44 |
-
* @param boolean $documents Document flag
|
45 |
-
* @return array of integers - List of service Ids
|
46 |
-
*/
|
47 |
-
public static function filterServicesByWeightIntervals($arrSelectedServices, $weightDeclared, $eps, $senderSiteId, $receiverSiteId, $date, $documents) {
|
48 |
-
$arrResult = array();
|
49 |
-
if (isset($arrSelectedServices) && is_array($arrSelectedServices)) {
|
50 |
-
$j = 0;
|
51 |
-
for ($i = 0; $i < count($arrSelectedServices); ++$i) {
|
52 |
-
$weightInterval = $eps->getWeightInterval($arrSelectedServices[$i], $senderSiteId, $receiverSiteId, $date, $documents);
|
53 |
-
if (isset($weightInterval)) {
|
54 |
-
if ($weightInterval->getMinValue() <= $weightDeclared && $weightDeclared <= $weightInterval->getMaxValue()) {
|
55 |
-
$arrResult[$j] = $arrSelectedServices[$i];
|
56 |
-
$j++;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
61 |
-
return $arrResult;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Returns single value from list
|
66 |
-
* @param Array $arrList List in array
|
67 |
-
* @throws ClientException Thrown in case no elements are found in the list or more than 1 elements is contained in the list
|
68 |
-
* @return First and the only value in the list
|
69 |
-
*/
|
70 |
-
public static function getIfSingleValueFromList($arrList) {
|
71 |
-
if (count($arrList) == 0) {
|
72 |
-
throw new ClientException("No element is found in the list.");
|
73 |
-
} else if (count($arrList) > 1) {
|
74 |
-
throw new ClientException("More than one element is found in the list.");
|
75 |
-
} else {
|
76 |
-
return $arrList[0];
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Get library version
|
82 |
-
*/
|
83 |
-
public static function getLibVersion() {
|
84 |
-
return "
|
85 |
-
}
|
86 |
-
}
|
87 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This class provides static utility functions
|
4 |
+
*/
|
5 |
+
class Util {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Sepeedy time zone
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
const SPEEDY_TIME_ZONE = "Europe/Sofia";
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Return intersection of two services list
|
15 |
+
* @param array $arrAvailableServices Array of ResultCourierServiceExt instances for available services
|
16 |
+
* @param array $arrEnabledServices Array of integers for enabled client services
|
17 |
+
* @return array Array if integers - intersection
|
18 |
+
*/
|
19 |
+
public static function serviceIntersection($arrAvailableServices, $arrEnabledServices) {
|
20 |
+
$arrResult = array();
|
21 |
+
if (isset($arrEnabledServices) && is_array($arrEnabledServices) && isset($arrAvailableServices) && is_array($arrAvailableServices)) {
|
22 |
+
$k = 0;
|
23 |
+
for($i = 0; $i < count($arrEnabledServices); ++$i) {
|
24 |
+
for($j = 0; $j < count($arrAvailableServices); ++$j) {
|
25 |
+
if ($arrEnabledServices[$i] == $arrAvailableServices[$j]->getTypeId()) {
|
26 |
+
$arrResult[$k] = $arrEnabledServices[$i];
|
27 |
+
$k++;
|
28 |
+
break;
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
return $arrResult;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Returns filtered list of services which may process pickings with provided declared weight
|
38 |
+
* @param array $arrSelectedServices Selected list service identofiers - integers
|
39 |
+
* @param double $weightDeclared Declared weight of picking
|
40 |
+
* @param EPSFacade $eps EPS client instance
|
41 |
+
* @param integer $senderSiteId Sender site ID
|
42 |
+
* @param integer $receiverSiteId Receiver site Id
|
43 |
+
* @param date $date Date
|
44 |
+
* @param boolean $documents Document flag
|
45 |
+
* @return array of integers - List of service Ids
|
46 |
+
*/
|
47 |
+
public static function filterServicesByWeightIntervals($arrSelectedServices, $weightDeclared, $eps, $senderSiteId, $receiverSiteId, $date, $documents) {
|
48 |
+
$arrResult = array();
|
49 |
+
if (isset($arrSelectedServices) && is_array($arrSelectedServices)) {
|
50 |
+
$j = 0;
|
51 |
+
for ($i = 0; $i < count($arrSelectedServices); ++$i) {
|
52 |
+
$weightInterval = $eps->getWeightInterval($arrSelectedServices[$i], $senderSiteId, $receiverSiteId, $date, $documents);
|
53 |
+
if (isset($weightInterval)) {
|
54 |
+
if ($weightInterval->getMinValue() <= $weightDeclared && $weightDeclared <= $weightInterval->getMaxValue()) {
|
55 |
+
$arrResult[$j] = $arrSelectedServices[$i];
|
56 |
+
$j++;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
return $arrResult;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Returns single value from list
|
66 |
+
* @param Array $arrList List in array
|
67 |
+
* @throws ClientException Thrown in case no elements are found in the list or more than 1 elements is contained in the list
|
68 |
+
* @return First and the only value in the list
|
69 |
+
*/
|
70 |
+
public static function getIfSingleValueFromList($arrList) {
|
71 |
+
if (count($arrList) == 0) {
|
72 |
+
throw new ClientException("No element is found in the list.");
|
73 |
+
} else if (count($arrList) > 1) {
|
74 |
+
throw new ClientException("More than one element is found in the list.");
|
75 |
+
} else {
|
76 |
+
return $arrList[0];
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get library version
|
82 |
+
*/
|
83 |
+
public static function getLibVersion() {
|
84 |
+
return "@@VERSION";
|
85 |
+
}
|
86 |
+
}
|
87 |
?>
|
lib/SpeedyEPS/ver01/AddrNomen.class.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class is enumeration of address nomenclature state
|
5 |
-
*/
|
6 |
-
class AddrNomen {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Speedy has no address nomenclature (streets, quarters etc.) for the site.
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
const ADDR_NOMEN_NO = 'NO';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Speedy has full address nomenclature (streets, quarters etc.) for the site.
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
const ADDR_NOMEN_FULL = 'FULL';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Speedy has partial address nomenclature (streets, quarters etc.) for this site.
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
const ADDR_NOMEN_PARTIAL = 'PARTIAL';
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Value is one of the constants (NO, FULL, PARTIAL)
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_value;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructs new instance of AddrNomen from string
|
34 |
-
* @param string $value
|
35 |
-
*/
|
36 |
-
function __construct($value) {
|
37 |
-
if ($value != self::ADDR_NOMEN_FULL && $value != self::ADDR_NOMEN_PARTIAL ) {
|
38 |
-
$this->_value = self::ADDR_NOMEN_NO;
|
39 |
-
} else {
|
40 |
-
$this->_value = $value;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get value - one of the constants (NO, FULL, PARTIAL)
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function getValue() {
|
49 |
-
return $this->_value;
|
50 |
-
}
|
51 |
-
}
|
52 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class is enumeration of address nomenclature state
|
5 |
+
*/
|
6 |
+
class AddrNomen {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Speedy has no address nomenclature (streets, quarters etc.) for the site.
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
const ADDR_NOMEN_NO = 'NO';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Speedy has full address nomenclature (streets, quarters etc.) for the site.
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
const ADDR_NOMEN_FULL = 'FULL';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Speedy has partial address nomenclature (streets, quarters etc.) for this site.
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
const ADDR_NOMEN_PARTIAL = 'PARTIAL';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Value is one of the constants (NO, FULL, PARTIAL)
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_value;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructs new instance of AddrNomen from string
|
34 |
+
* @param string $value
|
35 |
+
*/
|
36 |
+
function __construct($value) {
|
37 |
+
if ($value != self::ADDR_NOMEN_FULL && $value != self::ADDR_NOMEN_PARTIAL ) {
|
38 |
+
$this->_value = self::ADDR_NOMEN_NO;
|
39 |
+
} else {
|
40 |
+
$this->_value = $value;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get value - one of the constants (NO, FULL, PARTIAL)
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
public function getValue() {
|
49 |
+
return $this->_value;
|
50 |
+
}
|
51 |
+
}
|
52 |
?>
|
lib/SpeedyEPS/ver01/ClientException.class.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Client Exception is thrown in case client state is invalid
|
4 |
-
*/
|
5 |
-
class ClientException extends Exception {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Constructs new instance of exception
|
9 |
-
* @param string $message
|
10 |
-
*/
|
11 |
-
public function __construct($message) {
|
12 |
-
parent::__construct($message);
|
13 |
-
}
|
14 |
-
}
|
15 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Client Exception is thrown in case client state is invalid
|
4 |
+
*/
|
5 |
+
class ClientException extends Exception {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Constructs new instance of exception
|
9 |
+
* @param string $message
|
10 |
+
*/
|
11 |
+
public function __construct($message) {
|
12 |
+
parent::__construct($message);
|
13 |
+
}
|
14 |
+
}
|
15 |
?>
|
lib/SpeedyEPS/ver01/ComplementaryServiceAllowance.class.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class is enumeration of ComplementaryServiceAllowance
|
5 |
-
*/
|
6 |
-
class ComplementaryServiceAllowance {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The complementary service is not allowed.
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
const COMPL_SERVICE_ALLOWANCE_BANNED = 'BANNED';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* The complementary service is allowed (but not required).
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
const COMPL_SERVICE_ALLOWANCE_ALLOWED = 'ALLOWED';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* The complementary service is required.
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
const COMPL_SERVICE_ALLOWANCE_REQUIRED = 'REQUIRED';
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Value is one of the constants (BANNED, ALLOWED, REQUIRED)
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_value;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructs new instance of Complementary service allownace from string
|
34 |
-
* @param string $value
|
35 |
-
*/
|
36 |
-
function __construct($value) {
|
37 |
-
if ($value != self::COMPL_SERVICE_ALLOWANCE_REQUIRED && $value != self::COMPL_SERVICE_ALLOWANCE_ALLOWED ) {
|
38 |
-
$this->_value = self::COMPL_SERVICE_ALLOWANCE_BANNED;
|
39 |
-
} else {
|
40 |
-
$this->_value = $value;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get value - one of the constants (BANNED, ALLOWED, REQUIRED)
|
46 |
-
* @return string
|
47 |
-
*/
|
48 |
-
public function getValue() {
|
49 |
-
return $this->_value;
|
50 |
-
}
|
51 |
-
}
|
52 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class is enumeration of ComplementaryServiceAllowance
|
5 |
+
*/
|
6 |
+
class ComplementaryServiceAllowance {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The complementary service is not allowed.
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
const COMPL_SERVICE_ALLOWANCE_BANNED = 'BANNED';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The complementary service is allowed (but not required).
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
const COMPL_SERVICE_ALLOWANCE_ALLOWED = 'ALLOWED';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The complementary service is required.
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
const COMPL_SERVICE_ALLOWANCE_REQUIRED = 'REQUIRED';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Value is one of the constants (BANNED, ALLOWED, REQUIRED)
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_value;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructs new instance of Complementary service allownace from string
|
34 |
+
* @param string $value
|
35 |
+
*/
|
36 |
+
function __construct($value) {
|
37 |
+
if ($value != self::COMPL_SERVICE_ALLOWANCE_REQUIRED && $value != self::COMPL_SERVICE_ALLOWANCE_ALLOWED ) {
|
38 |
+
$this->_value = self::COMPL_SERVICE_ALLOWANCE_BANNED;
|
39 |
+
} else {
|
40 |
+
$this->_value = $value;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get value - one of the constants (BANNED, ALLOWED, REQUIRED)
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
+
public function getValue() {
|
49 |
+
return $this->_value;
|
50 |
+
}
|
51 |
+
}
|
52 |
?>
|
lib/SpeedyEPS/ver01/EPSFacade.class.php
CHANGED
@@ -1,719 +1,774 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ClientException.class.php';
|
4 |
-
require_once 'EPSInterface.class.php';
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Speedy EPS Service
|
8 |
-
*/
|
9 |
-
class EPSFacade {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* EPS Interface implementation
|
13 |
-
* @since 1.0
|
14 |
-
* @var EPSInterface
|
15 |
-
*/
|
16 |
-
private $_epsInterfaceImpl;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* User name
|
20 |
-
* @since 1.0
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
private $_username;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* User password
|
27 |
-
* @since 1.0
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_password;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Result of login Speedy web service method clall
|
34 |
-
* @since 1.0
|
35 |
-
* @var ResultLogin
|
36 |
-
*/
|
37 |
-
private $_resultLogin;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Constructs new instance of EPS Facade
|
41 |
-
* @since 1.0
|
42 |
-
* @param EPSInterface $epsInterfaceImpl EPS interface implementation
|
43 |
-
* @param string $username User name
|
44 |
-
* @param string $password User password
|
45 |
-
*/
|
46 |
-
function __construct($epsInterfaceImpl, $username, $password) {
|
47 |
-
$this->_epsInterfaceImpl = $epsInterfaceImpl;
|
48 |
-
$this->_username = $username;
|
49 |
-
$this->_password = $password;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Check session state before calling a business web service method
|
54 |
-
* @since 1.0
|
55 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
56 |
-
*/
|
57 |
-
private function checkStateBeforeCall() {
|
58 |
-
if (!isset($this->_epsInterfaceImpl)) {
|
59 |
-
throw new ClientException("EPS Interface implementation is not set");
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Set EPS interface implementation
|
65 |
-
* @since 1.0
|
66 |
-
* @param EPSInterface $epsInterfaceImpl
|
67 |
-
*/
|
68 |
-
public function setEPSInterfaceImpl($epsInterfaceImpl) {
|
69 |
-
$this->_epsInterfaceImpl = $epsInterfaceImpl;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Return EPS interface implementation
|
74 |
-
* @since 1.0
|
75 |
-
* @return EPSInterface
|
76 |
-
*/
|
77 |
-
public function getEPSInterfaceImpl() {
|
78 |
-
return $this->_epsInterfaceImpl;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Set user name
|
83 |
-
* @since 1.0
|
84 |
-
* @param string $username
|
85 |
-
*/
|
86 |
-
public function setUsername($username) {
|
87 |
-
$this->_username = $username;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Return user name
|
92 |
-
* @since 1.0
|
93 |
-
* @return string User name
|
94 |
-
*/
|
95 |
-
public function getUsername() {
|
96 |
-
return $this->_username;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Set user password
|
101 |
-
* @since 1.0
|
102 |
-
* @param string $password
|
103 |
-
*/
|
104 |
-
public function setPassword($password) {
|
105 |
-
$this->_password = $password;
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Return user password
|
110 |
-
* @since 1.0
|
111 |
-
* @return string User password
|
112 |
-
*/
|
113 |
-
public function getPassword() {
|
114 |
-
return $this->_password;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Return result login.
|
119 |
-
* Optionally tries to open new session in case it is not active
|
120 |
-
* @since 1.0
|
121 |
-
* @param boolean $openNewIfNotActive Whether to try to open new connection. Default is true
|
122 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
123 |
-
* @throws ServerException Thrown in case communication with server has failed
|
124 |
-
* @return ResultLogin
|
125 |
-
*/
|
126 |
-
public function getResultLogin($openNewIfNotActive=true) {
|
127 |
-
if ($openNewIfNotActive && !$this->isSessionActive(true)) {
|
128 |
-
$this->_resultLogin = $this->login();
|
129 |
-
}
|
130 |
-
return $this->_resultLogin;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Login web service method
|
135 |
-
* @since 1.0
|
136 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
137 |
-
* @throws ServerException Thrown in case communication with server has failed
|
138 |
-
* @return ResultLogin Result of login
|
139 |
-
*/
|
140 |
-
public function login() {
|
141 |
-
$this->checkStateBeforeCall();
|
142 |
-
$this->_resultLogin = $this->_epsInterfaceImpl->login($this->_username, $this->_password);
|
143 |
-
return $this->_resultLogin;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Returns flag whether the session is active
|
148 |
-
* @since 1.0
|
149 |
-
* @param boolean $refreshSession In case the session is active, this parameter specifies if the session should be automatically refreshed
|
150 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
151 |
-
* @throws ServerException Thrown in case communication with server has failed
|
152 |
-
* @return boolean Session active flag
|
153 |
-
*/
|
154 |
-
public function isSessionActive($refreshSession) {
|
155 |
-
$this->checkStateBeforeCall();
|
156 |
-
if (isset($this->_resultLogin)) {
|
157 |
-
return $this->_epsInterfaceImpl->isSessionActive($this->_resultLogin->getSessionId(), $refreshSession);
|
158 |
-
} else {
|
159 |
-
return false;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Returns the list of courier services valid on this date
|
165 |
-
* @since 1.0
|
166 |
-
* @param date $date
|
167 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
168 |
-
* @throws ServerException Thrown in case communication with server has failed
|
169 |
-
* @return array List of ResultCourierService instances
|
170 |
-
*/
|
171 |
-
public function listServices($date) {
|
172 |
-
$this->checkStateBeforeCall();
|
173 |
-
return $this->_epsInterfaceImpl->listServices($this->getResultLogin(true)->getSessionId(), $date);
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Returns a list of sites matching the search criteria.
|
178 |
-
* The result is limited to 10 records
|
179 |
-
* @since 1.0
|
180 |
-
* @param string $type Type of site
|
181 |
-
* @param string $name Site name or part of it
|
182 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
183 |
-
* @throws ServerException Thrown in case communication with server has failed
|
184 |
-
* @return array List of ResultSite instances
|
185 |
-
*/
|
186 |
-
public function listSites($type, $name) {
|
187 |
-
$this->checkStateBeforeCall();
|
188 |
-
return $this->_epsInterfaceImpl->listSites($this->getResultLogin(true)->getSessionId(), $type, $name);
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Returns a list of sites. The method aims to find the closest matches.
|
193 |
-
* The result is limited to 10 records
|
194 |
-
* @since 1.0
|
195 |
-
* @param ParamFilterSite $paramFilterSite
|
196 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
197 |
-
* @throws ServerException Thrown in case communication with server has failed
|
198 |
-
* @return array List of ResultSiteEx instances
|
199 |
-
*/
|
200 |
-
public function listSitesEx($paramFilterSite) {
|
201 |
-
$this->checkStateBeforeCall();
|
202 |
-
return $this->_epsInterfaceImpl->listSitesEx($this->getResultLogin(true)->getSessionId(), $paramFilterSite);
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Returns the list of courier services valid on this date and sites.
|
207 |
-
* @since 1.0
|
208 |
-
* @param date $date
|
209 |
-
* @param integer $senderSiteId Signed 64-bit integer sender's site ID;
|
210 |
-
* @param integer $receiverSiteId Signed 64-bit integer receiver's site ID;
|
211 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
212 |
-
* @throws ServerException Thrown in case communication with server has failed
|
213 |
-
* @return array List of ResultCourierServiceExt instances
|
214 |
-
*/
|
215 |
-
public function listServicesForSites($date, $senderSiteId, $receiverSiteId) {
|
216 |
-
$this->checkStateBeforeCall();
|
217 |
-
return $this->_epsInterfaceImpl->listServicesForSites($this->getResultLogin(true)->getSessionId(), $date, $senderSiteId, $receiverSiteId);
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Returns the min/max weight allowed for the given shipment parameters
|
222 |
-
* @since 1.0
|
223 |
-
* @param integer $serviceTypeId Signed 64-bit ID of the courier service
|
224 |
-
* @param integer $senderSiteId Signed 64-bit Sender's site ID
|
225 |
-
* @param integer $receiverSiteId Signed 64-bit Receiver's site ID
|
226 |
-
* @param date $date
|
227 |
-
* @param boolean $documents Specifies if the shipment consists of documents
|
228 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
229 |
-
* @throws ServerException Thrown in case communication with server has failed
|
230 |
-
* @return ResultMinMaxReal
|
231 |
-
*/
|
232 |
-
public function getWeightInterval($serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents) {
|
233 |
-
$this->checkStateBeforeCall();
|
234 |
-
return $this->_epsInterfaceImpl->getWeightInterval(
|
235 |
-
$this->getResultLogin(true)->getSessionId(), $serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents
|
236 |
-
);
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* Returns CSV-formatted data (depending on the nomenType value).
|
241 |
-
* Column numbers can change in the future so it's recommended to address the data using the column names in the header row.
|
242 |
-
* The data for some nomenTypes requires a payed license (additional licensing contract) and permissions (access rights).
|
243 |
-
* To obtain such license please contact our IT department or your Speedy key account manager.
|
244 |
-
* Type 100 - returns a list of all sites.
|
245 |
-
* Type 300 - returns a list of all streets (requires a license).
|
246 |
-
* Type 400 - returns a list of all quarters (requires a license).
|
247 |
-
* Type 500 - returns a list of all common objects (requires a license).
|
248 |
-
* Type 700 - returns a list of all block names (requires a license).
|
249 |
-
* @since 1.0
|
250 |
-
* @param integer $nomenType Signed 32-bit The type of address nomenclature
|
251 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
252 |
-
* @throws ServerException Thrown in case communication with server has failed
|
253 |
-
* @return string CSV formatted
|
254 |
-
*/
|
255 |
-
public function getAddressNomenclature($nomenType) {
|
256 |
-
$this->checkStateBeforeCall();
|
257 |
-
return $this->_epsInterfaceImpl->getAddressNomenclature($this->getResultLogin(true)->getSessionId(), $nomenType);
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Returns a list of all sites.
|
262 |
-
* Note: This method is relatively slow (because of the size of its response). You shouldn't call it more than several times a day.
|
263 |
-
* The methods is designed to provide data which should be locally stored/cached by client apps.
|
264 |
-
* The address-related nomenclature data is updated only several times a year.
|
265 |
-
* @since 1.0
|
266 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
267 |
-
* @throws ServerException Thrown in case communication with server has failed
|
268 |
-
* @return array List of ResultSite instances
|
269 |
-
*/
|
270 |
-
public function listAllSites() {
|
271 |
-
$this->checkStateBeforeCall();
|
272 |
-
return $this->_epsInterfaceImpl->listAllSites($this->getResultLogin(true)->getSessionId());
|
273 |
-
}
|
274 |
-
|
275 |
-
/**
|
276 |
-
* Returns a site by ID
|
277 |
-
* @since 1.0
|
278 |
-
* @param integer $siteId Signed 64-bit Site ID
|
279 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
280 |
-
* @throws ServerException Thrown in case communication with server has failed
|
281 |
-
* @return ResultSite
|
282 |
-
*/
|
283 |
-
public function getSiteById($siteId) {
|
284 |
-
$this->checkStateBeforeCall();
|
285 |
-
return $this->_epsInterfaceImpl->getSiteById($this->getResultLogin(true)->getSessionId(), $siteId);
|
286 |
-
}
|
287 |
-
|
288 |
-
/**
|
289 |
-
* Returns sites having either full or partial address nomenclature (streets, quarters etc.).
|
290 |
-
* @since 1.0
|
291 |
-
* @param AddrNomen $addrNomen Only values FULL and PARTIAL are allowed
|
292 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
293 |
-
* @throws ServerException Thrown in case communication with server has failed
|
294 |
-
* @return array List of ResultSite
|
295 |
-
*/
|
296 |
-
public function getSitesByAddrNomenType($addrNomen) {
|
297 |
-
$this->checkStateBeforeCall();
|
298 |
-
return $this->_epsInterfaceImpl->getSitesByAddrNomenType($this->getResultLogin(true)->getSessionId(), $addrNomen);
|
299 |
-
}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Returns a list of the most common types of streets.
|
303 |
-
* @since 1.0
|
304 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
305 |
-
* @throws ServerException Thrown in case communication with server has failed
|
306 |
-
* @return array string List of the most common types of streets
|
307 |
-
*/
|
308 |
-
public function listStreetTypes() {
|
309 |
-
$this->checkStateBeforeCall();
|
310 |
-
return $this->_epsInterfaceImpl->listStreetTypes($this->getResultLogin(true)->getSessionId());
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Returns a list of the most common types of quarters (districts).
|
315 |
-
* @since 1.0
|
316 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
317 |
-
* @throws ServerException Thrown in case communication with server has failed
|
318 |
-
* @return array string List of the most common types of quarters (districts).
|
319 |
-
*/
|
320 |
-
public function listQuarterTypes() {
|
321 |
-
$this->checkStateBeforeCall();
|
322 |
-
return $this->_epsInterfaceImpl->listQuarterTypes($this->getResultLogin(true)->getSessionId());
|
323 |
-
}
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Returns a list of streets matching the search criteria
|
327 |
-
* The list is limited to 10 records.
|
328 |
-
* @since 1.0
|
329 |
-
* @param string $name Street name (or part of it)
|
330 |
-
* @param integer $siteId Signed 64-bit Site ID
|
331 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
332 |
-
* @throws ServerException Thrown in case communication with server has failed
|
333 |
-
* @return array ResultStreet List of streets
|
334 |
-
*/
|
335 |
-
public function listStreets($name, $siteId) {
|
336 |
-
$this->checkStateBeforeCall();
|
337 |
-
return $this->_epsInterfaceImpl->listStreets($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
338 |
-
}
|
339 |
-
|
340 |
-
/**
|
341 |
-
* Returns a list of quarters matching the search criteria
|
342 |
-
* The list is limited to 10 records.
|
343 |
-
* @since 1.0
|
344 |
-
* @param string $name Quarter name (or part of it)
|
345 |
-
* @param integer $siteId Signed 64-bit Site ID
|
346 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
347 |
-
* @throws ServerException Thrown in case communication with server has failed
|
348 |
-
* @return array ResultQuarter List of quarters
|
349 |
-
*/
|
350 |
-
public function listQuarters($name, $siteId) {
|
351 |
-
$this->checkStateBeforeCall();
|
352 |
-
return $this->_epsInterfaceImpl->listQuarters($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
353 |
-
}
|
354 |
-
|
355 |
-
/**
|
356 |
-
* Returns a list of common objects matching the search criteria.
|
357 |
-
* The list is limited to 10 records.
|
358 |
-
* @since 1.0
|
359 |
-
* @param string $name Common object name (or part of it)
|
360 |
-
* @param integer $siteId Signed 64-bit Site ID
|
361 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
362 |
-
* @throws ServerException Thrown in case communication with server has failed
|
363 |
-
* @return array ResultCommonObject List of common objects
|
364 |
-
*/
|
365 |
-
public function listCommonObjects($name, $siteId) {
|
366 |
-
$this->checkStateBeforeCall();
|
367 |
-
return $this->_epsInterfaceImpl->listCommonObjects($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Returns a list of blocks matching the search criteria.
|
372 |
-
* The list is limited to 10 records.
|
373 |
-
* @since 1.0
|
374 |
-
* @param string $name Block name (or part of it)
|
375 |
-
* @param integer $siteId Signed 64-bit Site ID
|
376 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
377 |
-
* @throws ServerException Thrown in case communication with server has failed
|
378 |
-
* @return array string List of blocks
|
379 |
-
*/
|
380 |
-
public function listBlocks($name, $siteId) {
|
381 |
-
$this->checkStateBeforeCall();
|
382 |
-
return $this->_epsInterfaceImpl->listBlocks($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
383 |
-
}
|
384 |
-
|
385 |
-
/**
|
386 |
-
* Returns a list of Speedy offices matching the search criteria
|
387 |
-
* The list is limited to 10 records.
|
388 |
-
* @since 1.0
|
389 |
-
* @param string $name Office name (or part of it);
|
390 |
-
* @param integer $siteId Signed 64-bit Site ID
|
391 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
392 |
-
* @throws ServerException Thrown in case communication with server has failed
|
393 |
-
* @return array ResultOffice List of offices
|
394 |
-
*/
|
395 |
-
public function listOffices($name, $siteId) {
|
396 |
-
$this->checkStateBeforeCall();
|
397 |
-
return $this->_epsInterfaceImpl->listOffices($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
398 |
-
}
|
399 |
-
|
400 |
-
/**
|
401 |
-
* Returns data for client by ID.
|
402 |
-
* Allowed values for clientId are only the ones of members of the user's contract and the predefined partners
|
403 |
-
* in the WebClients application.
|
404 |
-
* @since 1.0
|
405 |
-
* @param integer $clientId Signed 64-bit integer – Client/Partner ID
|
406 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
407 |
-
* @throws ServerException Thrown in case communication with server has failed
|
408 |
-
* @return ResultClientData
|
409 |
-
*/
|
410 |
-
public function getClientById($clientId) {
|
411 |
-
$this->checkStateBeforeCall();
|
412 |
-
return $this->_epsInterfaceImpl->getClientById($this->getResultLogin(true)->getSessionId(), $clientId);
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Returns the dates when the shipment can be ordered for pick-up.
|
417 |
-
* The "time" component represents the deadline for creating an order
|
418 |
-
* (or the deadline for delivering the shipment to a Speedy office when senderOfficeId is set).
|
419 |
-
* (This method could be used for the "takingDate" property of ParamPicking or ParamCalculation.)
|
420 |
-
* Note: Either senderSiteId or senderOfficeId should be set, or neither of them. Both parameters having "not null" values is not allowed.
|
421 |
-
* @since 1.0
|
422 |
-
* @param integer $serviceTypeId
|
423 |
-
* @param integer $senderSiteId Signed 64-bit – Sender's site ID
|
424 |
-
* @param integer $senderOfficeId Signed 64-bit – If the sender intends to deliver the shipment to a Speedy office, the office ID could be set as a filter
|
425 |
-
* @param date $minDate - When the "time" component is set then this date is to be included in the result list only if the time is not after the working time of Speedy;
|
426 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
427 |
-
* @throws ServerException Thrown in case communication with server has failed
|
428 |
-
* @return array List of dates
|
429 |
-
*/
|
430 |
-
public function getAllowedDaysForTaking($serviceTypeId, $senderSiteId, $senderOfficeId, $minDate) {
|
431 |
-
$this->checkStateBeforeCall();
|
432 |
-
return $this->_epsInterfaceImpl->getAllowedDaysForTaking(
|
433 |
-
$this->getResultLogin(true)->getSessionId(), $serviceTypeId, $senderSiteId, $senderOfficeId, $minDate
|
434 |
-
);
|
435 |
-
}
|
436 |
-
|
437 |
-
/**
|
438 |
-
* Returns a list of addresses matching the search criteria.
|
439 |
-
* @since 1.0
|
440 |
-
* @param ParamAddressSearch $address Search criteria (filter)
|
441 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
442 |
-
* @throws ServerException Thrown in case communication with server has failed
|
443 |
-
* @return array List of ResultAddressSearch
|
444 |
-
*/
|
445 |
-
public function addressSearch($address) {
|
446 |
-
$this->checkStateBeforeCall();
|
447 |
-
return $this->_epsInterfaceImpl->addressSearch($this->getResultLogin(true)->getSessionId(), $address);
|
448 |
-
}
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Calculate method
|
452 |
-
* @since 1.0
|
453 |
-
* @param ParamCalculation $calculation
|
454 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
455 |
-
* @throws ServerException Thrown in case communication with server has failed
|
456 |
-
* @return ResultCalculation
|
457 |
-
*/
|
458 |
-
public function calculate($calculation) {
|
459 |
-
$this->checkStateBeforeCall();
|
460 |
-
return $this->_epsInterfaceImpl->calculate($this->getResultLogin(true)->getSessionId(), $calculation);
|
461 |
-
}
|
462 |
-
|
463 |
-
/**
|
464 |
-
* This method could be used for preliminary check-up of shipment's price for a range of courier services.
|
465 |
-
* @since 1.0
|
466 |
-
* @param ParamCalculation $calculation Data needed to perform the calculation;
|
467 |
-
* @param array $serviceTypeIds List<signed 64-bit integer> – A list of courier service IDs for which price needs to be calculated
|
468 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
469 |
-
* @throws ServerException Thrown in case communication with server has failed
|
470 |
-
* @return array List of ResultCalculationMS
|
471 |
-
*/
|
472 |
-
public function calculateMultipleServices($calculation, $serviceTypeIds) {
|
473 |
-
$this->checkStateBeforeCall();
|
474 |
-
return $this->_epsInterfaceImpl->calculateMultipleServices($this->getResultLogin(true)->getSessionId(), $calculation, $serviceTypeIds);
|
475 |
-
}
|
476 |
-
|
477 |
-
/**
|
478 |
-
* This is an alternative method for shipment price calculation where the parameter is of type ParamPicking.
|
479 |
-
* Clients are encouraged to use the method that best fits their needs.
|
480 |
-
* @since 1.0
|
481 |
-
* @param ParamPicking $picking
|
482 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
483 |
-
* @throws ServerException Thrown in case communication with server has failed
|
484 |
-
* @return ResultCalculation
|
485 |
-
*/
|
486 |
-
public function calculatePicking($picking) {
|
487 |
-
$this->checkStateBeforeCall();
|
488 |
-
return $this->_epsInterfaceImpl->calculatePicking($this->getResultLogin(true)->getSessionId(), $picking);
|
489 |
-
}
|
490 |
-
|
491 |
-
/**
|
492 |
-
* The method used to create BOL.
|
493 |
-
* @since 1.0
|
494 |
-
* @param ParamPicking $picking
|
495 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
496 |
-
* @throws ServerException Thrown in case communication with server has failed
|
497 |
-
* @return ResultBOL
|
498 |
-
*/
|
499 |
-
public function createBillOfLading($picking) {
|
500 |
-
$this->checkStateBeforeCall();
|
501 |
-
return $this->_epsInterfaceImpl->createBillOfLading($this->getResultLogin(true)->getSessionId(), $picking);
|
502 |
-
}
|
503 |
-
|
504 |
-
/**
|
505 |
-
* Used for creating PDF documents to be printed (BOLs, labels etc.)
|
506 |
-
* Examples:
|
507 |
-
* •Bill of Lading;
|
508 |
-
* •Bill of Lading with "cash on delivery";
|
509 |
-
* •Custom travel label (type 20);
|
510 |
-
* •Custom travel label (type 20) with "cash on delivery".
|
511 |
-
* @since 1.0
|
512 |
-
* @param ParamPDF $params
|
513 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
514 |
-
* @throws ServerException Thrown in case communication with server has failed
|
515 |
-
* @return array bytes
|
516 |
-
*/
|
517 |
-
public function createPDF($params) {
|
518 |
-
$this->checkStateBeforeCall();
|
519 |
-
return $this->_epsInterfaceImpl->createPDF($this->getResultLogin(true)->getSessionId(), $params);
|
520 |
-
}
|
521 |
-
|
522 |
-
/**
|
523 |
-
* Creates PDF document for BOL.
|
524 |
-
* The method is deprecated, "createPDF" should be used instead.
|
525 |
-
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
526 |
-
* @since 1.0
|
527 |
-
* @param integer $billOfLading Signed 64-bit
|
528 |
-
* @param boolean $includeAutoPrintJS Specifies if embedded JavaScript code for direct printing to be generated
|
529 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
530 |
-
* @throws ServerException Thrown in case communication with server has failed
|
531 |
-
* @return array of bytes
|
532 |
-
*/
|
533 |
-
public function createBillOfLadingPDF($billOfLading, $includeAutoPrintJS) {
|
534 |
-
$this->checkStateBeforeCall();
|
535 |
-
return $this->_epsInterfaceImpl->createBillOfLadingPDF($this->getResultLogin(true)->getSessionId(), $billOfLading, $includeAutoPrintJS);
|
536 |
-
}
|
537 |
-
|
538 |
-
/**
|
539 |
-
* Creates PDF document of "type I". The method is deprecated, "createPDF" should be used instead.
|
540 |
-
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
541 |
-
* @since 1.0
|
542 |
-
* @param integer $parcelId Signed 64-bit Parcel ID
|
543 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
544 |
-
* @throws ServerException Thrown in case communication with server has failed
|
545 |
-
* @return array of bytes
|
546 |
-
*/
|
547 |
-
public function createCustomTravelLabelPDFType1($parcelId) {
|
548 |
-
$this->checkStateBeforeCall();
|
549 |
-
return $this->_epsInterfaceImpl->createCustomTravelLabelPDFType1($this->getResultLogin(true)->getSessionId(), $parcelId);
|
550 |
-
}
|
551 |
-
|
552 |
-
/**
|
553 |
-
* Used to cancel BOL.
|
554 |
-
* Only allowed when the shipment is neither ordered nor picked up by Speedy.
|
555 |
-
* @since 1.0
|
556 |
-
* @param integer $billOfLading Signed 64-bit
|
557 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
558 |
-
* @throws ServerException Thrown in case communication with server has failed
|
559 |
-
*/
|
560 |
-
public function invalidatePicking($billOfLading) {
|
561 |
-
$this->checkStateBeforeCall();
|
562 |
-
return $this->_epsInterfaceImpl->invalidatePicking($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
563 |
-
}
|
564 |
-
|
565 |
-
/**
|
566 |
-
* This method is used to update BOL.
|
567 |
-
* Only allowed if BOL was created with pendingShipmentDescription = true.
|
568 |
-
* @since 1.0
|
569 |
-
* @param ParamPicking $picking Data for the shipment (BOL)
|
570 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
571 |
-
* @throws ServerException Thrown in case communication with server has failed
|
572 |
-
* @return ResultBOL
|
573 |
-
*/
|
574 |
-
public function updateBillOfLading($picking) {
|
575 |
-
$this->checkStateBeforeCall();
|
576 |
-
return $this->_epsInterfaceImpl->updateBillOfLading($this->getResultLogin(true)->getSessionId(), $picking);
|
577 |
-
}
|
578 |
-
|
579 |
-
/**
|
580 |
-
* This method is used to add parcel to an existing BOL
|
581 |
-
* (only allowed if BOL was created with pendingParcelsDescription = true).
|
582 |
-
* @since 1.0
|
583 |
-
* @param ParamParcel $parcel Parcel data
|
584 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
585 |
-
* @throws ServerException Thrown in case communication with server has failed
|
586 |
-
* @return integer Signed 64-bit parcel's ID
|
587 |
-
*/
|
588 |
-
public function addParcel($parcel) {
|
589 |
-
$this->checkStateBeforeCall();
|
590 |
-
return $this->_epsInterfaceImpl->addParcel($this->getResultLogin(true)->getSessionId(), $parcel);
|
591 |
-
}
|
592 |
-
|
593 |
-
/**
|
594 |
-
* Makes BOL "fully created".
|
595 |
-
* Only applies to BOLs created with pendingParcelsDescription = true.
|
596 |
-
* @since 1.0
|
597 |
-
* @param integer $billOfLading Signed 64-bit
|
598 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
599 |
-
* @throws ServerException Thrown in case communication with server has failed
|
600 |
-
* @return ResultBOL
|
601 |
-
*/
|
602 |
-
public function finalizeBillOfLadingCreation($billOfLading) {
|
603 |
-
$this->checkStateBeforeCall();
|
604 |
-
return $this->_epsInterfaceImpl->finalizeBillOfLadingCreation($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
605 |
-
}
|
606 |
-
|
607 |
-
/**
|
608 |
-
* Creates an order for shipments pick-up (i.e. a visit by courier of Speedy).
|
609 |
-
* The retuned list contains objects corresponding to each BOL (one object per BOL).
|
610 |
-
* When the validation errors list of at least one of the objects is not empty, that means the order has not been created.
|
611 |
-
* @since 1.0
|
612 |
-
* @param ParamOrder $order Order details
|
613 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
614 |
-
* @throws ServerException Thrown in case communication with server has failed
|
615 |
-
* @return array List of ResultOrderPickingInfo
|
616 |
-
*/
|
617 |
-
public function createOrder($order) {
|
618 |
-
$this->checkStateBeforeCall();
|
619 |
-
return $this->_epsInterfaceImpl->createOrder($this->getResultLogin(true)->getSessionId(), $order);
|
620 |
-
}
|
621 |
-
|
622 |
-
/**
|
623 |
-
* Returns a list with all parcels of a shipment.
|
624 |
-
* @since 1.0
|
625 |
-
* @param integer $billOfLading Signed 64-bit
|
626 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
627 |
-
* @throws ServerException Thrown in case communication with server has failed
|
628 |
-
* @return array List of ResultParcelInfo
|
629 |
-
*/
|
630 |
-
public function getPickingParcels($billOfLading) {
|
631 |
-
$this->checkStateBeforeCall();
|
632 |
-
return $this->_epsInterfaceImpl->getPickingParcels($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
633 |
-
}
|
634 |
-
|
635 |
-
/**
|
636 |
-
* This method can be used to track the state/history of a shipment.
|
637 |
-
* @deprecated Use trackPickingEx instead
|
638 |
-
* @since 1.0
|
639 |
-
* @param integer $billOfLading Signed 64-bit
|
640 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
641 |
-
* @throws ServerException Thrown in case communication with server has failed
|
642 |
-
* @return array List of ResultTrackPicking
|
643 |
-
*/
|
644 |
-
public function trackPicking($billOfLading) {
|
645 |
-
$this->checkStateBeforeCall();
|
646 |
-
return $this->_epsInterfaceImpl->trackPicking($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
647 |
-
}
|
648 |
-
|
649 |
-
/**
|
650 |
-
* This method can be used to track the state/history of a shipment.
|
651 |
-
* @since 1.2
|
652 |
-
* @param integer $billOfLading Signed 64-bit
|
653 |
-
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
654 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
655 |
-
* @throws ServerException Thrown in case communication with server has failed
|
656 |
-
* @return array List of ResultTrackPickingEx
|
657 |
-
*/
|
658 |
-
public function trackPickingEx($billOfLading, $language) {
|
659 |
-
$this->checkStateBeforeCall();
|
660 |
-
return $this->_epsInterfaceImpl->trackPickingEx($this->getResultLogin(true)->getSessionId(), $billOfLading, $language);
|
661 |
-
}
|
662 |
-
|
663 |
-
/**
|
664 |
-
* This method can be used to track the state/history of a shipment.
|
665 |
-
* @since 1.4
|
666 |
-
* @param integer $parcelId Signed 64-bit
|
667 |
-
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
668 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
669 |
-
* @throws ServerException Thrown in case communication with server has failed
|
670 |
-
* @return array List of ResultTrackPickingEx
|
671 |
-
*/
|
672 |
-
public function trackParcel($parcelId, $language) {
|
673 |
-
$this->checkStateBeforeCall();
|
674 |
-
return $this->_epsInterfaceImpl->trackParcel($this->getResultLogin(true)->getSessionId(), $parcelId, $language);
|
675 |
-
}
|
676 |
-
|
677 |
-
/**
|
678 |
-
* Search BOLs by reference codes (ref1 and/or ref2).
|
679 |
-
* @since 1.0
|
680 |
-
* @param ParamSearchByRefNum $params
|
681 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
682 |
-
* @throws ServerException Thrown in case communication with server has failed
|
683 |
-
* @return array List of BOLs found (signed 64-bit integers)
|
684 |
-
*/
|
685 |
-
public function searchPickingsByRefNumber($params) {
|
686 |
-
$this->checkStateBeforeCall();
|
687 |
-
return $this->_epsInterfaceImpl->searchPickingsByRefNumber($this->getResultLogin(true)->getSessionId(), $params);
|
688 |
-
}
|
689 |
-
|
690 |
-
/**
|
691 |
-
* Get microregion id for provided GPS coordinates
|
692 |
-
* @since 1.5
|
693 |
-
* @param signed 64-bit treal $coordX
|
694 |
-
* @param signed 64-bit treal $coordY
|
695 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
696 |
-
* @throws ServerException Thrown in case communication with server has failed
|
697 |
-
* @return Mocregion id (signed 64-bit integer)
|
698 |
-
*/
|
699 |
-
public function getMicroregionId($coordX, $coordY) {
|
700 |
-
$this->checkStateBeforeCall();
|
701 |
-
return $this->_epsInterfaceImpl->getMicroregionId($this->getResultLogin(true)->getSessionId(), $coordX, $coordY);
|
702 |
-
}
|
703 |
-
|
704 |
-
/**
|
705 |
-
* Returns data for clients by specified client ID or other search criteria.
|
706 |
-
* If client ID is specified the behaviour of this method is the same as getClientById.
|
707 |
-
* Otherwise, the search returns results that satisfy search criteria
|
708 |
-
* @since 1.6
|
709 |
-
* @param ParamClientSearch $clientQuery
|
710 |
-
* @throws ClientException Thrown in case EPS interface implementation is not set
|
711 |
-
* @throws ServerException Thrown in case communication with server has failed
|
712 |
-
* @return array List of ResultClientData
|
713 |
-
*/
|
714 |
-
public function searchClients($clientQuery) {
|
715 |
-
$this->checkStateBeforeCall();
|
716 |
-
return $this->_epsInterfaceImpl->searchClients($this->getResultLogin(true)->getSessionId(), $clientQuery);
|
717 |
-
}
|
718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ClientException.class.php';
|
4 |
+
require_once 'EPSInterface.class.php';
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Speedy EPS Service
|
8 |
+
*/
|
9 |
+
class EPSFacade {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* EPS Interface implementation
|
13 |
+
* @since 1.0
|
14 |
+
* @var EPSInterface
|
15 |
+
*/
|
16 |
+
private $_epsInterfaceImpl;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* User name
|
20 |
+
* @since 1.0
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $_username;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* User password
|
27 |
+
* @since 1.0
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_password;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Result of login Speedy web service method clall
|
34 |
+
* @since 1.0
|
35 |
+
* @var ResultLogin
|
36 |
+
*/
|
37 |
+
private $_resultLogin;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Constructs new instance of EPS Facade
|
41 |
+
* @since 1.0
|
42 |
+
* @param EPSInterface $epsInterfaceImpl EPS interface implementation
|
43 |
+
* @param string $username User name
|
44 |
+
* @param string $password User password
|
45 |
+
*/
|
46 |
+
function __construct($epsInterfaceImpl, $username, $password) {
|
47 |
+
$this->_epsInterfaceImpl = $epsInterfaceImpl;
|
48 |
+
$this->_username = $username;
|
49 |
+
$this->_password = $password;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Check session state before calling a business web service method
|
54 |
+
* @since 1.0
|
55 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
56 |
+
*/
|
57 |
+
private function checkStateBeforeCall() {
|
58 |
+
if (!isset($this->_epsInterfaceImpl)) {
|
59 |
+
throw new ClientException("EPS Interface implementation is not set");
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Set EPS interface implementation
|
65 |
+
* @since 1.0
|
66 |
+
* @param EPSInterface $epsInterfaceImpl
|
67 |
+
*/
|
68 |
+
public function setEPSInterfaceImpl($epsInterfaceImpl) {
|
69 |
+
$this->_epsInterfaceImpl = $epsInterfaceImpl;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Return EPS interface implementation
|
74 |
+
* @since 1.0
|
75 |
+
* @return EPSInterface
|
76 |
+
*/
|
77 |
+
public function getEPSInterfaceImpl() {
|
78 |
+
return $this->_epsInterfaceImpl;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Set user name
|
83 |
+
* @since 1.0
|
84 |
+
* @param string $username
|
85 |
+
*/
|
86 |
+
public function setUsername($username) {
|
87 |
+
$this->_username = $username;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Return user name
|
92 |
+
* @since 1.0
|
93 |
+
* @return string User name
|
94 |
+
*/
|
95 |
+
public function getUsername() {
|
96 |
+
return $this->_username;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Set user password
|
101 |
+
* @since 1.0
|
102 |
+
* @param string $password
|
103 |
+
*/
|
104 |
+
public function setPassword($password) {
|
105 |
+
$this->_password = $password;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Return user password
|
110 |
+
* @since 1.0
|
111 |
+
* @return string User password
|
112 |
+
*/
|
113 |
+
public function getPassword() {
|
114 |
+
return $this->_password;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Return result login.
|
119 |
+
* Optionally tries to open new session in case it is not active
|
120 |
+
* @since 1.0
|
121 |
+
* @param boolean $openNewIfNotActive Whether to try to open new connection. Default is true
|
122 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
123 |
+
* @throws ServerException Thrown in case communication with server has failed
|
124 |
+
* @return ResultLogin
|
125 |
+
*/
|
126 |
+
public function getResultLogin($openNewIfNotActive=true) {
|
127 |
+
if ($openNewIfNotActive && !$this->isSessionActive(true)) {
|
128 |
+
$this->_resultLogin = $this->login();
|
129 |
+
}
|
130 |
+
return $this->_resultLogin;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Login web service method
|
135 |
+
* @since 1.0
|
136 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
137 |
+
* @throws ServerException Thrown in case communication with server has failed
|
138 |
+
* @return ResultLogin Result of login
|
139 |
+
*/
|
140 |
+
public function login() {
|
141 |
+
$this->checkStateBeforeCall();
|
142 |
+
$this->_resultLogin = $this->_epsInterfaceImpl->login($this->_username, $this->_password);
|
143 |
+
return $this->_resultLogin;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Returns flag whether the session is active
|
148 |
+
* @since 1.0
|
149 |
+
* @param boolean $refreshSession In case the session is active, this parameter specifies if the session should be automatically refreshed
|
150 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
151 |
+
* @throws ServerException Thrown in case communication with server has failed
|
152 |
+
* @return boolean Session active flag
|
153 |
+
*/
|
154 |
+
public function isSessionActive($refreshSession) {
|
155 |
+
$this->checkStateBeforeCall();
|
156 |
+
if (isset($this->_resultLogin)) {
|
157 |
+
return $this->_epsInterfaceImpl->isSessionActive($this->_resultLogin->getSessionId(), $refreshSession);
|
158 |
+
} else {
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Returns the list of courier services valid on this date
|
165 |
+
* @since 1.0
|
166 |
+
* @param date $date
|
167 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
168 |
+
* @throws ServerException Thrown in case communication with server has failed
|
169 |
+
* @return array List of ResultCourierService instances
|
170 |
+
*/
|
171 |
+
public function listServices($date) {
|
172 |
+
$this->checkStateBeforeCall();
|
173 |
+
return $this->_epsInterfaceImpl->listServices($this->getResultLogin(true)->getSessionId(), $date);
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Returns a list of sites matching the search criteria.
|
178 |
+
* The result is limited to 10 records
|
179 |
+
* @since 1.0
|
180 |
+
* @param string $type Type of site
|
181 |
+
* @param string $name Site name or part of it
|
182 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
183 |
+
* @throws ServerException Thrown in case communication with server has failed
|
184 |
+
* @return array List of ResultSite instances
|
185 |
+
*/
|
186 |
+
public function listSites($type, $name) {
|
187 |
+
$this->checkStateBeforeCall();
|
188 |
+
return $this->_epsInterfaceImpl->listSites($this->getResultLogin(true)->getSessionId(), $type, $name);
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Returns a list of sites. The method aims to find the closest matches.
|
193 |
+
* The result is limited to 10 records
|
194 |
+
* @since 1.0
|
195 |
+
* @param ParamFilterSite $paramFilterSite
|
196 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
197 |
+
* @throws ServerException Thrown in case communication with server has failed
|
198 |
+
* @return array List of ResultSiteEx instances
|
199 |
+
*/
|
200 |
+
public function listSitesEx($paramFilterSite) {
|
201 |
+
$this->checkStateBeforeCall();
|
202 |
+
return $this->_epsInterfaceImpl->listSitesEx($this->getResultLogin(true)->getSessionId(), $paramFilterSite);
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Returns the list of courier services valid on this date and sites.
|
207 |
+
* @since 1.0
|
208 |
+
* @param date $date
|
209 |
+
* @param integer $senderSiteId Signed 64-bit integer sender's site ID;
|
210 |
+
* @param integer $receiverSiteId Signed 64-bit integer receiver's site ID;
|
211 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
212 |
+
* @throws ServerException Thrown in case communication with server has failed
|
213 |
+
* @return array List of ResultCourierServiceExt instances
|
214 |
+
*/
|
215 |
+
public function listServicesForSites($date, $senderSiteId, $receiverSiteId) {
|
216 |
+
$this->checkStateBeforeCall();
|
217 |
+
return $this->_epsInterfaceImpl->listServicesForSites($this->getResultLogin(true)->getSessionId(), $date, $senderSiteId, $receiverSiteId);
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Returns the min/max weight allowed for the given shipment parameters
|
222 |
+
* @since 1.0
|
223 |
+
* @param integer $serviceTypeId Signed 64-bit ID of the courier service
|
224 |
+
* @param integer $senderSiteId Signed 64-bit Sender's site ID
|
225 |
+
* @param integer $receiverSiteId Signed 64-bit Receiver's site ID
|
226 |
+
* @param date $date
|
227 |
+
* @param boolean $documents Specifies if the shipment consists of documents
|
228 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
229 |
+
* @throws ServerException Thrown in case communication with server has failed
|
230 |
+
* @return ResultMinMaxReal
|
231 |
+
*/
|
232 |
+
public function getWeightInterval($serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents) {
|
233 |
+
$this->checkStateBeforeCall();
|
234 |
+
return $this->_epsInterfaceImpl->getWeightInterval(
|
235 |
+
$this->getResultLogin(true)->getSessionId(), $serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents
|
236 |
+
);
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Returns CSV-formatted data (depending on the nomenType value).
|
241 |
+
* Column numbers can change in the future so it's recommended to address the data using the column names in the header row.
|
242 |
+
* The data for some nomenTypes requires a payed license (additional licensing contract) and permissions (access rights).
|
243 |
+
* To obtain such license please contact our IT department or your Speedy key account manager.
|
244 |
+
* Type 100 - returns a list of all sites.
|
245 |
+
* Type 300 - returns a list of all streets (requires a license).
|
246 |
+
* Type 400 - returns a list of all quarters (requires a license).
|
247 |
+
* Type 500 - returns a list of all common objects (requires a license).
|
248 |
+
* Type 700 - returns a list of all block names (requires a license).
|
249 |
+
* @since 1.0
|
250 |
+
* @param integer $nomenType Signed 32-bit The type of address nomenclature
|
251 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
252 |
+
* @throws ServerException Thrown in case communication with server has failed
|
253 |
+
* @return string CSV formatted
|
254 |
+
*/
|
255 |
+
public function getAddressNomenclature($nomenType) {
|
256 |
+
$this->checkStateBeforeCall();
|
257 |
+
return $this->_epsInterfaceImpl->getAddressNomenclature($this->getResultLogin(true)->getSessionId(), $nomenType);
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Returns a list of all sites.
|
262 |
+
* Note: This method is relatively slow (because of the size of its response). You shouldn't call it more than several times a day.
|
263 |
+
* The methods is designed to provide data which should be locally stored/cached by client apps.
|
264 |
+
* The address-related nomenclature data is updated only several times a year.
|
265 |
+
* @since 1.0
|
266 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
267 |
+
* @throws ServerException Thrown in case communication with server has failed
|
268 |
+
* @return array List of ResultSite instances
|
269 |
+
*/
|
270 |
+
public function listAllSites() {
|
271 |
+
$this->checkStateBeforeCall();
|
272 |
+
return $this->_epsInterfaceImpl->listAllSites($this->getResultLogin(true)->getSessionId());
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Returns a site by ID
|
277 |
+
* @since 1.0
|
278 |
+
* @param integer $siteId Signed 64-bit Site ID
|
279 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
280 |
+
* @throws ServerException Thrown in case communication with server has failed
|
281 |
+
* @return ResultSite
|
282 |
+
*/
|
283 |
+
public function getSiteById($siteId) {
|
284 |
+
$this->checkStateBeforeCall();
|
285 |
+
return $this->_epsInterfaceImpl->getSiteById($this->getResultLogin(true)->getSessionId(), $siteId);
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Returns sites having either full or partial address nomenclature (streets, quarters etc.).
|
290 |
+
* @since 1.0
|
291 |
+
* @param AddrNomen $addrNomen Only values FULL and PARTIAL are allowed
|
292 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
293 |
+
* @throws ServerException Thrown in case communication with server has failed
|
294 |
+
* @return array List of ResultSite
|
295 |
+
*/
|
296 |
+
public function getSitesByAddrNomenType($addrNomen) {
|
297 |
+
$this->checkStateBeforeCall();
|
298 |
+
return $this->_epsInterfaceImpl->getSitesByAddrNomenType($this->getResultLogin(true)->getSessionId(), $addrNomen);
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Returns a list of the most common types of streets.
|
303 |
+
* @since 1.0
|
304 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
305 |
+
* @throws ServerException Thrown in case communication with server has failed
|
306 |
+
* @return array string List of the most common types of streets
|
307 |
+
*/
|
308 |
+
public function listStreetTypes() {
|
309 |
+
$this->checkStateBeforeCall();
|
310 |
+
return $this->_epsInterfaceImpl->listStreetTypes($this->getResultLogin(true)->getSessionId());
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Returns a list of the most common types of quarters (districts).
|
315 |
+
* @since 1.0
|
316 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
317 |
+
* @throws ServerException Thrown in case communication with server has failed
|
318 |
+
* @return array string List of the most common types of quarters (districts).
|
319 |
+
*/
|
320 |
+
public function listQuarterTypes() {
|
321 |
+
$this->checkStateBeforeCall();
|
322 |
+
return $this->_epsInterfaceImpl->listQuarterTypes($this->getResultLogin(true)->getSessionId());
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Returns a list of streets matching the search criteria
|
327 |
+
* The list is limited to 10 records.
|
328 |
+
* @since 1.0
|
329 |
+
* @param string $name Street name (or part of it)
|
330 |
+
* @param integer $siteId Signed 64-bit Site ID
|
331 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
332 |
+
* @throws ServerException Thrown in case communication with server has failed
|
333 |
+
* @return array ResultStreet List of streets
|
334 |
+
*/
|
335 |
+
public function listStreets($name, $siteId) {
|
336 |
+
$this->checkStateBeforeCall();
|
337 |
+
return $this->_epsInterfaceImpl->listStreets($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Returns a list of quarters matching the search criteria
|
342 |
+
* The list is limited to 10 records.
|
343 |
+
* @since 1.0
|
344 |
+
* @param string $name Quarter name (or part of it)
|
345 |
+
* @param integer $siteId Signed 64-bit Site ID
|
346 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
347 |
+
* @throws ServerException Thrown in case communication with server has failed
|
348 |
+
* @return array ResultQuarter List of quarters
|
349 |
+
*/
|
350 |
+
public function listQuarters($name, $siteId) {
|
351 |
+
$this->checkStateBeforeCall();
|
352 |
+
return $this->_epsInterfaceImpl->listQuarters($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Returns a list of common objects matching the search criteria.
|
357 |
+
* The list is limited to 10 records.
|
358 |
+
* @since 1.0
|
359 |
+
* @param string $name Common object name (or part of it)
|
360 |
+
* @param integer $siteId Signed 64-bit Site ID
|
361 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
362 |
+
* @throws ServerException Thrown in case communication with server has failed
|
363 |
+
* @return array ResultCommonObject List of common objects
|
364 |
+
*/
|
365 |
+
public function listCommonObjects($name, $siteId) {
|
366 |
+
$this->checkStateBeforeCall();
|
367 |
+
return $this->_epsInterfaceImpl->listCommonObjects($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Returns a list of blocks matching the search criteria.
|
372 |
+
* The list is limited to 10 records.
|
373 |
+
* @since 1.0
|
374 |
+
* @param string $name Block name (or part of it)
|
375 |
+
* @param integer $siteId Signed 64-bit Site ID
|
376 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
377 |
+
* @throws ServerException Thrown in case communication with server has failed
|
378 |
+
* @return array string List of blocks
|
379 |
+
*/
|
380 |
+
public function listBlocks($name, $siteId) {
|
381 |
+
$this->checkStateBeforeCall();
|
382 |
+
return $this->_epsInterfaceImpl->listBlocks($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
383 |
+
}
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Returns a list of Speedy offices matching the search criteria
|
387 |
+
* The list is limited to 10 records.
|
388 |
+
* @since 1.0
|
389 |
+
* @param string $name Office name (or part of it);
|
390 |
+
* @param integer $siteId Signed 64-bit Site ID
|
391 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
392 |
+
* @throws ServerException Thrown in case communication with server has failed
|
393 |
+
* @return array ResultOffice List of offices
|
394 |
+
*/
|
395 |
+
public function listOffices($name, $siteId) {
|
396 |
+
$this->checkStateBeforeCall();
|
397 |
+
return $this->_epsInterfaceImpl->listOffices($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Returns data for client by ID.
|
402 |
+
* Allowed values for clientId are only the ones of members of the user's contract and the predefined partners
|
403 |
+
* in the WebClients application.
|
404 |
+
* @since 1.0
|
405 |
+
* @param integer $clientId Signed 64-bit integer – Client/Partner ID
|
406 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
407 |
+
* @throws ServerException Thrown in case communication with server has failed
|
408 |
+
* @return ResultClientData
|
409 |
+
*/
|
410 |
+
public function getClientById($clientId) {
|
411 |
+
$this->checkStateBeforeCall();
|
412 |
+
return $this->_epsInterfaceImpl->getClientById($this->getResultLogin(true)->getSessionId(), $clientId);
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Returns the dates when the shipment can be ordered for pick-up.
|
417 |
+
* The "time" component represents the deadline for creating an order
|
418 |
+
* (or the deadline for delivering the shipment to a Speedy office when senderOfficeId is set).
|
419 |
+
* (This method could be used for the "takingDate" property of ParamPicking or ParamCalculation.)
|
420 |
+
* Note: Either senderSiteId or senderOfficeId should be set, or neither of them. Both parameters having "not null" values is not allowed.
|
421 |
+
* @since 1.0
|
422 |
+
* @param integer $serviceTypeId
|
423 |
+
* @param integer $senderSiteId Signed 64-bit – Sender's site ID
|
424 |
+
* @param integer $senderOfficeId Signed 64-bit – If the sender intends to deliver the shipment to a Speedy office, the office ID could be set as a filter
|
425 |
+
* @param date $minDate - When the "time" component is set then this date is to be included in the result list only if the time is not after the working time of Speedy;
|
426 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
427 |
+
* @throws ServerException Thrown in case communication with server has failed
|
428 |
+
* @return array List of dates
|
429 |
+
*/
|
430 |
+
public function getAllowedDaysForTaking($serviceTypeId, $senderSiteId, $senderOfficeId, $minDate) {
|
431 |
+
$this->checkStateBeforeCall();
|
432 |
+
return $this->_epsInterfaceImpl->getAllowedDaysForTaking(
|
433 |
+
$this->getResultLogin(true)->getSessionId(), $serviceTypeId, $senderSiteId, $senderOfficeId, $minDate
|
434 |
+
);
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Returns a list of addresses matching the search criteria.
|
439 |
+
* @since 1.0
|
440 |
+
* @param ParamAddressSearch $address Search criteria (filter)
|
441 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
442 |
+
* @throws ServerException Thrown in case communication with server has failed
|
443 |
+
* @return array List of ResultAddressSearch
|
444 |
+
*/
|
445 |
+
public function addressSearch($address) {
|
446 |
+
$this->checkStateBeforeCall();
|
447 |
+
return $this->_epsInterfaceImpl->addressSearch($this->getResultLogin(true)->getSessionId(), $address);
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Calculate method
|
452 |
+
* @since 1.0
|
453 |
+
* @param ParamCalculation $calculation
|
454 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
455 |
+
* @throws ServerException Thrown in case communication with server has failed
|
456 |
+
* @return ResultCalculation
|
457 |
+
*/
|
458 |
+
public function calculate($calculation) {
|
459 |
+
$this->checkStateBeforeCall();
|
460 |
+
return $this->_epsInterfaceImpl->calculate($this->getResultLogin(true)->getSessionId(), $calculation);
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* This method could be used for preliminary check-up of shipment's price for a range of courier services.
|
465 |
+
* @since 1.0
|
466 |
+
* @param ParamCalculation $calculation Data needed to perform the calculation;
|
467 |
+
* @param array $serviceTypeIds List<signed 64-bit integer> – A list of courier service IDs for which price needs to be calculated
|
468 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
469 |
+
* @throws ServerException Thrown in case communication with server has failed
|
470 |
+
* @return array List of ResultCalculationMS
|
471 |
+
*/
|
472 |
+
public function calculateMultipleServices($calculation, $serviceTypeIds) {
|
473 |
+
$this->checkStateBeforeCall();
|
474 |
+
return $this->_epsInterfaceImpl->calculateMultipleServices($this->getResultLogin(true)->getSessionId(), $calculation, $serviceTypeIds);
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* This is an alternative method for shipment price calculation where the parameter is of type ParamPicking.
|
479 |
+
* Clients are encouraged to use the method that best fits their needs.
|
480 |
+
* @since 1.0
|
481 |
+
* @param ParamPicking $picking
|
482 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
483 |
+
* @throws ServerException Thrown in case communication with server has failed
|
484 |
+
* @return ResultCalculation
|
485 |
+
*/
|
486 |
+
public function calculatePicking($picking) {
|
487 |
+
$this->checkStateBeforeCall();
|
488 |
+
return $this->_epsInterfaceImpl->calculatePicking($this->getResultLogin(true)->getSessionId(), $picking);
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* The method used to create BOL.
|
493 |
+
* @since 1.0
|
494 |
+
* @param ParamPicking $picking
|
495 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
496 |
+
* @throws ServerException Thrown in case communication with server has failed
|
497 |
+
* @return ResultBOL
|
498 |
+
*/
|
499 |
+
public function createBillOfLading($picking) {
|
500 |
+
$this->checkStateBeforeCall();
|
501 |
+
return $this->_epsInterfaceImpl->createBillOfLading($this->getResultLogin(true)->getSessionId(), $picking);
|
502 |
+
}
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Used for creating PDF documents to be printed (BOLs, labels etc.)
|
506 |
+
* Examples:
|
507 |
+
* •Bill of Lading;
|
508 |
+
* •Bill of Lading with "cash on delivery";
|
509 |
+
* •Custom travel label (type 20);
|
510 |
+
* •Custom travel label (type 20) with "cash on delivery".
|
511 |
+
* @since 1.0
|
512 |
+
* @param ParamPDF $params
|
513 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
514 |
+
* @throws ServerException Thrown in case communication with server has failed
|
515 |
+
* @return array bytes
|
516 |
+
*/
|
517 |
+
public function createPDF($params) {
|
518 |
+
$this->checkStateBeforeCall();
|
519 |
+
return $this->_epsInterfaceImpl->createPDF($this->getResultLogin(true)->getSessionId(), $params);
|
520 |
+
}
|
521 |
+
|
522 |
+
/**
|
523 |
+
* Creates PDF document for BOL.
|
524 |
+
* The method is deprecated, "createPDF" should be used instead.
|
525 |
+
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
526 |
+
* @since 1.0
|
527 |
+
* @param integer $billOfLading Signed 64-bit
|
528 |
+
* @param boolean $includeAutoPrintJS Specifies if embedded JavaScript code for direct printing to be generated
|
529 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
530 |
+
* @throws ServerException Thrown in case communication with server has failed
|
531 |
+
* @return array of bytes
|
532 |
+
*/
|
533 |
+
public function createBillOfLadingPDF($billOfLading, $includeAutoPrintJS) {
|
534 |
+
$this->checkStateBeforeCall();
|
535 |
+
return $this->_epsInterfaceImpl->createBillOfLadingPDF($this->getResultLogin(true)->getSessionId(), $billOfLading, $includeAutoPrintJS);
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* Creates PDF document of "type I". The method is deprecated, "createPDF" should be used instead.
|
540 |
+
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
541 |
+
* @since 1.0
|
542 |
+
* @param integer $parcelId Signed 64-bit Parcel ID
|
543 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
544 |
+
* @throws ServerException Thrown in case communication with server has failed
|
545 |
+
* @return array of bytes
|
546 |
+
*/
|
547 |
+
public function createCustomTravelLabelPDFType1($parcelId) {
|
548 |
+
$this->checkStateBeforeCall();
|
549 |
+
return $this->_epsInterfaceImpl->createCustomTravelLabelPDFType1($this->getResultLogin(true)->getSessionId(), $parcelId);
|
550 |
+
}
|
551 |
+
|
552 |
+
/**
|
553 |
+
* Used to cancel BOL.
|
554 |
+
* Only allowed when the shipment is neither ordered nor picked up by Speedy.
|
555 |
+
* @since 1.0
|
556 |
+
* @param integer $billOfLading Signed 64-bit
|
557 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
558 |
+
* @throws ServerException Thrown in case communication with server has failed
|
559 |
+
*/
|
560 |
+
public function invalidatePicking($billOfLading) {
|
561 |
+
$this->checkStateBeforeCall();
|
562 |
+
return $this->_epsInterfaceImpl->invalidatePicking($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* This method is used to update BOL.
|
567 |
+
* Only allowed if BOL was created with pendingShipmentDescription = true.
|
568 |
+
* @since 1.0
|
569 |
+
* @param ParamPicking $picking Data for the shipment (BOL)
|
570 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
571 |
+
* @throws ServerException Thrown in case communication with server has failed
|
572 |
+
* @return ResultBOL
|
573 |
+
*/
|
574 |
+
public function updateBillOfLading($picking) {
|
575 |
+
$this->checkStateBeforeCall();
|
576 |
+
return $this->_epsInterfaceImpl->updateBillOfLading($this->getResultLogin(true)->getSessionId(), $picking);
|
577 |
+
}
|
578 |
+
|
579 |
+
/**
|
580 |
+
* This method is used to add parcel to an existing BOL
|
581 |
+
* (only allowed if BOL was created with pendingParcelsDescription = true).
|
582 |
+
* @since 1.0
|
583 |
+
* @param ParamParcel $parcel Parcel data
|
584 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
585 |
+
* @throws ServerException Thrown in case communication with server has failed
|
586 |
+
* @return integer Signed 64-bit parcel's ID
|
587 |
+
*/
|
588 |
+
public function addParcel($parcel) {
|
589 |
+
$this->checkStateBeforeCall();
|
590 |
+
return $this->_epsInterfaceImpl->addParcel($this->getResultLogin(true)->getSessionId(), $parcel);
|
591 |
+
}
|
592 |
+
|
593 |
+
/**
|
594 |
+
* Makes BOL "fully created".
|
595 |
+
* Only applies to BOLs created with pendingParcelsDescription = true.
|
596 |
+
* @since 1.0
|
597 |
+
* @param integer $billOfLading Signed 64-bit
|
598 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
599 |
+
* @throws ServerException Thrown in case communication with server has failed
|
600 |
+
* @return ResultBOL
|
601 |
+
*/
|
602 |
+
public function finalizeBillOfLadingCreation($billOfLading) {
|
603 |
+
$this->checkStateBeforeCall();
|
604 |
+
return $this->_epsInterfaceImpl->finalizeBillOfLadingCreation($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
605 |
+
}
|
606 |
+
|
607 |
+
/**
|
608 |
+
* Creates an order for shipments pick-up (i.e. a visit by courier of Speedy).
|
609 |
+
* The retuned list contains objects corresponding to each BOL (one object per BOL).
|
610 |
+
* When the validation errors list of at least one of the objects is not empty, that means the order has not been created.
|
611 |
+
* @since 1.0
|
612 |
+
* @param ParamOrder $order Order details
|
613 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
614 |
+
* @throws ServerException Thrown in case communication with server has failed
|
615 |
+
* @return array List of ResultOrderPickingInfo
|
616 |
+
*/
|
617 |
+
public function createOrder($order) {
|
618 |
+
$this->checkStateBeforeCall();
|
619 |
+
return $this->_epsInterfaceImpl->createOrder($this->getResultLogin(true)->getSessionId(), $order);
|
620 |
+
}
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Returns a list with all parcels of a shipment.
|
624 |
+
* @since 1.0
|
625 |
+
* @param integer $billOfLading Signed 64-bit
|
626 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
627 |
+
* @throws ServerException Thrown in case communication with server has failed
|
628 |
+
* @return array List of ResultParcelInfo
|
629 |
+
*/
|
630 |
+
public function getPickingParcels($billOfLading) {
|
631 |
+
$this->checkStateBeforeCall();
|
632 |
+
return $this->_epsInterfaceImpl->getPickingParcels($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* This method can be used to track the state/history of a shipment.
|
637 |
+
* @deprecated Use trackPickingEx instead
|
638 |
+
* @since 1.0
|
639 |
+
* @param integer $billOfLading Signed 64-bit
|
640 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
641 |
+
* @throws ServerException Thrown in case communication with server has failed
|
642 |
+
* @return array List of ResultTrackPicking
|
643 |
+
*/
|
644 |
+
public function trackPicking($billOfLading) {
|
645 |
+
$this->checkStateBeforeCall();
|
646 |
+
return $this->_epsInterfaceImpl->trackPicking($this->getResultLogin(true)->getSessionId(), $billOfLading);
|
647 |
+
}
|
648 |
+
|
649 |
+
/**
|
650 |
+
* This method can be used to track the state/history of a shipment.
|
651 |
+
* @since 1.2
|
652 |
+
* @param integer $billOfLading Signed 64-bit
|
653 |
+
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
654 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
655 |
+
* @throws ServerException Thrown in case communication with server has failed
|
656 |
+
* @return array List of ResultTrackPickingEx
|
657 |
+
*/
|
658 |
+
public function trackPickingEx($billOfLading, $language) {
|
659 |
+
$this->checkStateBeforeCall();
|
660 |
+
return $this->_epsInterfaceImpl->trackPickingEx($this->getResultLogin(true)->getSessionId(), $billOfLading, $language);
|
661 |
+
}
|
662 |
+
|
663 |
+
/**
|
664 |
+
* This method can be used to track the state/history of a shipment.
|
665 |
+
* @since 1.4
|
666 |
+
* @param integer $parcelId Signed 64-bit
|
667 |
+
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
668 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
669 |
+
* @throws ServerException Thrown in case communication with server has failed
|
670 |
+
* @return array List of ResultTrackPickingEx
|
671 |
+
*/
|
672 |
+
public function trackParcel($parcelId, $language) {
|
673 |
+
$this->checkStateBeforeCall();
|
674 |
+
return $this->_epsInterfaceImpl->trackParcel($this->getResultLogin(true)->getSessionId(), $parcelId, $language);
|
675 |
+
}
|
676 |
+
|
677 |
+
/**
|
678 |
+
* Search BOLs by reference codes (ref1 and/or ref2).
|
679 |
+
* @since 1.0
|
680 |
+
* @param ParamSearchByRefNum $params
|
681 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
682 |
+
* @throws ServerException Thrown in case communication with server has failed
|
683 |
+
* @return array List of BOLs found (signed 64-bit integers)
|
684 |
+
*/
|
685 |
+
public function searchPickingsByRefNumber($params) {
|
686 |
+
$this->checkStateBeforeCall();
|
687 |
+
return $this->_epsInterfaceImpl->searchPickingsByRefNumber($this->getResultLogin(true)->getSessionId(), $params);
|
688 |
+
}
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Get microregion id for provided GPS coordinates
|
692 |
+
* @since 1.5
|
693 |
+
* @param signed 64-bit treal $coordX
|
694 |
+
* @param signed 64-bit treal $coordY
|
695 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
696 |
+
* @throws ServerException Thrown in case communication with server has failed
|
697 |
+
* @return Mocregion id (signed 64-bit integer)
|
698 |
+
*/
|
699 |
+
public function getMicroregionId($coordX, $coordY) {
|
700 |
+
$this->checkStateBeforeCall();
|
701 |
+
return $this->_epsInterfaceImpl->getMicroregionId($this->getResultLogin(true)->getSessionId(), $coordX, $coordY);
|
702 |
+
}
|
703 |
+
|
704 |
+
/**
|
705 |
+
* Returns data for clients by specified client ID or other search criteria.
|
706 |
+
* If client ID is specified the behaviour of this method is the same as getClientById.
|
707 |
+
* Otherwise, the search returns results that satisfy search criteria
|
708 |
+
* @since 1.6
|
709 |
+
* @param ParamClientSearch $clientQuery
|
710 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
711 |
+
* @throws ServerException Thrown in case communication with server has failed
|
712 |
+
* @return array List of ResultClientData
|
713 |
+
*/
|
714 |
+
public function searchClients($clientQuery) {
|
715 |
+
$this->checkStateBeforeCall();
|
716 |
+
return $this->_epsInterfaceImpl->searchClients($this->getResultLogin(true)->getSessionId(), $clientQuery);
|
717 |
+
}
|
718 |
+
|
719 |
+
|
720 |
+
/**
|
721 |
+
* Returns list with available special delivery requirements for logged user
|
722 |
+
* @throws ClientException Thrown in case EPS interface implementation is not set
|
723 |
+
* @throws ServerException Thrown in case communication with server has failed
|
724 |
+
* @return array List of ResultSpecialDeliveryRequirement
|
725 |
+
* @since 2.1.0
|
726 |
+
*/
|
727 |
+
public function listSpecialDeliveryRequirements() {
|
728 |
+
$this->checkStateBeforeCall();
|
729 |
+
return $this->_epsInterfaceImpl->listSpecialDeliveryRequirements($this->getResultLogin(true)->getSessionId());
|
730 |
+
}
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Validates address and returns validation result
|
734 |
+
* - validationMode = 0 (default) - Extended validation w/o GIS info (address uniqueness is not verified);
|
735 |
+
* - validationMode = 1 (NOT IMPLEMENTED YET - reserved for future implementation) Extended validation with GIS info (address uniqueness is verified);
|
736 |
+
* - validationMode = 2 - basic validation (the same as address validation in createBillOfLading)
|
737 |
+
* @param ParamAddress $address
|
738 |
+
* @param integer $validationMode signed 32 bit
|
739 |
+
* @throws ServerException Thrown in case communication with server has failed
|
740 |
+
* @throws PickingValidationException Thrown in case address validation has failed
|
741 |
+
* @return boolean Validation result flag
|
742 |
+
* @since 2.2.0
|
743 |
+
*/
|
744 |
+
public function validateAddress($address, $validationMode) {
|
745 |
+
$this->checkStateBeforeCall();
|
746 |
+
return $this->_epsInterfaceImpl->validateAddress($this->getResultLogin(true)->getSessionId(), $address, $validationMode);
|
747 |
+
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* Returns all client objects ( including logged user's ) having the same contract as logged client's contract.
|
751 |
+
* @throws ServerException Thrown in case communication with server has failed
|
752 |
+
* @return List of ResultClientData
|
753 |
+
* @since 2.2.0
|
754 |
+
*/
|
755 |
+
public function listContractClients() {
|
756 |
+
$this->checkStateBeforeCall();
|
757 |
+
return $this->_epsInterfaceImpl->listContractClients($this->getResultLogin(true)->getSessionId());
|
758 |
+
}
|
759 |
+
|
760 |
+
/**
|
761 |
+
* Returns a list of Speedy offices matching the search criteria
|
762 |
+
* The list is limited to 10 records.
|
763 |
+
* @since 2.2.0
|
764 |
+
* @param string $name Office name (or part of it);
|
765 |
+
* @param integer $siteId Signed 64-bit Site ID
|
766 |
+
* @throws ServerException Thrown in case communication with server has failed
|
767 |
+
* @return array ResultOfficeEx List of offices
|
768 |
+
*/
|
769 |
+
public function listOfficesEx($name, $siteId) {
|
770 |
+
$this->checkStateBeforeCall();
|
771 |
+
return $this->_epsInterfaceImpl->listOfficesEx($this->getResultLogin(true)->getSessionId(), $name, $siteId);
|
772 |
+
}
|
773 |
+
}
|
774 |
?>
|
lib/SpeedyEPS/ver01/EPSInterface.class.php
CHANGED
@@ -1,498 +1,545 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ServerException.class.php';
|
4 |
-
require_once 'ResultLogin.class.php';
|
5 |
-
require_once 'ResultSite.class.php';
|
6 |
-
require_once 'ResultSiteEx.class.php';
|
7 |
-
require_once 'ResultCourierService.class.php';
|
8 |
-
require_once 'ResultCourierServiceExt.class.php';
|
9 |
-
require_once 'ResultMinMaxReal.class.php';
|
10 |
-
require_once 'ResultStreet.class.php';
|
11 |
-
require_once 'ResultQuarter.class.php';
|
12 |
-
require_once 'ResultCommonObject.class.php';
|
13 |
-
require_once 'ResultOffice.class.php';
|
14 |
-
require_once '
|
15 |
-
require_once '
|
16 |
-
require_once '
|
17 |
-
require_once '
|
18 |
-
require_once '
|
19 |
-
require_once '
|
20 |
-
require_once '
|
21 |
-
require_once '
|
22 |
-
require_once '
|
23 |
-
require_once '
|
24 |
-
require_once '
|
25 |
-
require_once '
|
26 |
-
require_once '
|
27 |
-
require_once '
|
28 |
-
require_once '
|
29 |
-
require_once '
|
30 |
-
require_once '
|
31 |
-
require_once '
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
interface
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
*
|
43 |
-
* @
|
44 |
-
* @
|
45 |
-
* @
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
*
|
53 |
-
* @
|
54 |
-
* @
|
55 |
-
* @
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
*
|
63 |
-
* @
|
64 |
-
* @
|
65 |
-
* @
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
*
|
73 |
-
* @
|
74 |
-
* @param
|
75 |
-
* @param
|
76 |
-
* @
|
77 |
-
* @
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
*
|
85 |
-
*
|
86 |
-
* @
|
87 |
-
* @param string $
|
88 |
-
* @
|
89 |
-
* @
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
*
|
97 |
-
*
|
98 |
-
* @
|
99 |
-
* @
|
100 |
-
* @
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
*
|
108 |
-
* @
|
109 |
-
* @param
|
110 |
-
* @param integer $
|
111 |
-
* @param
|
112 |
-
* @param
|
113 |
-
* @
|
114 |
-
* @
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
*
|
122 |
-
*
|
123 |
-
*
|
124 |
-
*
|
125 |
-
* Type
|
126 |
-
* Type
|
127 |
-
* Type
|
128 |
-
*
|
129 |
-
*
|
130 |
-
* @
|
131 |
-
* @
|
132 |
-
* @
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
*
|
140 |
-
*
|
141 |
-
*
|
142 |
-
*
|
143 |
-
* @
|
144 |
-
* @
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
*
|
152 |
-
* @
|
153 |
-
* @
|
154 |
-
* @
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
*
|
162 |
-
* @
|
163 |
-
* @
|
164 |
-
* @
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
*
|
172 |
-
* @
|
173 |
-
* @
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
*
|
181 |
-
* @
|
182 |
-
* @
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
*
|
190 |
-
*
|
191 |
-
* @
|
192 |
-
* @param
|
193 |
-
* @
|
194 |
-
* @
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
*
|
202 |
-
*
|
203 |
-
* @
|
204 |
-
* @param
|
205 |
-
* @
|
206 |
-
* @
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
*
|
214 |
-
*
|
215 |
-
* @
|
216 |
-
* @param
|
217 |
-
* @
|
218 |
-
* @
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
*
|
226 |
-
*
|
227 |
-
* @
|
228 |
-
* @param
|
229 |
-
* @
|
230 |
-
* @
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
*
|
238 |
-
*
|
239 |
-
* @
|
240 |
-
* @param
|
241 |
-
* @
|
242 |
-
* @
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
*
|
250 |
-
*
|
251 |
-
*
|
252 |
-
* @
|
253 |
-
* @
|
254 |
-
* @
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
*
|
262 |
-
*
|
263 |
-
*
|
264 |
-
*
|
265 |
-
*
|
266 |
-
* @
|
267 |
-
* @param
|
268 |
-
* @param integer $
|
269 |
-
* @param
|
270 |
-
* @
|
271 |
-
* @
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
*
|
279 |
-
* @
|
280 |
-
* @
|
281 |
-
* @
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
*
|
289 |
-
* @
|
290 |
-
* @
|
291 |
-
* @
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
*
|
299 |
-
*
|
300 |
-
* @
|
301 |
-
* @param
|
302 |
-
* @
|
303 |
-
* @
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
*
|
311 |
-
*
|
312 |
-
* @
|
313 |
-
* @
|
314 |
-
* @
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
*
|
322 |
-
* @
|
323 |
-
* @
|
324 |
-
* @
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
*
|
332 |
-
*
|
333 |
-
* •
|
334 |
-
* •
|
335 |
-
*
|
336 |
-
*
|
337 |
-
* @
|
338 |
-
* @
|
339 |
-
* @
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
*
|
347 |
-
*
|
348 |
-
* @
|
349 |
-
* @
|
350 |
-
* @param
|
351 |
-
* @
|
352 |
-
* @
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
*
|
360 |
-
* @
|
361 |
-
* @
|
362 |
-
* @
|
363 |
-
* @
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
*
|
371 |
-
*
|
372 |
-
* @
|
373 |
-
* @
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
*
|
381 |
-
*
|
382 |
-
* @
|
383 |
-
* @
|
384 |
-
* @
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
*
|
392 |
-
*
|
393 |
-
* @
|
394 |
-
* @
|
395 |
-
* @
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
*
|
403 |
-
*
|
404 |
-
* @
|
405 |
-
* @
|
406 |
-
* @
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
*
|
414 |
-
*
|
415 |
-
*
|
416 |
-
* @
|
417 |
-
* @
|
418 |
-
* @
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
*
|
426 |
-
* @
|
427 |
-
* @
|
428 |
-
* @
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
*
|
436 |
-
* @
|
437 |
-
* @
|
438 |
-
* @
|
439 |
-
* @
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
*
|
447 |
-
* @
|
448 |
-
* @param
|
449 |
-
* @
|
450 |
-
* @
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
*
|
458 |
-
* @
|
459 |
-
* @param
|
460 |
-
* @
|
461 |
-
* @
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
*
|
469 |
-
* @
|
470 |
-
* @
|
471 |
-
* @
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
*
|
479 |
-
* @
|
480 |
-
* @param
|
481 |
-
* @
|
482 |
-
* @
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
*
|
490 |
-
*
|
491 |
-
*
|
492 |
-
* @
|
493 |
-
* @
|
494 |
-
* @
|
495 |
-
|
496 |
-
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ServerException.class.php';
|
4 |
+
require_once 'ResultLogin.class.php';
|
5 |
+
require_once 'ResultSite.class.php';
|
6 |
+
require_once 'ResultSiteEx.class.php';
|
7 |
+
require_once 'ResultCourierService.class.php';
|
8 |
+
require_once 'ResultCourierServiceExt.class.php';
|
9 |
+
require_once 'ResultMinMaxReal.class.php';
|
10 |
+
require_once 'ResultStreet.class.php';
|
11 |
+
require_once 'ResultQuarter.class.php';
|
12 |
+
require_once 'ResultCommonObject.class.php';
|
13 |
+
require_once 'ResultOffice.class.php';
|
14 |
+
require_once 'ResultOfficeEx.class.php';
|
15 |
+
require_once 'ResultClientData.class.php';
|
16 |
+
require_once 'ResultAddressSearch.class.php';
|
17 |
+
require_once 'ResultCalculation.class.php';
|
18 |
+
require_once 'ResultCalculationMS.class.php';
|
19 |
+
require_once 'ResultBOL.class.php';
|
20 |
+
require_once 'ResultOrderPickingInfo.class.php';
|
21 |
+
require_once 'ResultTrackPicking.class.php';
|
22 |
+
require_once 'ResultTrackPickingEx.class.php';
|
23 |
+
require_once 'ResultSpecialDeliveryRequirement.class.php';
|
24 |
+
require_once 'ParamCalculation.class.php';
|
25 |
+
require_once 'ParamFilterSite.class.php';
|
26 |
+
require_once 'ParamAddressSearch.class.php';
|
27 |
+
require_once 'ParamLanguage.class.php';
|
28 |
+
require_once 'ParamPicking.class.php';
|
29 |
+
require_once 'ParamPDF.class.php';
|
30 |
+
require_once 'ParamParcel.class.php';
|
31 |
+
require_once 'ParamOrder.class.php';
|
32 |
+
require_once 'ParamSearchByRefNum.class.php';
|
33 |
+
require_once 'ParamClientSearch.class.php';
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Speedy EPS Service Interface.
|
37 |
+
* This interface should be implemented by all specific protocol class implementations (SOAP, REST, etc.)
|
38 |
+
*/
|
39 |
+
interface EPSInterface {
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Login web service method
|
43 |
+
* @since 1.0
|
44 |
+
* @param string $username User name
|
45 |
+
* @param string $password User password
|
46 |
+
* @throws ServerException Thrown in case communication with server has failed
|
47 |
+
* @return ResultLogin Result of login
|
48 |
+
*/
|
49 |
+
public function login($username, $password);
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Returns whether the session is active
|
53 |
+
* @since 1.0
|
54 |
+
* @param string $sessionId The session ID to be tested
|
55 |
+
* @param boolean $refreshSession In case the session is active, this parameter specifies if the session should be automatically refreshed
|
56 |
+
* @throws ServerException Thrown in case communication with server has failed
|
57 |
+
* @return boolean Session active flag
|
58 |
+
*/
|
59 |
+
public function isSessionActive($sessionId, $refreshSession);
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Returns the list of courier services valid on this date
|
63 |
+
* @since 1.0
|
64 |
+
* @param string $sessionId
|
65 |
+
* @param date $date
|
66 |
+
* @throws ServerException Thrown in case communication with server has failed
|
67 |
+
* @return array List of ResultCourierService instances
|
68 |
+
*/
|
69 |
+
public function listServices($sessionId, $date);
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Returns the list of courier services valid on this date and sites.
|
73 |
+
* @since 1.0
|
74 |
+
* @param string $sessionId
|
75 |
+
* @param datetime $date
|
76 |
+
* @param integer $senderSiteId Signed 64-bit integer sender's site ID;
|
77 |
+
* @param integer $receiverSiteId Signed 64-bit integer receiver's site ID;
|
78 |
+
* @throws ServerException Thrown in case communication with server has failed
|
79 |
+
* @return array List of ResultCourierServiceExt instances
|
80 |
+
*/
|
81 |
+
public function listServicesForSites($sessionId, $date, $senderSiteId, $receiverSiteId);
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Returns a list of sites matching the search criteria.
|
85 |
+
* The result is limited to 10 records
|
86 |
+
* @since 1.0
|
87 |
+
* @param string $sessionId
|
88 |
+
* @param string $type
|
89 |
+
* @param string $name
|
90 |
+
* @throws ServerException Thrown in case communication with server has failed
|
91 |
+
* @return array List of ResultSite instances
|
92 |
+
*/
|
93 |
+
public function listSites($sessionId, $type, $name);
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Returns a list of sites. The method aims to find the closest matches.
|
97 |
+
* The result is limited to 10 records
|
98 |
+
* @since 1.0
|
99 |
+
* @param string $sessionId
|
100 |
+
* @param ParamFilterSite $paramFilterSite
|
101 |
+
* @throws ServerException Thrown in case communication with server has failed
|
102 |
+
* @return array List of ResultSiteEx instances
|
103 |
+
*/
|
104 |
+
public function listSitesEx($sessionId, $paramFilterSite);
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Returns the min/max weight allowed for the given shipment parameters
|
108 |
+
* @since 1.0
|
109 |
+
* @param string $sessionId
|
110 |
+
* @param integer $serviceTypeId Signed 64-bit ID of the courier service
|
111 |
+
* @param integer $senderSiteId Signed 64-bit Sender's site ID
|
112 |
+
* @param integer $receiverSiteId Signed 64-bit Receiver's site ID
|
113 |
+
* @param date $date
|
114 |
+
* @param boolean $documents Specifies if the shipment consists of documents
|
115 |
+
* @throws ServerException Thrown in case communication with server has failed
|
116 |
+
* @return ResultMinMaxReal
|
117 |
+
*/
|
118 |
+
public function getWeightInterval($sessionId, $serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents);
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Returns CSV-formatted data (depending on the nomenType value).
|
122 |
+
* Column numbers can change in the future so it's recommended to address the data using the column names in the header row.
|
123 |
+
* The data for some nomenTypes requires a payed license (additional licensing contract) and permissions (access rights).
|
124 |
+
* To obtain such license please contact our IT department or your Speedy key account manager.
|
125 |
+
* Type 100 - returns a list of all sites.
|
126 |
+
* Type 300 - returns a list of all streets (requires a license).
|
127 |
+
* Type 400 - returns a list of all quarters (requires a license).
|
128 |
+
* Type 500 - returns a list of all common objects (requires a license).
|
129 |
+
* Type 700 - returns a list of all block names (requires a license).
|
130 |
+
* @since 1.0
|
131 |
+
* @param string $sessionId
|
132 |
+
* @param integer $nomenType Signed 32-bit The type of address nomenclature
|
133 |
+
* @throws ServerException Thrown in case communication with server has failed
|
134 |
+
* @return string CSV formatted
|
135 |
+
*/
|
136 |
+
public function getAddressNomenclature($sessionId, $nomenType);
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Returns a list of all sites.
|
140 |
+
* Note: This method is relatively slow (because of the size of its response). You shouldn't call it more than several times a day.
|
141 |
+
* The methods is designed to provide data which should be locally stored/cached by client apps.
|
142 |
+
* The address-related nomenclature data is updated only several times a year.
|
143 |
+
* @since 1.0
|
144 |
+
* @param string $sessionId
|
145 |
+
* @throws ServerException Thrown in case communication with server has failed
|
146 |
+
* @return array List of ResultSite instances
|
147 |
+
*/
|
148 |
+
public function listAllSites($sessionId);
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Returns a site by ID
|
152 |
+
* @since 1.0
|
153 |
+
* @param string $sessionId
|
154 |
+
* @param integer $siteId Signed 64-bit Site ID
|
155 |
+
* @throws ServerException Thrown in case communication with server has failed
|
156 |
+
* @return ResultSite
|
157 |
+
*/
|
158 |
+
public function getSiteById($sessionId, $siteId);
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Returns sites having either full or partial address nomenclature (streets, quarters etc.).
|
162 |
+
* @since 1.0
|
163 |
+
* @param string $sessionId
|
164 |
+
* @param AddrNomen $addrNomen Only values FULL and PARTIAL are allowed
|
165 |
+
* @throws ServerException Thrown in case communication with server has failed
|
166 |
+
* @return List of ResultSite
|
167 |
+
*/
|
168 |
+
public function getSitesByAddrNomenType($sessionId, $addrNomen);
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Returns a list of the most common types of streets.
|
172 |
+
* @since 1.0
|
173 |
+
* @param string $sessionId
|
174 |
+
* @throws ServerException Thrown in case communication with server has failed
|
175 |
+
* @return array string List of the most common types of streets
|
176 |
+
*/
|
177 |
+
public function listStreetTypes($sessionId);
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Returns a list of the most common types of quarters (districts).
|
181 |
+
* @since 1.0
|
182 |
+
* @param string $sessionId
|
183 |
+
* @throws ServerException Thrown in case communication with server has failed
|
184 |
+
* @return array string List of the most common types of quarters (districts).
|
185 |
+
*/
|
186 |
+
public function listQuarterTypes($sessionId);
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Returns a list of streets matching the search criteria
|
190 |
+
* The list is limited to 10 records.
|
191 |
+
* @since 1.0
|
192 |
+
* @param string $sessionId
|
193 |
+
* @param string $name Street name (or part of it)
|
194 |
+
* @param integer $siteId Signed 64-bit Site ID
|
195 |
+
* @throws ServerException Thrown in case communication with server has failed
|
196 |
+
* @return array ResultStreet List of streets
|
197 |
+
*/
|
198 |
+
public function listStreets($sessionId, $name, $siteId);
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Returns a list of quarters matching the search criteria
|
202 |
+
* The list is limited to 10 records.
|
203 |
+
* @since 1.0
|
204 |
+
* @param string $sessionId
|
205 |
+
* @param string $name Quarter name (or part of it)
|
206 |
+
* @param integer $siteId Signed 64-bit Site ID
|
207 |
+
* @throws ServerException Thrown in case communication with server has failed
|
208 |
+
* @return array ResultQuarter List of streets
|
209 |
+
*/
|
210 |
+
public function listQuarters($sessionId, $name, $siteId);
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Returns a list of common objects matching the search criteria.
|
214 |
+
* The list is limited to 10 records.
|
215 |
+
* @since 1.0
|
216 |
+
* @param string $sessionId
|
217 |
+
* @param string $name Common object name (or part of it)
|
218 |
+
* @param integer $siteId Signed 64-bit Site ID
|
219 |
+
* @throws ServerException Thrown in case communication with server has failed
|
220 |
+
* @return array ResultCommonObject List of common objects
|
221 |
+
*/
|
222 |
+
public function listCommonObjects($sessionId, $name, $siteId);
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Returns a list of blocks matching the search criteria.
|
226 |
+
* The list is limited to 10 records.
|
227 |
+
* @since 1.0
|
228 |
+
* @param string $sessionId
|
229 |
+
* @param string $name Block name (or part of it)
|
230 |
+
* @param integer $siteId Signed 64-bit Site ID
|
231 |
+
* @throws ServerException Thrown in case communication with server has failed
|
232 |
+
* @return array string List of blocks
|
233 |
+
*/
|
234 |
+
public function listBlocks($sessionId, $name, $siteId);
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Returns a list of Speedy offices matching the search criteria
|
238 |
+
* The list is limited to 10 records.
|
239 |
+
* @since 1.0
|
240 |
+
* @param string $sessionId
|
241 |
+
* @param string $name Office name (or part of it);
|
242 |
+
* @param integer $siteId Signed 64-bit Site ID
|
243 |
+
* @throws ServerException Thrown in case communication with server has failed
|
244 |
+
* @return array ResultOffice List of offices
|
245 |
+
*/
|
246 |
+
public function listOffices($sessionId, $name, $siteId);
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Returns data for client by ID.
|
250 |
+
* Allowed values for clientId are only the ones of members of the user's contract and the predefined partners
|
251 |
+
* in the WebClients application.
|
252 |
+
* @since 1.0
|
253 |
+
* @param string $sessionId
|
254 |
+
* @param integer $clientId Signed 64-bit integer – Client/Partner ID
|
255 |
+
* @throws ServerException Thrown in case communication with server has failed
|
256 |
+
* @return ResultClientData
|
257 |
+
*/
|
258 |
+
public function getClientById($sessionId, $clientId);
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Returns the dates when the shipment can be ordered for pick-up.
|
262 |
+
* The "time" component represents the deadline for creating an order
|
263 |
+
* (or the deadline for delivering the shipment to a Speedy office when senderOfficeId is set).
|
264 |
+
* (This method could be used for the "takingDate" property of ParamPicking or ParamCalculation.)
|
265 |
+
* Note: Either senderSiteId or senderOfficeId should be set, or neither of them. Both parameters having "not null" values is not allowed.
|
266 |
+
* @since 1.0
|
267 |
+
* @param string $sessionId
|
268 |
+
* @param integer $serviceTypeId
|
269 |
+
* @param integer $senderSiteId Signed 64-bit – Sender's site ID
|
270 |
+
* @param integer $senderOfficeId Signed 64-bit – If the sender intends to deliver the shipment to a Speedy office, the office ID could be set as a filter
|
271 |
+
* @param date $minDate - When the "time" component is set then this date is to be included in the result list only if the time is not after the working time of Speedy;
|
272 |
+
* @throws ServerException Thrown in case communication with server has failed
|
273 |
+
* @return array List of dates
|
274 |
+
*/
|
275 |
+
public function getAllowedDaysForTaking($sessionId, $serviceTypeId, $senderSiteId, $senderOfficeId, $minDate);
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Returns a list of addresses matching the search criteria.
|
279 |
+
* @since 1.0
|
280 |
+
* @param string $sessionId
|
281 |
+
* @param ParamAddressSearch $address Search criteria (filter)
|
282 |
+
* @throws ServerException Thrown in case communication with server has failed
|
283 |
+
* @return array List of ResultAddressSearch
|
284 |
+
*/
|
285 |
+
public function addressSearch($sessionId, $address);
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Calculate method
|
289 |
+
* @since 1.0
|
290 |
+
* @param string $sessionId Session ID
|
291 |
+
* @param ParamCalculation $paramCalculation
|
292 |
+
* @throws ServerException Thrown in case communication with server has failed
|
293 |
+
* @return ResultCalculation
|
294 |
+
*/
|
295 |
+
public function calculate($sessionId, $calculation);
|
296 |
+
|
297 |
+
/**
|
298 |
+
* This method could be used for preliminary check-up of shipment's price for a range of courier services.
|
299 |
+
* Service type ID field of $calculation structure is overriden by this method to required value (0) before call.
|
300 |
+
* @since 1.0
|
301 |
+
* @param string $sessionId
|
302 |
+
* @param ParamCalculation $calculation Data needed to perform the calculation;
|
303 |
+
* @param array $serviceTypeIds List<signed 64-bit integer> – A list of courier service IDs for which price needs to be calculated
|
304 |
+
* @throws ServerException Thrown in case communication with server has failed
|
305 |
+
* @return array List of ResultCalculationMS
|
306 |
+
*/
|
307 |
+
public function calculateMultipleServices($sessionId, $calculation, $serviceTypeIds);
|
308 |
+
|
309 |
+
/**
|
310 |
+
* This is an alternative method for shipment price calculation where the parameter is of type ParamPicking.
|
311 |
+
* Clients are encouraged to use the method that best fits their needs.
|
312 |
+
* @since 1.0
|
313 |
+
* @param string $sessionId
|
314 |
+
* @param ParamPicking $picking
|
315 |
+
* @throws ServerException Thrown in case communication with server has failed
|
316 |
+
* @return ResultCalculation
|
317 |
+
*/
|
318 |
+
public function calculatePicking($sessionId, $picking);
|
319 |
+
|
320 |
+
/**
|
321 |
+
* The method used to create BOL.
|
322 |
+
* @since 1.0
|
323 |
+
* @param string $sessionId
|
324 |
+
* @param ParamPicking $picking Data for the shipment (BOL)
|
325 |
+
* @throws ServerException Thrown in case communication with server has failed
|
326 |
+
* @return ResultBOL
|
327 |
+
*/
|
328 |
+
public function createBillOfLading($sessionId, $picking);
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Used for creating PDF documents to be printed (BOLs, labels etc.)
|
332 |
+
* Examples:
|
333 |
+
* •Bill of Lading;
|
334 |
+
* •Bill of Lading with "cash on delivery";
|
335 |
+
* •Custom travel label (type 20);
|
336 |
+
* •Custom travel label (type 20) with "cash on delivery".
|
337 |
+
* @since 1.0
|
338 |
+
* @param string $sessionId
|
339 |
+
* @param ParamPDF $params
|
340 |
+
* @throws ServerException Thrown in case communication with server has failed
|
341 |
+
* @return array bytes
|
342 |
+
*/
|
343 |
+
public function createPDF($sessionId, $params);
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Creates PDF document for BOL.
|
347 |
+
* The method is deprecated, "createPDF" should be used instead.
|
348 |
+
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
349 |
+
* @since 1.0
|
350 |
+
* @param string $sessionId
|
351 |
+
* @param integer $billOfLading Signed 64-bit
|
352 |
+
* @param boolean $includeAutoPrintJS Specifies if embedded JavaScript code for direct printing to be generated
|
353 |
+
* @throws ServerException Thrown in case communication with server has failed
|
354 |
+
* @return array of bytes
|
355 |
+
*/
|
356 |
+
public function createBillOfLadingPDF($sessionId, $billOfLading, $includeAutoPrintJS);
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Creates PDF document of "type I". The method is deprecated, "createPDF" should be used instead.
|
360 |
+
* @deprecated The method is deprecated, "createPDF" should be used instead.
|
361 |
+
* @since 1.0
|
362 |
+
* @param string $sessionId
|
363 |
+
* @param integer $parcelId Signed 64-bit Parcel ID
|
364 |
+
* @throws ServerException Thrown in case communication with server has failed
|
365 |
+
* @return array of bytes
|
366 |
+
*/
|
367 |
+
public function createCustomTravelLabelPDFType1($sessionId, $parcelId);
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Used to cancel BOL.
|
371 |
+
* Only allowed when the shipment is neither ordered nor picked up by Speedy.
|
372 |
+
* @since 1.0
|
373 |
+
* @param string $sessionId
|
374 |
+
* @param integer $billOfLading Signed 64-bit
|
375 |
+
* @throws ServerException Thrown in case communication with server has failed
|
376 |
+
*/
|
377 |
+
public function invalidatePicking($sessionId, $billOfLading);
|
378 |
+
|
379 |
+
/**
|
380 |
+
* This method is used to update BOL.
|
381 |
+
* Only allowed if BOL was created with pendingShipmentDescription = true.
|
382 |
+
* @since 1.0
|
383 |
+
* @param string $sessionId
|
384 |
+
* @param ParamPicking $picking Data for the shipment (BOL)
|
385 |
+
* @throws ServerException Thrown in case communication with server has failed
|
386 |
+
* @return ResultBOL
|
387 |
+
*/
|
388 |
+
public function updateBillOfLading($sessionId, $picking);
|
389 |
+
|
390 |
+
/**
|
391 |
+
* This method is used to add parcel to an existing BOL
|
392 |
+
* (only allowed if BOL was created with pendingParcelsDescription = true).
|
393 |
+
* @since 1.0
|
394 |
+
* @param string $sessionId
|
395 |
+
* @param ParamParcel $parcel Parcel data
|
396 |
+
* @throws ServerException Thrown in case communication with server has failed
|
397 |
+
* @return integer Signed 64-bit parcel's ID
|
398 |
+
*/
|
399 |
+
public function addParcel($sessionId, $parcel);
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Makes BOL "fully created".
|
403 |
+
* Only applies to BOLs created with pendingParcelsDescription = true.
|
404 |
+
* @since 1.0
|
405 |
+
* @param string $sessionId
|
406 |
+
* @param integer $billOfLading Signed 64-bit
|
407 |
+
* @throws ServerException Thrown in case communication with server has failed
|
408 |
+
* @return ResultBOL
|
409 |
+
*/
|
410 |
+
public function finalizeBillOfLadingCreation($sessionId, $billOfLading);
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Creates an order for shipments pick-up (i.e. a visit by courier of Speedy).
|
414 |
+
* The retuned list contains objects corresponding to each BOL (one object per BOL).
|
415 |
+
* When the validation errors list of at least one of the objects is not empty, that means the order has not been created.
|
416 |
+
* @since 1.0
|
417 |
+
* @param string $sessionId
|
418 |
+
* @param ParamOrder $order Order details
|
419 |
+
* @throws ServerException Thrown in case communication with server has failed
|
420 |
+
* @return array List of ResultOrderPickingInfo
|
421 |
+
*/
|
422 |
+
public function createOrder($sessionId, $order);
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Returns a list with all parcels of a shipment.
|
426 |
+
* @since 1.0
|
427 |
+
* @param string $sessionId
|
428 |
+
* @param integer $billOfLading Signed 64-bit
|
429 |
+
* @throws ServerException Thrown in case communication with server has failed
|
430 |
+
* @return array List of ResultParcelInfo
|
431 |
+
*/
|
432 |
+
public function getPickingParcels($sessionId, $billOfLading);
|
433 |
+
|
434 |
+
/**
|
435 |
+
* This method can be used to track the state/history of a shipment.
|
436 |
+
* @deprecated Use trackPickingEx instead
|
437 |
+
* @since 1.0
|
438 |
+
* @param string $sessionId
|
439 |
+
* @param integer $billOfLading Signed 64-bit
|
440 |
+
* @throws ServerException Thrown in case communication with server has failed
|
441 |
+
* @return array List of ResultTrackPicking
|
442 |
+
*/
|
443 |
+
public function trackPicking($sessionId, $billOfLading);
|
444 |
+
|
445 |
+
/**
|
446 |
+
* This method can be used to track the state/history of a shipment.
|
447 |
+
* @since 1.2
|
448 |
+
* @param string $sessionId
|
449 |
+
* @param integer $billOfLading Signed 64-bit
|
450 |
+
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
451 |
+
* @throws ServerException Thrown in case communication with server has failed
|
452 |
+
* @return array List of ResultTrackPickingEx
|
453 |
+
*/
|
454 |
+
public function trackPickingEx($sessionId, $billOfLading, $language);
|
455 |
+
|
456 |
+
/**
|
457 |
+
* This method can be used to track the state/history of a shipment parcel.
|
458 |
+
* @since 1.4
|
459 |
+
* @param string $sessionId
|
460 |
+
* @param integer $parcelId Signed 64-bit
|
461 |
+
* @param ParamLanguage $language BG or EN. If set to null the server defaults to BG
|
462 |
+
* @throws ServerException Thrown in case communication with server has failed
|
463 |
+
* @return array List of ResultTrackPickingEx
|
464 |
+
*/
|
465 |
+
public function trackParcel($sessionId, $parcelId, $language);
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Search BOLs by reference codes (ref1 and/or ref2).
|
469 |
+
* @since 1.0
|
470 |
+
* @param string $sessionId
|
471 |
+
* @param ParamSearchByRefNum $params
|
472 |
+
* @throws ServerException Thrown in case communication with server has failed
|
473 |
+
* @return array List of BOLs found (signed 64-bit integers)
|
474 |
+
*/
|
475 |
+
public function searchPickingsByRefNumber($sessionId, $params);
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Get microregion id for provided GPS corrdinates
|
479 |
+
* @since 1.5
|
480 |
+
* @param string $sessionId
|
481 |
+
* @param signed 64-bit treal $coordX
|
482 |
+
* @param signed 64-bit treal $coordY
|
483 |
+
* @throws ServerException Thrown in case communication with server has failed
|
484 |
+
* @return Mocregion id (signed 64-bit integer)
|
485 |
+
*/
|
486 |
+
public function getMicroregionId($sessionId, $coordX, $coordY);
|
487 |
+
|
488 |
+
/**
|
489 |
+
* Returns data for clients by specified client ID or other search criteria.
|
490 |
+
* If client ID is specified the behaviour of this method is the same as getClientById.
|
491 |
+
* Otherwise, the search returns results that satisfy search criteria
|
492 |
+
* @since 1.6
|
493 |
+
* @param string $sessionId
|
494 |
+
* @param ParamClientSearch $clientQuery
|
495 |
+
* @throws ServerException Thrown in case communication with server has failed
|
496 |
+
* @return array List of ResultClientData
|
497 |
+
*/
|
498 |
+
public function searchClients($sessionId, $clientQuery);
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Returns list with available special delivery requirements for logged user
|
502 |
+
* @param string $sessionId
|
503 |
+
* @throws ServerException Thrown in case communication with server has failed
|
504 |
+
* @return array List of ResultSpecialDeliveryRequirement
|
505 |
+
* @since 2.1.0
|
506 |
+
*/
|
507 |
+
public function listSpecialDeliveryRequirements($sessionId);
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Validates address and returns validation result
|
511 |
+
* - validationMode = 0 (default) - Extended validation w/o GIS info (address uniqueness is not verified);
|
512 |
+
* - validationMode = 1 (NOT IMPLEMENTED YET - reserved for future implementation) Extended validation with GIS info (address uniqueness is verified);
|
513 |
+
* - validationMode = 2 - basic validation (the same as address validation in createBillOfLading)
|
514 |
+
* @param string $sessionId
|
515 |
+
* @param ParamAddress $address
|
516 |
+
* @param integer $validationMode signed 32 bit
|
517 |
+
* @throws ServerException Thrown in case communication with server has failed
|
518 |
+
* @throws PickingValidationException Thrown in case address validation has failed
|
519 |
+
* @return boolean Validation result flag
|
520 |
+
* @since 2.2.0
|
521 |
+
*/
|
522 |
+
public function validateAddress($sessionId, $address, $validationMode);
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Returns all client objects ( including logged user's ) having the same contract as logged client's contract.
|
526 |
+
* @param string $sessionId
|
527 |
+
* @throws ServerException Thrown in case communication with server has failed
|
528 |
+
* @return List of ResultClientData
|
529 |
+
* @since 2.2.0
|
530 |
+
*/
|
531 |
+
public function listContractClients($sessionId);
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Returns a list of Speedy offices matching the search criteria
|
535 |
+
* The list is limited to 10 records.
|
536 |
+
* @since 2.2.0
|
537 |
+
* @param string $sessionId
|
538 |
+
* @param string $name Office name (or part of it);
|
539 |
+
* @param integer $siteId Signed 64-bit Site ID
|
540 |
+
* @throws ServerException Thrown in case communication with server has failed
|
541 |
+
* @return array ResultOfficeEx List of offices
|
542 |
+
*/
|
543 |
+
public function listOfficesEx($sessionId, $name, $siteId);
|
544 |
+
}
|
545 |
?>
|
lib/SpeedyEPS/ver01/FixedDiscountCardId.class.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as parameters in web service calls for picking calculation and registration
|
4 |
-
*/
|
5 |
-
class FixedDiscountCardId {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Agreement (contract) ID
|
9 |
-
* MANDATORY: NO
|
10 |
-
* @var integer Signed 32-bit
|
11 |
-
*/
|
12 |
-
private $_agreementId;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Card ID
|
16 |
-
* @var integer Signed 32-bit
|
17 |
-
*/
|
18 |
-
private $_cardId;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Set agreement (contract) ID
|
22 |
-
* @param integer $agreementId Signed 32-bit
|
23 |
-
*/
|
24 |
-
public function setAgreementId($agreementId) {
|
25 |
-
$this->_agreementId = $agreementId;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get agreement (contract) ID
|
30 |
-
* @return integer Signed 32-bit
|
31 |
-
*/
|
32 |
-
public function getAgreementId() {
|
33 |
-
return $this->_agreementId;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Set card ID
|
38 |
-
* @param integer $cardId Signed 32-bit
|
39 |
-
*/
|
40 |
-
public function setCardId($cardId) {
|
41 |
-
$this->_cardId = $cardId;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get card ID
|
46 |
-
* @return integer Signed 32-bit
|
47 |
-
*/
|
48 |
-
public function getCardId() {
|
49 |
-
return $this->_cardId;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Return standard class from this class
|
54 |
-
* @return stdClass
|
55 |
-
*/
|
56 |
-
public function toStdClass() {
|
57 |
-
$stdClass = new stdClass();
|
58 |
-
$stdClass->agreementId = $this->_agreementId;
|
59 |
-
$stdClass->cardId = $this->_cardId;
|
60 |
-
return $stdClass;
|
61 |
-
}
|
62 |
-
}
|
63 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as parameters in web service calls for picking calculation and registration
|
4 |
+
*/
|
5 |
+
class FixedDiscountCardId {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Agreement (contract) ID
|
9 |
+
* MANDATORY: NO
|
10 |
+
* @var integer Signed 32-bit
|
11 |
+
*/
|
12 |
+
private $_agreementId;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Card ID
|
16 |
+
* @var integer Signed 32-bit
|
17 |
+
*/
|
18 |
+
private $_cardId;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Set agreement (contract) ID
|
22 |
+
* @param integer $agreementId Signed 32-bit
|
23 |
+
*/
|
24 |
+
public function setAgreementId($agreementId) {
|
25 |
+
$this->_agreementId = $agreementId;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get agreement (contract) ID
|
30 |
+
* @return integer Signed 32-bit
|
31 |
+
*/
|
32 |
+
public function getAgreementId() {
|
33 |
+
return $this->_agreementId;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Set card ID
|
38 |
+
* @param integer $cardId Signed 32-bit
|
39 |
+
*/
|
40 |
+
public function setCardId($cardId) {
|
41 |
+
$this->_cardId = $cardId;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get card ID
|
46 |
+
* @return integer Signed 32-bit
|
47 |
+
*/
|
48 |
+
public function getCardId() {
|
49 |
+
return $this->_cardId;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Return standard class from this class
|
54 |
+
* @return stdClass
|
55 |
+
*/
|
56 |
+
public function toStdClass() {
|
57 |
+
$stdClass = new stdClass();
|
58 |
+
$stdClass->agreementId = $this->_agreementId;
|
59 |
+
$stdClass->cardId = $this->_cardId;
|
60 |
+
return $stdClass;
|
61 |
+
}
|
62 |
+
}
|
63 |
?>
|
lib/SpeedyEPS/ver01/ParamAddress.class.php
CHANGED
@@ -1,406 +1,406 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as parameters on web service method calls for picking calculation and registration
|
4 |
-
*
|
5 |
-
* When address is required (i.e. when clientId is null), at least one of the following rules must be met:
|
6 |
-
* •not empty street (ID or Type&Name) and (streetNo or blockNo);
|
7 |
-
* •not empty quarter (ID or Type&Name) and (streetNo or blockNo);
|
8 |
-
* •not empty common object;
|
9 |
-
* •not empty addressNote.
|
10 |
-
*/
|
11 |
-
class ParamAddress {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Site ID
|
15 |
-
* MANDATORY: YES
|
16 |
-
* @var integer Signed 64-bit
|
17 |
-
*/
|
18 |
-
private $_siteId;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Street name. Max size is 50 symbols.
|
22 |
-
* MANDATORY: NO
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
private $_streetName;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Street type. Max size is 15 symbols.
|
29 |
-
* MANDATORY: NO
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
private $_streetType;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Street ID
|
36 |
-
* MANDATORY: NO
|
37 |
-
* @var integer Signed 64-bit
|
38 |
-
*/
|
39 |
-
private $_streetId;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Quarter name. Max size is 50 symbols.
|
43 |
-
* MANDATORY: NO
|
44 |
-
* @var string
|
45 |
-
*/
|
46 |
-
private $_quarterName;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Quarter type. Max size is 15 symbols.
|
50 |
-
* MANDATORY: NO
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
private $_quarterType;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Quarter ID
|
57 |
-
* MANDATORY: NO
|
58 |
-
* @var long Signed 64-bit
|
59 |
-
*/
|
60 |
-
private $_quarterId;
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Street No. Max size is 10 symbols.
|
64 |
-
* MANDATORY: NO
|
65 |
-
* @var string
|
66 |
-
*/
|
67 |
-
private $_streetNo;
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Block No. Max size is 32 symbols.
|
71 |
-
* MANDATORY: NO
|
72 |
-
* @var string
|
73 |
-
*/
|
74 |
-
private $_blockNo;
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Entrance No. Max size is 10 symbols.
|
78 |
-
* MANDATORY: NO
|
79 |
-
* @var string
|
80 |
-
*/
|
81 |
-
private $_entranceNo;
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Floor No. Max size is 10 symbols.
|
85 |
-
* MANDATORY: NO
|
86 |
-
* @var string
|
87 |
-
*/
|
88 |
-
private $_floorNo;
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Appartment No. Max size is 10 symbols.
|
92 |
-
* MANDATORY: NO
|
93 |
-
* @var string
|
94 |
-
*/
|
95 |
-
private $_apartmentNo;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Address note. Max size is 200 symbols.
|
99 |
-
* MANDATORY: NO
|
100 |
-
* @var string
|
101 |
-
*/
|
102 |
-
private $_addressNote;
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Common object ID
|
106 |
-
* MANDATORY: NO
|
107 |
-
* @var integer Signed 64-bit
|
108 |
-
*/
|
109 |
-
private $_commonObjectId;
|
110 |
-
|
111 |
-
/**
|
112 |
-
* GIS coordinates - X
|
113 |
-
* MANDATORY: NO
|
114 |
-
* @var double Signed 64-bit
|
115 |
-
*/
|
116 |
-
private $_coordX;
|
117 |
-
|
118 |
-
/**
|
119 |
-
* GIS coordinates - Y
|
120 |
-
* MANDATORY: NO
|
121 |
-
* @var double Signed 64-bit
|
122 |
-
*/
|
123 |
-
private $_coordY;
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Set site ID
|
127 |
-
* @param integer $siteId Signed 64-bit
|
128 |
-
*/
|
129 |
-
public function setSiteId($siteId) {
|
130 |
-
$this->_siteId = $siteId;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Get site ID
|
135 |
-
* @return integer Signed 64-bit
|
136 |
-
*/
|
137 |
-
public function getSiteId() {
|
138 |
-
return $this->_siteId;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Set street name. Max size is 50 symbols.
|
143 |
-
* @param string $streetName
|
144 |
-
*/
|
145 |
-
public function setStreetName($streetName) {
|
146 |
-
$this->_streetName = $streetName;
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Get street name
|
151 |
-
* @return string
|
152 |
-
*/
|
153 |
-
public function getStreetName() {
|
154 |
-
return $this->_streetName;
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Set street type. Max size is 15 symbols.
|
159 |
-
* @param string $streetType
|
160 |
-
*/
|
161 |
-
public function setStreetType($streetType) {
|
162 |
-
$this->_streetType = $streetType;
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Get street type
|
167 |
-
* @return string
|
168 |
-
*/
|
169 |
-
public function getStreetType() {
|
170 |
-
return $this->_streetType;
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Set street ID
|
175 |
-
* @param integer $streetId Signed 64-bit
|
176 |
-
*/
|
177 |
-
public function setStreetId($streetId) {
|
178 |
-
$this->_streetId = $streetId;
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Get street ID
|
183 |
-
* @return integer Signed 64-bit
|
184 |
-
*/
|
185 |
-
public function getStreetId() {
|
186 |
-
return $this->_streetId;
|
187 |
-
}
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Set quarter name. Max size is 50 symbols.
|
191 |
-
* @param string $quarterName
|
192 |
-
*/
|
193 |
-
public function setQuarterName($quarterName) {
|
194 |
-
$this->_quarterName = $quarterName;
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Get quarter name
|
199 |
-
* @return string
|
200 |
-
*/
|
201 |
-
public function getQuarterName() {
|
202 |
-
return $this->_quarterName;
|
203 |
-
}
|
204 |
-
|
205 |
-
/**
|
206 |
-
* Set quarter type. Max size is 15 symbols.
|
207 |
-
* @param string $quarterType
|
208 |
-
*/
|
209 |
-
public function setQuarterType($quarterType) {
|
210 |
-
$this->_quarterType = $quarterType;
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Get quarter type
|
215 |
-
* @return string
|
216 |
-
*/
|
217 |
-
public function getQuarterType() {
|
218 |
-
return $this->_quarterType;
|
219 |
-
}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Set quarter ID.
|
223 |
-
* @param integer $quarterId Signed 64-bit
|
224 |
-
*/
|
225 |
-
public function setQuarterId($quarterId) {
|
226 |
-
$this->_quarterId = $quarterId;
|
227 |
-
}
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Get quarter ID
|
231 |
-
* @return integer Signed 64-bit
|
232 |
-
*/
|
233 |
-
public function getQuarterId() {
|
234 |
-
return $this->_quarterId;
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Set street No. Max size is 10 symbols.
|
239 |
-
* @param string $streetNo
|
240 |
-
*/
|
241 |
-
public function setStreetNo($streetNo) {
|
242 |
-
$this->_streetNo = $streetNo;
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Get street No
|
247 |
-
* @return string
|
248 |
-
*/
|
249 |
-
public function getStreetNo() {
|
250 |
-
return $this->_streetNo;
|
251 |
-
}
|
252 |
-
|
253 |
-
/**
|
254 |
-
* Set block No. Max size is 32 symbols.
|
255 |
-
* @param string $blockNo
|
256 |
-
*/
|
257 |
-
public function setBlockNo($blockNo) {
|
258 |
-
$this->_blockNo = $blockNo;
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Get block No
|
263 |
-
* @return string
|
264 |
-
*/
|
265 |
-
public function getBlockNo() {
|
266 |
-
return $this->_blockNo;
|
267 |
-
}
|
268 |
-
|
269 |
-
/**
|
270 |
-
* Set entrance No. Max size is 10 symbols.
|
271 |
-
* @param string $entranceNo
|
272 |
-
*/
|
273 |
-
public function setEntranceNo($entranceNo) {
|
274 |
-
$this->_entranceNo = $entranceNo;
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Get entrance No
|
279 |
-
* @return string
|
280 |
-
*/
|
281 |
-
public function getEntranceNo() {
|
282 |
-
return $this->_entranceNo;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Set floor No. Max size is 10 symbols.
|
287 |
-
* @param string $floorNo
|
288 |
-
*/
|
289 |
-
public function setFloorNo($floorNo) {
|
290 |
-
$this->_floorNo = $floorNo;
|
291 |
-
}
|
292 |
-
|
293 |
-
/**
|
294 |
-
* Get floor No
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
public function getFloorNo() {
|
298 |
-
return $this->_floorNo;
|
299 |
-
}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Set appartment No. Max size is 10 symbols.
|
303 |
-
* @param string $apartmentNo
|
304 |
-
*/
|
305 |
-
public function setApartmentNo($apartmentNo) {
|
306 |
-
$this->_apartmentNo = $apartmentNo;
|
307 |
-
}
|
308 |
-
|
309 |
-
/**
|
310 |
-
* Get appartment No
|
311 |
-
* @return string
|
312 |
-
*/
|
313 |
-
public function getApartmentNo() {
|
314 |
-
return $this->_apartmentNo;
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* Set address note. Max size is 200 symbols.
|
319 |
-
* @param string $addressNote
|
320 |
-
*/
|
321 |
-
public function setAddressNote($addressNote) {
|
322 |
-
$this->_addressNote = $addressNote;
|
323 |
-
}
|
324 |
-
|
325 |
-
/**
|
326 |
-
* Get address note
|
327 |
-
* @return string
|
328 |
-
*/
|
329 |
-
public function getAddressNote() {
|
330 |
-
return $this->_addressNote;
|
331 |
-
}
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Set common object ID.
|
335 |
-
* @param integer $commonObjectId Signed 64-bit
|
336 |
-
*/
|
337 |
-
public function setCommonObjectId($commonObjectId) {
|
338 |
-
$this->_commonObjectId = $commonObjectId;
|
339 |
-
}
|
340 |
-
|
341 |
-
/**
|
342 |
-
* Get common object ID
|
343 |
-
* @return integer Signed 64-bit
|
344 |
-
*/
|
345 |
-
public function getCommonObjectId() {
|
346 |
-
return $this->_commonObjectId;
|
347 |
-
}
|
348 |
-
|
349 |
-
/**
|
350 |
-
* Set GIS coordinate - X.
|
351 |
-
* @param double $coordX Signed 64-bit
|
352 |
-
*/
|
353 |
-
public function setCoordX($coordX) {
|
354 |
-
$this->_coordX = $coordX;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Get GIS coordinate - X
|
359 |
-
* @return double Signed 64-bit
|
360 |
-
*/
|
361 |
-
public function getCoordX() {
|
362 |
-
return $this->_coordX;
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Set GIS coordinate - Y.
|
367 |
-
* @param double $coordY Signed 64-bit
|
368 |
-
*/
|
369 |
-
public function setCoordY($coordY) {
|
370 |
-
$this->_coordY = $coordY;
|
371 |
-
}
|
372 |
-
|
373 |
-
/**
|
374 |
-
* Get GIS coordinate - Y
|
375 |
-
* @return double Signed 64-bit
|
376 |
-
*/
|
377 |
-
public function getCoordY() {
|
378 |
-
return $this->_coordY;
|
379 |
-
}
|
380 |
-
|
381 |
-
/**
|
382 |
-
* Return standard class from this class
|
383 |
-
* @return stdClass
|
384 |
-
*/
|
385 |
-
public function toStdClass() {
|
386 |
-
$stdClass = new stdClass();
|
387 |
-
$stdClass->siteId = $this->_siteId;
|
388 |
-
$stdClass->streetName = $this->_streetName;
|
389 |
-
$stdClass->streetType = $this->_streetType;
|
390 |
-
$stdClass->streetId = $this->_streetId;
|
391 |
-
$stdClass->quarterName = $this->_quarterName;
|
392 |
-
$stdClass->quarterType = $this->_quarterType;
|
393 |
-
$stdClass->quarterId = $this->_quarterId;
|
394 |
-
$stdClass->streetNo = $this->_streetNo;
|
395 |
-
$stdClass->blockNo = $this->_blockNo;
|
396 |
-
$stdClass->entranceNo = $this->_entranceNo;
|
397 |
-
$stdClass->floorNo = $this->_floorNo;
|
398 |
-
$stdClass->apartmentNo = $this->_apartmentNo;
|
399 |
-
$stdClass->addressNote = $this->_addressNote;
|
400 |
-
$stdClass->commonObjectId = $this->_commonObjectId;
|
401 |
-
$stdClass->coordX = $this->_coordX;
|
402 |
-
$stdClass->coordY = $this->_coordY;
|
403 |
-
return $stdClass;
|
404 |
-
}
|
405 |
-
}
|
406 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as parameters on web service method calls for picking calculation and registration
|
4 |
+
*
|
5 |
+
* When address is required (i.e. when clientId is null), at least one of the following rules must be met:
|
6 |
+
* •not empty street (ID or Type&Name) and (streetNo or blockNo);
|
7 |
+
* •not empty quarter (ID or Type&Name) and (streetNo or blockNo);
|
8 |
+
* •not empty common object;
|
9 |
+
* •not empty addressNote.
|
10 |
+
*/
|
11 |
+
class ParamAddress {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Site ID
|
15 |
+
* MANDATORY: YES
|
16 |
+
* @var integer Signed 64-bit
|
17 |
+
*/
|
18 |
+
private $_siteId;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Street name. Max size is 50 symbols.
|
22 |
+
* MANDATORY: NO
|
23 |
+
* @var string
|
24 |
+
*/
|
25 |
+
private $_streetName;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Street type. Max size is 15 symbols.
|
29 |
+
* MANDATORY: NO
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $_streetType;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Street ID
|
36 |
+
* MANDATORY: NO
|
37 |
+
* @var integer Signed 64-bit
|
38 |
+
*/
|
39 |
+
private $_streetId;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Quarter name. Max size is 50 symbols.
|
43 |
+
* MANDATORY: NO
|
44 |
+
* @var string
|
45 |
+
*/
|
46 |
+
private $_quarterName;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Quarter type. Max size is 15 symbols.
|
50 |
+
* MANDATORY: NO
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
private $_quarterType;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Quarter ID
|
57 |
+
* MANDATORY: NO
|
58 |
+
* @var long Signed 64-bit
|
59 |
+
*/
|
60 |
+
private $_quarterId;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Street No. Max size is 10 symbols.
|
64 |
+
* MANDATORY: NO
|
65 |
+
* @var string
|
66 |
+
*/
|
67 |
+
private $_streetNo;
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Block No. Max size is 32 symbols.
|
71 |
+
* MANDATORY: NO
|
72 |
+
* @var string
|
73 |
+
*/
|
74 |
+
private $_blockNo;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Entrance No. Max size is 10 symbols.
|
78 |
+
* MANDATORY: NO
|
79 |
+
* @var string
|
80 |
+
*/
|
81 |
+
private $_entranceNo;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Floor No. Max size is 10 symbols.
|
85 |
+
* MANDATORY: NO
|
86 |
+
* @var string
|
87 |
+
*/
|
88 |
+
private $_floorNo;
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Appartment No. Max size is 10 symbols.
|
92 |
+
* MANDATORY: NO
|
93 |
+
* @var string
|
94 |
+
*/
|
95 |
+
private $_apartmentNo;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Address note. Max size is 200 symbols.
|
99 |
+
* MANDATORY: NO
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
private $_addressNote;
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Common object ID
|
106 |
+
* MANDATORY: NO
|
107 |
+
* @var integer Signed 64-bit
|
108 |
+
*/
|
109 |
+
private $_commonObjectId;
|
110 |
+
|
111 |
+
/**
|
112 |
+
* GIS coordinates - X
|
113 |
+
* MANDATORY: NO
|
114 |
+
* @var double Signed 64-bit
|
115 |
+
*/
|
116 |
+
private $_coordX;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* GIS coordinates - Y
|
120 |
+
* MANDATORY: NO
|
121 |
+
* @var double Signed 64-bit
|
122 |
+
*/
|
123 |
+
private $_coordY;
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Set site ID
|
127 |
+
* @param integer $siteId Signed 64-bit
|
128 |
+
*/
|
129 |
+
public function setSiteId($siteId) {
|
130 |
+
$this->_siteId = $siteId;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Get site ID
|
135 |
+
* @return integer Signed 64-bit
|
136 |
+
*/
|
137 |
+
public function getSiteId() {
|
138 |
+
return $this->_siteId;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Set street name. Max size is 50 symbols.
|
143 |
+
* @param string $streetName
|
144 |
+
*/
|
145 |
+
public function setStreetName($streetName) {
|
146 |
+
$this->_streetName = $streetName;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Get street name
|
151 |
+
* @return string
|
152 |
+
*/
|
153 |
+
public function getStreetName() {
|
154 |
+
return $this->_streetName;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Set street type. Max size is 15 symbols.
|
159 |
+
* @param string $streetType
|
160 |
+
*/
|
161 |
+
public function setStreetType($streetType) {
|
162 |
+
$this->_streetType = $streetType;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Get street type
|
167 |
+
* @return string
|
168 |
+
*/
|
169 |
+
public function getStreetType() {
|
170 |
+
return $this->_streetType;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Set street ID
|
175 |
+
* @param integer $streetId Signed 64-bit
|
176 |
+
*/
|
177 |
+
public function setStreetId($streetId) {
|
178 |
+
$this->_streetId = $streetId;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get street ID
|
183 |
+
* @return integer Signed 64-bit
|
184 |
+
*/
|
185 |
+
public function getStreetId() {
|
186 |
+
return $this->_streetId;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Set quarter name. Max size is 50 symbols.
|
191 |
+
* @param string $quarterName
|
192 |
+
*/
|
193 |
+
public function setQuarterName($quarterName) {
|
194 |
+
$this->_quarterName = $quarterName;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Get quarter name
|
199 |
+
* @return string
|
200 |
+
*/
|
201 |
+
public function getQuarterName() {
|
202 |
+
return $this->_quarterName;
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Set quarter type. Max size is 15 symbols.
|
207 |
+
* @param string $quarterType
|
208 |
+
*/
|
209 |
+
public function setQuarterType($quarterType) {
|
210 |
+
$this->_quarterType = $quarterType;
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Get quarter type
|
215 |
+
* @return string
|
216 |
+
*/
|
217 |
+
public function getQuarterType() {
|
218 |
+
return $this->_quarterType;
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Set quarter ID.
|
223 |
+
* @param integer $quarterId Signed 64-bit
|
224 |
+
*/
|
225 |
+
public function setQuarterId($quarterId) {
|
226 |
+
$this->_quarterId = $quarterId;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Get quarter ID
|
231 |
+
* @return integer Signed 64-bit
|
232 |
+
*/
|
233 |
+
public function getQuarterId() {
|
234 |
+
return $this->_quarterId;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Set street No. Max size is 10 symbols.
|
239 |
+
* @param string $streetNo
|
240 |
+
*/
|
241 |
+
public function setStreetNo($streetNo) {
|
242 |
+
$this->_streetNo = $streetNo;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Get street No
|
247 |
+
* @return string
|
248 |
+
*/
|
249 |
+
public function getStreetNo() {
|
250 |
+
return $this->_streetNo;
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Set block No. Max size is 32 symbols.
|
255 |
+
* @param string $blockNo
|
256 |
+
*/
|
257 |
+
public function setBlockNo($blockNo) {
|
258 |
+
$this->_blockNo = $blockNo;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Get block No
|
263 |
+
* @return string
|
264 |
+
*/
|
265 |
+
public function getBlockNo() {
|
266 |
+
return $this->_blockNo;
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Set entrance No. Max size is 10 symbols.
|
271 |
+
* @param string $entranceNo
|
272 |
+
*/
|
273 |
+
public function setEntranceNo($entranceNo) {
|
274 |
+
$this->_entranceNo = $entranceNo;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Get entrance No
|
279 |
+
* @return string
|
280 |
+
*/
|
281 |
+
public function getEntranceNo() {
|
282 |
+
return $this->_entranceNo;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Set floor No. Max size is 10 symbols.
|
287 |
+
* @param string $floorNo
|
288 |
+
*/
|
289 |
+
public function setFloorNo($floorNo) {
|
290 |
+
$this->_floorNo = $floorNo;
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Get floor No
|
295 |
+
* @return string
|
296 |
+
*/
|
297 |
+
public function getFloorNo() {
|
298 |
+
return $this->_floorNo;
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Set appartment No. Max size is 10 symbols.
|
303 |
+
* @param string $apartmentNo
|
304 |
+
*/
|
305 |
+
public function setApartmentNo($apartmentNo) {
|
306 |
+
$this->_apartmentNo = $apartmentNo;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Get appartment No
|
311 |
+
* @return string
|
312 |
+
*/
|
313 |
+
public function getApartmentNo() {
|
314 |
+
return $this->_apartmentNo;
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Set address note. Max size is 200 symbols.
|
319 |
+
* @param string $addressNote
|
320 |
+
*/
|
321 |
+
public function setAddressNote($addressNote) {
|
322 |
+
$this->_addressNote = $addressNote;
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Get address note
|
327 |
+
* @return string
|
328 |
+
*/
|
329 |
+
public function getAddressNote() {
|
330 |
+
return $this->_addressNote;
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Set common object ID.
|
335 |
+
* @param integer $commonObjectId Signed 64-bit
|
336 |
+
*/
|
337 |
+
public function setCommonObjectId($commonObjectId) {
|
338 |
+
$this->_commonObjectId = $commonObjectId;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Get common object ID
|
343 |
+
* @return integer Signed 64-bit
|
344 |
+
*/
|
345 |
+
public function getCommonObjectId() {
|
346 |
+
return $this->_commonObjectId;
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Set GIS coordinate - X.
|
351 |
+
* @param double $coordX Signed 64-bit
|
352 |
+
*/
|
353 |
+
public function setCoordX($coordX) {
|
354 |
+
$this->_coordX = $coordX;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Get GIS coordinate - X
|
359 |
+
* @return double Signed 64-bit
|
360 |
+
*/
|
361 |
+
public function getCoordX() {
|
362 |
+
return $this->_coordX;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Set GIS coordinate - Y.
|
367 |
+
* @param double $coordY Signed 64-bit
|
368 |
+
*/
|
369 |
+
public function setCoordY($coordY) {
|
370 |
+
$this->_coordY = $coordY;
|
371 |
+
}
|
372 |
+
|
373 |
+
/**
|
374 |
+
* Get GIS coordinate - Y
|
375 |
+
* @return double Signed 64-bit
|
376 |
+
*/
|
377 |
+
public function getCoordY() {
|
378 |
+
return $this->_coordY;
|
379 |
+
}
|
380 |
+
|
381 |
+
/**
|
382 |
+
* Return standard class from this class
|
383 |
+
* @return stdClass
|
384 |
+
*/
|
385 |
+
public function toStdClass() {
|
386 |
+
$stdClass = new stdClass();
|
387 |
+
$stdClass->siteId = $this->_siteId;
|
388 |
+
$stdClass->streetName = $this->_streetName;
|
389 |
+
$stdClass->streetType = $this->_streetType;
|
390 |
+
$stdClass->streetId = $this->_streetId;
|
391 |
+
$stdClass->quarterName = $this->_quarterName;
|
392 |
+
$stdClass->quarterType = $this->_quarterType;
|
393 |
+
$stdClass->quarterId = $this->_quarterId;
|
394 |
+
$stdClass->streetNo = $this->_streetNo;
|
395 |
+
$stdClass->blockNo = $this->_blockNo;
|
396 |
+
$stdClass->entranceNo = $this->_entranceNo;
|
397 |
+
$stdClass->floorNo = $this->_floorNo;
|
398 |
+
$stdClass->apartmentNo = $this->_apartmentNo;
|
399 |
+
$stdClass->addressNote = $this->_addressNote;
|
400 |
+
$stdClass->commonObjectId = $this->_commonObjectId;
|
401 |
+
$stdClass->coordX = $this->_coordX;
|
402 |
+
$stdClass->coordY = $this->_coordY;
|
403 |
+
return $stdClass;
|
404 |
+
}
|
405 |
+
}
|
406 |
?>
|
lib/SpeedyEPS/ver01/ParamAddressSearch.class.php
CHANGED
@@ -1,184 +1,184 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as a parameter for Speedy web service address search methods
|
4 |
-
*/
|
5 |
-
class ParamAddressSearch {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Site ID
|
9 |
-
* MANDATORY: YES
|
10 |
-
* @var integer Signed 64-bit
|
11 |
-
*/
|
12 |
-
private $_siteId;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Quarter ID
|
16 |
-
* MANDATORY: NO
|
17 |
-
* @var integer Signed 64-bit
|
18 |
-
*/
|
19 |
-
private $_quarterId;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Street ID
|
23 |
-
* MANDATORY: NO
|
24 |
-
* @var integer Signed 64-bit
|
25 |
-
*/
|
26 |
-
private $_streetId;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Common object ID
|
30 |
-
* MANDATORY: NO
|
31 |
-
* @var integer Signed 64-bit
|
32 |
-
*/
|
33 |
-
private $_commonObjectId;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Block No/name
|
37 |
-
* MANDATORY: NO
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
private $_blockNo;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Street No
|
44 |
-
* MANDATORY: NO
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_streetNo;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Entrance
|
51 |
-
* MANDATORY: NO
|
52 |
-
* @var string
|
53 |
-
*/
|
54 |
-
private $_entranceNo;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Set site ID
|
58 |
-
* @param integer $siteId Signed 64-bit
|
59 |
-
*/
|
60 |
-
public function setSiteId($siteId) {
|
61 |
-
$this->_siteId = $siteId;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Get site ID
|
66 |
-
* @return integer Signed 64-bit
|
67 |
-
*/
|
68 |
-
public function getSiteId() {
|
69 |
-
return $this->_siteId;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Set quarter ID
|
74 |
-
* @param integer $quarterId Signed 64-bit
|
75 |
-
*/
|
76 |
-
public function setQuarterId($quarterId) {
|
77 |
-
$this->_quarterId = $quarterId;
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Get quarter ID
|
82 |
-
* @return integer Signed 64-bit
|
83 |
-
*/
|
84 |
-
public function getQuarterId() {
|
85 |
-
return $this->_quarterId;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Set street ID
|
90 |
-
* @param integer $streetId Signed 64-bit
|
91 |
-
*/
|
92 |
-
public function setStreetId($streetId) {
|
93 |
-
$this->_streetId = $streetId;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Get street ID
|
98 |
-
* @return integer Signed 64-bit
|
99 |
-
*/
|
100 |
-
public function getStreetId() {
|
101 |
-
return $this->_streetId;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Set common object ID
|
106 |
-
* @param integer $commonObjectId Signed 64-bit
|
107 |
-
*/
|
108 |
-
public function setCommonObjectId($commonObjectId) {
|
109 |
-
$this->_commonObjectId = $commonObjectId;
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Get common object ID
|
114 |
-
* @return integer Signed 64-bit
|
115 |
-
*/
|
116 |
-
public function getCommonObjectId() {
|
117 |
-
return $this->_commonObjectId;
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Set block No
|
122 |
-
* @param string $blockNo
|
123 |
-
*/
|
124 |
-
public function setBlockNo($blockNo) {
|
125 |
-
$this->_blockNo = $blockNo;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Get block No
|
130 |
-
* @return string
|
131 |
-
*/
|
132 |
-
public function getBlockNo() {
|
133 |
-
return $this->_blockNo;
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Set street No
|
138 |
-
* @param string $streetNo
|
139 |
-
*/
|
140 |
-
public function setStreetNo($streetNo) {
|
141 |
-
$this->_streetNo = $streetNo;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Get street No
|
146 |
-
* @return string
|
147 |
-
*/
|
148 |
-
public function getStreetNo() {
|
149 |
-
return $this->_streetNo;
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Set entrance No
|
154 |
-
* @param string $entranceNo
|
155 |
-
*/
|
156 |
-
public function setEntranceNo($entranceNo) {
|
157 |
-
$this->_entranceNo = $entranceNo;
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Get entrance No
|
162 |
-
* @return string
|
163 |
-
*/
|
164 |
-
public function getEntranceNo() {
|
165 |
-
return $this->_entranceNo;
|
166 |
-
}
|
167 |
-
|
168 |
-
/**
|
169 |
-
* Return standard class from this class
|
170 |
-
* @return stdClass
|
171 |
-
*/
|
172 |
-
public function toStdClass() {
|
173 |
-
$stdClass = new stdClass();
|
174 |
-
$stdClass->siteId = $this->_siteId;
|
175 |
-
$stdClass->quarterId = $this->_quarterId;
|
176 |
-
$stdClass->streetId = $this->_streetId;
|
177 |
-
$stdClass->commonObjectId = $this->_commonObjectId;
|
178 |
-
$stdClass->blockNo = $this->_blockNo;
|
179 |
-
$stdClass->streetNo = $this->_streetNo;
|
180 |
-
$stdClass->entranceNo = $this->_entranceNo;
|
181 |
-
return $stdClass;
|
182 |
-
}
|
183 |
-
}
|
184 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as a parameter for Speedy web service address search methods
|
4 |
+
*/
|
5 |
+
class ParamAddressSearch {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Site ID
|
9 |
+
* MANDATORY: YES
|
10 |
+
* @var integer Signed 64-bit
|
11 |
+
*/
|
12 |
+
private $_siteId;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Quarter ID
|
16 |
+
* MANDATORY: NO
|
17 |
+
* @var integer Signed 64-bit
|
18 |
+
*/
|
19 |
+
private $_quarterId;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Street ID
|
23 |
+
* MANDATORY: NO
|
24 |
+
* @var integer Signed 64-bit
|
25 |
+
*/
|
26 |
+
private $_streetId;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Common object ID
|
30 |
+
* MANDATORY: NO
|
31 |
+
* @var integer Signed 64-bit
|
32 |
+
*/
|
33 |
+
private $_commonObjectId;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Block No/name
|
37 |
+
* MANDATORY: NO
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
private $_blockNo;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Street No
|
44 |
+
* MANDATORY: NO
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_streetNo;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Entrance
|
51 |
+
* MANDATORY: NO
|
52 |
+
* @var string
|
53 |
+
*/
|
54 |
+
private $_entranceNo;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Set site ID
|
58 |
+
* @param integer $siteId Signed 64-bit
|
59 |
+
*/
|
60 |
+
public function setSiteId($siteId) {
|
61 |
+
$this->_siteId = $siteId;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get site ID
|
66 |
+
* @return integer Signed 64-bit
|
67 |
+
*/
|
68 |
+
public function getSiteId() {
|
69 |
+
return $this->_siteId;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Set quarter ID
|
74 |
+
* @param integer $quarterId Signed 64-bit
|
75 |
+
*/
|
76 |
+
public function setQuarterId($quarterId) {
|
77 |
+
$this->_quarterId = $quarterId;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get quarter ID
|
82 |
+
* @return integer Signed 64-bit
|
83 |
+
*/
|
84 |
+
public function getQuarterId() {
|
85 |
+
return $this->_quarterId;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Set street ID
|
90 |
+
* @param integer $streetId Signed 64-bit
|
91 |
+
*/
|
92 |
+
public function setStreetId($streetId) {
|
93 |
+
$this->_streetId = $streetId;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Get street ID
|
98 |
+
* @return integer Signed 64-bit
|
99 |
+
*/
|
100 |
+
public function getStreetId() {
|
101 |
+
return $this->_streetId;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Set common object ID
|
106 |
+
* @param integer $commonObjectId Signed 64-bit
|
107 |
+
*/
|
108 |
+
public function setCommonObjectId($commonObjectId) {
|
109 |
+
$this->_commonObjectId = $commonObjectId;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Get common object ID
|
114 |
+
* @return integer Signed 64-bit
|
115 |
+
*/
|
116 |
+
public function getCommonObjectId() {
|
117 |
+
return $this->_commonObjectId;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Set block No
|
122 |
+
* @param string $blockNo
|
123 |
+
*/
|
124 |
+
public function setBlockNo($blockNo) {
|
125 |
+
$this->_blockNo = $blockNo;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get block No
|
130 |
+
* @return string
|
131 |
+
*/
|
132 |
+
public function getBlockNo() {
|
133 |
+
return $this->_blockNo;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Set street No
|
138 |
+
* @param string $streetNo
|
139 |
+
*/
|
140 |
+
public function setStreetNo($streetNo) {
|
141 |
+
$this->_streetNo = $streetNo;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get street No
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public function getStreetNo() {
|
149 |
+
return $this->_streetNo;
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Set entrance No
|
154 |
+
* @param string $entranceNo
|
155 |
+
*/
|
156 |
+
public function setEntranceNo($entranceNo) {
|
157 |
+
$this->_entranceNo = $entranceNo;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Get entrance No
|
162 |
+
* @return string
|
163 |
+
*/
|
164 |
+
public function getEntranceNo() {
|
165 |
+
return $this->_entranceNo;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Return standard class from this class
|
170 |
+
* @return stdClass
|
171 |
+
*/
|
172 |
+
public function toStdClass() {
|
173 |
+
$stdClass = new stdClass();
|
174 |
+
$stdClass->siteId = $this->_siteId;
|
175 |
+
$stdClass->quarterId = $this->_quarterId;
|
176 |
+
$stdClass->streetId = $this->_streetId;
|
177 |
+
$stdClass->commonObjectId = $this->_commonObjectId;
|
178 |
+
$stdClass->blockNo = $this->_blockNo;
|
179 |
+
$stdClass->streetNo = $this->_streetNo;
|
180 |
+
$stdClass->entranceNo = $this->_entranceNo;
|
181 |
+
return $stdClass;
|
182 |
+
}
|
183 |
+
}
|
184 |
?>
|
lib/SpeedyEPS/ver01/ParamBarcodeInfo.class.php
CHANGED
@@ -1,67 +1,67 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instance of this class are used as parameters for providing barcode inpuit fot pdf generation web service calls
|
4 |
-
*/
|
5 |
-
class ParamBarcodeInfo {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
9 |
-
* MANDATORY: YES
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
private $_barcodeValue;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Barcode label. It is printed just below the barcode image.
|
16 |
-
* For barcode formats other than 'CODE128' barcodeLabel must be equal to barcodeValue.
|
17 |
-
* MANDATORY: NO
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
private $_barcodeLabel;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Set barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
24 |
-
* @param string $barcodeValue
|
25 |
-
*/
|
26 |
-
public function setBarcodeValue($barcodeValue) {
|
27 |
-
$this->_barcodeValue = $barcodeValue;
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Get barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
32 |
-
* @return string
|
33 |
-
*/
|
34 |
-
public function getBarcodeValue() {
|
35 |
-
return $this->_barcodeValue;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Set barcode label. It is printed just below the barcode image.
|
40 |
-
* For barcode formats other than 'CODE128' barcodeLabel must be equal to barcodeValue.
|
41 |
-
* @param string $barcodeLabel
|
42 |
-
*/
|
43 |
-
public function setBarcodeLabel($barcodeLabel) {
|
44 |
-
$this->_barcodeLabel = $barcodeLabel;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Get barcode label. It is printed just below the barcode image.
|
49 |
-
* For barcode formats other than 'CODE128' it must contain digits only.
|
50 |
-
* @return string
|
51 |
-
*/
|
52 |
-
public function getBarcodeLabel() {
|
53 |
-
return $this->_barcodeLabel;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Return standard class from this class
|
58 |
-
* @return stdClass
|
59 |
-
*/
|
60 |
-
public function toStdClass() {
|
61 |
-
$stdClass = new stdClass();
|
62 |
-
$stdClass->barcodeValue = $this->_barcodeValue;
|
63 |
-
$stdClass->barcodeLabel = $this->_barcodeLabel;
|
64 |
-
return $stdClass;
|
65 |
-
}
|
66 |
-
}
|
67 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instance of this class are used as parameters for providing barcode inpuit fot pdf generation web service calls
|
4 |
+
*/
|
5 |
+
class ParamBarcodeInfo {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
9 |
+
* MANDATORY: YES
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
private $_barcodeValue;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Barcode label. It is printed just below the barcode image.
|
16 |
+
* For barcode formats other than 'CODE128' barcodeLabel must be equal to barcodeValue.
|
17 |
+
* MANDATORY: NO
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_barcodeLabel;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Set barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
24 |
+
* @param string $barcodeValue
|
25 |
+
*/
|
26 |
+
public function setBarcodeValue($barcodeValue) {
|
27 |
+
$this->_barcodeValue = $barcodeValue;
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get barcode value. For barcode formats other than 'CODE128' it must contain digits only.
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function getBarcodeValue() {
|
35 |
+
return $this->_barcodeValue;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Set barcode label. It is printed just below the barcode image.
|
40 |
+
* For barcode formats other than 'CODE128' barcodeLabel must be equal to barcodeValue.
|
41 |
+
* @param string $barcodeLabel
|
42 |
+
*/
|
43 |
+
public function setBarcodeLabel($barcodeLabel) {
|
44 |
+
$this->_barcodeLabel = $barcodeLabel;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get barcode label. It is printed just below the barcode image.
|
49 |
+
* For barcode formats other than 'CODE128' it must contain digits only.
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
public function getBarcodeLabel() {
|
53 |
+
return $this->_barcodeLabel;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Return standard class from this class
|
58 |
+
* @return stdClass
|
59 |
+
*/
|
60 |
+
public function toStdClass() {
|
61 |
+
$stdClass = new stdClass();
|
62 |
+
$stdClass->barcodeValue = $this->_barcodeValue;
|
63 |
+
$stdClass->barcodeLabel = $this->_barcodeLabel;
|
64 |
+
return $stdClass;
|
65 |
+
}
|
66 |
+
}
|
67 |
?>
|
lib/SpeedyEPS/ver01/ParamCalculation.class.php
CHANGED
@@ -1,647 +1,647 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class represents ParamCalculation type
|
5 |
-
*/
|
6 |
-
class ParamCalculation {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Payer type: sender
|
10 |
-
* @var integer Signed 32-bit
|
11 |
-
*/
|
12 |
-
const PAYER_TYPE_SENDER = 0;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Payer type: receiver
|
16 |
-
* @var integer Signed 32-bit
|
17 |
-
*/
|
18 |
-
const PAYER_TYPE_RECEIVER = 1;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Payer type: third party
|
22 |
-
* @var integer Signed 32-bit
|
23 |
-
*/
|
24 |
-
const PAYER_TYPE_THIRD_PARTY = 2;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Service type ID to set when this structire is used for multiple service calculations
|
28 |
-
* @var integer Signed 64-bit
|
29 |
-
*/
|
30 |
-
const CALCULATE_MULTUPLE_SERVICES_SERVICE_TYPE_ID = 0;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* The date for shipment pick-up (the "time" component is ignored). Default value is "today".
|
34 |
-
* MANDATORY: NO
|
35 |
-
* @access private
|
36 |
-
* @var date
|
37 |
-
*/
|
38 |
-
private $_takingDate;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* If set to true, the "takingDate" field is not just to be validated, but the first allowed (following)
|
42 |
-
* date will be used instead (in compliance with the pick-up schedule etc.).
|
43 |
-
* MANDATORY: NO
|
44 |
-
* @access private
|
45 |
-
* @var boolean
|
46 |
-
*/
|
47 |
-
private $_autoAdjustTakingDate;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Courier service type ID
|
51 |
-
* MANDATORY: YES
|
52 |
-
* @access private
|
53 |
-
* @var integer Signed 64-bit
|
54 |
-
*/
|
55 |
-
private $_serviceTypeId;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
59 |
-
* MANDATORY: YES
|
60 |
-
* @access private
|
61 |
-
* @var boolean
|
62 |
-
*/
|
63 |
-
private $_broughtToOffice;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Specifies if the shipment is "to be called"
|
67 |
-
* MANDATORY: YES
|
68 |
-
* @access private
|
69 |
-
* @var boolean
|
70 |
-
*/
|
71 |
-
private $_toBeCalled;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
75 |
-
* Depending on the courier service, this property could be required, allowed or banned
|
76 |
-
* MANDATORY: NO
|
77 |
-
* @access private
|
78 |
-
* @var integer Signed 16-bit
|
79 |
-
*/
|
80 |
-
private $_fixedTimeDelivery;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* In some rare cases users might prefer the delivery to be deferred by a day or two.
|
84 |
-
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
85 |
-
* Max value is 2.
|
86 |
-
* MANDATORY: NO
|
87 |
-
* @access private
|
88 |
-
* @var integer Signed 32-bit
|
89 |
-
*/
|
90 |
-
private $_deferredDeliveryWorkDays;
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Shipment insurance value (if the shipment is insured).
|
94 |
-
* The limit of this value depends on user's permissions and Speedy's current policy.
|
95 |
-
* MANDATORY: NO
|
96 |
-
* @access private
|
97 |
-
* @var integer Signed 64-bit
|
98 |
-
*/
|
99 |
-
private $_amountInsuranceBase;
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Cash-on-Delivery (COD) amount
|
103 |
-
* The limit of this value depends on user's permissions and Speedy's current policy.
|
104 |
-
* MANDATORY: NO
|
105 |
-
* @access private
|
106 |
-
* @var integer Signed 64-bit
|
107 |
-
*/
|
108 |
-
private $_amountCodBase;
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Specifies if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
112 |
-
* MANDATORY: NO
|
113 |
-
* @access private
|
114 |
-
* @var boolean
|
115 |
-
*/
|
116 |
-
private $_payCodToThirdParty;
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Parcels count.
|
120 |
-
* Max 999.
|
121 |
-
* MANDATORY: YES
|
122 |
-
* @access private
|
123 |
-
* @var integer Signed 32-bit
|
124 |
-
*/
|
125 |
-
private $_parcelsCount;
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Declared weight (the greater of "volume" and "real" weight values).
|
129 |
-
* Max 100.00
|
130 |
-
* MANDATORY: YES
|
131 |
-
* @access private
|
132 |
-
* @var double Signed 64-bit
|
133 |
-
*/
|
134 |
-
private $_weightDeclared;
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Specifies whether the shipment consists of documents
|
138 |
-
* MANDATORY: YES
|
139 |
-
* @access private
|
140 |
-
* @var boolean
|
141 |
-
*/
|
142 |
-
private $_documents;
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Specifies whether the shipment is fragile - necessary when the price of insurance is being calculated
|
146 |
-
* MANDATORY: YES
|
147 |
-
* @access private
|
148 |
-
* @var boolean
|
149 |
-
*/
|
150 |
-
private $_fragile;
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Specifies whether the shipment is palletized
|
154 |
-
* MANDATORY: YES
|
155 |
-
* @access private
|
156 |
-
* @var boolean
|
157 |
-
*/
|
158 |
-
private $_palletized;
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Sender's ID.
|
162 |
-
* Either senderId or senderSiteId must be set
|
163 |
-
* MANDATORY: NO
|
164 |
-
* @access private
|
165 |
-
* @var integer Signed 64-bit
|
166 |
-
*/
|
167 |
-
private $_senderId;
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Sender's site ID.
|
171 |
-
* Either senderId or senderSiteId must be set
|
172 |
-
* MANDATORY: NO
|
173 |
-
* @access private
|
174 |
-
* @var integer Signed 64-bit
|
175 |
-
*/
|
176 |
-
private $_senderSiteId;
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Receiver's ID.
|
180 |
-
* Either receiverId or receiverSiteId must be set
|
181 |
-
* MANDATORY: NO
|
182 |
-
* @access private
|
183 |
-
* @var integer Signed 64-bit
|
184 |
-
*/
|
185 |
-
private $_receiverId;
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Receiver's site ID
|
189 |
-
* Either receiverId or receiverSiteId must be set
|
190 |
-
* MANDATORY: NO
|
191 |
-
* @access private
|
192 |
-
* @var integer Signed 64-bit
|
193 |
-
*/
|
194 |
-
private $_receiverSiteId;
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Payer type (0=sender, 1=receiver or 2=third party)
|
198 |
-
* MANDATORY: YES
|
199 |
-
* @access private
|
200 |
-
* @var integer Signed 32-bit
|
201 |
-
*/
|
202 |
-
private $_payerType;
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Payer ID. Must be set <=> payer is "third party".
|
206 |
-
* MANDATORY: NO
|
207 |
-
* @access private
|
208 |
-
* @var integer Signed 64-bit
|
209 |
-
*/
|
210 |
-
private $_payerRefId;
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Insurance payer type (0=sender, 1=reciever or 2=third party).
|
214 |
-
* Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
215 |
-
* MANDATORY: NO
|
216 |
-
* @access private
|
217 |
-
* @var integer Signed 32-bit
|
218 |
-
*/
|
219 |
-
private $_payerTypeInsurance;
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Insurance payer ID. Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
223 |
-
* MANDATORY: NO
|
224 |
-
* @access private
|
225 |
-
* @var integer Signed 64-bit
|
226 |
-
*/
|
227 |
-
private $_payerRefInsuranceId;
|
228 |
-
|
229 |
-
/**
|
230 |
-
* Set the date for shipment pick-up (the "time" component is ignored).
|
231 |
-
* Server defaults this value to "today" if it is not set
|
232 |
-
* @param date $takingDate
|
233 |
-
*/
|
234 |
-
public function setTakingDate($takingDate) {
|
235 |
-
$this->_takingDate = $takingDate;
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Get date for shipment pick-up (the "time" component is ignored).
|
240 |
-
* @return date Taking date
|
241 |
-
*/
|
242 |
-
public function getTakingDate() {
|
243 |
-
return $this->_takingDate;
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* Set flag to auto-adjist or not taking date.
|
248 |
-
* If set to true, the "takingDate" field is not just to be validated, but the first allowed (following)
|
249 |
-
* date will be used instead (in compliance with the pick-up schedule etc.).
|
250 |
-
* @param boolean $autoAdjustTakingDate
|
251 |
-
*/
|
252 |
-
public function setAutoAdjustTakingDate($autoAdjustTakingDate) {
|
253 |
-
$this->_autoAdjustTakingDate = $autoAdjustTakingDate;
|
254 |
-
}
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Get flag for taking date auto-adjustment
|
258 |
-
* @return boolean Auto-adjust taking date flag
|
259 |
-
*/
|
260 |
-
public function isAutoAdjustTakingDate() {
|
261 |
-
return $this->_autoAdjustTakingDate;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Set courier service type ID from.
|
266 |
-
* @param integer $serviceTypeId Signed 64-bit value from Speedy service nomenclature
|
267 |
-
*/
|
268 |
-
public function setServiceTypeId($serviceTypeId) {
|
269 |
-
$this->_serviceTypeId = $serviceTypeId;
|
270 |
-
}
|
271 |
-
|
272 |
-
/**
|
273 |
-
* Get courier service type ID from nomenclature.
|
274 |
-
* @return integer Courier service type ID - signed 64-bit value from Speedy service nomenclature
|
275 |
-
*/
|
276 |
-
public function getServiceTypeId() {
|
277 |
-
return $this->_serviceTypeId;
|
278 |
-
}
|
279 |
-
|
280 |
-
/**
|
281 |
-
* Set flag for brought-to-office
|
282 |
-
* This flag specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
283 |
-
* @param boolean $broughtToOffice Brought-to-office flag
|
284 |
-
*/
|
285 |
-
public function setBroughtToOffice($broughtToOffice) {
|
286 |
-
$this->_broughtToOffice = $broughtToOffice;
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Get flag for brought-to-office
|
291 |
-
* @return boolean Brought-to-office flag
|
292 |
-
*/
|
293 |
-
public function isBroughtToOffice() {
|
294 |
-
return $this->_broughtToOffice;
|
295 |
-
}
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Set flag for to-be-called. Specifies if the shipment is "to be called"
|
299 |
-
* @param boolean $toBeCalled Brought-to-office flag
|
300 |
-
*/
|
301 |
-
public function setToBeCalled($toBeCalled) {
|
302 |
-
$this->_toBeCalled = $toBeCalled;
|
303 |
-
}
|
304 |
-
|
305 |
-
/**
|
306 |
-
* Get flag for to-be-called
|
307 |
-
* @return boolean To-be-called flag
|
308 |
-
*/
|
309 |
-
public function isToBeCalled() {
|
310 |
-
return $this->_toBeCalled;
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Set fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
315 |
-
* Depending on the courier service, this property could be required, allowed or banned
|
316 |
-
* @param integer $fixedTimeDelivery Signed 16-bit
|
317 |
-
*/
|
318 |
-
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
319 |
-
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Get fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
324 |
-
* @return integer Fixed time for delivery - signed 16-bit
|
325 |
-
*/
|
326 |
-
public function getFixedTimeDelivery() {
|
327 |
-
return $this->_fixedTimeDelivery;
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Set deferred delivery work days.
|
332 |
-
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
333 |
-
* Max value is 2.
|
334 |
-
* @param integer $deferredDeliveryWorkDays Signed 32-bit
|
335 |
-
*/
|
336 |
-
public function setDeferredDeliveryWorkDays($deferredDeliveryWorkDays) {
|
337 |
-
$this->_deferredDeliveryWorkDays = $deferredDeliveryWorkDays;
|
338 |
-
}
|
339 |
-
|
340 |
-
/**
|
341 |
-
* Get deferred delivery work days.
|
342 |
-
* @return integer Deferred delivery work days - signed 32-bit
|
343 |
-
*/
|
344 |
-
public function getDeferredDeliveryWorkDays() {
|
345 |
-
return $this->_deferredDeliveryWorkDays;
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Set shipment insurance value (if the shipment is insured).
|
350 |
-
* The limit of this value depends on user's permissions and Speedy's current policy.
|
351 |
-
* @param integer $amountInsuranceBase Signed 64-bit
|
352 |
-
*/
|
353 |
-
public function setAmountInsuranceBase($amountInsuranceBase) {
|
354 |
-
$this->_amountInsuranceBase = $amountInsuranceBase;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Get shipment insurance value
|
359 |
-
* @return integer Shipment insurance value - signed 64-bit
|
360 |
-
*/
|
361 |
-
public function getAmountInsuranceBase() {
|
362 |
-
return $this->_amountInsuranceBase;
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Set cash-on-Delivery (COD) amount.
|
367 |
-
* The limit of this value depends on user's permissions and Speedy's current policy.
|
368 |
-
* @param integer $amountCodBase Signed 64-bit
|
369 |
-
*/
|
370 |
-
public function setAmountCodBase($amountCodBase) {
|
371 |
-
$this->_amountCodBase = $amountCodBase;
|
372 |
-
}
|
373 |
-
|
374 |
-
/**
|
375 |
-
* Get cash-on-Delivery (COD) amount.
|
376 |
-
* @return integer Cash-on-Delivery (COD) amount - signed 64-bit
|
377 |
-
*/
|
378 |
-
public function getAmountCodBase() {
|
379 |
-
return $this->_amountCodBase;
|
380 |
-
}
|
381 |
-
|
382 |
-
/**
|
383 |
-
* Set flag, if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
384 |
-
* @param boolean $payCodToThirdParty
|
385 |
-
*/
|
386 |
-
public function setPayCodToThirdParty($payCodToThirdParty) {
|
387 |
-
$this->_payCodToThirdParty = $payCodToThirdParty;
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Get flag for COD value to be paid to a third party
|
392 |
-
* @return boolean Flag for cash-on-Delivery (COD) to third party
|
393 |
-
*/
|
394 |
-
public function isPayCodToThirdParty() {
|
395 |
-
return $this->_payCodToThirdParty;
|
396 |
-
}
|
397 |
-
|
398 |
-
/**
|
399 |
-
* Set parcels count.
|
400 |
-
* Max 999.
|
401 |
-
* @param integer $parcelsCount Parcels count - signed 32-bit
|
402 |
-
*/
|
403 |
-
public function setParcelsCount($parcelsCount) {
|
404 |
-
$this->_parcelsCount = $parcelsCount;
|
405 |
-
}
|
406 |
-
|
407 |
-
/**
|
408 |
-
* Get parcels count.
|
409 |
-
* @return integer Parcels count - signed 32-bit
|
410 |
-
*/
|
411 |
-
public function getParcelsCount() {
|
412 |
-
return $this->_parcelsCount;
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Set declared weight (the greater of "volume" and "real" weight values).
|
417 |
-
* Max 100.00
|
418 |
-
* @param double $weightDeclared Declared weight - signed 64-bit
|
419 |
-
*/
|
420 |
-
public function setWeightDeclared($weightDeclared) {
|
421 |
-
$this->_weightDeclared = $weightDeclared;
|
422 |
-
}
|
423 |
-
|
424 |
-
/**
|
425 |
-
* Get declared weight
|
426 |
-
* @return double Declared weight - signed 64-bit
|
427 |
-
*/
|
428 |
-
public function getWeightDeclared() {
|
429 |
-
return $this->_weightDeclared;
|
430 |
-
}
|
431 |
-
|
432 |
-
/**
|
433 |
-
* Set flag whether the shipment consists of documents
|
434 |
-
* @param boolean $documents Documents flag
|
435 |
-
*/
|
436 |
-
public function setDocuments($documents) {
|
437 |
-
$this->_documents = $documents;
|
438 |
-
}
|
439 |
-
|
440 |
-
/**
|
441 |
-
* Get flag whether the shipment consists of documents
|
442 |
-
* @return boolean Documents flag
|
443 |
-
*/
|
444 |
-
public function isDocuments() {
|
445 |
-
return $this->_documents;
|
446 |
-
}
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Set flag whether the shipment is fragile - necessary when the price of insurance is being calculated
|
450 |
-
* @param boolean $fragile Fragile flag
|
451 |
-
*/
|
452 |
-
public function setFragile($fragile) {
|
453 |
-
$this->_fragile = $fragile;
|
454 |
-
}
|
455 |
-
|
456 |
-
/**
|
457 |
-
* Get flag whether the shipment is fragile
|
458 |
-
* @return boolean Fragile flag
|
459 |
-
*/
|
460 |
-
public function isFragile() {
|
461 |
-
return $this->_fragile;
|
462 |
-
}
|
463 |
-
|
464 |
-
/**
|
465 |
-
* Set flag whether the shipment is for pallets
|
466 |
-
* @param boolean $palletized Palletized flag
|
467 |
-
*/
|
468 |
-
public function setPalletized($palletized) {
|
469 |
-
$this->_palletized = $palletized;
|
470 |
-
}
|
471 |
-
|
472 |
-
/**
|
473 |
-
* Get flag whether the shipment is for pallets
|
474 |
-
* @return boolean Palletized flag
|
475 |
-
*/
|
476 |
-
public function isPalletized() {
|
477 |
-
return $this->_palletized;
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Set sender's ID. From Speedy client nomenclature.
|
482 |
-
* Either senderId or senderSiteId must be set
|
483 |
-
* @param integer $senderId Signed 64-bit
|
484 |
-
*/
|
485 |
-
public function setSenderId($senderId) {
|
486 |
-
$this->_senderId = $senderId;
|
487 |
-
}
|
488 |
-
|
489 |
-
/**
|
490 |
-
* Get sender's ID. From Speedy client nomenclature.
|
491 |
-
* @return integer Sender's ID - signed 64-bit
|
492 |
-
*/
|
493 |
-
public function getSenderId() {
|
494 |
-
return $this->_senderId;
|
495 |
-
}
|
496 |
-
|
497 |
-
/**
|
498 |
-
* Set sender's site ID. From Speedy site nomenclature.
|
499 |
-
* Either senderId or senderSiteId must be set
|
500 |
-
* @param integer $senderSiteId Signed 64-bit
|
501 |
-
*/
|
502 |
-
public function setSenderSiteId($senderSiteId) {
|
503 |
-
$this->_senderSiteId = $senderSiteId;
|
504 |
-
}
|
505 |
-
|
506 |
-
/**
|
507 |
-
* Get sender's site ID. From Speedy site nomenclature.
|
508 |
-
* @return integer Sender's site ID - signed 64-bit
|
509 |
-
*/
|
510 |
-
public function getSenderSiteId() {
|
511 |
-
return $this->_senderSiteId;
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* Receiver's ID. From Speedy client nomenclature.
|
516 |
-
* Either receiverId or receiverSiteId must be set
|
517 |
-
* @param integer $receiverId Signed 64-bit
|
518 |
-
*/
|
519 |
-
public function setReceiverId($receiverId) {
|
520 |
-
$this->_receiverId = $receiverId;
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Get receiver's ID. From Speedy client nomenclature.
|
525 |
-
* @return integer Receiver's ID - signed 64-bit
|
526 |
-
*/
|
527 |
-
public function getReceiverId() {
|
528 |
-
return $this->_receiverId;
|
529 |
-
}
|
530 |
-
|
531 |
-
/**
|
532 |
-
* Set receiver's site ID. From Speedy site nomenclature.
|
533 |
-
* Either receiverId or receiverSiteId must be set
|
534 |
-
* @param integer $receiverSiteId Signed 64-bit
|
535 |
-
*/
|
536 |
-
public function setReceiverSiteId($receiverSiteId) {
|
537 |
-
$this->_receiverSiteId = $receiverSiteId;
|
538 |
-
}
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Get receiver's site ID. From Speedy site nomenclature.
|
542 |
-
* @return integer Receiver's site ID - signed 64-bit
|
543 |
-
*/
|
544 |
-
public function getReceiverSiteId() {
|
545 |
-
return $this->_receiverSiteId;
|
546 |
-
}
|
547 |
-
|
548 |
-
/**
|
549 |
-
* Set payer type (0=sender, 1=receiver or 2=third party)
|
550 |
-
* @param integer $payerType Signed 32-bit
|
551 |
-
*/
|
552 |
-
public function setPayerType($payerType) {
|
553 |
-
$this->_payerType = $payerType;
|
554 |
-
}
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Get payer type (0=sender, 1=receiver or 2=third party)
|
558 |
-
* @return integer Payer type - signed 32-bit
|
559 |
-
*/
|
560 |
-
public function getPayerType() {
|
561 |
-
return $this->_payerType;
|
562 |
-
}
|
563 |
-
|
564 |
-
/**
|
565 |
-
* Set payer ID from Speedy client nomenclature.
|
566 |
-
* Must be set <=> payer is "third party".
|
567 |
-
* @param integer $payerRefId Signed 64-bit
|
568 |
-
*/
|
569 |
-
public function setPayerRefId($payerRefId) {
|
570 |
-
$this->_payerRefId = $payerRefId;
|
571 |
-
}
|
572 |
-
|
573 |
-
/**
|
574 |
-
* Get payer ID from Speedy client nomenclature.
|
575 |
-
* @return integer Payer ID - signed 64-bit
|
576 |
-
*/
|
577 |
-
public function getPayerRefId() {
|
578 |
-
return $this->_payerRefId;
|
579 |
-
}
|
580 |
-
|
581 |
-
/**
|
582 |
-
* Set insurance payer type (0=sender, 1=reciever or 2=third party).
|
583 |
-
* Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
584 |
-
* @param integer $payerTypeInsurance Signed 32-bit
|
585 |
-
*/
|
586 |
-
public function setPayerTypeInsurance($payerTypeInsurance) {
|
587 |
-
$this->_payerTypeInsurance = $payerTypeInsurance;
|
588 |
-
}
|
589 |
-
|
590 |
-
/**
|
591 |
-
* Get insurance payer type (0=sender, 1=reciever or 2=third party).
|
592 |
-
* @return integer Insurance payer type - signed 32-bit
|
593 |
-
*/
|
594 |
-
public function getPayerTypeInsurance() {
|
595 |
-
return $this->_payerTypeInsurance;
|
596 |
-
}
|
597 |
-
|
598 |
-
/**
|
599 |
-
* Set insurance payer ID from Speedy client nomenclature.
|
600 |
-
* Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
601 |
-
* @param integer $payerRefInsuranceId Signed 64-bit
|
602 |
-
*/
|
603 |
-
public function setPayerRefInsuranceId($payerRefInsuranceId) {
|
604 |
-
$this->_payerRefInsuranceId = $payerRefInsuranceId;
|
605 |
-
}
|
606 |
-
|
607 |
-
/**
|
608 |
-
* Get insurance payer ID from Speedy client nomenclature.
|
609 |
-
* @return integer Insurance payer ID - signed 64-bit
|
610 |
-
*/
|
611 |
-
public function getPayerRefInsuranceId() {
|
612 |
-
return $this->_payerRefInsuranceId;
|
613 |
-
}
|
614 |
-
|
615 |
-
/**
|
616 |
-
* Return standard class from this class
|
617 |
-
* @return stdClass
|
618 |
-
*/
|
619 |
-
public function toStdClass() {
|
620 |
-
$stdClass = new stdClass();
|
621 |
-
$stdClass->takingDate = $this->_takingDate;
|
622 |
-
$stdClass->autoAdjustTakingDate = $this->_autoAdjustTakingDate;
|
623 |
-
$stdClass->serviceTypeId = $this->_serviceTypeId;
|
624 |
-
$stdClass->broughtToOffice = $this->_broughtToOffice;
|
625 |
-
$stdClass->toBeCalled = $this->_toBeCalled;
|
626 |
-
$stdClass->fixedTimeDelivery = $this->_fixedTimeDelivery;
|
627 |
-
$stdClass->deferredDeliveryWorkDays = $this->_deferredDeliveryWorkDays;
|
628 |
-
$stdClass->amountInsuranceBase = $this->_amountInsuranceBase;
|
629 |
-
$stdClass->amountCodBase = $this->_amountCodBase;
|
630 |
-
$stdClass->payCodToThirdParty = $this->_payCodToThirdParty;
|
631 |
-
$stdClass->parcelsCount = $this->_parcelsCount;
|
632 |
-
$stdClass->weightDeclared = $this->_weightDeclared;
|
633 |
-
$stdClass->documents = $this->_documents;
|
634 |
-
$stdClass->fragile = $this->_fragile;
|
635 |
-
$stdClass->palletized = $this->_palletized;
|
636 |
-
$stdClass->senderId = $this->_senderId;
|
637 |
-
$stdClass->senderSiteId = $this->_senderSiteId;
|
638 |
-
$stdClass->receiverId = $this->_receiverId;
|
639 |
-
$stdClass->receiverSiteId = $this->_receiverSiteId;
|
640 |
-
$stdClass->payerType = $this->_payerType;
|
641 |
-
$stdClass->payerRefId = $this->_payerRefId;
|
642 |
-
$stdClass->payerTypeInsurance = $this->_payerTypeInsurance;
|
643 |
-
$stdClass->payerRefInsuranceId = $this->_payerRefInsuranceId;
|
644 |
-
return $stdClass;
|
645 |
-
}
|
646 |
-
}
|
647 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class represents ParamCalculation type
|
5 |
+
*/
|
6 |
+
class ParamCalculation {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Payer type: sender
|
10 |
+
* @var integer Signed 32-bit
|
11 |
+
*/
|
12 |
+
const PAYER_TYPE_SENDER = 0;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Payer type: receiver
|
16 |
+
* @var integer Signed 32-bit
|
17 |
+
*/
|
18 |
+
const PAYER_TYPE_RECEIVER = 1;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Payer type: third party
|
22 |
+
* @var integer Signed 32-bit
|
23 |
+
*/
|
24 |
+
const PAYER_TYPE_THIRD_PARTY = 2;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Service type ID to set when this structire is used for multiple service calculations
|
28 |
+
* @var integer Signed 64-bit
|
29 |
+
*/
|
30 |
+
const CALCULATE_MULTUPLE_SERVICES_SERVICE_TYPE_ID = 0;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* The date for shipment pick-up (the "time" component is ignored). Default value is "today".
|
34 |
+
* MANDATORY: NO
|
35 |
+
* @access private
|
36 |
+
* @var date
|
37 |
+
*/
|
38 |
+
private $_takingDate;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* If set to true, the "takingDate" field is not just to be validated, but the first allowed (following)
|
42 |
+
* date will be used instead (in compliance with the pick-up schedule etc.).
|
43 |
+
* MANDATORY: NO
|
44 |
+
* @access private
|
45 |
+
* @var boolean
|
46 |
+
*/
|
47 |
+
private $_autoAdjustTakingDate;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Courier service type ID
|
51 |
+
* MANDATORY: YES
|
52 |
+
* @access private
|
53 |
+
* @var integer Signed 64-bit
|
54 |
+
*/
|
55 |
+
private $_serviceTypeId;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
59 |
+
* MANDATORY: YES
|
60 |
+
* @access private
|
61 |
+
* @var boolean
|
62 |
+
*/
|
63 |
+
private $_broughtToOffice;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Specifies if the shipment is "to be called"
|
67 |
+
* MANDATORY: YES
|
68 |
+
* @access private
|
69 |
+
* @var boolean
|
70 |
+
*/
|
71 |
+
private $_toBeCalled;
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
75 |
+
* Depending on the courier service, this property could be required, allowed or banned
|
76 |
+
* MANDATORY: NO
|
77 |
+
* @access private
|
78 |
+
* @var integer Signed 16-bit
|
79 |
+
*/
|
80 |
+
private $_fixedTimeDelivery;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* In some rare cases users might prefer the delivery to be deferred by a day or two.
|
84 |
+
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
85 |
+
* Max value is 2.
|
86 |
+
* MANDATORY: NO
|
87 |
+
* @access private
|
88 |
+
* @var integer Signed 32-bit
|
89 |
+
*/
|
90 |
+
private $_deferredDeliveryWorkDays;
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Shipment insurance value (if the shipment is insured).
|
94 |
+
* The limit of this value depends on user's permissions and Speedy's current policy.
|
95 |
+
* MANDATORY: NO
|
96 |
+
* @access private
|
97 |
+
* @var integer Signed 64-bit
|
98 |
+
*/
|
99 |
+
private $_amountInsuranceBase;
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Cash-on-Delivery (COD) amount
|
103 |
+
* The limit of this value depends on user's permissions and Speedy's current policy.
|
104 |
+
* MANDATORY: NO
|
105 |
+
* @access private
|
106 |
+
* @var integer Signed 64-bit
|
107 |
+
*/
|
108 |
+
private $_amountCodBase;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Specifies if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
112 |
+
* MANDATORY: NO
|
113 |
+
* @access private
|
114 |
+
* @var boolean
|
115 |
+
*/
|
116 |
+
private $_payCodToThirdParty;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Parcels count.
|
120 |
+
* Max 999.
|
121 |
+
* MANDATORY: YES
|
122 |
+
* @access private
|
123 |
+
* @var integer Signed 32-bit
|
124 |
+
*/
|
125 |
+
private $_parcelsCount;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Declared weight (the greater of "volume" and "real" weight values).
|
129 |
+
* Max 100.00
|
130 |
+
* MANDATORY: YES
|
131 |
+
* @access private
|
132 |
+
* @var double Signed 64-bit
|
133 |
+
*/
|
134 |
+
private $_weightDeclared;
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Specifies whether the shipment consists of documents
|
138 |
+
* MANDATORY: YES
|
139 |
+
* @access private
|
140 |
+
* @var boolean
|
141 |
+
*/
|
142 |
+
private $_documents;
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Specifies whether the shipment is fragile - necessary when the price of insurance is being calculated
|
146 |
+
* MANDATORY: YES
|
147 |
+
* @access private
|
148 |
+
* @var boolean
|
149 |
+
*/
|
150 |
+
private $_fragile;
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Specifies whether the shipment is palletized
|
154 |
+
* MANDATORY: YES
|
155 |
+
* @access private
|
156 |
+
* @var boolean
|
157 |
+
*/
|
158 |
+
private $_palletized;
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Sender's ID.
|
162 |
+
* Either senderId or senderSiteId must be set
|
163 |
+
* MANDATORY: NO
|
164 |
+
* @access private
|
165 |
+
* @var integer Signed 64-bit
|
166 |
+
*/
|
167 |
+
private $_senderId;
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Sender's site ID.
|
171 |
+
* Either senderId or senderSiteId must be set
|
172 |
+
* MANDATORY: NO
|
173 |
+
* @access private
|
174 |
+
* @var integer Signed 64-bit
|
175 |
+
*/
|
176 |
+
private $_senderSiteId;
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Receiver's ID.
|
180 |
+
* Either receiverId or receiverSiteId must be set
|
181 |
+
* MANDATORY: NO
|
182 |
+
* @access private
|
183 |
+
* @var integer Signed 64-bit
|
184 |
+
*/
|
185 |
+
private $_receiverId;
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Receiver's site ID
|
189 |
+
* Either receiverId or receiverSiteId must be set
|
190 |
+
* MANDATORY: NO
|
191 |
+
* @access private
|
192 |
+
* @var integer Signed 64-bit
|
193 |
+
*/
|
194 |
+
private $_receiverSiteId;
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Payer type (0=sender, 1=receiver or 2=third party)
|
198 |
+
* MANDATORY: YES
|
199 |
+
* @access private
|
200 |
+
* @var integer Signed 32-bit
|
201 |
+
*/
|
202 |
+
private $_payerType;
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Payer ID. Must be set <=> payer is "third party".
|
206 |
+
* MANDATORY: NO
|
207 |
+
* @access private
|
208 |
+
* @var integer Signed 64-bit
|
209 |
+
*/
|
210 |
+
private $_payerRefId;
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Insurance payer type (0=sender, 1=reciever or 2=third party).
|
214 |
+
* Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
215 |
+
* MANDATORY: NO
|
216 |
+
* @access private
|
217 |
+
* @var integer Signed 32-bit
|
218 |
+
*/
|
219 |
+
private $_payerTypeInsurance;
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Insurance payer ID. Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
223 |
+
* MANDATORY: NO
|
224 |
+
* @access private
|
225 |
+
* @var integer Signed 64-bit
|
226 |
+
*/
|
227 |
+
private $_payerRefInsuranceId;
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Set the date for shipment pick-up (the "time" component is ignored).
|
231 |
+
* Server defaults this value to "today" if it is not set
|
232 |
+
* @param date $takingDate
|
233 |
+
*/
|
234 |
+
public function setTakingDate($takingDate) {
|
235 |
+
$this->_takingDate = $takingDate;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Get date for shipment pick-up (the "time" component is ignored).
|
240 |
+
* @return date Taking date
|
241 |
+
*/
|
242 |
+
public function getTakingDate() {
|
243 |
+
return $this->_takingDate;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Set flag to auto-adjist or not taking date.
|
248 |
+
* If set to true, the "takingDate" field is not just to be validated, but the first allowed (following)
|
249 |
+
* date will be used instead (in compliance with the pick-up schedule etc.).
|
250 |
+
* @param boolean $autoAdjustTakingDate
|
251 |
+
*/
|
252 |
+
public function setAutoAdjustTakingDate($autoAdjustTakingDate) {
|
253 |
+
$this->_autoAdjustTakingDate = $autoAdjustTakingDate;
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Get flag for taking date auto-adjustment
|
258 |
+
* @return boolean Auto-adjust taking date flag
|
259 |
+
*/
|
260 |
+
public function isAutoAdjustTakingDate() {
|
261 |
+
return $this->_autoAdjustTakingDate;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Set courier service type ID from.
|
266 |
+
* @param integer $serviceTypeId Signed 64-bit value from Speedy service nomenclature
|
267 |
+
*/
|
268 |
+
public function setServiceTypeId($serviceTypeId) {
|
269 |
+
$this->_serviceTypeId = $serviceTypeId;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Get courier service type ID from nomenclature.
|
274 |
+
* @return integer Courier service type ID - signed 64-bit value from Speedy service nomenclature
|
275 |
+
*/
|
276 |
+
public function getServiceTypeId() {
|
277 |
+
return $this->_serviceTypeId;
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Set flag for brought-to-office
|
282 |
+
* This flag specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
283 |
+
* @param boolean $broughtToOffice Brought-to-office flag
|
284 |
+
*/
|
285 |
+
public function setBroughtToOffice($broughtToOffice) {
|
286 |
+
$this->_broughtToOffice = $broughtToOffice;
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Get flag for brought-to-office
|
291 |
+
* @return boolean Brought-to-office flag
|
292 |
+
*/
|
293 |
+
public function isBroughtToOffice() {
|
294 |
+
return $this->_broughtToOffice;
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Set flag for to-be-called. Specifies if the shipment is "to be called"
|
299 |
+
* @param boolean $toBeCalled Brought-to-office flag
|
300 |
+
*/
|
301 |
+
public function setToBeCalled($toBeCalled) {
|
302 |
+
$this->_toBeCalled = $toBeCalled;
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Get flag for to-be-called
|
307 |
+
* @return boolean To-be-called flag
|
308 |
+
*/
|
309 |
+
public function isToBeCalled() {
|
310 |
+
return $this->_toBeCalled;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Set fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
315 |
+
* Depending on the courier service, this property could be required, allowed or banned
|
316 |
+
* @param integer $fixedTimeDelivery Signed 16-bit
|
317 |
+
*/
|
318 |
+
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
319 |
+
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Get fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.).
|
324 |
+
* @return integer Fixed time for delivery - signed 16-bit
|
325 |
+
*/
|
326 |
+
public function getFixedTimeDelivery() {
|
327 |
+
return $this->_fixedTimeDelivery;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Set deferred delivery work days.
|
332 |
+
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
333 |
+
* Max value is 2.
|
334 |
+
* @param integer $deferredDeliveryWorkDays Signed 32-bit
|
335 |
+
*/
|
336 |
+
public function setDeferredDeliveryWorkDays($deferredDeliveryWorkDays) {
|
337 |
+
$this->_deferredDeliveryWorkDays = $deferredDeliveryWorkDays;
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Get deferred delivery work days.
|
342 |
+
* @return integer Deferred delivery work days - signed 32-bit
|
343 |
+
*/
|
344 |
+
public function getDeferredDeliveryWorkDays() {
|
345 |
+
return $this->_deferredDeliveryWorkDays;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Set shipment insurance value (if the shipment is insured).
|
350 |
+
* The limit of this value depends on user's permissions and Speedy's current policy.
|
351 |
+
* @param integer $amountInsuranceBase Signed 64-bit
|
352 |
+
*/
|
353 |
+
public function setAmountInsuranceBase($amountInsuranceBase) {
|
354 |
+
$this->_amountInsuranceBase = $amountInsuranceBase;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Get shipment insurance value
|
359 |
+
* @return integer Shipment insurance value - signed 64-bit
|
360 |
+
*/
|
361 |
+
public function getAmountInsuranceBase() {
|
362 |
+
return $this->_amountInsuranceBase;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Set cash-on-Delivery (COD) amount.
|
367 |
+
* The limit of this value depends on user's permissions and Speedy's current policy.
|
368 |
+
* @param integer $amountCodBase Signed 64-bit
|
369 |
+
*/
|
370 |
+
public function setAmountCodBase($amountCodBase) {
|
371 |
+
$this->_amountCodBase = $amountCodBase;
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Get cash-on-Delivery (COD) amount.
|
376 |
+
* @return integer Cash-on-Delivery (COD) amount - signed 64-bit
|
377 |
+
*/
|
378 |
+
public function getAmountCodBase() {
|
379 |
+
return $this->_amountCodBase;
|
380 |
+
}
|
381 |
+
|
382 |
+
/**
|
383 |
+
* Set flag, if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
384 |
+
* @param boolean $payCodToThirdParty
|
385 |
+
*/
|
386 |
+
public function setPayCodToThirdParty($payCodToThirdParty) {
|
387 |
+
$this->_payCodToThirdParty = $payCodToThirdParty;
|
388 |
+
}
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Get flag for COD value to be paid to a third party
|
392 |
+
* @return boolean Flag for cash-on-Delivery (COD) to third party
|
393 |
+
*/
|
394 |
+
public function isPayCodToThirdParty() {
|
395 |
+
return $this->_payCodToThirdParty;
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Set parcels count.
|
400 |
+
* Max 999.
|
401 |
+
* @param integer $parcelsCount Parcels count - signed 32-bit
|
402 |
+
*/
|
403 |
+
public function setParcelsCount($parcelsCount) {
|
404 |
+
$this->_parcelsCount = $parcelsCount;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Get parcels count.
|
409 |
+
* @return integer Parcels count - signed 32-bit
|
410 |
+
*/
|
411 |
+
public function getParcelsCount() {
|
412 |
+
return $this->_parcelsCount;
|
413 |
+
}
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Set declared weight (the greater of "volume" and "real" weight values).
|
417 |
+
* Max 100.00
|
418 |
+
* @param double $weightDeclared Declared weight - signed 64-bit
|
419 |
+
*/
|
420 |
+
public function setWeightDeclared($weightDeclared) {
|
421 |
+
$this->_weightDeclared = $weightDeclared;
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Get declared weight
|
426 |
+
* @return double Declared weight - signed 64-bit
|
427 |
+
*/
|
428 |
+
public function getWeightDeclared() {
|
429 |
+
return $this->_weightDeclared;
|
430 |
+
}
|
431 |
+
|
432 |
+
/**
|
433 |
+
* Set flag whether the shipment consists of documents
|
434 |
+
* @param boolean $documents Documents flag
|
435 |
+
*/
|
436 |
+
public function setDocuments($documents) {
|
437 |
+
$this->_documents = $documents;
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Get flag whether the shipment consists of documents
|
442 |
+
* @return boolean Documents flag
|
443 |
+
*/
|
444 |
+
public function isDocuments() {
|
445 |
+
return $this->_documents;
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Set flag whether the shipment is fragile - necessary when the price of insurance is being calculated
|
450 |
+
* @param boolean $fragile Fragile flag
|
451 |
+
*/
|
452 |
+
public function setFragile($fragile) {
|
453 |
+
$this->_fragile = $fragile;
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Get flag whether the shipment is fragile
|
458 |
+
* @return boolean Fragile flag
|
459 |
+
*/
|
460 |
+
public function isFragile() {
|
461 |
+
return $this->_fragile;
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* Set flag whether the shipment is for pallets
|
466 |
+
* @param boolean $palletized Palletized flag
|
467 |
+
*/
|
468 |
+
public function setPalletized($palletized) {
|
469 |
+
$this->_palletized = $palletized;
|
470 |
+
}
|
471 |
+
|
472 |
+
/**
|
473 |
+
* Get flag whether the shipment is for pallets
|
474 |
+
* @return boolean Palletized flag
|
475 |
+
*/
|
476 |
+
public function isPalletized() {
|
477 |
+
return $this->_palletized;
|
478 |
+
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Set sender's ID. From Speedy client nomenclature.
|
482 |
+
* Either senderId or senderSiteId must be set
|
483 |
+
* @param integer $senderId Signed 64-bit
|
484 |
+
*/
|
485 |
+
public function setSenderId($senderId) {
|
486 |
+
$this->_senderId = $senderId;
|
487 |
+
}
|
488 |
+
|
489 |
+
/**
|
490 |
+
* Get sender's ID. From Speedy client nomenclature.
|
491 |
+
* @return integer Sender's ID - signed 64-bit
|
492 |
+
*/
|
493 |
+
public function getSenderId() {
|
494 |
+
return $this->_senderId;
|
495 |
+
}
|
496 |
+
|
497 |
+
/**
|
498 |
+
* Set sender's site ID. From Speedy site nomenclature.
|
499 |
+
* Either senderId or senderSiteId must be set
|
500 |
+
* @param integer $senderSiteId Signed 64-bit
|
501 |
+
*/
|
502 |
+
public function setSenderSiteId($senderSiteId) {
|
503 |
+
$this->_senderSiteId = $senderSiteId;
|
504 |
+
}
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Get sender's site ID. From Speedy site nomenclature.
|
508 |
+
* @return integer Sender's site ID - signed 64-bit
|
509 |
+
*/
|
510 |
+
public function getSenderSiteId() {
|
511 |
+
return $this->_senderSiteId;
|
512 |
+
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* Receiver's ID. From Speedy client nomenclature.
|
516 |
+
* Either receiverId or receiverSiteId must be set
|
517 |
+
* @param integer $receiverId Signed 64-bit
|
518 |
+
*/
|
519 |
+
public function setReceiverId($receiverId) {
|
520 |
+
$this->_receiverId = $receiverId;
|
521 |
+
}
|
522 |
+
|
523 |
+
/**
|
524 |
+
* Get receiver's ID. From Speedy client nomenclature.
|
525 |
+
* @return integer Receiver's ID - signed 64-bit
|
526 |
+
*/
|
527 |
+
public function getReceiverId() {
|
528 |
+
return $this->_receiverId;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Set receiver's site ID. From Speedy site nomenclature.
|
533 |
+
* Either receiverId or receiverSiteId must be set
|
534 |
+
* @param integer $receiverSiteId Signed 64-bit
|
535 |
+
*/
|
536 |
+
public function setReceiverSiteId($receiverSiteId) {
|
537 |
+
$this->_receiverSiteId = $receiverSiteId;
|
538 |
+
}
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Get receiver's site ID. From Speedy site nomenclature.
|
542 |
+
* @return integer Receiver's site ID - signed 64-bit
|
543 |
+
*/
|
544 |
+
public function getReceiverSiteId() {
|
545 |
+
return $this->_receiverSiteId;
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Set payer type (0=sender, 1=receiver or 2=third party)
|
550 |
+
* @param integer $payerType Signed 32-bit
|
551 |
+
*/
|
552 |
+
public function setPayerType($payerType) {
|
553 |
+
$this->_payerType = $payerType;
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Get payer type (0=sender, 1=receiver or 2=third party)
|
558 |
+
* @return integer Payer type - signed 32-bit
|
559 |
+
*/
|
560 |
+
public function getPayerType() {
|
561 |
+
return $this->_payerType;
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
* Set payer ID from Speedy client nomenclature.
|
566 |
+
* Must be set <=> payer is "third party".
|
567 |
+
* @param integer $payerRefId Signed 64-bit
|
568 |
+
*/
|
569 |
+
public function setPayerRefId($payerRefId) {
|
570 |
+
$this->_payerRefId = $payerRefId;
|
571 |
+
}
|
572 |
+
|
573 |
+
/**
|
574 |
+
* Get payer ID from Speedy client nomenclature.
|
575 |
+
* @return integer Payer ID - signed 64-bit
|
576 |
+
*/
|
577 |
+
public function getPayerRefId() {
|
578 |
+
return $this->_payerRefId;
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Set insurance payer type (0=sender, 1=reciever or 2=third party).
|
583 |
+
* Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
584 |
+
* @param integer $payerTypeInsurance Signed 32-bit
|
585 |
+
*/
|
586 |
+
public function setPayerTypeInsurance($payerTypeInsurance) {
|
587 |
+
$this->_payerTypeInsurance = $payerTypeInsurance;
|
588 |
+
}
|
589 |
+
|
590 |
+
/**
|
591 |
+
* Get insurance payer type (0=sender, 1=reciever or 2=third party).
|
592 |
+
* @return integer Insurance payer type - signed 32-bit
|
593 |
+
*/
|
594 |
+
public function getPayerTypeInsurance() {
|
595 |
+
return $this->_payerTypeInsurance;
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Set insurance payer ID from Speedy client nomenclature.
|
600 |
+
* Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
601 |
+
* @param integer $payerRefInsuranceId Signed 64-bit
|
602 |
+
*/
|
603 |
+
public function setPayerRefInsuranceId($payerRefInsuranceId) {
|
604 |
+
$this->_payerRefInsuranceId = $payerRefInsuranceId;
|
605 |
+
}
|
606 |
+
|
607 |
+
/**
|
608 |
+
* Get insurance payer ID from Speedy client nomenclature.
|
609 |
+
* @return integer Insurance payer ID - signed 64-bit
|
610 |
+
*/
|
611 |
+
public function getPayerRefInsuranceId() {
|
612 |
+
return $this->_payerRefInsuranceId;
|
613 |
+
}
|
614 |
+
|
615 |
+
/**
|
616 |
+
* Return standard class from this class
|
617 |
+
* @return stdClass
|
618 |
+
*/
|
619 |
+
public function toStdClass() {
|
620 |
+
$stdClass = new stdClass();
|
621 |
+
$stdClass->takingDate = $this->_takingDate;
|
622 |
+
$stdClass->autoAdjustTakingDate = $this->_autoAdjustTakingDate;
|
623 |
+
$stdClass->serviceTypeId = $this->_serviceTypeId;
|
624 |
+
$stdClass->broughtToOffice = $this->_broughtToOffice;
|
625 |
+
$stdClass->toBeCalled = $this->_toBeCalled;
|
626 |
+
$stdClass->fixedTimeDelivery = $this->_fixedTimeDelivery;
|
627 |
+
$stdClass->deferredDeliveryWorkDays = $this->_deferredDeliveryWorkDays;
|
628 |
+
$stdClass->amountInsuranceBase = $this->_amountInsuranceBase;
|
629 |
+
$stdClass->amountCodBase = $this->_amountCodBase;
|
630 |
+
$stdClass->payCodToThirdParty = $this->_payCodToThirdParty;
|
631 |
+
$stdClass->parcelsCount = $this->_parcelsCount;
|
632 |
+
$stdClass->weightDeclared = $this->_weightDeclared;
|
633 |
+
$stdClass->documents = $this->_documents;
|
634 |
+
$stdClass->fragile = $this->_fragile;
|
635 |
+
$stdClass->palletized = $this->_palletized;
|
636 |
+
$stdClass->senderId = $this->_senderId;
|
637 |
+
$stdClass->senderSiteId = $this->_senderSiteId;
|
638 |
+
$stdClass->receiverId = $this->_receiverId;
|
639 |
+
$stdClass->receiverSiteId = $this->_receiverSiteId;
|
640 |
+
$stdClass->payerType = $this->_payerType;
|
641 |
+
$stdClass->payerRefId = $this->_payerRefId;
|
642 |
+
$stdClass->payerTypeInsurance = $this->_payerTypeInsurance;
|
643 |
+
$stdClass->payerRefInsuranceId = $this->_payerRefInsuranceId;
|
644 |
+
return $stdClass;
|
645 |
+
}
|
646 |
+
}
|
647 |
?>
|
lib/SpeedyEPS/ver01/ParamClientData.class.php
CHANGED
@@ -1,188 +1,217 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ParamAddress.class.php';
|
4 |
-
require_once 'ParamPhoneNumber.class.php';
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Instances of this class are used as a parameter for speedy web service method calls for picking calculation and registration
|
8 |
-
*/
|
9 |
-
class ParamClientData {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Client/Partner ID
|
13 |
-
* MANDATORY: NO
|
14 |
-
* @var integer Signed 64-bit
|
15 |
-
*/
|
16 |
-
private $_clientId;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Name of the client (company or private person).
|
20 |
-
* Maximum size is 60 symbols.
|
21 |
-
* MANDATORY: Must be set <=> clientId is null.
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_partnerName;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Company department/office.
|
28 |
-
* Maximum size is 60 symbols.
|
29 |
-
* MANDATORY: Allowed <=> clientId is null.
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
private $_objectName;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Address details
|
36 |
-
* MANDATORY: Required when clientId is null
|
37 |
-
* @var ParamAddress
|
38 |
-
*/
|
39 |
-
private $_address;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Contact name.
|
43 |
-
* Maximum size is 60 symbols.
|
44 |
-
* MANDATORY: NO
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_contactName;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Phone numbers.
|
51 |
-
* This list contains maximum 3 phone numbers.
|
52 |
-
* MANDATORY: Sender's phone number is always required.
|
53 |
-
* Receiver's phone number is required if the shipment is to be delivered on a half-working day or
|
54 |
-
* the shipment needs to be delivered the day it has been picked up.
|
55 |
-
* ("Required" means at least one valid phone number must be set.)
|
56 |
-
* @var array List of ParamPhoneNumber
|
57 |
-
*/
|
58 |
-
private $_phones;
|
59 |
-
|
60 |
-
/**
|
61 |
-
*
|
62 |
-
*
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
*
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
*
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
*
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
*
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
*
|
146 |
-
*
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
*
|
155 |
-
*
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ParamAddress.class.php';
|
4 |
+
require_once 'ParamPhoneNumber.class.php';
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Instances of this class are used as a parameter for speedy web service method calls for picking calculation and registration
|
8 |
+
*/
|
9 |
+
class ParamClientData {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Client/Partner ID
|
13 |
+
* MANDATORY: NO
|
14 |
+
* @var integer Signed 64-bit
|
15 |
+
*/
|
16 |
+
private $_clientId;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Name of the client (company or private person).
|
20 |
+
* Maximum size is 60 symbols.
|
21 |
+
* MANDATORY: Must be set <=> clientId is null.
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_partnerName;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Company department/office.
|
28 |
+
* Maximum size is 60 symbols.
|
29 |
+
* MANDATORY: Allowed <=> clientId is null.
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $_objectName;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Address details
|
36 |
+
* MANDATORY: Required when clientId is null
|
37 |
+
* @var ParamAddress
|
38 |
+
*/
|
39 |
+
private $_address;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Contact name.
|
43 |
+
* Maximum size is 60 symbols.
|
44 |
+
* MANDATORY: NO
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_contactName;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Phone numbers.
|
51 |
+
* This list contains maximum 3 phone numbers.
|
52 |
+
* MANDATORY: Sender's phone number is always required.
|
53 |
+
* Receiver's phone number is required if the shipment is to be delivered on a half-working day or
|
54 |
+
* the shipment needs to be delivered the day it has been picked up.
|
55 |
+
* ("Required" means at least one valid phone number must be set.)
|
56 |
+
* @var array List of ParamPhoneNumber
|
57 |
+
*/
|
58 |
+
private $_phones;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Email
|
62 |
+
* Maximum size is 256 symbols.
|
63 |
+
* MANDATORY: NO
|
64 |
+
* @var string
|
65 |
+
*
|
66 |
+
* @since 2.1.0
|
67 |
+
*/
|
68 |
+
private $_email;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Set client/partner ID
|
72 |
+
* @param integer $clientId Signed 64-bit
|
73 |
+
*/
|
74 |
+
public function setClientId($clientId) {
|
75 |
+
$this->_clientId = $clientId;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get client/partner ID
|
80 |
+
* @return integer Signed 64-bit
|
81 |
+
*/
|
82 |
+
public function getClientId() {
|
83 |
+
return $this->_clientId;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Set name of the client (company or private person).
|
88 |
+
* Maximum size is 60 symbols.
|
89 |
+
* @param string $partnerName
|
90 |
+
*/
|
91 |
+
public function setPartnerName($partnerName) {
|
92 |
+
$this->_partnerName = $partnerName;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get name of the client (company or private person).
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function getPartnerName() {
|
100 |
+
return $this->_partnerName;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Set company department/office.
|
105 |
+
* Maximum size is 60 symbols.
|
106 |
+
* @param string $objectName
|
107 |
+
*/
|
108 |
+
public function setObjectName($objectName) {
|
109 |
+
$this->_objectName = $objectName;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Get company department/office.
|
114 |
+
* @return string
|
115 |
+
*/
|
116 |
+
public function getObjectName() {
|
117 |
+
return $this->_objectName;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Set address details
|
122 |
+
* @param ParamAddress $address
|
123 |
+
*/
|
124 |
+
public function setAddress($address) {
|
125 |
+
$this->_address = $address;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get address details
|
130 |
+
* @return ParamAddress
|
131 |
+
*/
|
132 |
+
public function getAddress() {
|
133 |
+
return $this->_address;
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Set contact name. Maximum size is 60 symbols.
|
138 |
+
* @param string $contactName
|
139 |
+
*/
|
140 |
+
public function setContactName($contactName) {
|
141 |
+
$this->_contactName = $contactName;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get contact name.
|
146 |
+
* @return string
|
147 |
+
*/
|
148 |
+
public function getContactName() {
|
149 |
+
return $this->_contactName;
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Set phone numbers. This list contains maximum 3 phone numbers.
|
154 |
+
* Sender's phone number is always required. Receiver's phone number is required if the shipment is to be delivered on a half-working day or
|
155 |
+
* the shipment needs to be delivered the day it has been picked up.
|
156 |
+
* ("Required" means at least one valid phone number must be set.)
|
157 |
+
* @param array $phones List of ParamPhoneNumber
|
158 |
+
*/
|
159 |
+
public function setPhones($phones) {
|
160 |
+
$this->_phones = $phones;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get phone numbers.
|
165 |
+
* @return array List of ParamPhoneNumber
|
166 |
+
*/
|
167 |
+
public function getPhones() {
|
168 |
+
return $this->_phones;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Set email
|
173 |
+
* @param string $email Email address to set
|
174 |
+
* @since 2.1.0
|
175 |
+
*/
|
176 |
+
public function setEmail($email) {
|
177 |
+
$this->_email = $email;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get email
|
182 |
+
* @return string Email address
|
183 |
+
* @since 2.1.0
|
184 |
+
*/
|
185 |
+
public function getEmail() {
|
186 |
+
return $this->_email;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Return standard class from this class
|
191 |
+
* @return stdClass
|
192 |
+
*/
|
193 |
+
public function toStdClass() {
|
194 |
+
$stdClass = new stdClass();
|
195 |
+
$stdClass->clientId = $this->_clientId;
|
196 |
+
$stdClass->partnerName = $this->_partnerName;
|
197 |
+
$stdClass->objectName = $this->_objectName;
|
198 |
+
if (isset($this->_address)) {
|
199 |
+
$stdClass->address = $this->_address->toStdClass();
|
200 |
+
}
|
201 |
+
$stdClass->contactName = $this->_contactName;
|
202 |
+
$arrStdClassParamPhoneNumber = array();
|
203 |
+
if (isset($this->_phones)) {
|
204 |
+
if (is_array($this->_phones)) {
|
205 |
+
for($i = 0; $i < count($this->_phones); $i++) {
|
206 |
+
$arrStdClassParamPhoneNumber[$i] = $this->_phones[$i]->toStdClass();
|
207 |
+
}
|
208 |
+
} else {
|
209 |
+
$arrStdClassParamPhoneNumber[0] = $this->_phones->toStdClass();
|
210 |
+
}
|
211 |
+
}
|
212 |
+
$stdClass->phones = $arrStdClassParamPhoneNumber;
|
213 |
+
$stdClass->email = $this->_email;
|
214 |
+
return $stdClass;
|
215 |
+
}
|
216 |
+
}
|
217 |
?>
|
lib/SpeedyEPS/ver01/ParamClientSearch.class.php
CHANGED
@@ -1,161 +1,161 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as a parameter to search for Speedy clients
|
4 |
-
* @since 1.6
|
5 |
-
*/
|
6 |
-
class ParamClientSearch {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Client id
|
10 |
-
* MANDATORY: NO
|
11 |
-
* @var integer signed 64-bit
|
12 |
-
*/
|
13 |
-
private $_clientId;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Client name
|
17 |
-
* MANDATORY: NO
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
private $_clientName;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Common object name
|
24 |
-
* MANDATORY: NO
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
private $_objectName;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Client phone
|
31 |
-
* MANDATORY: NO
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
private $_phone;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Site id
|
38 |
-
* MANDATORY: NO
|
39 |
-
* @var integer signed 64-bit
|
40 |
-
*/
|
41 |
-
private $_siteId;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* User def tag
|
45 |
-
* MANDATORY: NO
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
private $_userDefTag;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Set client id
|
52 |
-
* @param integer $clientId Signed 64 bit
|
53 |
-
*/
|
54 |
-
public function setClientId($clientId) {
|
55 |
-
$this->_clientId = $clientId;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Get client id
|
60 |
-
* @return integer Signed 64-bit
|
61 |
-
*/
|
62 |
-
public function getClientId() {
|
63 |
-
return $this->_clientId;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Set client name
|
68 |
-
* @param string $clientName
|
69 |
-
*/
|
70 |
-
public function setClientName($clientName) {
|
71 |
-
$this->_clientName = $clientName;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Get client name
|
76 |
-
* @return string client name
|
77 |
-
*/
|
78 |
-
public function getClientName() {
|
79 |
-
return $this->_clientName;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Set object name
|
84 |
-
* @param string $objectName
|
85 |
-
*/
|
86 |
-
public function setObjectName($objectName) {
|
87 |
-
$this->_objectName = $objectName;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get object name
|
92 |
-
* @return string object name
|
93 |
-
*/
|
94 |
-
public function getObjectName() {
|
95 |
-
return $this->_objectName;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Set phone
|
100 |
-
* @param string $phone
|
101 |
-
*/
|
102 |
-
public function setPhone($phone) {
|
103 |
-
$this->_phone = $phone;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Get phone
|
108 |
-
* @return string phone
|
109 |
-
*/
|
110 |
-
public function getPhone() {
|
111 |
-
return $this->_phone;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Set site id
|
116 |
-
* @param integer $siteId Signed 64 bit
|
117 |
-
*/
|
118 |
-
public function setSiteId($siteId) {
|
119 |
-
$this->_siteId = $siteId;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Get site id
|
124 |
-
* @return integer Signed 64-bit
|
125 |
-
*/
|
126 |
-
public function getSiteId() {
|
127 |
-
return $this->_siteId;
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Set userDefTag
|
132 |
-
* @param string $userDefTag
|
133 |
-
*/
|
134 |
-
public function setUserDefTag($userDefTag) {
|
135 |
-
$this->_userDefTag = $userDefTag;
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Get userDefTag
|
140 |
-
* @return string userDefTag
|
141 |
-
*/
|
142 |
-
public function getUserDefTag() {
|
143 |
-
return $this->_userDefTag;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Return standard class from this class
|
148 |
-
* @return stdClass
|
149 |
-
*/
|
150 |
-
public function toStdClass() {
|
151 |
-
$stdClass = new stdClass();
|
152 |
-
$stdClass->clientId = $this->_clientId;
|
153 |
-
$stdClass->clientName = $this->_clientName;
|
154 |
-
$stdClass->objectName = $this->_objectName;
|
155 |
-
$stdClass->phone = $this->_phone;
|
156 |
-
$stdClass->siteId = $this->_siteId;
|
157 |
-
$stdClass->userDefTag = $this->_userDefTag;
|
158 |
-
return $stdClass;
|
159 |
-
}
|
160 |
-
}
|
161 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as a parameter to search for Speedy clients
|
4 |
+
* @since 1.6
|
5 |
+
*/
|
6 |
+
class ParamClientSearch {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Client id
|
10 |
+
* MANDATORY: NO
|
11 |
+
* @var integer signed 64-bit
|
12 |
+
*/
|
13 |
+
private $_clientId;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Client name
|
17 |
+
* MANDATORY: NO
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_clientName;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Common object name
|
24 |
+
* MANDATORY: NO
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
private $_objectName;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Client phone
|
31 |
+
* MANDATORY: NO
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
private $_phone;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Site id
|
38 |
+
* MANDATORY: NO
|
39 |
+
* @var integer signed 64-bit
|
40 |
+
*/
|
41 |
+
private $_siteId;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* User def tag
|
45 |
+
* MANDATORY: NO
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
private $_userDefTag;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Set client id
|
52 |
+
* @param integer $clientId Signed 64 bit
|
53 |
+
*/
|
54 |
+
public function setClientId($clientId) {
|
55 |
+
$this->_clientId = $clientId;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get client id
|
60 |
+
* @return integer Signed 64-bit
|
61 |
+
*/
|
62 |
+
public function getClientId() {
|
63 |
+
return $this->_clientId;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Set client name
|
68 |
+
* @param string $clientName
|
69 |
+
*/
|
70 |
+
public function setClientName($clientName) {
|
71 |
+
$this->_clientName = $clientName;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get client name
|
76 |
+
* @return string client name
|
77 |
+
*/
|
78 |
+
public function getClientName() {
|
79 |
+
return $this->_clientName;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Set object name
|
84 |
+
* @param string $objectName
|
85 |
+
*/
|
86 |
+
public function setObjectName($objectName) {
|
87 |
+
$this->_objectName = $objectName;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get object name
|
92 |
+
* @return string object name
|
93 |
+
*/
|
94 |
+
public function getObjectName() {
|
95 |
+
return $this->_objectName;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Set phone
|
100 |
+
* @param string $phone
|
101 |
+
*/
|
102 |
+
public function setPhone($phone) {
|
103 |
+
$this->_phone = $phone;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get phone
|
108 |
+
* @return string phone
|
109 |
+
*/
|
110 |
+
public function getPhone() {
|
111 |
+
return $this->_phone;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Set site id
|
116 |
+
* @param integer $siteId Signed 64 bit
|
117 |
+
*/
|
118 |
+
public function setSiteId($siteId) {
|
119 |
+
$this->_siteId = $siteId;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get site id
|
124 |
+
* @return integer Signed 64-bit
|
125 |
+
*/
|
126 |
+
public function getSiteId() {
|
127 |
+
return $this->_siteId;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Set userDefTag
|
132 |
+
* @param string $userDefTag
|
133 |
+
*/
|
134 |
+
public function setUserDefTag($userDefTag) {
|
135 |
+
$this->_userDefTag = $userDefTag;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Get userDefTag
|
140 |
+
* @return string userDefTag
|
141 |
+
*/
|
142 |
+
public function getUserDefTag() {
|
143 |
+
return $this->_userDefTag;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Return standard class from this class
|
148 |
+
* @return stdClass
|
149 |
+
*/
|
150 |
+
public function toStdClass() {
|
151 |
+
$stdClass = new stdClass();
|
152 |
+
$stdClass->clientId = $this->_clientId;
|
153 |
+
$stdClass->clientName = $this->_clientName;
|
154 |
+
$stdClass->objectName = $this->_objectName;
|
155 |
+
$stdClass->phone = $this->_phone;
|
156 |
+
$stdClass->siteId = $this->_siteId;
|
157 |
+
$stdClass->userDefTag = $this->_userDefTag;
|
158 |
+
return $stdClass;
|
159 |
+
}
|
160 |
+
}
|
161 |
?>
|
lib/SpeedyEPS/ver01/ParamFilterSite.class.php
CHANGED
@@ -1,136 +1,136 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as a parameter to filter Speedy web service site quiery
|
4 |
-
*/
|
5 |
-
class ParamFilterSite {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Post code
|
9 |
-
* MANDATORY: NO
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
private $_postCode;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Site name
|
16 |
-
* MANDATORY: NO
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
private $_name;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Site type
|
23 |
-
* MANDATORY: NO
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
private $_type;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Site municipality name
|
30 |
-
* MANDATORY: NO
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
private $_municipality;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Site region name
|
37 |
-
* MANDATORY: NO
|
38 |
-
* @var string
|
39 |
-
*/
|
40 |
-
private $_region;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Set post code
|
44 |
-
* @param string $postCode
|
45 |
-
*/
|
46 |
-
public function setPostCode($postCode) {
|
47 |
-
$this->_postCode = $postCode;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Get post code
|
52 |
-
* @return string Post code
|
53 |
-
*/
|
54 |
-
public function getPostCode() {
|
55 |
-
return $this->_postCode;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Set site name
|
60 |
-
* @param string $name
|
61 |
-
*/
|
62 |
-
public function setName($name) {
|
63 |
-
$this->_name = $name;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Get site name
|
68 |
-
* @return string Site code
|
69 |
-
*/
|
70 |
-
public function getName() {
|
71 |
-
return $this->_name;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Set site type
|
76 |
-
* @param string $type
|
77 |
-
*/
|
78 |
-
public function setType($type) {
|
79 |
-
$this->_type = $type;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Get site type
|
84 |
-
* @return string Site type
|
85 |
-
*/
|
86 |
-
public function getType() {
|
87 |
-
return $this->_type;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Set site municipaity
|
92 |
-
* @param string $municipality
|
93 |
-
*/
|
94 |
-
public function setMunicipality($municipality) {
|
95 |
-
$this->_municipality = $municipality;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get site municipaity
|
100 |
-
* @return string Site municipality
|
101 |
-
*/
|
102 |
-
public function getMunicipality() {
|
103 |
-
return $this->_municipality;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Set site region
|
108 |
-
* @param string $region
|
109 |
-
*/
|
110 |
-
public function setRegion($region) {
|
111 |
-
$this->_region = $region;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Get site region
|
116 |
-
* @return string Site municipality
|
117 |
-
*/
|
118 |
-
public function getRegion() {
|
119 |
-
return $this->_region;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Return standard class from this class
|
124 |
-
* @return stdClass
|
125 |
-
*/
|
126 |
-
public function toStdClass() {
|
127 |
-
$stdClass = new stdClass();
|
128 |
-
$stdClass->postCode = $this->_postCode;
|
129 |
-
$stdClass->name = $this->_name;
|
130 |
-
$stdClass->type = $this->_type;
|
131 |
-
$stdClass->municipality = $this->_municipality;
|
132 |
-
$stdClass->region = $this->_region;
|
133 |
-
return $stdClass;
|
134 |
-
}
|
135 |
-
}
|
136 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as a parameter to filter Speedy web service site quiery
|
4 |
+
*/
|
5 |
+
class ParamFilterSite {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Post code
|
9 |
+
* MANDATORY: NO
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
private $_postCode;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Site name
|
16 |
+
* MANDATORY: NO
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
private $_name;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Site type
|
23 |
+
* MANDATORY: NO
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $_type;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Site municipality name
|
30 |
+
* MANDATORY: NO
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $_municipality;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Site region name
|
37 |
+
* MANDATORY: NO
|
38 |
+
* @var string
|
39 |
+
*/
|
40 |
+
private $_region;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Set post code
|
44 |
+
* @param string $postCode
|
45 |
+
*/
|
46 |
+
public function setPostCode($postCode) {
|
47 |
+
$this->_postCode = $postCode;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get post code
|
52 |
+
* @return string Post code
|
53 |
+
*/
|
54 |
+
public function getPostCode() {
|
55 |
+
return $this->_postCode;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Set site name
|
60 |
+
* @param string $name
|
61 |
+
*/
|
62 |
+
public function setName($name) {
|
63 |
+
$this->_name = $name;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Get site name
|
68 |
+
* @return string Site code
|
69 |
+
*/
|
70 |
+
public function getName() {
|
71 |
+
return $this->_name;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Set site type
|
76 |
+
* @param string $type
|
77 |
+
*/
|
78 |
+
public function setType($type) {
|
79 |
+
$this->_type = $type;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get site type
|
84 |
+
* @return string Site type
|
85 |
+
*/
|
86 |
+
public function getType() {
|
87 |
+
return $this->_type;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Set site municipaity
|
92 |
+
* @param string $municipality
|
93 |
+
*/
|
94 |
+
public function setMunicipality($municipality) {
|
95 |
+
$this->_municipality = $municipality;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get site municipaity
|
100 |
+
* @return string Site municipality
|
101 |
+
*/
|
102 |
+
public function getMunicipality() {
|
103 |
+
return $this->_municipality;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Set site region
|
108 |
+
* @param string $region
|
109 |
+
*/
|
110 |
+
public function setRegion($region) {
|
111 |
+
$this->_region = $region;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get site region
|
116 |
+
* @return string Site municipality
|
117 |
+
*/
|
118 |
+
public function getRegion() {
|
119 |
+
return $this->_region;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Return standard class from this class
|
124 |
+
* @return stdClass
|
125 |
+
*/
|
126 |
+
public function toStdClass() {
|
127 |
+
$stdClass = new stdClass();
|
128 |
+
$stdClass->postCode = $this->_postCode;
|
129 |
+
$stdClass->name = $this->_name;
|
130 |
+
$stdClass->type = $this->_type;
|
131 |
+
$stdClass->municipality = $this->_municipality;
|
132 |
+
$stdClass->region = $this->_region;
|
133 |
+
return $stdClass;
|
134 |
+
}
|
135 |
+
}
|
136 |
?>
|
lib/SpeedyEPS/ver01/ParamLanguage.class.php
CHANGED
@@ -1,47 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This class is enumeration of ParamLanguage
|
5 |
-
*/
|
6 |
-
class ParamLanguage {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Bulgarian language
|
10 |
-
* @var string
|
11 |
-
*/
|
12 |
-
const PARAM_LANGUAGE_BG = 'BG';
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Engilish language
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
const PARAM_LANGUAGE_EN = 'EN';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Value is one of the constants (BG, EN)
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_value;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Constructs new instance of ParamLangage from string.
|
28 |
-
* Defaults to BG
|
29 |
-
* @param string $value
|
30 |
-
*/
|
31 |
-
function __construct($value) {
|
32 |
-
if ($value != self::PARAM_LANGUAGE_BG && $value != self::PARAM_LANGUAGE_EN ) {
|
33 |
-
$this->_value = self::PARAM_LANGUAGE_BG;
|
34 |
-
} else {
|
35 |
-
$this->_value = $value;
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get value - one of the constants (BG, EN)
|
41 |
-
* @return string
|
42 |
-
*/
|
43 |
-
public function getValue() {
|
44 |
-
return $this->_value;
|
45 |
-
}
|
46 |
-
}
|
47 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This class is enumeration of ParamLanguage
|
5 |
+
*/
|
6 |
+
class ParamLanguage {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Bulgarian language
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
const PARAM_LANGUAGE_BG = 'BG';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Engilish language
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
const PARAM_LANGUAGE_EN = 'EN';
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Value is one of the constants (BG, EN)
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_value;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Constructs new instance of ParamLangage from string.
|
28 |
+
* Defaults to BG
|
29 |
+
* @param string $value
|
30 |
+
*/
|
31 |
+
function __construct($value) {
|
32 |
+
if ($value != self::PARAM_LANGUAGE_BG && $value != self::PARAM_LANGUAGE_EN ) {
|
33 |
+
$this->_value = self::PARAM_LANGUAGE_BG;
|
34 |
+
} else {
|
35 |
+
$this->_value = $value;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get value - one of the constants (BG, EN)
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
public function getValue() {
|
44 |
+
return $this->_value;
|
45 |
+
}
|
46 |
+
}
|
47 |
?>
|
lib/SpeedyEPS/ver01/ParamOrder.class.php
CHANGED
@@ -1,219 +1,219 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ParamPhoneNumber.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are used as parameters for orders web service calls
|
7 |
-
*/
|
8 |
-
class ParamOrder {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Include in order list all explicitly provided numbers with setBillOfLadingsList method
|
12 |
-
* @var integer Signed 32-bit
|
13 |
-
*/
|
14 |
-
const ORDER_BOL_INCLUDE_TYPE_EXPLICIT = 10;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Include in order list all not-ordered-yet BOLs created by the logged client
|
18 |
-
* @var integer Signed 32-bit
|
19 |
-
*/
|
20 |
-
const ORDER_BOL_INCLUDE_TYPE_OWN_PENDING = 20;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Include in order list all not-ordered-yet BOLs created by the logged client or members of his/her contract.
|
24 |
-
* (taking into account user's permissions)
|
25 |
-
* @var integer Signed 32-bit
|
26 |
-
*/
|
27 |
-
const ORDER_BOL_INCLUDE_TYPE_CONTARCT_PENDIND = 30;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Specifies the set of shipments/BOLs to be ordered:
|
31 |
-
* •[10] Explicit numbers (in billOfLadingsList)
|
32 |
-
* •[20] All not-ordered-yet BOLs created by the logged client
|
33 |
-
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
34 |
-
* MANDATORY: YES
|
35 |
-
* @var integer Signed 32-bit
|
36 |
-
*/
|
37 |
-
private $_billOfLadingsToIncludeType;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* List of BOL numbers.
|
41 |
-
* MANDATORY: Must be set <=> billOfLadingsToIncludeType = 10.
|
42 |
-
* @var array List of signed 64-bit integer
|
43 |
-
*/
|
44 |
-
private $_billOfLadingsList;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* The date for shipments pick-up (the "time" component is ignored). The default value is "today".
|
48 |
-
* MANDATORY: NO
|
49 |
-
* @var date
|
50 |
-
*/
|
51 |
-
private $_pickupDate;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Specifies when all the shipments/parcels will be ready for pickup. The default value is "now".
|
55 |
-
* MANDATORY: Only if pickupDate > today
|
56 |
-
* @var integer Signed 16-bit
|
57 |
-
*/
|
58 |
-
private $_readinessTime;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* The sender's working time end
|
62 |
-
* MANDATORY: YES
|
63 |
-
* @var integer Signed 16-bit
|
64 |
-
*/
|
65 |
-
private $_workingEndTime;
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Contact name.
|
69 |
-
* Limited to 60 symbols.
|
70 |
-
* MANDATORY: YES
|
71 |
-
* @var string
|
72 |
-
*/
|
73 |
-
private $_contactName;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Phone number
|
77 |
-
* MANDATORY: YES
|
78 |
-
* @var ParamPhoneNumber
|
79 |
-
*/
|
80 |
-
private $_phoneNumber;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Set the set of shipments/BOLs to be ordered:
|
84 |
-
* •[10] Explicit numbers (in billOfLadingsList)
|
85 |
-
* •[20] All not-ordered-yet BOLs created by the logged client
|
86 |
-
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
87 |
-
* @param integer $billOfLadingsToIncludeType Signed 32-bit
|
88 |
-
*/
|
89 |
-
public function setBillOfLadingsToIncludeType($billOfLadingsToIncludeType) {
|
90 |
-
$this->_billOfLadingsToIncludeType = $billOfLadingsToIncludeType;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Get the set of shipments/BOLs to be ordered:
|
95 |
-
* •[10] Explicit numbers (in billOfLadingsList)
|
96 |
-
* •[20] All not-ordered-yet BOLs created by the logged client
|
97 |
-
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
98 |
-
* @return integer Signed 32-bit
|
99 |
-
*/
|
100 |
-
public function getBillOfLadingsToIncludeType() {
|
101 |
-
return $this->_billOfLadingsToIncludeType;
|
102 |
-
}
|
103 |
-
|
104 |
-
/**
|
105 |
-
* Set list of BOL numbers.
|
106 |
-
* Must be set <=> billOfLadingsToIncludeType = 10.
|
107 |
-
* @param array $billOfLadingsList List of signed 64-bit
|
108 |
-
*/
|
109 |
-
public function setBillOfLadingsList($billOfLadingsList) {
|
110 |
-
$this->_billOfLadingsList = $billOfLadingsList;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Get list of BOL numbers.
|
115 |
-
* @return array List of signed 64-bit
|
116 |
-
*/
|
117 |
-
public function getBillOfLadingsList() {
|
118 |
-
return $this->_billOfLadingsList;
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Set date for shipments pick-up (the "time" component is ignored)
|
123 |
-
* @param date $pickupDate
|
124 |
-
*/
|
125 |
-
public function setPickupDate($pickupDate) {
|
126 |
-
$this->_pickupDate = $pickupDate;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Get date for shipments pick-up
|
131 |
-
* @return date
|
132 |
-
*/
|
133 |
-
public function getPickupDate() {
|
134 |
-
return $this->_pickupDate;
|
135 |
-
}
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Set the time when all the shipments/parcels will be ready for pickup.
|
139 |
-
* @param iteger $readinessTime Signed 16-bit
|
140 |
-
*/
|
141 |
-
public function setReadinessTime($readinessTime) {
|
142 |
-
$this->_readinessTime = $readinessTime;
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Get the time when all the shipments/parcels will be ready for pickup.
|
147 |
-
* @return iteger Signed 16-bit
|
148 |
-
*/
|
149 |
-
public function getReadinessTime() {
|
150 |
-
return $this->_readinessTime;
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Set sender's working time end
|
155 |
-
* @param iteger $workingEndTime Signed 16-bit
|
156 |
-
*/
|
157 |
-
public function setWorkingEndTime($workingEndTime) {
|
158 |
-
$this->_workingEndTime = $workingEndTime;
|
159 |
-
}
|
160 |
-
|
161 |
-
/**
|
162 |
-
* Get sender's working time end
|
163 |
-
* @return iteger Signed 16-bit
|
164 |
-
*/
|
165 |
-
public function getWorkingEndTime() {
|
166 |
-
return $this->_workingEndTime;
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Set contact name - limited to 60 symbols.
|
171 |
-
* @param string $contactName
|
172 |
-
*/
|
173 |
-
public function setContactName($contactName) {
|
174 |
-
$this->_contactName = $contactName;
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Get contact name
|
179 |
-
* @return string
|
180 |
-
*/
|
181 |
-
public function getContactName() {
|
182 |
-
return $this->_contactName;
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Set phone number.
|
187 |
-
* @param ParamPhoneNumber $phoneNumber
|
188 |
-
*/
|
189 |
-
public function setPhoneNumber($phoneNumber) {
|
190 |
-
$this->_phoneNumber = $phoneNumber;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Get phone number.
|
195 |
-
* @return ParamPhoneNumber
|
196 |
-
*/
|
197 |
-
public function getPhoneNumber() {
|
198 |
-
return $this->_phoneNumber;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Return standard class from this class
|
203 |
-
* @return stdClass
|
204 |
-
*/
|
205 |
-
public function toStdClass() {
|
206 |
-
$stdClass = new stdClass();
|
207 |
-
$stdClass->billOfLadingsToIncludeType = $this->_billOfLadingsToIncludeType;
|
208 |
-
$stdClass->billOfLadingsList = $this->_billOfLadingsList;
|
209 |
-
$stdClass->pickupDate = $this->_pickupDate;
|
210 |
-
$stdClass->readinessTime = $this->_readinessTime;
|
211 |
-
$stdClass->workingEndTime = $this->_workingEndTime;
|
212 |
-
$stdClass->contactName = $this->_contactName;
|
213 |
-
if (isset($this->_phoneNumber)) {
|
214 |
-
$stdClass->phoneNumber = $this->_phoneNumber->toStdClass();
|
215 |
-
}
|
216 |
-
return $stdClass;
|
217 |
-
}
|
218 |
-
}
|
219 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ParamPhoneNumber.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are used as parameters for orders web service calls
|
7 |
+
*/
|
8 |
+
class ParamOrder {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Include in order list all explicitly provided numbers with setBillOfLadingsList method
|
12 |
+
* @var integer Signed 32-bit
|
13 |
+
*/
|
14 |
+
const ORDER_BOL_INCLUDE_TYPE_EXPLICIT = 10;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Include in order list all not-ordered-yet BOLs created by the logged client
|
18 |
+
* @var integer Signed 32-bit
|
19 |
+
*/
|
20 |
+
const ORDER_BOL_INCLUDE_TYPE_OWN_PENDING = 20;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Include in order list all not-ordered-yet BOLs created by the logged client or members of his/her contract.
|
24 |
+
* (taking into account user's permissions)
|
25 |
+
* @var integer Signed 32-bit
|
26 |
+
*/
|
27 |
+
const ORDER_BOL_INCLUDE_TYPE_CONTARCT_PENDIND = 30;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Specifies the set of shipments/BOLs to be ordered:
|
31 |
+
* •[10] Explicit numbers (in billOfLadingsList)
|
32 |
+
* •[20] All not-ordered-yet BOLs created by the logged client
|
33 |
+
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
34 |
+
* MANDATORY: YES
|
35 |
+
* @var integer Signed 32-bit
|
36 |
+
*/
|
37 |
+
private $_billOfLadingsToIncludeType;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* List of BOL numbers.
|
41 |
+
* MANDATORY: Must be set <=> billOfLadingsToIncludeType = 10.
|
42 |
+
* @var array List of signed 64-bit integer
|
43 |
+
*/
|
44 |
+
private $_billOfLadingsList;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* The date for shipments pick-up (the "time" component is ignored). The default value is "today".
|
48 |
+
* MANDATORY: NO
|
49 |
+
* @var date
|
50 |
+
*/
|
51 |
+
private $_pickupDate;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Specifies when all the shipments/parcels will be ready for pickup. The default value is "now".
|
55 |
+
* MANDATORY: Only if pickupDate > today
|
56 |
+
* @var integer Signed 16-bit
|
57 |
+
*/
|
58 |
+
private $_readinessTime;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* The sender's working time end
|
62 |
+
* MANDATORY: YES
|
63 |
+
* @var integer Signed 16-bit
|
64 |
+
*/
|
65 |
+
private $_workingEndTime;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Contact name.
|
69 |
+
* Limited to 60 symbols.
|
70 |
+
* MANDATORY: YES
|
71 |
+
* @var string
|
72 |
+
*/
|
73 |
+
private $_contactName;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Phone number
|
77 |
+
* MANDATORY: YES
|
78 |
+
* @var ParamPhoneNumber
|
79 |
+
*/
|
80 |
+
private $_phoneNumber;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Set the set of shipments/BOLs to be ordered:
|
84 |
+
* •[10] Explicit numbers (in billOfLadingsList)
|
85 |
+
* •[20] All not-ordered-yet BOLs created by the logged client
|
86 |
+
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
87 |
+
* @param integer $billOfLadingsToIncludeType Signed 32-bit
|
88 |
+
*/
|
89 |
+
public function setBillOfLadingsToIncludeType($billOfLadingsToIncludeType) {
|
90 |
+
$this->_billOfLadingsToIncludeType = $billOfLadingsToIncludeType;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get the set of shipments/BOLs to be ordered:
|
95 |
+
* •[10] Explicit numbers (in billOfLadingsList)
|
96 |
+
* •[20] All not-ordered-yet BOLs created by the logged client
|
97 |
+
* •[30] All not-ordered-yet BOLs created by the logged client or members of his/her contract (taking into account user's permissions)
|
98 |
+
* @return integer Signed 32-bit
|
99 |
+
*/
|
100 |
+
public function getBillOfLadingsToIncludeType() {
|
101 |
+
return $this->_billOfLadingsToIncludeType;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Set list of BOL numbers.
|
106 |
+
* Must be set <=> billOfLadingsToIncludeType = 10.
|
107 |
+
* @param array $billOfLadingsList List of signed 64-bit
|
108 |
+
*/
|
109 |
+
public function setBillOfLadingsList($billOfLadingsList) {
|
110 |
+
$this->_billOfLadingsList = $billOfLadingsList;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get list of BOL numbers.
|
115 |
+
* @return array List of signed 64-bit
|
116 |
+
*/
|
117 |
+
public function getBillOfLadingsList() {
|
118 |
+
return $this->_billOfLadingsList;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Set date for shipments pick-up (the "time" component is ignored)
|
123 |
+
* @param date $pickupDate
|
124 |
+
*/
|
125 |
+
public function setPickupDate($pickupDate) {
|
126 |
+
$this->_pickupDate = $pickupDate;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get date for shipments pick-up
|
131 |
+
* @return date
|
132 |
+
*/
|
133 |
+
public function getPickupDate() {
|
134 |
+
return $this->_pickupDate;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Set the time when all the shipments/parcels will be ready for pickup.
|
139 |
+
* @param iteger $readinessTime Signed 16-bit
|
140 |
+
*/
|
141 |
+
public function setReadinessTime($readinessTime) {
|
142 |
+
$this->_readinessTime = $readinessTime;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Get the time when all the shipments/parcels will be ready for pickup.
|
147 |
+
* @return iteger Signed 16-bit
|
148 |
+
*/
|
149 |
+
public function getReadinessTime() {
|
150 |
+
return $this->_readinessTime;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Set sender's working time end
|
155 |
+
* @param iteger $workingEndTime Signed 16-bit
|
156 |
+
*/
|
157 |
+
public function setWorkingEndTime($workingEndTime) {
|
158 |
+
$this->_workingEndTime = $workingEndTime;
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Get sender's working time end
|
163 |
+
* @return iteger Signed 16-bit
|
164 |
+
*/
|
165 |
+
public function getWorkingEndTime() {
|
166 |
+
return $this->_workingEndTime;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Set contact name - limited to 60 symbols.
|
171 |
+
* @param string $contactName
|
172 |
+
*/
|
173 |
+
public function setContactName($contactName) {
|
174 |
+
$this->_contactName = $contactName;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Get contact name
|
179 |
+
* @return string
|
180 |
+
*/
|
181 |
+
public function getContactName() {
|
182 |
+
return $this->_contactName;
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Set phone number.
|
187 |
+
* @param ParamPhoneNumber $phoneNumber
|
188 |
+
*/
|
189 |
+
public function setPhoneNumber($phoneNumber) {
|
190 |
+
$this->_phoneNumber = $phoneNumber;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Get phone number.
|
195 |
+
* @return ParamPhoneNumber
|
196 |
+
*/
|
197 |
+
public function getPhoneNumber() {
|
198 |
+
return $this->_phoneNumber;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Return standard class from this class
|
203 |
+
* @return stdClass
|
204 |
+
*/
|
205 |
+
public function toStdClass() {
|
206 |
+
$stdClass = new stdClass();
|
207 |
+
$stdClass->billOfLadingsToIncludeType = $this->_billOfLadingsToIncludeType;
|
208 |
+
$stdClass->billOfLadingsList = $this->_billOfLadingsList;
|
209 |
+
$stdClass->pickupDate = $this->_pickupDate;
|
210 |
+
$stdClass->readinessTime = $this->_readinessTime;
|
211 |
+
$stdClass->workingEndTime = $this->_workingEndTime;
|
212 |
+
$stdClass->contactName = $this->_contactName;
|
213 |
+
if (isset($this->_phoneNumber)) {
|
214 |
+
$stdClass->phoneNumber = $this->_phoneNumber->toStdClass();
|
215 |
+
}
|
216 |
+
return $stdClass;
|
217 |
+
}
|
218 |
+
}
|
219 |
?>
|
lib/SpeedyEPS/ver01/ParamPDF.class.php
CHANGED
@@ -1,242 +1,242 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ParamBarcodeInfo.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are used as a parameter for createPDF documents web service methods
|
7 |
-
*/
|
8 |
-
class ParamPDF {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* BOL type
|
12 |
-
* @var integer Signed 32-bit
|
13 |
-
*/
|
14 |
-
const PARAM_PDF_TYPE_BOL = 10;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Labels type
|
18 |
-
* @var integer Signed 32-bit
|
19 |
-
*/
|
20 |
-
const PARAM_PDF_TYPE_LBL = 20;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* labels with additional barcode type
|
24 |
-
* @var integer Signed 32-bit
|
25 |
-
*/
|
26 |
-
const PARAM_PDF_TYPE_LBL_WITH_ADDTNL_BARCODE = 25;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Additional barcode format CODE128
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_CODE128 = 'CODE128';
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Additional barcode format EAN13
|
36 |
-
* @var string
|
37 |
-
*/
|
38 |
-
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_EAN13 = 'EAN13';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Additional barcode format EAN8
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_EAN8 = 'EAN8';
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Additional barcode format UPC-A
|
48 |
-
* @var string
|
49 |
-
*/
|
50 |
-
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_UPC_A = 'UPC-A';
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Additional barcode format UPC-E
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_UPC_E = 'UPC-E';
|
57 |
-
|
58 |
-
/**
|
59 |
-
* The document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
60 |
-
* MANDATORY: YES
|
61 |
-
* @var integer signed 32-bit
|
62 |
-
*/
|
63 |
-
private $_type;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* List of IDs.
|
67 |
-
* For type 10 only the BOL number is needed.
|
68 |
-
* For types 20 and 25 one or more parcel IDs are expected (parcels must be of a single BOL).
|
69 |
-
* MANDATORY: YES
|
70 |
-
* @var array List of signed 64-bit integers
|
71 |
-
*/
|
72 |
-
private $_ids;
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Specifies if embedded JavaScript code for direct printing to be generated (works for Adobe Acrobat Reader only).
|
76 |
-
* MANDATORY: YES
|
77 |
-
* @var boolean
|
78 |
-
*/
|
79 |
-
private $_includeAutoPrintJS;
|
80 |
-
|
81 |
-
/**
|
82 |
-
* The printer name. If empty, the default printer is to be used. Only applicable if includeAutoPrintJS = true.
|
83 |
-
* MANDATORY: NO
|
84 |
-
* @var string
|
85 |
-
*/
|
86 |
-
private $_printerName;
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Only allowed for type 25. A list of additional (second) barcodes to be printed on the bottom of each label in the PDF document.
|
90 |
-
* Note that the additional barcodes take some extra space so the label height for type 25 is greater than the label height for type 20.
|
91 |
-
* Each element in the list corresponds to the element of 'ids' with the same index (position).
|
92 |
-
* MANDATORY: NO
|
93 |
-
* @var array List of ParamBarcodeInfo
|
94 |
-
*/
|
95 |
-
private $_additionalBarcodes;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Only allowed for type 25.
|
99 |
-
* Specifies the barcode format to be used for additionalBarcodes.
|
100 |
-
* Accepts the following values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
101 |
-
* MANDATORY: NO
|
102 |
-
* @var string
|
103 |
-
*/
|
104 |
-
private $_additionalBarcodesFormat;
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Set document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
108 |
-
* @param integer $type signed 32-bit
|
109 |
-
*/
|
110 |
-
public function setType($type) {
|
111 |
-
$this->_type = $type;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Get document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
116 |
-
* @return integer Signed 32-bit
|
117 |
-
*/
|
118 |
-
public function getType() {
|
119 |
-
return $this->_type;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Set list of IDs. For type 10 only the BOL number is needed.
|
124 |
-
* For types 20 and 25 one or more parcel IDs are expected (parcels must be of a single BOL).
|
125 |
-
* @param array $ids List of signed 64-bit integers
|
126 |
-
*/
|
127 |
-
public function setIds($ids) {
|
128 |
-
$this->_ids = $ids;
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Get list of IDs.
|
133 |
-
* @return array List of signed 64-bit integers
|
134 |
-
*/
|
135 |
-
public function getIds() {
|
136 |
-
return $this->_ids;
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Set flag to include embedded JavaScript code for direct printing for Adobe Acrobat Reader
|
141 |
-
* @param boolean $includeAutoPrintJS
|
142 |
-
*/
|
143 |
-
public function setIncludeAutoPrintJS($includeAutoPrintJS) {
|
144 |
-
$this->_includeAutoPrintJS = $includeAutoPrintJS;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Check flag to include embedded JavaScript code for direct printing for Adobe Acrobat Reader.
|
149 |
-
* @return boolean
|
150 |
-
*/
|
151 |
-
public function isIncludeAutoPrintJS() {
|
152 |
-
return $this->_includeAutoPrintJS;
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Set printer name. If empty, the default printer is to be used. Only applicable if includeAutoPrintJS = true.
|
157 |
-
* @param string $printerName
|
158 |
-
*/
|
159 |
-
public function setPrinterName($printerName) {
|
160 |
-
$this->_printerName = $printerName;
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Get printer name.
|
165 |
-
* @return string
|
166 |
-
*/
|
167 |
-
public function getPrinterName() {
|
168 |
-
return $this->_printerName;
|
169 |
-
}
|
170 |
-
|
171 |
-
/**
|
172 |
-
* Set list of additional (second) barcodes to be printed on the bottom of each label in the PDF document. Only allowed for type 25.
|
173 |
-
* Note that the additional barcodes take some extra space so the label height for type 25 is greater than the label height for type 20.
|
174 |
-
* Each element in the list corresponds to the element of 'ids' with the same index (position).
|
175 |
-
* @param array $additionalBarcodes List of ParamBarcodeInfo
|
176 |
-
*/
|
177 |
-
public function setAdditionalBarcodes($additionalBarcodes) {
|
178 |
-
$this->_additionalBarcodes = $additionalBarcodes;
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Get list of additional (second) barcodes to be printed on the bottom of each label in the PDF document for type 25.
|
183 |
-
* @return array List of ParamBarcodeInfo
|
184 |
-
*/
|
185 |
-
public function getAdditionalBarcodes() {
|
186 |
-
return $this->_additionalBarcodes;
|
187 |
-
}
|
188 |
-
|
189 |
-
/**
|
190 |
-
* Set the barcode format to be used for additionalBarcodes. Only allowed for type 25.
|
191 |
-
* Accepts the following values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
192 |
-
* @param string $additionalBarcodesFormat
|
193 |
-
*/
|
194 |
-
public function setAdditionalBarcodesFormat($additionalBarcodesFormat) {
|
195 |
-
$this->_additionalBarcodesFormat = $additionalBarcodesFormat;
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Get the barcode format to be used for additionalBarcodes.
|
200 |
-
* Possible values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
201 |
-
* @return string
|
202 |
-
*/
|
203 |
-
public function getAdditionalBarcodesFormat() {
|
204 |
-
return $this->_additionalBarcodesFormat;
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Return standard class from this class
|
209 |
-
* @return stdClass
|
210 |
-
*/
|
211 |
-
public function toStdClass() {
|
212 |
-
$stdClass = new stdClass();
|
213 |
-
$stdClass->type = $this->_type;
|
214 |
-
$arrIds = array();
|
215 |
-
if (isset($this->_ids)) {
|
216 |
-
if (is_array($this->_ids)) {
|
217 |
-
for($i = 0; $i < count($this->_ids); $i++) {
|
218 |
-
$arrIds[$i] = $this->_ids[$i];
|
219 |
-
}
|
220 |
-
} else {
|
221 |
-
$arrIds[0] = $this->_ids;
|
222 |
-
}
|
223 |
-
}
|
224 |
-
$stdClass->ids = $arrIds;
|
225 |
-
$stdClass->includeAutoPrintJS = $this->_includeAutoPrintJS;
|
226 |
-
$stdClass->printerName = $this->_printerName;
|
227 |
-
$arrAdditionalBarcodes = array();
|
228 |
-
if (isset($this->_additionalBarcodes)) {
|
229 |
-
if (is_array($this->_additionalBarcodes)) {
|
230 |
-
for($i = 0; $i < count($this->_additionalBarcodes); $i++) {
|
231 |
-
$arrAdditionalBarcodes[$i] = $this->_additionalBarcodes[$i]->toStdClass();
|
232 |
-
}
|
233 |
-
} else {
|
234 |
-
$arrAdditionalBarcodes[0] = $this->_additionalBarcodes->toStdClass();
|
235 |
-
}
|
236 |
-
}
|
237 |
-
$stdClass->additionalBarcodes = $arrAdditionalBarcodes;
|
238 |
-
$stdClass->additionalBarcodesFormat = $this->_additionalBarcodesFormat;
|
239 |
-
return $stdClass;
|
240 |
-
}
|
241 |
-
}
|
242 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ParamBarcodeInfo.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are used as a parameter for createPDF documents web service methods
|
7 |
+
*/
|
8 |
+
class ParamPDF {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* BOL type
|
12 |
+
* @var integer Signed 32-bit
|
13 |
+
*/
|
14 |
+
const PARAM_PDF_TYPE_BOL = 10;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Labels type
|
18 |
+
* @var integer Signed 32-bit
|
19 |
+
*/
|
20 |
+
const PARAM_PDF_TYPE_LBL = 20;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* labels with additional barcode type
|
24 |
+
* @var integer Signed 32-bit
|
25 |
+
*/
|
26 |
+
const PARAM_PDF_TYPE_LBL_WITH_ADDTNL_BARCODE = 25;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Additional barcode format CODE128
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_CODE128 = 'CODE128';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Additional barcode format EAN13
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_EAN13 = 'EAN13';
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Additional barcode format EAN8
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_EAN8 = 'EAN8';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Additional barcode format UPC-A
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_UPC_A = 'UPC-A';
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Additional barcode format UPC-E
|
54 |
+
* @var string
|
55 |
+
*/
|
56 |
+
const PARAM_PDF_ADDIRIONAL_BARCODE_FMT_UPC_E = 'UPC-E';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* The document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
60 |
+
* MANDATORY: YES
|
61 |
+
* @var integer signed 32-bit
|
62 |
+
*/
|
63 |
+
private $_type;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* List of IDs.
|
67 |
+
* For type 10 only the BOL number is needed.
|
68 |
+
* For types 20 and 25 one or more parcel IDs are expected (parcels must be of a single BOL).
|
69 |
+
* MANDATORY: YES
|
70 |
+
* @var array List of signed 64-bit integers
|
71 |
+
*/
|
72 |
+
private $_ids;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Specifies if embedded JavaScript code for direct printing to be generated (works for Adobe Acrobat Reader only).
|
76 |
+
* MANDATORY: YES
|
77 |
+
* @var boolean
|
78 |
+
*/
|
79 |
+
private $_includeAutoPrintJS;
|
80 |
+
|
81 |
+
/**
|
82 |
+
* The printer name. If empty, the default printer is to be used. Only applicable if includeAutoPrintJS = true.
|
83 |
+
* MANDATORY: NO
|
84 |
+
* @var string
|
85 |
+
*/
|
86 |
+
private $_printerName;
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Only allowed for type 25. A list of additional (second) barcodes to be printed on the bottom of each label in the PDF document.
|
90 |
+
* Note that the additional barcodes take some extra space so the label height for type 25 is greater than the label height for type 20.
|
91 |
+
* Each element in the list corresponds to the element of 'ids' with the same index (position).
|
92 |
+
* MANDATORY: NO
|
93 |
+
* @var array List of ParamBarcodeInfo
|
94 |
+
*/
|
95 |
+
private $_additionalBarcodes;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Only allowed for type 25.
|
99 |
+
* Specifies the barcode format to be used for additionalBarcodes.
|
100 |
+
* Accepts the following values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
101 |
+
* MANDATORY: NO
|
102 |
+
* @var string
|
103 |
+
*/
|
104 |
+
private $_additionalBarcodesFormat;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Set document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
108 |
+
* @param integer $type signed 32-bit
|
109 |
+
*/
|
110 |
+
public function setType($type) {
|
111 |
+
$this->_type = $type;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get document type (10 - BOL; 20 - labels; 25 - labels with additional barcode)
|
116 |
+
* @return integer Signed 32-bit
|
117 |
+
*/
|
118 |
+
public function getType() {
|
119 |
+
return $this->_type;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Set list of IDs. For type 10 only the BOL number is needed.
|
124 |
+
* For types 20 and 25 one or more parcel IDs are expected (parcels must be of a single BOL).
|
125 |
+
* @param array $ids List of signed 64-bit integers
|
126 |
+
*/
|
127 |
+
public function setIds($ids) {
|
128 |
+
$this->_ids = $ids;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Get list of IDs.
|
133 |
+
* @return array List of signed 64-bit integers
|
134 |
+
*/
|
135 |
+
public function getIds() {
|
136 |
+
return $this->_ids;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Set flag to include embedded JavaScript code for direct printing for Adobe Acrobat Reader
|
141 |
+
* @param boolean $includeAutoPrintJS
|
142 |
+
*/
|
143 |
+
public function setIncludeAutoPrintJS($includeAutoPrintJS) {
|
144 |
+
$this->_includeAutoPrintJS = $includeAutoPrintJS;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Check flag to include embedded JavaScript code for direct printing for Adobe Acrobat Reader.
|
149 |
+
* @return boolean
|
150 |
+
*/
|
151 |
+
public function isIncludeAutoPrintJS() {
|
152 |
+
return $this->_includeAutoPrintJS;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Set printer name. If empty, the default printer is to be used. Only applicable if includeAutoPrintJS = true.
|
157 |
+
* @param string $printerName
|
158 |
+
*/
|
159 |
+
public function setPrinterName($printerName) {
|
160 |
+
$this->_printerName = $printerName;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get printer name.
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
public function getPrinterName() {
|
168 |
+
return $this->_printerName;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Set list of additional (second) barcodes to be printed on the bottom of each label in the PDF document. Only allowed for type 25.
|
173 |
+
* Note that the additional barcodes take some extra space so the label height for type 25 is greater than the label height for type 20.
|
174 |
+
* Each element in the list corresponds to the element of 'ids' with the same index (position).
|
175 |
+
* @param array $additionalBarcodes List of ParamBarcodeInfo
|
176 |
+
*/
|
177 |
+
public function setAdditionalBarcodes($additionalBarcodes) {
|
178 |
+
$this->_additionalBarcodes = $additionalBarcodes;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get list of additional (second) barcodes to be printed on the bottom of each label in the PDF document for type 25.
|
183 |
+
* @return array List of ParamBarcodeInfo
|
184 |
+
*/
|
185 |
+
public function getAdditionalBarcodes() {
|
186 |
+
return $this->_additionalBarcodes;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Set the barcode format to be used for additionalBarcodes. Only allowed for type 25.
|
191 |
+
* Accepts the following values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
192 |
+
* @param string $additionalBarcodesFormat
|
193 |
+
*/
|
194 |
+
public function setAdditionalBarcodesFormat($additionalBarcodesFormat) {
|
195 |
+
$this->_additionalBarcodesFormat = $additionalBarcodesFormat;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Get the barcode format to be used for additionalBarcodes.
|
200 |
+
* Possible values: 'CODE128', 'EAN13', 'EAN8', 'UPC-A', 'UPC-E'
|
201 |
+
* @return string
|
202 |
+
*/
|
203 |
+
public function getAdditionalBarcodesFormat() {
|
204 |
+
return $this->_additionalBarcodesFormat;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Return standard class from this class
|
209 |
+
* @return stdClass
|
210 |
+
*/
|
211 |
+
public function toStdClass() {
|
212 |
+
$stdClass = new stdClass();
|
213 |
+
$stdClass->type = $this->_type;
|
214 |
+
$arrIds = array();
|
215 |
+
if (isset($this->_ids)) {
|
216 |
+
if (is_array($this->_ids)) {
|
217 |
+
for($i = 0; $i < count($this->_ids); $i++) {
|
218 |
+
$arrIds[$i] = $this->_ids[$i];
|
219 |
+
}
|
220 |
+
} else {
|
221 |
+
$arrIds[0] = $this->_ids;
|
222 |
+
}
|
223 |
+
}
|
224 |
+
$stdClass->ids = $arrIds;
|
225 |
+
$stdClass->includeAutoPrintJS = $this->_includeAutoPrintJS;
|
226 |
+
$stdClass->printerName = $this->_printerName;
|
227 |
+
$arrAdditionalBarcodes = array();
|
228 |
+
if (isset($this->_additionalBarcodes)) {
|
229 |
+
if (is_array($this->_additionalBarcodes)) {
|
230 |
+
for($i = 0; $i < count($this->_additionalBarcodes); $i++) {
|
231 |
+
$arrAdditionalBarcodes[$i] = $this->_additionalBarcodes[$i]->toStdClass();
|
232 |
+
}
|
233 |
+
} else {
|
234 |
+
$arrAdditionalBarcodes[0] = $this->_additionalBarcodes->toStdClass();
|
235 |
+
}
|
236 |
+
}
|
237 |
+
$stdClass->additionalBarcodes = $arrAdditionalBarcodes;
|
238 |
+
$stdClass->additionalBarcodesFormat = $this->_additionalBarcodesFormat;
|
239 |
+
return $stdClass;
|
240 |
+
}
|
241 |
+
}
|
242 |
?>
|
lib/SpeedyEPS/ver01/ParamParcel.class.php
CHANGED
@@ -1,141 +1,141 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Size.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Inctances of this class are used as a paremeter to add parcels to pickings
|
7 |
-
*/
|
8 |
-
class ParamParcel {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The BOL to which the parcel is to be added
|
12 |
-
* MANDATORY: YES
|
13 |
-
* @var integer signed 64-bit
|
14 |
-
*/
|
15 |
-
private $_billOfLading;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Parcel ID (if empty, the server will generate one)
|
19 |
-
* MANDATORY: NO
|
20 |
-
* @var integer signed 64-bit
|
21 |
-
*/
|
22 |
-
private $_parcelId;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Packing ID
|
26 |
-
* MANDATORY: NO
|
27 |
-
* @var integer Signed 64-bit
|
28 |
-
*/
|
29 |
-
private $_packId;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Real weight (kg)
|
33 |
-
* MANDATORY: YES
|
34 |
-
* @var double Signed 64-bit
|
35 |
-
*/
|
36 |
-
private $_weight;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Parcel size
|
40 |
-
* MANDATORY: NO
|
41 |
-
* @var Size
|
42 |
-
*/
|
43 |
-
private $_size;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Set BOL number
|
47 |
-
* @param integer $billOfLading Signed 64-bit
|
48 |
-
*/
|
49 |
-
public function setBillOfLading($billOfLading) {
|
50 |
-
$this->_billOfLading = $billOfLading;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get BOL number
|
55 |
-
* @return integer Signed 64-bit
|
56 |
-
*/
|
57 |
-
public function getBillOfLading() {
|
58 |
-
return $this->_billOfLading;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Set parcel ID (if empty, the server will generate one)
|
63 |
-
* @param integer $parcelId Signed 64-bit
|
64 |
-
*/
|
65 |
-
public function setParcelId($parcelId) {
|
66 |
-
$this->_parcelId = $parcelId;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Get parcel ID
|
71 |
-
* @return integer Signed 64-bit
|
72 |
-
*/
|
73 |
-
public function getParcelId() {
|
74 |
-
return $this->_parcelId;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Set packing ID
|
79 |
-
* @param integer $packId Signed 64-bit
|
80 |
-
*/
|
81 |
-
public function setPackId($packId) {
|
82 |
-
$this->_packId = $packId;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Get packing ID
|
87 |
-
* @return integer Signed 64-bit
|
88 |
-
*/
|
89 |
-
public function getPackId() {
|
90 |
-
return $this->_packId;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Set real weight
|
95 |
-
* @param double $weight Signed 64-bit
|
96 |
-
*/
|
97 |
-
public function setWeight($weight) {
|
98 |
-
$this->_weight = $weight;
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Get real weight
|
103 |
-
* @return double Signed 64-bit
|
104 |
-
*/
|
105 |
-
public function getWeight() {
|
106 |
-
return $this->_weight;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Set parcel size
|
111 |
-
* @param Size $size
|
112 |
-
*/
|
113 |
-
public function setSize($size) {
|
114 |
-
$this->_size = $size;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Get parcel size
|
119 |
-
* @return Size
|
120 |
-
*/
|
121 |
-
public function getSize() {
|
122 |
-
return $this->_size;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* Return standard class from this class
|
127 |
-
* @return stdClass
|
128 |
-
*/
|
129 |
-
public function toStdClass() {
|
130 |
-
$stdClass = new stdClass();
|
131 |
-
$stdClass->billOfLading = $this->_billOfLading;
|
132 |
-
$stdClass->parcelId = $this->_parcelId;
|
133 |
-
$stdClass->packId = $this->_packId;
|
134 |
-
$stdClass->weight = $this->_weight;
|
135 |
-
if (isset($this->_size)) {
|
136 |
-
$stdClass->size = $this->_size->toStdClass();
|
137 |
-
}
|
138 |
-
return $stdClass;
|
139 |
-
}
|
140 |
-
}
|
141 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Size.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Inctances of this class are used as a paremeter to add parcels to pickings
|
7 |
+
*/
|
8 |
+
class ParamParcel {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The BOL to which the parcel is to be added
|
12 |
+
* MANDATORY: YES
|
13 |
+
* @var integer signed 64-bit
|
14 |
+
*/
|
15 |
+
private $_billOfLading;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Parcel ID (if empty, the server will generate one)
|
19 |
+
* MANDATORY: NO
|
20 |
+
* @var integer signed 64-bit
|
21 |
+
*/
|
22 |
+
private $_parcelId;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Packing ID
|
26 |
+
* MANDATORY: NO
|
27 |
+
* @var integer Signed 64-bit
|
28 |
+
*/
|
29 |
+
private $_packId;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Real weight (kg)
|
33 |
+
* MANDATORY: YES
|
34 |
+
* @var double Signed 64-bit
|
35 |
+
*/
|
36 |
+
private $_weight;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Parcel size
|
40 |
+
* MANDATORY: NO
|
41 |
+
* @var Size
|
42 |
+
*/
|
43 |
+
private $_size;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Set BOL number
|
47 |
+
* @param integer $billOfLading Signed 64-bit
|
48 |
+
*/
|
49 |
+
public function setBillOfLading($billOfLading) {
|
50 |
+
$this->_billOfLading = $billOfLading;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get BOL number
|
55 |
+
* @return integer Signed 64-bit
|
56 |
+
*/
|
57 |
+
public function getBillOfLading() {
|
58 |
+
return $this->_billOfLading;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Set parcel ID (if empty, the server will generate one)
|
63 |
+
* @param integer $parcelId Signed 64-bit
|
64 |
+
*/
|
65 |
+
public function setParcelId($parcelId) {
|
66 |
+
$this->_parcelId = $parcelId;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get parcel ID
|
71 |
+
* @return integer Signed 64-bit
|
72 |
+
*/
|
73 |
+
public function getParcelId() {
|
74 |
+
return $this->_parcelId;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Set packing ID
|
79 |
+
* @param integer $packId Signed 64-bit
|
80 |
+
*/
|
81 |
+
public function setPackId($packId) {
|
82 |
+
$this->_packId = $packId;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get packing ID
|
87 |
+
* @return integer Signed 64-bit
|
88 |
+
*/
|
89 |
+
public function getPackId() {
|
90 |
+
return $this->_packId;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Set real weight
|
95 |
+
* @param double $weight Signed 64-bit
|
96 |
+
*/
|
97 |
+
public function setWeight($weight) {
|
98 |
+
$this->_weight = $weight;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get real weight
|
103 |
+
* @return double Signed 64-bit
|
104 |
+
*/
|
105 |
+
public function getWeight() {
|
106 |
+
return $this->_weight;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Set parcel size
|
111 |
+
* @param Size $size
|
112 |
+
*/
|
113 |
+
public function setSize($size) {
|
114 |
+
$this->_size = $size;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Get parcel size
|
119 |
+
* @return Size
|
120 |
+
*/
|
121 |
+
public function getSize() {
|
122 |
+
return $this->_size;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Return standard class from this class
|
127 |
+
* @return stdClass
|
128 |
+
*/
|
129 |
+
public function toStdClass() {
|
130 |
+
$stdClass = new stdClass();
|
131 |
+
$stdClass->billOfLading = $this->_billOfLading;
|
132 |
+
$stdClass->parcelId = $this->_parcelId;
|
133 |
+
$stdClass->packId = $this->_packId;
|
134 |
+
$stdClass->weight = $this->_weight;
|
135 |
+
if (isset($this->_size)) {
|
136 |
+
$stdClass->size = $this->_size->toStdClass();
|
137 |
+
}
|
138 |
+
return $stdClass;
|
139 |
+
}
|
140 |
+
}
|
141 |
?>
|
lib/SpeedyEPS/ver01/ParamParcelInfo.class.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as parameters in web service calls for picking calculation and registration
|
4 |
-
*/
|
5 |
-
class ParamParcelInfo {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Parcel's serial number (2, 3, ...)
|
9 |
-
* MANDATORY: YES
|
10 |
-
* @var integer Signed 32-bit
|
11 |
-
*/
|
12 |
-
private $_seqNo;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Parcel ID
|
16 |
-
* MANDATORY: YES
|
17 |
-
* @var integer Signed 64-bit
|
18 |
-
*/
|
19 |
-
private $_parcelId;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Packing ID
|
23 |
-
* MANDATORY: NO
|
24 |
-
* @var integer Signed 64-bit
|
25 |
-
*/
|
26 |
-
private $_packId;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Set parcel's serial number (2, 3, ...)
|
30 |
-
* @param integer $seqNo Signed 32-bit
|
31 |
-
*/
|
32 |
-
public function setSeqNo($seqNo) {
|
33 |
-
$this->_seqNo = $seqNo;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Get parcel's serial number
|
38 |
-
* @return integer Signed 32-bit
|
39 |
-
*/
|
40 |
-
public function getSeqNo() {
|
41 |
-
return $this->_seqNo;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Set parcel ID
|
46 |
-
* @param integer $parcelId Signed 64-bit
|
47 |
-
*/
|
48 |
-
public function setParcelId($parcelId) {
|
49 |
-
$this->_parcelId = $parcelId;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get parcel ID
|
54 |
-
* @return integer Signed 64-bit
|
55 |
-
*/
|
56 |
-
public function getParcelId() {
|
57 |
-
return $this->_parcelId;
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Set packing ID
|
62 |
-
* @param integer $packId Signed 64-bit
|
63 |
-
*/
|
64 |
-
public function setPackId($packId) {
|
65 |
-
$this->_packId = $packId;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Get packing ID
|
70 |
-
* @return integer Signed 64-bit
|
71 |
-
*/
|
72 |
-
public function getPackId() {
|
73 |
-
return $this->_packId;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Return standard class from this class
|
78 |
-
* @return stdClass
|
79 |
-
*/
|
80 |
-
public function toStdClass() {
|
81 |
-
$stdClass = new stdClass();
|
82 |
-
$stdClass->seqNo = $this->_seqNo;
|
83 |
-
$stdClass->parcelId = $this->_parcelId;
|
84 |
-
$stdClass->packId = $this->_packId;
|
85 |
-
return $stdClass;
|
86 |
-
}
|
87 |
-
}
|
88 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as parameters in web service calls for picking calculation and registration
|
4 |
+
*/
|
5 |
+
class ParamParcelInfo {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Parcel's serial number (2, 3, ...)
|
9 |
+
* MANDATORY: YES
|
10 |
+
* @var integer Signed 32-bit
|
11 |
+
*/
|
12 |
+
private $_seqNo;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Parcel ID
|
16 |
+
* MANDATORY: YES
|
17 |
+
* @var integer Signed 64-bit
|
18 |
+
*/
|
19 |
+
private $_parcelId;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Packing ID
|
23 |
+
* MANDATORY: NO
|
24 |
+
* @var integer Signed 64-bit
|
25 |
+
*/
|
26 |
+
private $_packId;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Set parcel's serial number (2, 3, ...)
|
30 |
+
* @param integer $seqNo Signed 32-bit
|
31 |
+
*/
|
32 |
+
public function setSeqNo($seqNo) {
|
33 |
+
$this->_seqNo = $seqNo;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get parcel's serial number
|
38 |
+
* @return integer Signed 32-bit
|
39 |
+
*/
|
40 |
+
public function getSeqNo() {
|
41 |
+
return $this->_seqNo;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Set parcel ID
|
46 |
+
* @param integer $parcelId Signed 64-bit
|
47 |
+
*/
|
48 |
+
public function setParcelId($parcelId) {
|
49 |
+
$this->_parcelId = $parcelId;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get parcel ID
|
54 |
+
* @return integer Signed 64-bit
|
55 |
+
*/
|
56 |
+
public function getParcelId() {
|
57 |
+
return $this->_parcelId;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Set packing ID
|
62 |
+
* @param integer $packId Signed 64-bit
|
63 |
+
*/
|
64 |
+
public function setPackId($packId) {
|
65 |
+
$this->_packId = $packId;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Get packing ID
|
70 |
+
* @return integer Signed 64-bit
|
71 |
+
*/
|
72 |
+
public function getPackId() {
|
73 |
+
return $this->_packId;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Return standard class from this class
|
78 |
+
* @return stdClass
|
79 |
+
*/
|
80 |
+
public function toStdClass() {
|
81 |
+
$stdClass = new stdClass();
|
82 |
+
$stdClass->seqNo = $this->_seqNo;
|
83 |
+
$stdClass->parcelId = $this->_parcelId;
|
84 |
+
$stdClass->packId = $this->_packId;
|
85 |
+
return $stdClass;
|
86 |
+
}
|
87 |
+
}
|
88 |
?>
|
lib/SpeedyEPS/ver01/ParamPhoneNumber.class.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used as a parameter for client phone numbers in web service calls
|
4 |
-
*/
|
5 |
-
class ParamPhoneNumber {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Phone number (example: "0888123456", "+35932261020" etc.).
|
9 |
-
* Max size is 20 symbols.
|
10 |
-
* MANDATORY: YES
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
private $_number;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* An extension number.
|
17 |
-
* Max size is 10 symbols.
|
18 |
-
* MANDATORY: NO
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
private $_internal;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Set phone number (example: "0888123456", "+35932261020" etc.). Max size is 20 symbols.
|
25 |
-
* @param string $number
|
26 |
-
*/
|
27 |
-
public function setNumber($number) {
|
28 |
-
$this->_number = $number;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get phone number
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
public function getNumber() {
|
36 |
-
return $this->_number;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Set extension number. Max size is 10 symbols.
|
41 |
-
* @param string $internal
|
42 |
-
*/
|
43 |
-
public function setInternal($internal) {
|
44 |
-
$this->_internal = $internal;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Get extension number.
|
49 |
-
* @return string
|
50 |
-
*/
|
51 |
-
public function getInternal() {
|
52 |
-
return $this->_internal;
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Return standard class from this class
|
57 |
-
* @return stdClass
|
58 |
-
*/
|
59 |
-
public function toStdClass() {
|
60 |
-
$stdClass = new stdClass();
|
61 |
-
$stdClass->number = $this->_number;
|
62 |
-
$stdClass->internal = $this->_internal;
|
63 |
-
return $stdClass;
|
64 |
-
}
|
65 |
-
}
|
66 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used as a parameter for client phone numbers in web service calls
|
4 |
+
*/
|
5 |
+
class ParamPhoneNumber {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Phone number (example: "0888123456", "+35932261020" etc.).
|
9 |
+
* Max size is 20 symbols.
|
10 |
+
* MANDATORY: YES
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
private $_number;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* An extension number.
|
17 |
+
* Max size is 10 symbols.
|
18 |
+
* MANDATORY: NO
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $_internal;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Set phone number (example: "0888123456", "+35932261020" etc.). Max size is 20 symbols.
|
25 |
+
* @param string $number
|
26 |
+
*/
|
27 |
+
public function setNumber($number) {
|
28 |
+
$this->_number = $number;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get phone number
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getNumber() {
|
36 |
+
return $this->_number;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Set extension number. Max size is 10 symbols.
|
41 |
+
* @param string $internal
|
42 |
+
*/
|
43 |
+
public function setInternal($internal) {
|
44 |
+
$this->_internal = $internal;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get extension number.
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public function getInternal() {
|
52 |
+
return $this->_internal;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Return standard class from this class
|
57 |
+
* @return stdClass
|
58 |
+
*/
|
59 |
+
public function toStdClass() {
|
60 |
+
$stdClass = new stdClass();
|
61 |
+
$stdClass->number = $this->_number;
|
62 |
+
$stdClass->internal = $this->_internal;
|
63 |
+
return $stdClass;
|
64 |
+
}
|
65 |
+
}
|
66 |
?>
|
lib/SpeedyEPS/ver01/ParamPicking.class.php
CHANGED
@@ -1,1000 +1,1000 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Size.class.php';
|
4 |
-
require_once 'ParamClientData.class.php';
|
5 |
-
require_once 'FixedDiscountCardId.class.php';
|
6 |
-
require_once 'ParamParcelInfo.class.php';
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Instances of this class are passed as a parameter of Speedy web service calls for calclualation and registration
|
10 |
-
* @since 1.0
|
11 |
-
*/
|
12 |
-
class ParamPicking {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* BOL number
|
16 |
-
* MANDATORY: Only for updateBillOfLading. Null otherwise
|
17 |
-
* @var integer Signed 64-bit
|
18 |
-
*/
|
19 |
-
private $_billOfLading;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* The date for shipment pick-up (the "time" component is ignored). Default value is "today".
|
23 |
-
* MANDATORY: NO
|
24 |
-
* @var date
|
25 |
-
*/
|
26 |
-
private $_takingDate;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Courier service type ID
|
30 |
-
* MANDATORY: YES
|
31 |
-
* @var integer Signed 64-bit
|
32 |
-
*/
|
33 |
-
private $_serviceTypeId;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* ID of an office "to be called"
|
37 |
-
* MANDATORY: Only for "to be called" pickings
|
38 |
-
* @var integer Signed 64-bit
|
39 |
-
*/
|
40 |
-
private $_officeToBeCalledId;
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
44 |
-
* MANDATORY: Depending on the courier service, this property could be required, allowed or banned
|
45 |
-
* @var integer Signed 16-bit
|
46 |
-
*/
|
47 |
-
private $_fixedTimeDelivery;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* In some rare cases users might prefer the delivery to be deferred by a day or two.
|
51 |
-
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
52 |
-
* Max 2 days
|
53 |
-
* MANDATORY: No
|
54 |
-
* @var integer Signed 32-bit
|
55 |
-
*/
|
56 |
-
private $_deferredDeliveryWorkDays;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Specifies if the shipment has a "request for return documents"
|
60 |
-
* MANDATORY: YES
|
61 |
-
* @var boolean
|
62 |
-
*/
|
63 |
-
private $_backDocumentsRequest;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Specifies if the shipment has a "request for return receipt"
|
67 |
-
* MANDATORY: YES
|
68 |
-
* @var boolean
|
69 |
-
*/
|
70 |
-
private $_backReceiptRequest;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
74 |
-
* MANDATORY: YES
|
75 |
-
* @var boolean
|
76 |
-
*/
|
77 |
-
private $_willBringToOffice;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Specifies the specific Speedy office, where the sender intends to deliver the shipment by him/herself.
|
81 |
-
* If willBringToOfficeId is provided, willBringToOffice flag is considered "true", regardless the value provided.
|
82 |
-
* If willBringToOfficeId is not provied (0 or null) and willBringToOffice flag is "true",
|
83 |
-
* willBringToOfficeId is automatically set with default value configured for caller user profile.
|
84 |
-
* The default willBringToOfficeId value could be managed using profile configuration page in client's Speedy web site.
|
85 |
-
* MANDATORY: NO
|
86 |
-
* @since 1.3
|
87 |
-
* @var integer Signed 64-bit
|
88 |
-
*/
|
89 |
-
private $_willBringToOfficeId;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Shipment insurance value (if the shipment is insured).
|
93 |
-
* The value is limited depending on user's permissions and Speedy's current policy
|
94 |
-
* MANDATORY: NO
|
95 |
-
* @var double Signed 64-bit
|
96 |
-
*/
|
97 |
-
private $_amountInsuranceBase;
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Cash-on-Delivery (COD) amount.
|
101 |
-
* The value is limited depending on user's permissions and Speedy's current policy
|
102 |
-
* MANDATORY: NO
|
103 |
-
* @var double Signed 64-bit
|
104 |
-
*/
|
105 |
-
private $_amountCodBase;
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Specifies if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
109 |
-
* MANDATORY: NO
|
110 |
-
* @var boolean
|
111 |
-
*/
|
112 |
-
private $_payCodToThirdParty;
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Return money-transfer request amount
|
116 |
-
* The value is limited depending on user's permissions and Speedy's current policy
|
117 |
-
* MANDATORY: NO
|
118 |
-
* @var double Signed 64-bit
|
119 |
-
*/
|
120 |
-
private $_retMoneyTransferReqAmount;
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Parcels count. Maximum value is 999.
|
124 |
-
* MANDATORY: YES
|
125 |
-
* @var integer Signed 32-bit
|
126 |
-
*/
|
127 |
-
private $_parcelsCount;
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Size of shipment
|
131 |
-
* MANDATORY: NO
|
132 |
-
* @var Size
|
133 |
-
*/
|
134 |
-
private $_size;
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Declared weight (the greater of "volume" and "real" weight values).
|
138 |
-
* Maximum value is 100.00
|
139 |
-
* MANDATORY: YES
|
140 |
-
* @var double Signed 64-bit
|
141 |
-
*/
|
142 |
-
private $_weightDeclared;
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Contents. Max text size - 50 symbols
|
146 |
-
* MANDATORY: YES
|
147 |
-
* @var string
|
148 |
-
*/
|
149 |
-
private $_contents;
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Packing
|
153 |
-
* MANDATORY: YES
|
154 |
-
* @var string
|
155 |
-
*/
|
156 |
-
private $_packing;
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Packing ID (number)
|
160 |
-
* MANDATORY: NO
|
161 |
-
* @var integer Signed 64-bit
|
162 |
-
*/
|
163 |
-
private $_packId;
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Specifies whether the shipment consists of documents
|
167 |
-
* MANDATORY: YES
|
168 |
-
* @var boolean
|
169 |
-
*/
|
170 |
-
private $_documents;
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Specifies whether the shipment is fragile - necessary when the price of insurance is being calculated
|
174 |
-
* MANDATORY: YES
|
175 |
-
* @var boolean
|
176 |
-
*/
|
177 |
-
private $_fragile;
|
178 |
-
|
179 |
-
/**
|
180 |
-
* Specifies whether the shipment is palletized
|
181 |
-
* MANDATORY: YES
|
182 |
-
* @var boolean
|
183 |
-
*/
|
184 |
-
private $_palletized;
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Data for the sender
|
188 |
-
* MANDATORY: YES
|
189 |
-
* @var ParamClientData
|
190 |
-
*/
|
191 |
-
private $_sender;
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Data for the receiver
|
195 |
-
* MANDATORY: YES
|
196 |
-
* @var ParamClientData
|
197 |
-
*/
|
198 |
-
private $_receiver;
|
199 |
-
|
200 |
-
/**
|
201 |
-
* Payer type (0=sender, 1=receiver or 2=third party)
|
202 |
-
* MANDATORY: YES
|
203 |
-
* @var integer Signed 32-bit
|
204 |
-
*/
|
205 |
-
private $_payerType;
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Payer ID.
|
209 |
-
* MANDATORY: Must be set <=> payer is "third party".
|
210 |
-
* @var integer Signed 64-bit
|
211 |
-
*/
|
212 |
-
private $_payerRefId;
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Insurance payer type (0=sender, 1=reciever or 2=third party)
|
216 |
-
* MANDATORY: Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
217 |
-
* @var integer Signed 32-bit
|
218 |
-
*/
|
219 |
-
private $_payerTypeInsurance;
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Insurance payer ID
|
223 |
-
* MANDATORY: Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
224 |
-
* @var integer Signed 64-bit
|
225 |
-
*/
|
226 |
-
private $_payerRefInsuranceId;
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Client's note
|
230 |
-
* MANDATORY: NO
|
231 |
-
* @var string
|
232 |
-
*/
|
233 |
-
private $_noteClient;
|
234 |
-
|
235 |
-
/**
|
236 |
-
* Card/Coupon/Voucher number for fixed discount
|
237 |
-
* MANDATORY: NO
|
238 |
-
* @var FixedDiscountCardId
|
239 |
-
*/
|
240 |
-
private $_discCalc;
|
241 |
-
|
242 |
-
/**
|
243 |
-
* ID of the client who is to receive the return receipt and/or the return documents.
|
244 |
-
* If payer is "third party" then this client has to be payer's contract member.
|
245 |
-
* Otherwise the client has to be sender's contract member.
|
246 |
-
* MANDATORY: NO
|
247 |
-
* @var integer Signed 64-bit
|
248 |
-
*/
|
249 |
-
private $_retToClientId;
|
250 |
-
|
251 |
-
/**
|
252 |
-
* An optional reference code.
|
253 |
-
* Maximum 30 symbols
|
254 |
-
* MANDATORY: NO
|
255 |
-
* @var string
|
256 |
-
*/
|
257 |
-
private $_ref1;
|
258 |
-
|
259 |
-
/**
|
260 |
-
* An optional reference code.
|
261 |
-
* Maximum 30 symbols
|
262 |
-
* MANDATORY: NO
|
263 |
-
* @var string
|
264 |
-
*/
|
265 |
-
private $_ref2;
|
266 |
-
|
267 |
-
/**
|
268 |
-
* An optional value used to identify user's client software.
|
269 |
-
* Please verify the allowed values with Speedy's IT Department.
|
270 |
-
* MANDATORY: NO
|
271 |
-
* @var integer Signed 64-bit
|
272 |
-
*/
|
273 |
-
private $_clientSystemId;
|
274 |
-
|
275 |
-
/**
|
276 |
-
* Data for parcels with explicit/fixed IDs (from the second one onward)
|
277 |
-
* The list has maximum lenght 998
|
278 |
-
* MANDATORY: NO
|
279 |
-
* @var array List of ParamParcelInfo
|
280 |
-
*/
|
281 |
-
private $_parcels;
|
282 |
-
|
283 |
-
/**
|
284 |
-
* When parcelsCount > 1 and no explicit data has been set in the parcels property during the creation,
|
285 |
-
* then parcels will be created automatically by default.
|
286 |
-
* This parameter allows users to control this behaviour.
|
287 |
-
* MANDATORY: NO
|
288 |
-
* @var boolean
|
289 |
-
*/
|
290 |
-
private $_skipAutomaticParcelsCreation;
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Specifies if the service/system should allow parcels to be added to the shipment at a later stage.
|
294 |
-
* MANDATORY: NO
|
295 |
-
* @var boolean
|
296 |
-
*/
|
297 |
-
private $_pendingParcelsDescription;
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Specifies if the service/system should allow BOL's modification at a later stage.
|
301 |
-
* MANDATORY: NO
|
302 |
-
* @var boolean
|
303 |
-
*/
|
304 |
-
private $_pendingShipmentDescription;
|
305 |
-
|
306 |
-
/**
|
307 |
-
* Set BOL number
|
308 |
-
* @param integer $billOfLading Signed 64-bit
|
309 |
-
*/
|
310 |
-
public function setBillOfLading($billOfLading) {
|
311 |
-
$this->_billOfLading = $billOfLading;
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Get BOL number
|
316 |
-
* @return integer Signed 64-bit
|
317 |
-
*/
|
318 |
-
public function getBillOfLading() {
|
319 |
-
return $this->_billOfLading;
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Set date for shipment pick-up (the "time" component is ignored).
|
324 |
-
* @param date $takingDate
|
325 |
-
*/
|
326 |
-
public function setTakingDate($takingDate) {
|
327 |
-
$this->_takingDate = $takingDate;
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Get BOL number
|
332 |
-
* @return date
|
333 |
-
*/
|
334 |
-
public function getTakingDate() {
|
335 |
-
return $this->_takingDate;
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Set courier service type ID
|
340 |
-
* @param integer $serviceTypeId Signed 64-bit
|
341 |
-
*/
|
342 |
-
public function setServiceTypeId($serviceTypeId) {
|
343 |
-
$this->_serviceTypeId = $serviceTypeId;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Get courier service type ID
|
348 |
-
* @return integer Signed 64-bit
|
349 |
-
*/
|
350 |
-
public function getServiceTypeId() {
|
351 |
-
return $this->_serviceTypeId;
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Set ID of an office "to be called"
|
356 |
-
* @param integer $officeToBeCalledId Signed 64-bit
|
357 |
-
*/
|
358 |
-
public function setOfficeToBeCalledId($officeToBeCalledId) {
|
359 |
-
$this->_officeToBeCalledId = $officeToBeCalledId;
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Get ID of an office "to be called"
|
364 |
-
* @return integer Signed 64-bit
|
365 |
-
*/
|
366 |
-
public function getOfficeToBeCalledId() {
|
367 |
-
return $this->_officeToBeCalledId;
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Set fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
372 |
-
* @param integer $fixedTimeDelivery Signed 16-bit
|
373 |
-
*/
|
374 |
-
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
375 |
-
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Get fixed time for delivery
|
380 |
-
* @return integer Signed 16-bit
|
381 |
-
*/
|
382 |
-
public function getFixedTimeDelivery() {
|
383 |
-
return $this->_fixedTimeDelivery;
|
384 |
-
}
|
385 |
-
|
386 |
-
/**
|
387 |
-
* Set working days to postpone the shipment delivery. Allowe values are 1 or 2
|
388 |
-
* @param integer $deferredDeliveryWorkDays Signed 32-bit
|
389 |
-
*/
|
390 |
-
public function setDeferredDeliveryWorkDays($deferredDeliveryWorkDays) {
|
391 |
-
$this->_deferredDeliveryWorkDays = $deferredDeliveryWorkDays;
|
392 |
-
}
|
393 |
-
|
394 |
-
/**
|
395 |
-
* Get working days to postpone the shipment delivery
|
396 |
-
* @return integer Signed 32-bit
|
397 |
-
*/
|
398 |
-
public function getDeferredDeliveryWorkDays() {
|
399 |
-
return $this->_deferredDeliveryWorkDays;
|
400 |
-
}
|
401 |
-
|
402 |
-
/**
|
403 |
-
* Set "request for return documents" flag for shipment
|
404 |
-
* @param boolean $backDocumentsRequest
|
405 |
-
*/
|
406 |
-
public function setBackDocumentsRequest($backDocumentsRequest) {
|
407 |
-
$this->_backDocumentsRequest = $backDocumentsRequest;
|
408 |
-
}
|
409 |
-
|
410 |
-
/**
|
411 |
-
* Check "request for return documents" flag for shipment
|
412 |
-
* @return boolean
|
413 |
-
*/
|
414 |
-
public function isBackDocumentsRequest() {
|
415 |
-
return $this->_backDocumentsRequest;
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Set "request for return receipt" flag for shipment
|
420 |
-
* @param boolean $backReceiptRequest
|
421 |
-
*/
|
422 |
-
public function setBackReceiptRequest($backReceiptRequest) {
|
423 |
-
$this->_backReceiptRequest = $backReceiptRequest;
|
424 |
-
}
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Check "request for return receipt" flag for shipment
|
428 |
-
* @return boolean
|
429 |
-
*/
|
430 |
-
public function isBackReceiptRequest() {
|
431 |
-
return $this->_backReceiptRequest;
|
432 |
-
}
|
433 |
-
|
434 |
-
/**
|
435 |
-
* Set "bring to office" flag for shipment
|
436 |
-
* @param boolean $willBringToOffice
|
437 |
-
*/
|
438 |
-
public function setWillBringToOffice($willBringToOffice) {
|
439 |
-
$this->_willBringToOffice = $willBringToOffice;
|
440 |
-
}
|
441 |
-
|
442 |
-
/**
|
443 |
-
* Check "bring to office" flag for shipment
|
444 |
-
* @return boolean
|
445 |
-
*/
|
446 |
-
public function getWillBringToOffice() {
|
447 |
-
return $this->_willBringToOffice;
|
448 |
-
}
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Set "bring to office" id
|
452 |
-
* @since 1.3
|
453 |
-
* @param Signed 64-bit $willBringToOfficeId
|
454 |
-
*/
|
455 |
-
public function setWillBringToOfficeId($willBringToOfficeId) {
|
456 |
-
$this->_willBringToOfficeId = $willBringToOfficeId;
|
457 |
-
}
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Get "bring to office" id
|
461 |
-
* @since 1.3
|
462 |
-
* @return Signed 64-bit
|
463 |
-
*/
|
464 |
-
public function getWillBringToOfficeId() {
|
465 |
-
return $this->_willBringToOfficeId;
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* Set shipment insurance value (if the shipment is insured).
|
470 |
-
* @param double $amountInsuranceBase Signed 64-bit
|
471 |
-
*/
|
472 |
-
public function setAmountInsuranceBase($amountInsuranceBase) {
|
473 |
-
$this->_amountInsuranceBase = $amountInsuranceBase;
|
474 |
-
}
|
475 |
-
|
476 |
-
/**
|
477 |
-
* Get shipment insurance value
|
478 |
-
* @return double Signed 64-bit
|
479 |
-
*/
|
480 |
-
public function getAmountInsuranceBase() {
|
481 |
-
return $this->_amountInsuranceBase;
|
482 |
-
}
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Set cash-on-Delivery (COD) amount.
|
486 |
-
* @param double $amountCodBase Signed 64-bit
|
487 |
-
*/
|
488 |
-
public function setAmountCodBase($amountCodBase) {
|
489 |
-
$this->_amountCodBase = $amountCodBase;
|
490 |
-
}
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Get cash-on-Delivery (COD) amount.
|
494 |
-
* @return double Signed 64-bit
|
495 |
-
*/
|
496 |
-
public function getAmountCodBase() {
|
497 |
-
return $this->_amountCodBase;
|
498 |
-
}
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Set flag for COD value to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
502 |
-
* @param boolean $payCodToThirdParty
|
503 |
-
*/
|
504 |
-
public function setPayCodToThirdParty($payCodToThirdParty) {
|
505 |
-
$this->_payCodToThirdParty = $payCodToThirdParty;
|
506 |
-
}
|
507 |
-
|
508 |
-
/**
|
509 |
-
* Check flag for COD value to be paid to a third party
|
510 |
-
* @return boolean
|
511 |
-
*/
|
512 |
-
public function isPayCodToThirdParty() {
|
513 |
-
return $this->_payCodToThirdParty;
|
514 |
-
}
|
515 |
-
|
516 |
-
/**
|
517 |
-
* Set return money-transfer request amount
|
518 |
-
* @param double $retMoneyTransferReqAmount Signed 64-bit
|
519 |
-
*/
|
520 |
-
public function setRetMoneyTransferReqAmount($retMoneyTransferReqAmount) {
|
521 |
-
$this->_retMoneyTransferReqAmount = $retMoneyTransferReqAmount;
|
522 |
-
}
|
523 |
-
|
524 |
-
/**
|
525 |
-
* Get return money-transfer request amount
|
526 |
-
* @return double Signed 64-bit
|
527 |
-
*/
|
528 |
-
public function getRetMoneyTransferReqAmount() {
|
529 |
-
return $this->_retMoneyTransferReqAmount;
|
530 |
-
}
|
531 |
-
|
532 |
-
/**
|
533 |
-
* Set parcels count. Maximum value is 999
|
534 |
-
* @param integer $parcelsCount Signed 32-bit
|
535 |
-
*/
|
536 |
-
public function setParcelsCount($parcelsCount) {
|
537 |
-
$this->_parcelsCount = $parcelsCount;
|
538 |
-
}
|
539 |
-
|
540 |
-
/**
|
541 |
-
* Get parcels count
|
542 |
-
* @return integer Signed 32-bit
|
543 |
-
*/
|
544 |
-
public function getParcelsCount() {
|
545 |
-
return $this->_parcelsCount;
|
546 |
-
}
|
547 |
-
|
548 |
-
/**
|
549 |
-
* Set size of shipment
|
550 |
-
* @param Size $size
|
551 |
-
*/
|
552 |
-
public function setSize($size) {
|
553 |
-
$this->_size = $size;
|
554 |
-
}
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Get size of shipment
|
558 |
-
* @return Size
|
559 |
-
*/
|
560 |
-
public function getSize() {
|
561 |
-
return $this->_size;
|
562 |
-
}
|
563 |
-
|
564 |
-
/**
|
565 |
-
* Set declared weight (the greater of "volume" and "real" weight values). Maximum value is 100.00
|
566 |
-
* @param double $weightDeclared Signed 64-bit
|
567 |
-
*/
|
568 |
-
public function setWeightDeclared($weightDeclared) {
|
569 |
-
$this->_weightDeclared = $weightDeclared;
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* Get declared weight
|
574 |
-
* @return double Signed 64-bit
|
575 |
-
*/
|
576 |
-
public function getWeightDeclared() {
|
577 |
-
return $this->_weightDeclared;
|
578 |
-
}
|
579 |
-
|
580 |
-
/**
|
581 |
-
* Set contents. Max text size - 50 symbols
|
582 |
-
* @param string $contents
|
583 |
-
*/
|
584 |
-
public function setContents($contents) {
|
585 |
-
$this->_contents = $contents;
|
586 |
-
}
|
587 |
-
|
588 |
-
/**
|
589 |
-
* Get contents.
|
590 |
-
* @return string
|
591 |
-
*/
|
592 |
-
public function getContents() {
|
593 |
-
return $this->_contents;
|
594 |
-
}
|
595 |
-
|
596 |
-
/**
|
597 |
-
* Set contents. Max text size - 50 symbols
|
598 |
-
* @param string $packing
|
599 |
-
*/
|
600 |
-
public function setPacking($packing) {
|
601 |
-
$this->_packing = $packing;
|
602 |
-
}
|
603 |
-
|
604 |
-
/**
|
605 |
-
* Get contents.
|
606 |
-
* @return string
|
607 |
-
*/
|
608 |
-
public function getPacking() {
|
609 |
-
return $this->_packing;
|
610 |
-
}
|
611 |
-
|
612 |
-
/**
|
613 |
-
* Set packing ID (number)
|
614 |
-
* @param integer $packId Signed 64-bit
|
615 |
-
*/
|
616 |
-
public function setPackId($packId) {
|
617 |
-
$this->_packId = $packId;
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* Get packing ID (number).
|
622 |
-
* @return integer Signed 64-bit
|
623 |
-
*/
|
624 |
-
public function getPackId() {
|
625 |
-
return $this->_packId;
|
626 |
-
}
|
627 |
-
|
628 |
-
/**
|
629 |
-
* Set flag whether shipment consists of documents
|
630 |
-
* @param boolean $documents
|
631 |
-
*/
|
632 |
-
public function setDocuments($documents) {
|
633 |
-
$this->_documents = $documents;
|
634 |
-
}
|
635 |
-
|
636 |
-
/**
|
637 |
-
* Check whether shipment consists if documents
|
638 |
-
* @return boolean
|
639 |
-
*/
|
640 |
-
public function isDocuments() {
|
641 |
-
return $this->_documents;
|
642 |
-
}
|
643 |
-
|
644 |
-
/**
|
645 |
-
* Set flag whether shipment is fragile - necessary when the price of insurance is being calculated
|
646 |
-
* @param boolean $fragile
|
647 |
-
*/
|
648 |
-
public function setFragile($fragile) {
|
649 |
-
$this->_fragile = $fragile;
|
650 |
-
}
|
651 |
-
|
652 |
-
/**
|
653 |
-
* Check whether shipment is fragile
|
654 |
-
* @return boolean
|
655 |
-
*/
|
656 |
-
public function isFragile() {
|
657 |
-
return $this->_fragile;
|
658 |
-
}
|
659 |
-
|
660 |
-
/**
|
661 |
-
* Set flag whether shipment is palletized
|
662 |
-
* @param boolean $palletized
|
663 |
-
*/
|
664 |
-
public function setPalletized($palletized) {
|
665 |
-
$this->_palletized = $palletized;
|
666 |
-
}
|
667 |
-
|
668 |
-
/**
|
669 |
-
* Check whether shipment is palletized
|
670 |
-
* @return boolean
|
671 |
-
*/
|
672 |
-
public function isPalletized() {
|
673 |
-
return $this->_palletized;
|
674 |
-
}
|
675 |
-
|
676 |
-
/**
|
677 |
-
* Set data for the sender
|
678 |
-
* @param ParamClientData $sender
|
679 |
-
*/
|
680 |
-
public function setSender($sender) {
|
681 |
-
$this->_sender = $sender;
|
682 |
-
}
|
683 |
-
|
684 |
-
/**
|
685 |
-
* Get data for the sender
|
686 |
-
* @return ParamClientData
|
687 |
-
*/
|
688 |
-
public function getSender() {
|
689 |
-
return $this->_sender;
|
690 |
-
}
|
691 |
-
|
692 |
-
/**
|
693 |
-
* Set data for the receiver
|
694 |
-
* @param ParamClientData $receiver
|
695 |
-
*/
|
696 |
-
public function setReceiver($receiver) {
|
697 |
-
$this->_receiver = $receiver;
|
698 |
-
}
|
699 |
-
|
700 |
-
/**
|
701 |
-
* Get data for the receiver
|
702 |
-
* @return ParamClientData
|
703 |
-
*/
|
704 |
-
public function getReceiver() {
|
705 |
-
return $this->_receiver;
|
706 |
-
}
|
707 |
-
|
708 |
-
/**
|
709 |
-
* Set payer type (0=sender, 1=receiver or 2=third party)
|
710 |
-
* @param integer $payerType Signed 32-bit
|
711 |
-
*/
|
712 |
-
public function setPayerType($payerType) {
|
713 |
-
$this->_payerType = $payerType;
|
714 |
-
}
|
715 |
-
|
716 |
-
/**
|
717 |
-
* Get payer type (0=sender, 1=receiver or 2=third party)
|
718 |
-
* @return integer Signed 32-bit
|
719 |
-
*/
|
720 |
-
public function getPayerType() {
|
721 |
-
return $this->_payerType;
|
722 |
-
}
|
723 |
-
|
724 |
-
/**
|
725 |
-
* Set payer ID
|
726 |
-
* @param integer $payerRefId Signed 64-bit
|
727 |
-
*/
|
728 |
-
public function setPayerRefId($payerRefId) {
|
729 |
-
$this->_payerRefId = $payerRefId;
|
730 |
-
}
|
731 |
-
|
732 |
-
/**
|
733 |
-
* Get payer ID
|
734 |
-
* @return integer Signed 64-bit
|
735 |
-
*/
|
736 |
-
public function getPayerRefId() {
|
737 |
-
return $this->_payerRefId;
|
738 |
-
}
|
739 |
-
|
740 |
-
/**
|
741 |
-
* Set insurance payer type (0=sender, 1=reciever or 2=third party)
|
742 |
-
* @param integer $payerTypeInsurance Signed 32-bit
|
743 |
-
*/
|
744 |
-
public function setPayerTypeInsurance($payerTypeInsurance) {
|
745 |
-
$this->_payerTypeInsurance = $payerTypeInsurance;
|
746 |
-
}
|
747 |
-
|
748 |
-
/**
|
749 |
-
* Get insurance payer type
|
750 |
-
* @return integer Signed 32-bit
|
751 |
-
*/
|
752 |
-
public function getPayerTypeInsurance() {
|
753 |
-
return $this->_payerTypeInsurance;
|
754 |
-
}
|
755 |
-
|
756 |
-
/**
|
757 |
-
* Set insurance payer ID
|
758 |
-
* @param integer $payerRefInsuranceId Signed 64-bit
|
759 |
-
*/
|
760 |
-
public function setPayerRefInsuranceId($payerRefInsuranceId) {
|
761 |
-
$this->_payerRefInsuranceId = $payerRefInsuranceId;
|
762 |
-
}
|
763 |
-
|
764 |
-
/**
|
765 |
-
* Get insurance payer ID
|
766 |
-
* @return integer Signed 64-bit
|
767 |
-
*/
|
768 |
-
public function getPayerRefInsuranceId() {
|
769 |
-
return $this->_payerRefInsuranceId;
|
770 |
-
}
|
771 |
-
|
772 |
-
/**
|
773 |
-
* Set client's note
|
774 |
-
* @param string $noteClient
|
775 |
-
*/
|
776 |
-
public function setNoteClient($noteClient) {
|
777 |
-
$this->_noteClient = $noteClient;
|
778 |
-
}
|
779 |
-
|
780 |
-
/**
|
781 |
-
* Get client's note
|
782 |
-
* @return string
|
783 |
-
*/
|
784 |
-
public function getNoteClient() {
|
785 |
-
return $this->_noteClient;
|
786 |
-
}
|
787 |
-
|
788 |
-
/**
|
789 |
-
* Set card/coupon/voucher number for fixed discount
|
790 |
-
* @param FixedDiscountCardId $discCalc
|
791 |
-
*/
|
792 |
-
public function setDiscCalc($discCalc) {
|
793 |
-
$this->_discCalc = $discCalc;
|
794 |
-
}
|
795 |
-
|
796 |
-
/**
|
797 |
-
* Get card/coupon/voucher number for fixed discount
|
798 |
-
* @return FixedDiscountCardId
|
799 |
-
*/
|
800 |
-
public function getDiscCalc() {
|
801 |
-
return $this->_discCalc;
|
802 |
-
}
|
803 |
-
|
804 |
-
/**
|
805 |
-
* Set ID of the client who is to receive the return receipt and/or the return documents.
|
806 |
-
* If payer is "third party" then this client has to be payer's contract member.
|
807 |
-
* Otherwise the client has to be sender's contract member.
|
808 |
-
* @param integer $retToClientId Signed 64-bit
|
809 |
-
*/
|
810 |
-
public function setRetToClientId($retToClientId) {
|
811 |
-
$this->_retToClientId = $retToClientId;
|
812 |
-
}
|
813 |
-
|
814 |
-
/**
|
815 |
-
* Get ID of the client who is to receive the return receipt and/or the return documents.
|
816 |
-
* @return integer Signed 64-bit
|
817 |
-
*/
|
818 |
-
public function getRetToClientId() {
|
819 |
-
return $this->_retToClientId;
|
820 |
-
}
|
821 |
-
|
822 |
-
/**
|
823 |
-
* Set optional reference code. Maximum 30 symbols.
|
824 |
-
* @param string $ref1
|
825 |
-
*/
|
826 |
-
public function setRef1($ref1) {
|
827 |
-
$this->_ref1 = $ref1;
|
828 |
-
}
|
829 |
-
|
830 |
-
/**
|
831 |
-
* Get optional reference code. Maximum 30 symbols.
|
832 |
-
* @return string
|
833 |
-
*/
|
834 |
-
public function getRef1() {
|
835 |
-
return $this->_ref1;
|
836 |
-
}
|
837 |
-
|
838 |
-
/**
|
839 |
-
* Set optional reference code 2. Maximum 30 symbols.
|
840 |
-
* @param string $ref2
|
841 |
-
*/
|
842 |
-
public function setRef2($ref2) {
|
843 |
-
$this->_ref2 = $ref2;
|
844 |
-
}
|
845 |
-
|
846 |
-
/**
|
847 |
-
* Get optional reference code 2. Maximum 30 symbols.
|
848 |
-
* @return string
|
849 |
-
*/
|
850 |
-
public function getRef2() {
|
851 |
-
return $this->_ref2;
|
852 |
-
}
|
853 |
-
|
854 |
-
/**
|
855 |
-
* Set optional value used to identify user's client software.
|
856 |
-
* @param integer $clientSystemId Signed 64-bit
|
857 |
-
*/
|
858 |
-
public function setClientSystemId($clientSystemId) {
|
859 |
-
$this->_clientSystemId = $clientSystemId;
|
860 |
-
}
|
861 |
-
|
862 |
-
/**
|
863 |
-
* Get optional value used to identify user's client software.
|
864 |
-
* @return integer Signed 64-bit
|
865 |
-
*/
|
866 |
-
public function getClientSystemId() {
|
867 |
-
return $this->_clientSystemId;
|
868 |
-
}
|
869 |
-
|
870 |
-
/**
|
871 |
-
* Set data for parcels with explicit/fixed IDs (from the second one onward)
|
872 |
-
* @param array $parcels List of ParamParcelInfo
|
873 |
-
*/
|
874 |
-
public function setParcels($parcels) {
|
875 |
-
$this->_parcels = $parcels;
|
876 |
-
}
|
877 |
-
|
878 |
-
/**
|
879 |
-
* Get data for parcels with explicit/fixed IDs (from the second one onward)
|
880 |
-
* @return array List of ParamParcelInfo
|
881 |
-
*/
|
882 |
-
public function getParcels() {
|
883 |
-
return $this->_parcels;
|
884 |
-
}
|
885 |
-
|
886 |
-
/**
|
887 |
-
* Set flag to set or not explicit data on processing parcels with sequence number > 1
|
888 |
-
* @param boolean $skipAutomaticParcelsCreation
|
889 |
-
*/
|
890 |
-
public function setSkipAutomaticParcelsCreation($skipAutomaticParcelsCreation) {
|
891 |
-
$this->_skipAutomaticParcelsCreation = $skipAutomaticParcelsCreation;
|
892 |
-
}
|
893 |
-
|
894 |
-
/**
|
895 |
-
* Check flag to set or not explicit data on processing parcels with sequence number > 1
|
896 |
-
* @return boolean
|
897 |
-
*/
|
898 |
-
public function isSkipAutomaticParcelsCreation() {
|
899 |
-
return $this->_skipAutomaticParcelsCreation;
|
900 |
-
}
|
901 |
-
|
902 |
-
/**
|
903 |
-
* Set flag service/system to allow parcels to be added to the shipment at a later stage
|
904 |
-
* @param boolean $pendingParcelsDescription
|
905 |
-
*/
|
906 |
-
public function setPendingParcelsDescription($pendingParcelsDescription) {
|
907 |
-
$this->_pendingParcelsDescription = $pendingParcelsDescription;
|
908 |
-
}
|
909 |
-
|
910 |
-
/**
|
911 |
-
* Check whether service/system to allow parcels to be added to the shipment at a later stage
|
912 |
-
* @return boolean
|
913 |
-
*/
|
914 |
-
public function isPendingParcelsDescription() {
|
915 |
-
return $this->_pendingParcelsDescription;
|
916 |
-
}
|
917 |
-
|
918 |
-
/**
|
919 |
-
* Set flag the service/system to allow BOL's modification at a later stage.
|
920 |
-
* @param boolean $pendingShipmentDescription
|
921 |
-
*/
|
922 |
-
public function setPendingShipmentDescription($pendingShipmentDescription) {
|
923 |
-
$this->_pendingShipmentDescription = $pendingShipmentDescription;
|
924 |
-
}
|
925 |
-
|
926 |
-
/**
|
927 |
-
* Check whether the service/system should allow BOL's modification at a later stage.
|
928 |
-
* @return boolean
|
929 |
-
*/
|
930 |
-
public function isPendingShipmentDescription() {
|
931 |
-
return $this->_pendingShipmentDescription;
|
932 |
-
}
|
933 |
-
|
934 |
-
/**
|
935 |
-
* Return standard class from this class
|
936 |
-
* @return stdClass
|
937 |
-
*/
|
938 |
-
public function toStdClass() {
|
939 |
-
$stdClass = new stdClass();
|
940 |
-
$stdClass->billOfLading = $this->_billOfLading;
|
941 |
-
$stdClass->takingDate = $this->_takingDate;
|
942 |
-
$stdClass->serviceTypeId = $this->_serviceTypeId;
|
943 |
-
$stdClass->officeToBeCalledId = $this->_officeToBeCalledId;
|
944 |
-
$stdClass->fixedTimeDelivery = $this->_fixedTimeDelivery;
|
945 |
-
$stdClass->deferredDeliveryWorkDays = $this->_deferredDeliveryWorkDays;
|
946 |
-
$stdClass->backDocumentsRequest = $this->_backDocumentsRequest;
|
947 |
-
$stdClass->backReceiptRequest = $this->_backReceiptRequest;
|
948 |
-
$stdClass->willBringToOffice = $this->_willBringToOffice;
|
949 |
-
$stdClass->willBringToOfficeId
|
950 |
-
$stdClass->amountInsuranceBase = $this->_amountInsuranceBase;
|
951 |
-
$stdClass->amountCodBase = $this->_amountCodBase;
|
952 |
-
$stdClass->payCodToThirdParty = $this->_payCodToThirdParty;
|
953 |
-
$stdClass->retMoneyTransferReqAmount = $this->_retMoneyTransferReqAmount;
|
954 |
-
$stdClass->parcelsCount = $this->_parcelsCount;
|
955 |
-
if (isset($this->_size)) {
|
956 |
-
$stdClass->size = $this->_size->toStdClass();
|
957 |
-
}
|
958 |
-
$stdClass->weightDeclared = $this->_weightDeclared;
|
959 |
-
$stdClass->contents = $this->_contents;
|
960 |
-
$stdClass->packing = $this->_packing;
|
961 |
-
$stdClass->packId = $this->_packId;
|
962 |
-
$stdClass->documents = $this->_documents;
|
963 |
-
$stdClass->fragile = $this->_fragile;
|
964 |
-
$stdClass->palletized = $this->_palletized;
|
965 |
-
if (isset($this->_sender)) {
|
966 |
-
$stdClass->sender = $this->_sender->toStdClass();
|
967 |
-
}
|
968 |
-
if (isset($this->_receiver)) {
|
969 |
-
$stdClass->receiver = $this->_receiver->toStdClass();
|
970 |
-
}
|
971 |
-
$stdClass->payerType = $this->_payerType;
|
972 |
-
$stdClass->payerRefId = $this->_payerRefId;
|
973 |
-
$stdClass->payerTypeInsurance = $this->_payerTypeInsurance;
|
974 |
-
$stdClass->payerRefInsuranceId = $this->_payerRefInsuranceId;
|
975 |
-
$stdClass->noteClient = $this->_noteClient;
|
976 |
-
if (isset($this->_discCalc)) {
|
977 |
-
$stdClass->discCalc = $this->_discCalc->toStdClass();
|
978 |
-
}
|
979 |
-
$stdClass->retToClientId = $this->_retToClientId;
|
980 |
-
$stdClass->ref1 = $this->_ref1;
|
981 |
-
$stdClass->ref2 = $this->_ref2;
|
982 |
-
$stdClass->clientSystemId = $this->_clientSystemId;
|
983 |
-
$arrStdClassParamParcelInfo = array();
|
984 |
-
if (isset($this->_parcels)) {
|
985 |
-
if (is_array($this->_parcels)) {
|
986 |
-
for($i = 0; $i < count($this->_parcels); $i++) {
|
987 |
-
$arrStdClassParamParcelInfo[$i] = $this->_parcels[$i]->toStdClass();
|
988 |
-
}
|
989 |
-
} else {
|
990 |
-
$arrStdClassParamParcelInfo[0] = $this->_parcels->toStdClass();
|
991 |
-
}
|
992 |
-
}
|
993 |
-
$stdClass->parcels = $arrStdClassParamParcelInfo;
|
994 |
-
$stdClass->skipAutomaticParcelsCreation = $this->_skipAutomaticParcelsCreation;
|
995 |
-
$stdClass->pendingParcelsDescription = $this->_pendingParcelsDescription;
|
996 |
-
$stdClass->pendingShipmentDescription = $this->_pendingShipmentDescription;
|
997 |
-
return $stdClass;
|
998 |
-
}
|
999 |
-
}
|
1000 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'Size.class.php';
|
4 |
+
require_once 'ParamClientData.class.php';
|
5 |
+
require_once 'FixedDiscountCardId.class.php';
|
6 |
+
require_once 'ParamParcelInfo.class.php';
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Instances of this class are passed as a parameter of Speedy web service calls for calclualation and registration
|
10 |
+
* @since 1.0
|
11 |
+
*/
|
12 |
+
class ParamPicking {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* BOL number
|
16 |
+
* MANDATORY: Only for updateBillOfLading. Null otherwise
|
17 |
+
* @var integer Signed 64-bit
|
18 |
+
*/
|
19 |
+
private $_billOfLading;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The date for shipment pick-up (the "time" component is ignored). Default value is "today".
|
23 |
+
* MANDATORY: NO
|
24 |
+
* @var date
|
25 |
+
*/
|
26 |
+
private $_takingDate;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Courier service type ID
|
30 |
+
* MANDATORY: YES
|
31 |
+
* @var integer Signed 64-bit
|
32 |
+
*/
|
33 |
+
private $_serviceTypeId;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* ID of an office "to be called"
|
37 |
+
* MANDATORY: Only for "to be called" pickings
|
38 |
+
* @var integer Signed 64-bit
|
39 |
+
*/
|
40 |
+
private $_officeToBeCalledId;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
44 |
+
* MANDATORY: Depending on the courier service, this property could be required, allowed or banned
|
45 |
+
* @var integer Signed 16-bit
|
46 |
+
*/
|
47 |
+
private $_fixedTimeDelivery;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* In some rare cases users might prefer the delivery to be deferred by a day or two.
|
51 |
+
* This parameter allows users to specify by how many (working) days they would like to postpone the shipment delivery.
|
52 |
+
* Max 2 days
|
53 |
+
* MANDATORY: No
|
54 |
+
* @var integer Signed 32-bit
|
55 |
+
*/
|
56 |
+
private $_deferredDeliveryWorkDays;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Specifies if the shipment has a "request for return documents"
|
60 |
+
* MANDATORY: YES
|
61 |
+
* @var boolean
|
62 |
+
*/
|
63 |
+
private $_backDocumentsRequest;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Specifies if the shipment has a "request for return receipt"
|
67 |
+
* MANDATORY: YES
|
68 |
+
* @var boolean
|
69 |
+
*/
|
70 |
+
private $_backReceiptRequest;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Specifies if the sender intends to deliver the shipment to a Speedy office by him/herself instead of ordering a visit by courier
|
74 |
+
* MANDATORY: YES
|
75 |
+
* @var boolean
|
76 |
+
*/
|
77 |
+
private $_willBringToOffice;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Specifies the specific Speedy office, where the sender intends to deliver the shipment by him/herself.
|
81 |
+
* If willBringToOfficeId is provided, willBringToOffice flag is considered "true", regardless the value provided.
|
82 |
+
* If willBringToOfficeId is not provied (0 or null) and willBringToOffice flag is "true",
|
83 |
+
* willBringToOfficeId is automatically set with default value configured for caller user profile.
|
84 |
+
* The default willBringToOfficeId value could be managed using profile configuration page in client's Speedy web site.
|
85 |
+
* MANDATORY: NO
|
86 |
+
* @since 1.3
|
87 |
+
* @var integer Signed 64-bit
|
88 |
+
*/
|
89 |
+
private $_willBringToOfficeId;
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Shipment insurance value (if the shipment is insured).
|
93 |
+
* The value is limited depending on user's permissions and Speedy's current policy
|
94 |
+
* MANDATORY: NO
|
95 |
+
* @var double Signed 64-bit
|
96 |
+
*/
|
97 |
+
private $_amountInsuranceBase;
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Cash-on-Delivery (COD) amount.
|
101 |
+
* The value is limited depending on user's permissions and Speedy's current policy
|
102 |
+
* MANDATORY: NO
|
103 |
+
* @var double Signed 64-bit
|
104 |
+
*/
|
105 |
+
private $_amountCodBase;
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Specifies if the COD value is to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
109 |
+
* MANDATORY: NO
|
110 |
+
* @var boolean
|
111 |
+
*/
|
112 |
+
private $_payCodToThirdParty;
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Return money-transfer request amount
|
116 |
+
* The value is limited depending on user's permissions and Speedy's current policy
|
117 |
+
* MANDATORY: NO
|
118 |
+
* @var double Signed 64-bit
|
119 |
+
*/
|
120 |
+
private $_retMoneyTransferReqAmount;
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Parcels count. Maximum value is 999.
|
124 |
+
* MANDATORY: YES
|
125 |
+
* @var integer Signed 32-bit
|
126 |
+
*/
|
127 |
+
private $_parcelsCount;
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Size of shipment
|
131 |
+
* MANDATORY: NO
|
132 |
+
* @var Size
|
133 |
+
*/
|
134 |
+
private $_size;
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Declared weight (the greater of "volume" and "real" weight values).
|
138 |
+
* Maximum value is 100.00
|
139 |
+
* MANDATORY: YES
|
140 |
+
* @var double Signed 64-bit
|
141 |
+
*/
|
142 |
+
private $_weightDeclared;
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Contents. Max text size - 50 symbols
|
146 |
+
* MANDATORY: YES
|
147 |
+
* @var string
|
148 |
+
*/
|
149 |
+
private $_contents;
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Packing
|
153 |
+
* MANDATORY: YES
|
154 |
+
* @var string
|
155 |
+
*/
|
156 |
+
private $_packing;
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Packing ID (number)
|
160 |
+
* MANDATORY: NO
|
161 |
+
* @var integer Signed 64-bit
|
162 |
+
*/
|
163 |
+
private $_packId;
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Specifies whether the shipment consists of documents
|
167 |
+
* MANDATORY: YES
|
168 |
+
* @var boolean
|
169 |
+
*/
|
170 |
+
private $_documents;
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Specifies whether the shipment is fragile - necessary when the price of insurance is being calculated
|
174 |
+
* MANDATORY: YES
|
175 |
+
* @var boolean
|
176 |
+
*/
|
177 |
+
private $_fragile;
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Specifies whether the shipment is palletized
|
181 |
+
* MANDATORY: YES
|
182 |
+
* @var boolean
|
183 |
+
*/
|
184 |
+
private $_palletized;
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Data for the sender
|
188 |
+
* MANDATORY: YES
|
189 |
+
* @var ParamClientData
|
190 |
+
*/
|
191 |
+
private $_sender;
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Data for the receiver
|
195 |
+
* MANDATORY: YES
|
196 |
+
* @var ParamClientData
|
197 |
+
*/
|
198 |
+
private $_receiver;
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Payer type (0=sender, 1=receiver or 2=third party)
|
202 |
+
* MANDATORY: YES
|
203 |
+
* @var integer Signed 32-bit
|
204 |
+
*/
|
205 |
+
private $_payerType;
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Payer ID.
|
209 |
+
* MANDATORY: Must be set <=> payer is "third party".
|
210 |
+
* @var integer Signed 64-bit
|
211 |
+
*/
|
212 |
+
private $_payerRefId;
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Insurance payer type (0=sender, 1=reciever or 2=third party)
|
216 |
+
* MANDATORY: Must be set <=> shipment is insured (i.e. amountInsuranceBase > 0).
|
217 |
+
* @var integer Signed 32-bit
|
218 |
+
*/
|
219 |
+
private $_payerTypeInsurance;
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Insurance payer ID
|
223 |
+
* MANDATORY: Must be set <=> shipment has insurance (i.e. amountInsuranceBase > 0) and it is payed by a "third party".
|
224 |
+
* @var integer Signed 64-bit
|
225 |
+
*/
|
226 |
+
private $_payerRefInsuranceId;
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Client's note
|
230 |
+
* MANDATORY: NO
|
231 |
+
* @var string
|
232 |
+
*/
|
233 |
+
private $_noteClient;
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Card/Coupon/Voucher number for fixed discount
|
237 |
+
* MANDATORY: NO
|
238 |
+
* @var FixedDiscountCardId
|
239 |
+
*/
|
240 |
+
private $_discCalc;
|
241 |
+
|
242 |
+
/**
|
243 |
+
* ID of the client who is to receive the return receipt and/or the return documents.
|
244 |
+
* If payer is "third party" then this client has to be payer's contract member.
|
245 |
+
* Otherwise the client has to be sender's contract member.
|
246 |
+
* MANDATORY: NO
|
247 |
+
* @var integer Signed 64-bit
|
248 |
+
*/
|
249 |
+
private $_retToClientId;
|
250 |
+
|
251 |
+
/**
|
252 |
+
* An optional reference code.
|
253 |
+
* Maximum 30 symbols
|
254 |
+
* MANDATORY: NO
|
255 |
+
* @var string
|
256 |
+
*/
|
257 |
+
private $_ref1;
|
258 |
+
|
259 |
+
/**
|
260 |
+
* An optional reference code.
|
261 |
+
* Maximum 30 symbols
|
262 |
+
* MANDATORY: NO
|
263 |
+
* @var string
|
264 |
+
*/
|
265 |
+
private $_ref2;
|
266 |
+
|
267 |
+
/**
|
268 |
+
* An optional value used to identify user's client software.
|
269 |
+
* Please verify the allowed values with Speedy's IT Department.
|
270 |
+
* MANDATORY: NO
|
271 |
+
* @var integer Signed 64-bit
|
272 |
+
*/
|
273 |
+
private $_clientSystemId;
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Data for parcels with explicit/fixed IDs (from the second one onward)
|
277 |
+
* The list has maximum lenght 998
|
278 |
+
* MANDATORY: NO
|
279 |
+
* @var array List of ParamParcelInfo
|
280 |
+
*/
|
281 |
+
private $_parcels;
|
282 |
+
|
283 |
+
/**
|
284 |
+
* When parcelsCount > 1 and no explicit data has been set in the parcels property during the creation,
|
285 |
+
* then parcels will be created automatically by default.
|
286 |
+
* This parameter allows users to control this behaviour.
|
287 |
+
* MANDATORY: NO
|
288 |
+
* @var boolean
|
289 |
+
*/
|
290 |
+
private $_skipAutomaticParcelsCreation;
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Specifies if the service/system should allow parcels to be added to the shipment at a later stage.
|
294 |
+
* MANDATORY: NO
|
295 |
+
* @var boolean
|
296 |
+
*/
|
297 |
+
private $_pendingParcelsDescription;
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Specifies if the service/system should allow BOL's modification at a later stage.
|
301 |
+
* MANDATORY: NO
|
302 |
+
* @var boolean
|
303 |
+
*/
|
304 |
+
private $_pendingShipmentDescription;
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Set BOL number
|
308 |
+
* @param integer $billOfLading Signed 64-bit
|
309 |
+
*/
|
310 |
+
public function setBillOfLading($billOfLading) {
|
311 |
+
$this->_billOfLading = $billOfLading;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Get BOL number
|
316 |
+
* @return integer Signed 64-bit
|
317 |
+
*/
|
318 |
+
public function getBillOfLading() {
|
319 |
+
return $this->_billOfLading;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Set date for shipment pick-up (the "time" component is ignored).
|
324 |
+
* @param date $takingDate
|
325 |
+
*/
|
326 |
+
public function setTakingDate($takingDate) {
|
327 |
+
$this->_takingDate = $takingDate;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Get BOL number
|
332 |
+
* @return date
|
333 |
+
*/
|
334 |
+
public function getTakingDate() {
|
335 |
+
return $this->_takingDate;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Set courier service type ID
|
340 |
+
* @param integer $serviceTypeId Signed 64-bit
|
341 |
+
*/
|
342 |
+
public function setServiceTypeId($serviceTypeId) {
|
343 |
+
$this->_serviceTypeId = $serviceTypeId;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get courier service type ID
|
348 |
+
* @return integer Signed 64-bit
|
349 |
+
*/
|
350 |
+
public function getServiceTypeId() {
|
351 |
+
return $this->_serviceTypeId;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Set ID of an office "to be called"
|
356 |
+
* @param integer $officeToBeCalledId Signed 64-bit
|
357 |
+
*/
|
358 |
+
public function setOfficeToBeCalledId($officeToBeCalledId) {
|
359 |
+
$this->_officeToBeCalledId = $officeToBeCalledId;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Get ID of an office "to be called"
|
364 |
+
* @return integer Signed 64-bit
|
365 |
+
*/
|
366 |
+
public function getOfficeToBeCalledId() {
|
367 |
+
return $this->_officeToBeCalledId;
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Set fixed time for delivery ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
372 |
+
* @param integer $fixedTimeDelivery Signed 16-bit
|
373 |
+
*/
|
374 |
+
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
375 |
+
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Get fixed time for delivery
|
380 |
+
* @return integer Signed 16-bit
|
381 |
+
*/
|
382 |
+
public function getFixedTimeDelivery() {
|
383 |
+
return $this->_fixedTimeDelivery;
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Set working days to postpone the shipment delivery. Allowe values are 1 or 2
|
388 |
+
* @param integer $deferredDeliveryWorkDays Signed 32-bit
|
389 |
+
*/
|
390 |
+
public function setDeferredDeliveryWorkDays($deferredDeliveryWorkDays) {
|
391 |
+
$this->_deferredDeliveryWorkDays = $deferredDeliveryWorkDays;
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Get working days to postpone the shipment delivery
|
396 |
+
* @return integer Signed 32-bit
|
397 |
+
*/
|
398 |
+
public function getDeferredDeliveryWorkDays() {
|
399 |
+
return $this->_deferredDeliveryWorkDays;
|
400 |
+
}
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Set "request for return documents" flag for shipment
|
404 |
+
* @param boolean $backDocumentsRequest
|
405 |
+
*/
|
406 |
+
public function setBackDocumentsRequest($backDocumentsRequest) {
|
407 |
+
$this->_backDocumentsRequest = $backDocumentsRequest;
|
408 |
+
}
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Check "request for return documents" flag for shipment
|
412 |
+
* @return boolean
|
413 |
+
*/
|
414 |
+
public function isBackDocumentsRequest() {
|
415 |
+
return $this->_backDocumentsRequest;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Set "request for return receipt" flag for shipment
|
420 |
+
* @param boolean $backReceiptRequest
|
421 |
+
*/
|
422 |
+
public function setBackReceiptRequest($backReceiptRequest) {
|
423 |
+
$this->_backReceiptRequest = $backReceiptRequest;
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Check "request for return receipt" flag for shipment
|
428 |
+
* @return boolean
|
429 |
+
*/
|
430 |
+
public function isBackReceiptRequest() {
|
431 |
+
return $this->_backReceiptRequest;
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Set "bring to office" flag for shipment
|
436 |
+
* @param boolean $willBringToOffice
|
437 |
+
*/
|
438 |
+
public function setWillBringToOffice($willBringToOffice) {
|
439 |
+
$this->_willBringToOffice = $willBringToOffice;
|
440 |
+
}
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Check "bring to office" flag for shipment
|
444 |
+
* @return boolean
|
445 |
+
*/
|
446 |
+
public function getWillBringToOffice() {
|
447 |
+
return $this->_willBringToOffice;
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Set "bring to office" id
|
452 |
+
* @since 1.3
|
453 |
+
* @param Signed 64-bit $willBringToOfficeId
|
454 |
+
*/
|
455 |
+
public function setWillBringToOfficeId($willBringToOfficeId) {
|
456 |
+
$this->_willBringToOfficeId = $willBringToOfficeId;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Get "bring to office" id
|
461 |
+
* @since 1.3
|
462 |
+
* @return Signed 64-bit
|
463 |
+
*/
|
464 |
+
public function getWillBringToOfficeId() {
|
465 |
+
return $this->_willBringToOfficeId;
|
466 |
+
}
|
467 |
+
|
468 |
+
/**
|
469 |
+
* Set shipment insurance value (if the shipment is insured).
|
470 |
+
* @param double $amountInsuranceBase Signed 64-bit
|
471 |
+
*/
|
472 |
+
public function setAmountInsuranceBase($amountInsuranceBase) {
|
473 |
+
$this->_amountInsuranceBase = $amountInsuranceBase;
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Get shipment insurance value
|
478 |
+
* @return double Signed 64-bit
|
479 |
+
*/
|
480 |
+
public function getAmountInsuranceBase() {
|
481 |
+
return $this->_amountInsuranceBase;
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Set cash-on-Delivery (COD) amount.
|
486 |
+
* @param double $amountCodBase Signed 64-bit
|
487 |
+
*/
|
488 |
+
public function setAmountCodBase($amountCodBase) {
|
489 |
+
$this->_amountCodBase = $amountCodBase;
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Get cash-on-Delivery (COD) amount.
|
494 |
+
* @return double Signed 64-bit
|
495 |
+
*/
|
496 |
+
public function getAmountCodBase() {
|
497 |
+
return $this->_amountCodBase;
|
498 |
+
}
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Set flag for COD value to be paid to a third party. Allowed only if the shipment has payerType = 2 (third party).
|
502 |
+
* @param boolean $payCodToThirdParty
|
503 |
+
*/
|
504 |
+
public function setPayCodToThirdParty($payCodToThirdParty) {
|
505 |
+
$this->_payCodToThirdParty = $payCodToThirdParty;
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Check flag for COD value to be paid to a third party
|
510 |
+
* @return boolean
|
511 |
+
*/
|
512 |
+
public function isPayCodToThirdParty() {
|
513 |
+
return $this->_payCodToThirdParty;
|
514 |
+
}
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Set return money-transfer request amount
|
518 |
+
* @param double $retMoneyTransferReqAmount Signed 64-bit
|
519 |
+
*/
|
520 |
+
public function setRetMoneyTransferReqAmount($retMoneyTransferReqAmount) {
|
521 |
+
$this->_retMoneyTransferReqAmount = $retMoneyTransferReqAmount;
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Get return money-transfer request amount
|
526 |
+
* @return double Signed 64-bit
|
527 |
+
*/
|
528 |
+
public function getRetMoneyTransferReqAmount() {
|
529 |
+
return $this->_retMoneyTransferReqAmount;
|
530 |
+
}
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Set parcels count. Maximum value is 999
|
534 |
+
* @param integer $parcelsCount Signed 32-bit
|
535 |
+
*/
|
536 |
+
public function setParcelsCount($parcelsCount) {
|
537 |
+
$this->_parcelsCount = $parcelsCount;
|
538 |
+
}
|
539 |
+
|
540 |
+
/**
|
541 |
+
* Get parcels count
|
542 |
+
* @return integer Signed 32-bit
|
543 |
+
*/
|
544 |
+
public function getParcelsCount() {
|
545 |
+
return $this->_parcelsCount;
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Set size of shipment
|
550 |
+
* @param Size $size
|
551 |
+
*/
|
552 |
+
public function setSize($size) {
|
553 |
+
$this->_size = $size;
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Get size of shipment
|
558 |
+
* @return Size
|
559 |
+
*/
|
560 |
+
public function getSize() {
|
561 |
+
return $this->_size;
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
* Set declared weight (the greater of "volume" and "real" weight values). Maximum value is 100.00
|
566 |
+
* @param double $weightDeclared Signed 64-bit
|
567 |
+
*/
|
568 |
+
public function setWeightDeclared($weightDeclared) {
|
569 |
+
$this->_weightDeclared = $weightDeclared;
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* Get declared weight
|
574 |
+
* @return double Signed 64-bit
|
575 |
+
*/
|
576 |
+
public function getWeightDeclared() {
|
577 |
+
return $this->_weightDeclared;
|
578 |
+
}
|
579 |
+
|
580 |
+
/**
|
581 |
+
* Set contents. Max text size - 50 symbols
|
582 |
+
* @param string $contents
|
583 |
+
*/
|
584 |
+
public function setContents($contents) {
|
585 |
+
$this->_contents = $contents;
|
586 |
+
}
|
587 |
+
|
588 |
+
/**
|
589 |
+
* Get contents.
|
590 |
+
* @return string
|
591 |
+
*/
|
592 |
+
public function getContents() {
|
593 |
+
return $this->_contents;
|
594 |
+
}
|
595 |
+
|
596 |
+
/**
|
597 |
+
* Set contents. Max text size - 50 symbols
|
598 |
+
* @param string $packing
|
599 |
+
*/
|
600 |
+
public function setPacking($packing) {
|
601 |
+
$this->_packing = $packing;
|
602 |
+
}
|
603 |
+
|
604 |
+
/**
|
605 |
+
* Get contents.
|
606 |
+
* @return string
|
607 |
+
*/
|
608 |
+
public function getPacking() {
|
609 |
+
return $this->_packing;
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Set packing ID (number)
|
614 |
+
* @param integer $packId Signed 64-bit
|
615 |
+
*/
|
616 |
+
public function setPackId($packId) {
|
617 |
+
$this->_packId = $packId;
|
618 |
+
}
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Get packing ID (number).
|
622 |
+
* @return integer Signed 64-bit
|
623 |
+
*/
|
624 |
+
public function getPackId() {
|
625 |
+
return $this->_packId;
|
626 |
+
}
|
627 |
+
|
628 |
+
/**
|
629 |
+
* Set flag whether shipment consists of documents
|
630 |
+
* @param boolean $documents
|
631 |
+
*/
|
632 |
+
public function setDocuments($documents) {
|
633 |
+
$this->_documents = $documents;
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Check whether shipment consists if documents
|
638 |
+
* @return boolean
|
639 |
+
*/
|
640 |
+
public function isDocuments() {
|
641 |
+
return $this->_documents;
|
642 |
+
}
|
643 |
+
|
644 |
+
/**
|
645 |
+
* Set flag whether shipment is fragile - necessary when the price of insurance is being calculated
|
646 |
+
* @param boolean $fragile
|
647 |
+
*/
|
648 |
+
public function setFragile($fragile) {
|
649 |
+
$this->_fragile = $fragile;
|
650 |
+
}
|
651 |
+
|
652 |
+
/**
|
653 |
+
* Check whether shipment is fragile
|
654 |
+
* @return boolean
|
655 |
+
*/
|
656 |
+
public function isFragile() {
|
657 |
+
return $this->_fragile;
|
658 |
+
}
|
659 |
+
|
660 |
+
/**
|
661 |
+
* Set flag whether shipment is palletized
|
662 |
+
* @param boolean $palletized
|
663 |
+
*/
|
664 |
+
public function setPalletized($palletized) {
|
665 |
+
$this->_palletized = $palletized;
|
666 |
+
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Check whether shipment is palletized
|
670 |
+
* @return boolean
|
671 |
+
*/
|
672 |
+
public function isPalletized() {
|
673 |
+
return $this->_palletized;
|
674 |
+
}
|
675 |
+
|
676 |
+
/**
|
677 |
+
* Set data for the sender
|
678 |
+
* @param ParamClientData $sender
|
679 |
+
*/
|
680 |
+
public function setSender($sender) {
|
681 |
+
$this->_sender = $sender;
|
682 |
+
}
|
683 |
+
|
684 |
+
/**
|
685 |
+
* Get data for the sender
|
686 |
+
* @return ParamClientData
|
687 |
+
*/
|
688 |
+
public function getSender() {
|
689 |
+
return $this->_sender;
|
690 |
+
}
|
691 |
+
|
692 |
+
/**
|
693 |
+
* Set data for the receiver
|
694 |
+
* @param ParamClientData $receiver
|
695 |
+
*/
|
696 |
+
public function setReceiver($receiver) {
|
697 |
+
$this->_receiver = $receiver;
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Get data for the receiver
|
702 |
+
* @return ParamClientData
|
703 |
+
*/
|
704 |
+
public function getReceiver() {
|
705 |
+
return $this->_receiver;
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Set payer type (0=sender, 1=receiver or 2=third party)
|
710 |
+
* @param integer $payerType Signed 32-bit
|
711 |
+
*/
|
712 |
+
public function setPayerType($payerType) {
|
713 |
+
$this->_payerType = $payerType;
|
714 |
+
}
|
715 |
+
|
716 |
+
/**
|
717 |
+
* Get payer type (0=sender, 1=receiver or 2=third party)
|
718 |
+
* @return integer Signed 32-bit
|
719 |
+
*/
|
720 |
+
public function getPayerType() {
|
721 |
+
return $this->_payerType;
|
722 |
+
}
|
723 |
+
|
724 |
+
/**
|
725 |
+
* Set payer ID
|
726 |
+
* @param integer $payerRefId Signed 64-bit
|
727 |
+
*/
|
728 |
+
public function setPayerRefId($payerRefId) {
|
729 |
+
$this->_payerRefId = $payerRefId;
|
730 |
+
}
|
731 |
+
|
732 |
+
/**
|
733 |
+
* Get payer ID
|
734 |
+
* @return integer Signed 64-bit
|
735 |
+
*/
|
736 |
+
public function getPayerRefId() {
|
737 |
+
return $this->_payerRefId;
|
738 |
+
}
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Set insurance payer type (0=sender, 1=reciever or 2=third party)
|
742 |
+
* @param integer $payerTypeInsurance Signed 32-bit
|
743 |
+
*/
|
744 |
+
public function setPayerTypeInsurance($payerTypeInsurance) {
|
745 |
+
$this->_payerTypeInsurance = $payerTypeInsurance;
|
746 |
+
}
|
747 |
+
|
748 |
+
/**
|
749 |
+
* Get insurance payer type
|
750 |
+
* @return integer Signed 32-bit
|
751 |
+
*/
|
752 |
+
public function getPayerTypeInsurance() {
|
753 |
+
return $this->_payerTypeInsurance;
|
754 |
+
}
|
755 |
+
|
756 |
+
/**
|
757 |
+
* Set insurance payer ID
|
758 |
+
* @param integer $payerRefInsuranceId Signed 64-bit
|
759 |
+
*/
|
760 |
+
public function setPayerRefInsuranceId($payerRefInsuranceId) {
|
761 |
+
$this->_payerRefInsuranceId = $payerRefInsuranceId;
|
762 |
+
}
|
763 |
+
|
764 |
+
/**
|
765 |
+
* Get insurance payer ID
|
766 |
+
* @return integer Signed 64-bit
|
767 |
+
*/
|
768 |
+
public function getPayerRefInsuranceId() {
|
769 |
+
return $this->_payerRefInsuranceId;
|
770 |
+
}
|
771 |
+
|
772 |
+
/**
|
773 |
+
* Set client's note
|
774 |
+
* @param string $noteClient
|
775 |
+
*/
|
776 |
+
public function setNoteClient($noteClient) {
|
777 |
+
$this->_noteClient = $noteClient;
|
778 |
+
}
|
779 |
+
|
780 |
+
/**
|
781 |
+
* Get client's note
|
782 |
+
* @return string
|
783 |
+
*/
|
784 |
+
public function getNoteClient() {
|
785 |
+
return $this->_noteClient;
|
786 |
+
}
|
787 |
+
|
788 |
+
/**
|
789 |
+
* Set card/coupon/voucher number for fixed discount
|
790 |
+
* @param FixedDiscountCardId $discCalc
|
791 |
+
*/
|
792 |
+
public function setDiscCalc($discCalc) {
|
793 |
+
$this->_discCalc = $discCalc;
|
794 |
+
}
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Get card/coupon/voucher number for fixed discount
|
798 |
+
* @return FixedDiscountCardId
|
799 |
+
*/
|
800 |
+
public function getDiscCalc() {
|
801 |
+
return $this->_discCalc;
|
802 |
+
}
|
803 |
+
|
804 |
+
/**
|
805 |
+
* Set ID of the client who is to receive the return receipt and/or the return documents.
|
806 |
+
* If payer is "third party" then this client has to be payer's contract member.
|
807 |
+
* Otherwise the client has to be sender's contract member.
|
808 |
+
* @param integer $retToClientId Signed 64-bit
|
809 |
+
*/
|
810 |
+
public function setRetToClientId($retToClientId) {
|
811 |
+
$this->_retToClientId = $retToClientId;
|
812 |
+
}
|
813 |
+
|
814 |
+
/**
|
815 |
+
* Get ID of the client who is to receive the return receipt and/or the return documents.
|
816 |
+
* @return integer Signed 64-bit
|
817 |
+
*/
|
818 |
+
public function getRetToClientId() {
|
819 |
+
return $this->_retToClientId;
|
820 |
+
}
|
821 |
+
|
822 |
+
/**
|
823 |
+
* Set optional reference code. Maximum 30 symbols.
|
824 |
+
* @param string $ref1
|
825 |
+
*/
|
826 |
+
public function setRef1($ref1) {
|
827 |
+
$this->_ref1 = $ref1;
|
828 |
+
}
|
829 |
+
|
830 |
+
/**
|
831 |
+
* Get optional reference code. Maximum 30 symbols.
|
832 |
+
* @return string
|
833 |
+
*/
|
834 |
+
public function getRef1() {
|
835 |
+
return $this->_ref1;
|
836 |
+
}
|
837 |
+
|
838 |
+
/**
|
839 |
+
* Set optional reference code 2. Maximum 30 symbols.
|
840 |
+
* @param string $ref2
|
841 |
+
*/
|
842 |
+
public function setRef2($ref2) {
|
843 |
+
$this->_ref2 = $ref2;
|
844 |
+
}
|
845 |
+
|
846 |
+
/**
|
847 |
+
* Get optional reference code 2. Maximum 30 symbols.
|
848 |
+
* @return string
|
849 |
+
*/
|
850 |
+
public function getRef2() {
|
851 |
+
return $this->_ref2;
|
852 |
+
}
|
853 |
+
|
854 |
+
/**
|
855 |
+
* Set optional value used to identify user's client software.
|
856 |
+
* @param integer $clientSystemId Signed 64-bit
|
857 |
+
*/
|
858 |
+
public function setClientSystemId($clientSystemId) {
|
859 |
+
$this->_clientSystemId = $clientSystemId;
|
860 |
+
}
|
861 |
+
|
862 |
+
/**
|
863 |
+
* Get optional value used to identify user's client software.
|
864 |
+
* @return integer Signed 64-bit
|
865 |
+
*/
|
866 |
+
public function getClientSystemId() {
|
867 |
+
return $this->_clientSystemId;
|
868 |
+
}
|
869 |
+
|
870 |
+
/**
|
871 |
+
* Set data for parcels with explicit/fixed IDs (from the second one onward)
|
872 |
+
* @param array $parcels List of ParamParcelInfo
|
873 |
+
*/
|
874 |
+
public function setParcels($parcels) {
|
875 |
+
$this->_parcels = $parcels;
|
876 |
+
}
|
877 |
+
|
878 |
+
/**
|
879 |
+
* Get data for parcels with explicit/fixed IDs (from the second one onward)
|
880 |
+
* @return array List of ParamParcelInfo
|
881 |
+
*/
|
882 |
+
public function getParcels() {
|
883 |
+
return $this->_parcels;
|
884 |
+
}
|
885 |
+
|
886 |
+
/**
|
887 |
+
* Set flag to set or not explicit data on processing parcels with sequence number > 1
|
888 |
+
* @param boolean $skipAutomaticParcelsCreation
|
889 |
+
*/
|
890 |
+
public function setSkipAutomaticParcelsCreation($skipAutomaticParcelsCreation) {
|
891 |
+
$this->_skipAutomaticParcelsCreation = $skipAutomaticParcelsCreation;
|
892 |
+
}
|
893 |
+
|
894 |
+
/**
|
895 |
+
* Check flag to set or not explicit data on processing parcels with sequence number > 1
|
896 |
+
* @return boolean
|
897 |
+
*/
|
898 |
+
public function isSkipAutomaticParcelsCreation() {
|
899 |
+
return $this->_skipAutomaticParcelsCreation;
|
900 |
+
}
|
901 |
+
|
902 |
+
/**
|
903 |
+
* Set flag service/system to allow parcels to be added to the shipment at a later stage
|
904 |
+
* @param boolean $pendingParcelsDescription
|
905 |
+
*/
|
906 |
+
public function setPendingParcelsDescription($pendingParcelsDescription) {
|
907 |
+
$this->_pendingParcelsDescription = $pendingParcelsDescription;
|
908 |
+
}
|
909 |
+
|
910 |
+
/**
|
911 |
+
* Check whether service/system to allow parcels to be added to the shipment at a later stage
|
912 |
+
* @return boolean
|
913 |
+
*/
|
914 |
+
public function isPendingParcelsDescription() {
|
915 |
+
return $this->_pendingParcelsDescription;
|
916 |
+
}
|
917 |
+
|
918 |
+
/**
|
919 |
+
* Set flag the service/system to allow BOL's modification at a later stage.
|
920 |
+
* @param boolean $pendingShipmentDescription
|
921 |
+
*/
|
922 |
+
public function setPendingShipmentDescription($pendingShipmentDescription) {
|
923 |
+
$this->_pendingShipmentDescription = $pendingShipmentDescription;
|
924 |
+
}
|
925 |
+
|
926 |
+
/**
|
927 |
+
* Check whether the service/system should allow BOL's modification at a later stage.
|
928 |
+
* @return boolean
|
929 |
+
*/
|
930 |
+
public function isPendingShipmentDescription() {
|
931 |
+
return $this->_pendingShipmentDescription;
|
932 |
+
}
|
933 |
+
|
934 |
+
/**
|
935 |
+
* Return standard class from this class
|
936 |
+
* @return stdClass
|
937 |
+
*/
|
938 |
+
public function toStdClass() {
|
939 |
+
$stdClass = new stdClass();
|
940 |
+
$stdClass->billOfLading = $this->_billOfLading;
|
941 |
+
$stdClass->takingDate = $this->_takingDate;
|
942 |
+
$stdClass->serviceTypeId = $this->_serviceTypeId;
|
943 |
+
$stdClass->officeToBeCalledId = $this->_officeToBeCalledId;
|
944 |
+
$stdClass->fixedTimeDelivery = $this->_fixedTimeDelivery;
|
945 |
+
$stdClass->deferredDeliveryWorkDays = $this->_deferredDeliveryWorkDays;
|
946 |
+
$stdClass->backDocumentsRequest = $this->_backDocumentsRequest;
|
947 |
+
$stdClass->backReceiptRequest = $this->_backReceiptRequest;
|
948 |
+
$stdClass->willBringToOffice = $this->_willBringToOffice;
|
949 |
+
$stdClass->willBringToOfficeId = $this->_willBringToOfficeId;
|
950 |
+
$stdClass->amountInsuranceBase = $this->_amountInsuranceBase;
|
951 |
+
$stdClass->amountCodBase = $this->_amountCodBase;
|
952 |
+
$stdClass->payCodToThirdParty = $this->_payCodToThirdParty;
|
953 |
+
$stdClass->retMoneyTransferReqAmount = $this->_retMoneyTransferReqAmount;
|
954 |
+
$stdClass->parcelsCount = $this->_parcelsCount;
|
955 |
+
if (isset($this->_size)) {
|
956 |
+
$stdClass->size = $this->_size->toStdClass();
|
957 |
+
}
|
958 |
+
$stdClass->weightDeclared = $this->_weightDeclared;
|
959 |
+
$stdClass->contents = $this->_contents;
|
960 |
+
$stdClass->packing = $this->_packing;
|
961 |
+
$stdClass->packId = $this->_packId;
|
962 |
+
$stdClass->documents = $this->_documents;
|
963 |
+
$stdClass->fragile = $this->_fragile;
|
964 |
+
$stdClass->palletized = $this->_palletized;
|
965 |
+
if (isset($this->_sender)) {
|
966 |
+
$stdClass->sender = $this->_sender->toStdClass();
|
967 |
+
}
|
968 |
+
if (isset($this->_receiver)) {
|
969 |
+
$stdClass->receiver = $this->_receiver->toStdClass();
|
970 |
+
}
|
971 |
+
$stdClass->payerType = $this->_payerType;
|
972 |
+
$stdClass->payerRefId = $this->_payerRefId;
|
973 |
+
$stdClass->payerTypeInsurance = $this->_payerTypeInsurance;
|
974 |
+
$stdClass->payerRefInsuranceId = $this->_payerRefInsuranceId;
|
975 |
+
$stdClass->noteClient = $this->_noteClient;
|
976 |
+
if (isset($this->_discCalc)) {
|
977 |
+
$stdClass->discCalc = $this->_discCalc->toStdClass();
|
978 |
+
}
|
979 |
+
$stdClass->retToClientId = $this->_retToClientId;
|
980 |
+
$stdClass->ref1 = $this->_ref1;
|
981 |
+
$stdClass->ref2 = $this->_ref2;
|
982 |
+
$stdClass->clientSystemId = $this->_clientSystemId;
|
983 |
+
$arrStdClassParamParcelInfo = array();
|
984 |
+
if (isset($this->_parcels)) {
|
985 |
+
if (is_array($this->_parcels)) {
|
986 |
+
for($i = 0; $i < count($this->_parcels); $i++) {
|
987 |
+
$arrStdClassParamParcelInfo[$i] = $this->_parcels[$i]->toStdClass();
|
988 |
+
}
|
989 |
+
} else {
|
990 |
+
$arrStdClassParamParcelInfo[0] = $this->_parcels->toStdClass();
|
991 |
+
}
|
992 |
+
}
|
993 |
+
$stdClass->parcels = $arrStdClassParamParcelInfo;
|
994 |
+
$stdClass->skipAutomaticParcelsCreation = $this->_skipAutomaticParcelsCreation;
|
995 |
+
$stdClass->pendingParcelsDescription = $this->_pendingParcelsDescription;
|
996 |
+
$stdClass->pendingShipmentDescription = $this->_pendingShipmentDescription;
|
997 |
+
return $stdClass;
|
998 |
+
}
|
999 |
+
}
|
1000 |
+
?>
|
lib/SpeedyEPS/ver01/ParamSearchByRefNum.class.php
CHANGED
@@ -1,130 +1,130 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of thics class are used az parameters for picking search web services class
|
4 |
-
*/
|
5 |
-
class ParamSearchByRefNum {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Search in Ref1 or Ref2 fields
|
9 |
-
* @var integer Signed 32-bit
|
10 |
-
*/
|
11 |
-
const PARAM_SEARCH_REF1_OR_REF2 = 0;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Search in Ref1 field only
|
15 |
-
* @var integer Signed 32-bit
|
16 |
-
*/
|
17 |
-
const PARAM_SEARCH_REF1_ONLY = 1;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Search in Ref2 field only
|
21 |
-
* @var integer Signed 32-bit
|
22 |
-
*/
|
23 |
-
const PARAM_SEARCH_REF2_ONLY = 2;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* The reference code to be searched (exact match, case sensitive)
|
27 |
-
* MANDATORY: YES
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_referenceNumber;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Specifies where to search: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
34 |
-
* MANDATORY: YES
|
35 |
-
* @var integer Signed 32-bit
|
36 |
-
*/
|
37 |
-
private $_searchInField;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Pick-up date - from
|
41 |
-
* MANDATORY: NO
|
42 |
-
* @var date
|
43 |
-
*/
|
44 |
-
private $_dateFrom;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Pick-up date - to
|
48 |
-
* MANDATORY: NO
|
49 |
-
* @var date
|
50 |
-
*/
|
51 |
-
private $_dateTo;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Set reference code to be searched (exact match, case sensitive)
|
55 |
-
* @param string $referenceNumber
|
56 |
-
*/
|
57 |
-
public function setReferenceNumber($referenceNumber) {
|
58 |
-
$this->_referenceNumber = $referenceNumber;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Get reference code to be searched (exact match, case sensitive)
|
63 |
-
* @return string
|
64 |
-
*/
|
65 |
-
public function getReferenceNumber() {
|
66 |
-
return $this->_referenceNumber;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Set search code: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
71 |
-
* @param integer $searchInField Signed 32-bit
|
72 |
-
*/
|
73 |
-
public function setSearchInField($searchInField) {
|
74 |
-
$this->_searchInField = $searchInField;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Get search code: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
79 |
-
* @return integer Signed 32-bit
|
80 |
-
*/
|
81 |
-
public function getSearchInField() {
|
82 |
-
return $this->_searchInField;
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Set pick-up date - from
|
87 |
-
* @param date $dateFrom
|
88 |
-
*/
|
89 |
-
public function setDateFrom($dateFrom) {
|
90 |
-
$this->_dateFrom = $dateFrom;
|
91 |
-
}
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Get pick-up date - from
|
95 |
-
* @return date
|
96 |
-
*/
|
97 |
-
public function getDateFrom() {
|
98 |
-
return $this->_dateFrom;
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Set pick-up date - to
|
103 |
-
* @param date $dateTo
|
104 |
-
*/
|
105 |
-
public function setDateTo($dateTo) {
|
106 |
-
$this->_dateTo = $dateTo;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Get pick-up date - to
|
111 |
-
* @return date
|
112 |
-
*/
|
113 |
-
public function getDateTo() {
|
114 |
-
return $this->_dateTo;
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Return standard class from this class
|
119 |
-
* @return stdClass
|
120 |
-
*/
|
121 |
-
public function toStdClass() {
|
122 |
-
$stdClass = new stdClass();
|
123 |
-
$stdClass->referenceNumber = $this->_referenceNumber;
|
124 |
-
$stdClass->searchInField = $this->_searchInField;
|
125 |
-
$stdClass->dateFrom = $this->_dateFrom;
|
126 |
-
$stdClass->dateTo = $this->_dateTo;
|
127 |
-
return $stdClass;
|
128 |
-
}
|
129 |
-
}
|
130 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of thics class are used az parameters for picking search web services class
|
4 |
+
*/
|
5 |
+
class ParamSearchByRefNum {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Search in Ref1 or Ref2 fields
|
9 |
+
* @var integer Signed 32-bit
|
10 |
+
*/
|
11 |
+
const PARAM_SEARCH_REF1_OR_REF2 = 0;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Search in Ref1 field only
|
15 |
+
* @var integer Signed 32-bit
|
16 |
+
*/
|
17 |
+
const PARAM_SEARCH_REF1_ONLY = 1;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Search in Ref2 field only
|
21 |
+
* @var integer Signed 32-bit
|
22 |
+
*/
|
23 |
+
const PARAM_SEARCH_REF2_ONLY = 2;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* The reference code to be searched (exact match, case sensitive)
|
27 |
+
* MANDATORY: YES
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_referenceNumber;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Specifies where to search: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
34 |
+
* MANDATORY: YES
|
35 |
+
* @var integer Signed 32-bit
|
36 |
+
*/
|
37 |
+
private $_searchInField;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Pick-up date - from
|
41 |
+
* MANDATORY: NO
|
42 |
+
* @var date
|
43 |
+
*/
|
44 |
+
private $_dateFrom;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Pick-up date - to
|
48 |
+
* MANDATORY: NO
|
49 |
+
* @var date
|
50 |
+
*/
|
51 |
+
private $_dateTo;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Set reference code to be searched (exact match, case sensitive)
|
55 |
+
* @param string $referenceNumber
|
56 |
+
*/
|
57 |
+
public function setReferenceNumber($referenceNumber) {
|
58 |
+
$this->_referenceNumber = $referenceNumber;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get reference code to be searched (exact match, case sensitive)
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function getReferenceNumber() {
|
66 |
+
return $this->_referenceNumber;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Set search code: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
71 |
+
* @param integer $searchInField Signed 32-bit
|
72 |
+
*/
|
73 |
+
public function setSearchInField($searchInField) {
|
74 |
+
$this->_searchInField = $searchInField;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get search code: 0 means [Ref1 or Ref2], 1 means [Ref1], 2 means [Ref2]
|
79 |
+
* @return integer Signed 32-bit
|
80 |
+
*/
|
81 |
+
public function getSearchInField() {
|
82 |
+
return $this->_searchInField;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Set pick-up date - from
|
87 |
+
* @param date $dateFrom
|
88 |
+
*/
|
89 |
+
public function setDateFrom($dateFrom) {
|
90 |
+
$this->_dateFrom = $dateFrom;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get pick-up date - from
|
95 |
+
* @return date
|
96 |
+
*/
|
97 |
+
public function getDateFrom() {
|
98 |
+
return $this->_dateFrom;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Set pick-up date - to
|
103 |
+
* @param date $dateTo
|
104 |
+
*/
|
105 |
+
public function setDateTo($dateTo) {
|
106 |
+
$this->_dateTo = $dateTo;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get pick-up date - to
|
111 |
+
* @return date
|
112 |
+
*/
|
113 |
+
public function getDateTo() {
|
114 |
+
return $this->_dateTo;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Return standard class from this class
|
119 |
+
* @return stdClass
|
120 |
+
*/
|
121 |
+
public function toStdClass() {
|
122 |
+
$stdClass = new stdClass();
|
123 |
+
$stdClass->referenceNumber = $this->_referenceNumber;
|
124 |
+
$stdClass->searchInField = $this->_searchInField;
|
125 |
+
$stdClass->dateFrom = $this->_dateFrom;
|
126 |
+
$stdClass->dateTo = $this->_dateTo;
|
127 |
+
return $stdClass;
|
128 |
+
}
|
129 |
+
}
|
130 |
?>
|
lib/SpeedyEPS/ver01/ResultAddress.class.php
CHANGED
@@ -1,314 +1,314 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of web service method calls for clients
|
4 |
-
*/
|
5 |
-
class ResultAddress {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Site ID
|
9 |
-
* @var integer Signed 64-bit
|
10 |
-
*/
|
11 |
-
private $_siteId;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Site name
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
private $_siteName;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Site type
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
private $_siteType;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Municpality name
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $_municipalityName;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Region name
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
private $_regionName;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Post code
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $_postCode;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Street name
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_streetName;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Street type
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
private $_streetType;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Street ID
|
57 |
-
* @var integer Signed 64-bit
|
58 |
-
*/
|
59 |
-
private $_streetId;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Quarter name
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
private $_quarterName;
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Quarter type
|
69 |
-
* @var string
|
70 |
-
*/
|
71 |
-
private $_quarterType;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Quarter ID
|
75 |
-
* @var long Signed 64-bit
|
76 |
-
*/
|
77 |
-
private $_quarterId;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Street No
|
81 |
-
* @var string
|
82 |
-
*/
|
83 |
-
private $_streetNo;
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Block No
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
private $_blockNo;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Entrance No
|
93 |
-
* @var string
|
94 |
-
*/
|
95 |
-
private $_entranceNo;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Floor No
|
99 |
-
* @var string
|
100 |
-
*/
|
101 |
-
private $_floorNo;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Appartment No
|
105 |
-
* @var string
|
106 |
-
*/
|
107 |
-
private $_apartmentNo;
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Address note
|
111 |
-
* @var string
|
112 |
-
*/
|
113 |
-
private $_addressNote;
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Common object ID
|
117 |
-
* @var integer Signed 64-bit
|
118 |
-
*/
|
119 |
-
private $_commonObjectId;
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Common object name
|
123 |
-
* @var string
|
124 |
-
*/
|
125 |
-
private $_commonObjectName;
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Constructs new instance of ResultAddress
|
129 |
-
* @param stdClass $stdClassResultAddress
|
130 |
-
*/
|
131 |
-
function __construct($stdClassResultAddress) {
|
132 |
-
$this->_siteId = isset($stdClassResultAddress->siteId) ? $stdClassResultAddress->siteId : null;
|
133 |
-
$this->_siteName = isset($stdClassResultAddress->siteName) ? $stdClassResultAddress->siteName : null;
|
134 |
-
$this->_siteType = isset($stdClassResultAddress->siteType) ? $stdClassResultAddress->siteType : null;
|
135 |
-
$this->_municipalityName = isset($stdClassResultAddress->municipalityName) ? $stdClassResultAddress->municipalityName : null;
|
136 |
-
$this->_regionName = isset($stdClassResultAddress->regionName) ? $stdClassResultAddress->regionName : null;
|
137 |
-
$this->_postCode = isset($stdClassResultAddress->postCode) ? $stdClassResultAddress->postCode : null;
|
138 |
-
$this->_streetName = isset($stdClassResultAddress->streetName) ? $stdClassResultAddress->streetName : null;
|
139 |
-
$this->_streetType = isset($stdClassResultAddress->streetType) ? $stdClassResultAddress->streetType : null;
|
140 |
-
$this->_streetId = isset($stdClassResultAddress->streetId) ? $stdClassResultAddress->streetId : null;
|
141 |
-
$this->_quarterName = isset($stdClassResultAddress->quarterName) ? $stdClassResultAddress->quarterName : null;
|
142 |
-
$this->_quarterType = isset($stdClassResultAddress->quarterType) ? $stdClassResultAddress->quarterType : null;
|
143 |
-
$this->_quarterId = isset($stdClassResultAddress->quarterId) ? $stdClassResultAddress->quarterId : null;
|
144 |
-
$this->_streetNo = isset($stdClassResultAddress->streetNo) ? $stdClassResultAddress->streetNo : null;
|
145 |
-
$this->_blockNo = isset($stdClassResultAddress->blockNo) ? $stdClassResultAddress->blockNo : null;
|
146 |
-
$this->_entranceNo = isset($stdClassResultAddress->entranceNo) ? $stdClassResultAddress->entranceNo : null;
|
147 |
-
$this->_floorNo = isset($stdClassResultAddress->floorNo) ? $stdClassResultAddress->floorNo : null;
|
148 |
-
$this->_apartmentNo = isset($stdClassResultAddress->apartmentNo) ? $stdClassResultAddress->apartmentNo : null;
|
149 |
-
$this->_addressNote = isset($stdClassResultAddress->addressNote) ? $stdClassResultAddress->addressNote : null;
|
150 |
-
$this->_commonObjectId = isset($stdClassResultAddress->commonObjectId) ? $stdClassResultAddress->commonObjectId : null;
|
151 |
-
$this->_commonObjectName = isset($stdClassResultAddress->commonObjectName) ? $stdClassResultAddress->commonObjectName : null;
|
152 |
-
}
|
153 |
-
|
154 |
-
/**
|
155 |
-
* Get site ID
|
156 |
-
* @return integer Signed 64-bit
|
157 |
-
*/
|
158 |
-
public function getSiteId() {
|
159 |
-
return $this->_siteId;
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Get site name
|
164 |
-
* @return string
|
165 |
-
*/
|
166 |
-
public function getSiteName() {
|
167 |
-
return $this->_siteName;
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Get site type
|
172 |
-
* @return string
|
173 |
-
*/
|
174 |
-
public function getSiteType() {
|
175 |
-
return $this->_siteType;
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Get municipality name
|
180 |
-
* @return string
|
181 |
-
*/
|
182 |
-
public function getMunicipalityName() {
|
183 |
-
return $this->_municipalityName;
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Get region name
|
188 |
-
* @return string
|
189 |
-
*/
|
190 |
-
public function getRegionName() {
|
191 |
-
return $this->_regionName;
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Get post code
|
196 |
-
* @return string
|
197 |
-
*/
|
198 |
-
public function getPostCode() {
|
199 |
-
return $this->_postCode;
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Get street name
|
204 |
-
* @return string
|
205 |
-
*/
|
206 |
-
public function getStreetName() {
|
207 |
-
return $this->_streetName;
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Get street type
|
212 |
-
* @return string
|
213 |
-
*/
|
214 |
-
public function getStreetType() {
|
215 |
-
return $this->_streetType;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Get street ID
|
220 |
-
* @return integer Signed 64-bit
|
221 |
-
*/
|
222 |
-
public function getStreetId() {
|
223 |
-
return $this->_streetId;
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Get quarter name
|
228 |
-
* @return string
|
229 |
-
*/
|
230 |
-
public function getQuarterName() {
|
231 |
-
return $this->_quarterName;
|
232 |
-
}
|
233 |
-
|
234 |
-
/**
|
235 |
-
* Get quarter type
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
public function getQuarterType() {
|
239 |
-
return $this->_quarterType;
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Get quarter ID
|
244 |
-
* @return integer Signed 64-bit
|
245 |
-
*/
|
246 |
-
public function getQuarterId() {
|
247 |
-
return $this->_quarterId;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Get street No
|
252 |
-
* @return string
|
253 |
-
*/
|
254 |
-
public function getStreetNo() {
|
255 |
-
return $this->_streetNo;
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Get block No
|
260 |
-
* @return string
|
261 |
-
*/
|
262 |
-
public function getBlockNo() {
|
263 |
-
return $this->_blockNo;
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Get entrance No
|
268 |
-
* @return string
|
269 |
-
*/
|
270 |
-
public function getEntranceNo() {
|
271 |
-
return $this->_entranceNo;
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Get floor No
|
276 |
-
* @return string
|
277 |
-
*/
|
278 |
-
public function getFloorNo() {
|
279 |
-
return $this->_floorNo;
|
280 |
-
}
|
281 |
-
|
282 |
-
/**
|
283 |
-
* Get appartment No
|
284 |
-
* @return string
|
285 |
-
*/
|
286 |
-
public function getApartmentNo() {
|
287 |
-
return $this->_apartmentNo;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Get address note
|
292 |
-
* @return string
|
293 |
-
*/
|
294 |
-
public function getAddressNote() {
|
295 |
-
return $this->_addressNote;
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Get common object ID
|
300 |
-
* @return integer Signed 64-bit
|
301 |
-
*/
|
302 |
-
public function getCommonObjectId() {
|
303 |
-
return $this->_commonObjectId;
|
304 |
-
}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* Get common object name
|
308 |
-
* @return string
|
309 |
-
*/
|
310 |
-
public function getCommonObjectName() {
|
311 |
-
return $this->_commonObjectName;
|
312 |
-
}
|
313 |
-
}
|
314 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of web service method calls for clients
|
4 |
+
*/
|
5 |
+
class ResultAddress {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Site ID
|
9 |
+
* @var integer Signed 64-bit
|
10 |
+
*/
|
11 |
+
private $_siteId;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Site name
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $_siteName;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Site type
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $_siteType;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Municpality name
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $_municipalityName;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Region name
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $_regionName;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Post code
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private $_postCode;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Street name
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_streetName;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Street type
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
private $_streetType;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Street ID
|
57 |
+
* @var integer Signed 64-bit
|
58 |
+
*/
|
59 |
+
private $_streetId;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Quarter name
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
private $_quarterName;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Quarter type
|
69 |
+
* @var string
|
70 |
+
*/
|
71 |
+
private $_quarterType;
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Quarter ID
|
75 |
+
* @var long Signed 64-bit
|
76 |
+
*/
|
77 |
+
private $_quarterId;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Street No
|
81 |
+
* @var string
|
82 |
+
*/
|
83 |
+
private $_streetNo;
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Block No
|
87 |
+
* @var string
|
88 |
+
*/
|
89 |
+
private $_blockNo;
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Entrance No
|
93 |
+
* @var string
|
94 |
+
*/
|
95 |
+
private $_entranceNo;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Floor No
|
99 |
+
* @var string
|
100 |
+
*/
|
101 |
+
private $_floorNo;
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Appartment No
|
105 |
+
* @var string
|
106 |
+
*/
|
107 |
+
private $_apartmentNo;
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Address note
|
111 |
+
* @var string
|
112 |
+
*/
|
113 |
+
private $_addressNote;
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Common object ID
|
117 |
+
* @var integer Signed 64-bit
|
118 |
+
*/
|
119 |
+
private $_commonObjectId;
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Common object name
|
123 |
+
* @var string
|
124 |
+
*/
|
125 |
+
private $_commonObjectName;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Constructs new instance of ResultAddress
|
129 |
+
* @param stdClass $stdClassResultAddress
|
130 |
+
*/
|
131 |
+
function __construct($stdClassResultAddress) {
|
132 |
+
$this->_siteId = isset($stdClassResultAddress->siteId) ? $stdClassResultAddress->siteId : null;
|
133 |
+
$this->_siteName = isset($stdClassResultAddress->siteName) ? $stdClassResultAddress->siteName : null;
|
134 |
+
$this->_siteType = isset($stdClassResultAddress->siteType) ? $stdClassResultAddress->siteType : null;
|
135 |
+
$this->_municipalityName = isset($stdClassResultAddress->municipalityName) ? $stdClassResultAddress->municipalityName : null;
|
136 |
+
$this->_regionName = isset($stdClassResultAddress->regionName) ? $stdClassResultAddress->regionName : null;
|
137 |
+
$this->_postCode = isset($stdClassResultAddress->postCode) ? $stdClassResultAddress->postCode : null;
|
138 |
+
$this->_streetName = isset($stdClassResultAddress->streetName) ? $stdClassResultAddress->streetName : null;
|
139 |
+
$this->_streetType = isset($stdClassResultAddress->streetType) ? $stdClassResultAddress->streetType : null;
|
140 |
+
$this->_streetId = isset($stdClassResultAddress->streetId) ? $stdClassResultAddress->streetId : null;
|
141 |
+
$this->_quarterName = isset($stdClassResultAddress->quarterName) ? $stdClassResultAddress->quarterName : null;
|
142 |
+
$this->_quarterType = isset($stdClassResultAddress->quarterType) ? $stdClassResultAddress->quarterType : null;
|
143 |
+
$this->_quarterId = isset($stdClassResultAddress->quarterId) ? $stdClassResultAddress->quarterId : null;
|
144 |
+
$this->_streetNo = isset($stdClassResultAddress->streetNo) ? $stdClassResultAddress->streetNo : null;
|
145 |
+
$this->_blockNo = isset($stdClassResultAddress->blockNo) ? $stdClassResultAddress->blockNo : null;
|
146 |
+
$this->_entranceNo = isset($stdClassResultAddress->entranceNo) ? $stdClassResultAddress->entranceNo : null;
|
147 |
+
$this->_floorNo = isset($stdClassResultAddress->floorNo) ? $stdClassResultAddress->floorNo : null;
|
148 |
+
$this->_apartmentNo = isset($stdClassResultAddress->apartmentNo) ? $stdClassResultAddress->apartmentNo : null;
|
149 |
+
$this->_addressNote = isset($stdClassResultAddress->addressNote) ? $stdClassResultAddress->addressNote : null;
|
150 |
+
$this->_commonObjectId = isset($stdClassResultAddress->commonObjectId) ? $stdClassResultAddress->commonObjectId : null;
|
151 |
+
$this->_commonObjectName = isset($stdClassResultAddress->commonObjectName) ? $stdClassResultAddress->commonObjectName : null;
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Get site ID
|
156 |
+
* @return integer Signed 64-bit
|
157 |
+
*/
|
158 |
+
public function getSiteId() {
|
159 |
+
return $this->_siteId;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get site name
|
164 |
+
* @return string
|
165 |
+
*/
|
166 |
+
public function getSiteName() {
|
167 |
+
return $this->_siteName;
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Get site type
|
172 |
+
* @return string
|
173 |
+
*/
|
174 |
+
public function getSiteType() {
|
175 |
+
return $this->_siteType;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Get municipality name
|
180 |
+
* @return string
|
181 |
+
*/
|
182 |
+
public function getMunicipalityName() {
|
183 |
+
return $this->_municipalityName;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Get region name
|
188 |
+
* @return string
|
189 |
+
*/
|
190 |
+
public function getRegionName() {
|
191 |
+
return $this->_regionName;
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Get post code
|
196 |
+
* @return string
|
197 |
+
*/
|
198 |
+
public function getPostCode() {
|
199 |
+
return $this->_postCode;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Get street name
|
204 |
+
* @return string
|
205 |
+
*/
|
206 |
+
public function getStreetName() {
|
207 |
+
return $this->_streetName;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Get street type
|
212 |
+
* @return string
|
213 |
+
*/
|
214 |
+
public function getStreetType() {
|
215 |
+
return $this->_streetType;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Get street ID
|
220 |
+
* @return integer Signed 64-bit
|
221 |
+
*/
|
222 |
+
public function getStreetId() {
|
223 |
+
return $this->_streetId;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Get quarter name
|
228 |
+
* @return string
|
229 |
+
*/
|
230 |
+
public function getQuarterName() {
|
231 |
+
return $this->_quarterName;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get quarter type
|
236 |
+
* @return string
|
237 |
+
*/
|
238 |
+
public function getQuarterType() {
|
239 |
+
return $this->_quarterType;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Get quarter ID
|
244 |
+
* @return integer Signed 64-bit
|
245 |
+
*/
|
246 |
+
public function getQuarterId() {
|
247 |
+
return $this->_quarterId;
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Get street No
|
252 |
+
* @return string
|
253 |
+
*/
|
254 |
+
public function getStreetNo() {
|
255 |
+
return $this->_streetNo;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Get block No
|
260 |
+
* @return string
|
261 |
+
*/
|
262 |
+
public function getBlockNo() {
|
263 |
+
return $this->_blockNo;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Get entrance No
|
268 |
+
* @return string
|
269 |
+
*/
|
270 |
+
public function getEntranceNo() {
|
271 |
+
return $this->_entranceNo;
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Get floor No
|
276 |
+
* @return string
|
277 |
+
*/
|
278 |
+
public function getFloorNo() {
|
279 |
+
return $this->_floorNo;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Get appartment No
|
284 |
+
* @return string
|
285 |
+
*/
|
286 |
+
public function getApartmentNo() {
|
287 |
+
return $this->_apartmentNo;
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Get address note
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getAddressNote() {
|
295 |
+
return $this->_addressNote;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Get common object ID
|
300 |
+
* @return integer Signed 64-bit
|
301 |
+
*/
|
302 |
+
public function getCommonObjectId() {
|
303 |
+
return $this->_commonObjectId;
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Get common object name
|
308 |
+
* @return string
|
309 |
+
*/
|
310 |
+
public function getCommonObjectName() {
|
311 |
+
return $this->_commonObjectName;
|
312 |
+
}
|
313 |
+
}
|
314 |
?>
|
lib/SpeedyEPS/ver01/ResultAddressEx.class.php
ADDED
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultSite.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of web service method calls for clients
|
7 |
+
*/
|
8 |
+
class ResultAddressEx {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Result site
|
12 |
+
* @var ResultSite result site
|
13 |
+
*/
|
14 |
+
private $_resultSite;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Post code
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_postCode;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Street name
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $_streetName;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Street type
|
30 |
+
* @var string
|
31 |
+
*/
|
32 |
+
private $_streetType;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Street ID
|
36 |
+
* @var integer Signed 64-bit
|
37 |
+
*/
|
38 |
+
private $_streetId;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Quarter name
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
private $_quarterName;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Quarter type
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
private $_quarterType;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Quarter ID
|
54 |
+
* @var long Signed 64-bit
|
55 |
+
*/
|
56 |
+
private $_quarterId;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Street No
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
private $_streetNo;
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Block No
|
66 |
+
* @var string
|
67 |
+
*/
|
68 |
+
private $_blockNo;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Entrance No
|
72 |
+
* @var string
|
73 |
+
*/
|
74 |
+
private $_entranceNo;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Floor No
|
78 |
+
* @var string
|
79 |
+
*/
|
80 |
+
private $_floorNo;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Appartment No
|
84 |
+
* @var string
|
85 |
+
*/
|
86 |
+
private $_apartmentNo;
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Address note
|
90 |
+
* @var string
|
91 |
+
*/
|
92 |
+
private $_addressNote;
|
93 |
+
|
94 |
+
/**
|
95 |
+
* GPS X coordinate
|
96 |
+
* @var signed 64-bit real
|
97 |
+
*/
|
98 |
+
private $_coordX;
|
99 |
+
|
100 |
+
/**
|
101 |
+
* GPS Y coordinate
|
102 |
+
* @var signed 64-bit real
|
103 |
+
*/
|
104 |
+
private $_coordY;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* GPS coordinate type
|
108 |
+
* @var signed 32-bit integer
|
109 |
+
*/
|
110 |
+
private $_coordTypeId;
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Common object ID
|
114 |
+
* @var integer Signed 64-bit
|
115 |
+
*/
|
116 |
+
private $_commonObjectId;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Common object name
|
120 |
+
* @var string
|
121 |
+
*/
|
122 |
+
private $_commonObjectName;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Full address as text
|
126 |
+
* @var string
|
127 |
+
*/
|
128 |
+
private $_fullAddressString;
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Constructs new instance of ResultAddressEx
|
132 |
+
* @param stdClass $stdClassResultAddressEx
|
133 |
+
*/
|
134 |
+
function __construct($stdClassResultAddressEx) {
|
135 |
+
$this->_resultSite = isset($stdClassResultAddressEx->resultSite) ? new ResultSite($stdClassResultAddressEx->resultSite) : null;
|
136 |
+
$this->_postCode = isset($stdClassResultAddressEx->postCode) ? $stdClassResultAddressEx->postCode : null;
|
137 |
+
$this->_streetName = isset($stdClassResultAddressEx->streetName) ? $stdClassResultAddressEx->streetName : null;
|
138 |
+
$this->_streetType = isset($stdClassResultAddressEx->streetType) ? $stdClassResultAddressEx->streetType : null;
|
139 |
+
$this->_streetId = isset($stdClassResultAddressEx->streetId) ? $stdClassResultAddressEx->streetId : null;
|
140 |
+
$this->_quarterName = isset($stdClassResultAddressEx->quarterName) ? $stdClassResultAddressEx->quarterName : null;
|
141 |
+
$this->_quarterType = isset($stdClassResultAddressEx->quarterType) ? $stdClassResultAddressEx->quarterType : null;
|
142 |
+
$this->_quarterId = isset($stdClassResultAddressEx->quarterId) ? $stdClassResultAddressEx->quarterId : null;
|
143 |
+
$this->_streetNo = isset($stdClassResultAddressEx->streetNo) ? $stdClassResultAddressEx->streetNo : null;
|
144 |
+
$this->_blockNo = isset($stdClassResultAddressEx->blockNo) ? $stdClassResultAddressEx->blockNo : null;
|
145 |
+
$this->_entranceNo = isset($stdClassResultAddressEx->entranceNo) ? $stdClassResultAddressEx->entranceNo : null;
|
146 |
+
$this->_floorNo = isset($stdClassResultAddressEx->floorNo) ? $stdClassResultAddressEx->floorNo : null;
|
147 |
+
$this->_apartmentNo = isset($stdClassResultAddressEx->apartmentNo) ? $stdClassResultAddressEx->apartmentNo : null;
|
148 |
+
$this->_addressNote = isset($stdClassResultAddressEx->addressNote) ? $stdClassResultAddressEx->addressNote : null;
|
149 |
+
$this->_coordX = isset($stdClassResultAddressEx->coordX) ? $stdClassResultAddressEx->coordX : null;
|
150 |
+
$this->_coordY = isset($stdClassResultAddressEx->coordY) ? $stdClassResultAddressEx->coordY : null;
|
151 |
+
$this->_coordTypeId = isset($stdClassResultAddressEx->coordTypeId) ? $stdClassResultAddressEx->coordTypeId : null;
|
152 |
+
$this->_commonObjectId = isset($stdClassResultAddressEx->commonObjectId) ? $stdClassResultAddressEx->commonObjectId : null;
|
153 |
+
$this->_commonObjectName = isset($stdClassResultAddressEx->commonObjectName) ? $stdClassResultAddressEx->commonObjectName : null;
|
154 |
+
$this->_fullAddressString = isset($stdClassResultAddressEx->fullAddressString) ? $stdClassResultAddressEx->fullAddressString : null;
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Get result site
|
160 |
+
* @return ResultSite
|
161 |
+
*/
|
162 |
+
public function getResultSite() {
|
163 |
+
return $this->_resultSite;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Get post code
|
168 |
+
* @return string
|
169 |
+
*/
|
170 |
+
public function getPostCode() {
|
171 |
+
return $this->_postCode;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Get street name
|
176 |
+
* @return string
|
177 |
+
*/
|
178 |
+
public function getStreetName() {
|
179 |
+
return $this->_streetName;
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Get street type
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
+
public function getStreetType() {
|
187 |
+
return $this->_streetType;
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Get street ID
|
192 |
+
* @return integer Signed 64-bit
|
193 |
+
*/
|
194 |
+
public function getStreetId() {
|
195 |
+
return $this->_streetId;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Get quarter name
|
200 |
+
* @return string
|
201 |
+
*/
|
202 |
+
public function getQuarterName() {
|
203 |
+
return $this->_quarterName;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Get quarter type
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
+
public function getQuarterType() {
|
211 |
+
return $this->_quarterType;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Get quarter ID
|
216 |
+
* @return integer Signed 64-bit
|
217 |
+
*/
|
218 |
+
public function getQuarterId() {
|
219 |
+
return $this->_quarterId;
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Get street No
|
224 |
+
* @return string
|
225 |
+
*/
|
226 |
+
public function getStreetNo() {
|
227 |
+
return $this->_streetNo;
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Get block No
|
232 |
+
* @return string
|
233 |
+
*/
|
234 |
+
public function getBlockNo() {
|
235 |
+
return $this->_blockNo;
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Get entrance No
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
+
public function getEntranceNo() {
|
243 |
+
return $this->_entranceNo;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Get floor No
|
248 |
+
* @return string
|
249 |
+
*/
|
250 |
+
public function getFloorNo() {
|
251 |
+
return $this->_floorNo;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Get appartment No
|
256 |
+
* @return string
|
257 |
+
*/
|
258 |
+
public function getApartmentNo() {
|
259 |
+
return $this->_apartmentNo;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Get address note
|
264 |
+
* @return string
|
265 |
+
*/
|
266 |
+
public function getAddressNote() {
|
267 |
+
return $this->_addressNote;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Get GPS X coordinate
|
272 |
+
* @return signed 64-bit real
|
273 |
+
*/
|
274 |
+
public function getCoordX() {
|
275 |
+
return $this->_coordX;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Get GPS Y coordinate
|
280 |
+
* @return signed 64-bit real
|
281 |
+
*/
|
282 |
+
public function getCoordY() {
|
283 |
+
return $this->_coordY;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Get GPS coordinate type
|
288 |
+
* @return signed 32-bit integer
|
289 |
+
*/
|
290 |
+
public function getCoordTypeId() {
|
291 |
+
return $this->_coordTypeId;
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Get common object ID
|
296 |
+
* @return integer Signed 64-bit
|
297 |
+
*/
|
298 |
+
public function getCommonObjectId() {
|
299 |
+
return $this->_commonObjectId;
|
300 |
+
}
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Get common object name
|
304 |
+
* @return string
|
305 |
+
*/
|
306 |
+
public function getCommonObjectName() {
|
307 |
+
return $this->_commonObjectName;
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Get full address string
|
312 |
+
* @return string
|
313 |
+
*/
|
314 |
+
public function getFullAddressString() {
|
315 |
+
return $this->_fullAddressString;
|
316 |
+
}
|
317 |
+
|
318 |
+
}
|
319 |
+
?>
|
lib/SpeedyEPS/ver01/ResultAddressSearch.class.php
CHANGED
@@ -1,134 +1,134 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of Speedy address search web service methods
|
4 |
-
*/
|
5 |
-
class ResultAddressSearch {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Text description of the address found
|
9 |
-
* @var string
|
10 |
-
*/
|
11 |
-
private $_text;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* GIS coordinates - X
|
15 |
-
* @var double Signed 64-bit
|
16 |
-
*/
|
17 |
-
private $_coordX;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* GIS coordinates - Y
|
21 |
-
* @var double Signed 64-bit
|
22 |
-
*/
|
23 |
-
private $_coordY;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Microregion ID
|
27 |
-
* @var integer Signed 64-bit
|
28 |
-
*/
|
29 |
-
private $_microregionId;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Distance to site's center in kilometers (straight line)
|
33 |
-
* @var double Signed 64-bit
|
34 |
-
*/
|
35 |
-
private $_distanceToSiteCenter;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Specifies if the address is actual now
|
39 |
-
* @var boolean
|
40 |
-
*/
|
41 |
-
private $_actual;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* GIS coordinates type
|
45 |
-
* @var integer Signed 32-bit
|
46 |
-
*/
|
47 |
-
private $_coordType;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Internal/debug info
|
51 |
-
* @var integer Signed 32-bit
|
52 |
-
*/
|
53 |
-
private $_additionalAddressProcessing;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Constructs new instance of ResultAddressSearch from stdClass
|
57 |
-
* @param stdClass $stdClassResultAddressSearch
|
58 |
-
*/
|
59 |
-
function __construct($stdClassResultAddressSearch) {
|
60 |
-
$this->_text = isset($stdClassResultAddressSearch->text) ? $stdClassResultAddressSearch->text : null;
|
61 |
-
$this->_coordX = isset($stdClassResultAddressSearch->coordX) ? $stdClassResultAddressSearch->coordX : null;
|
62 |
-
$this->_coordY = isset($stdClassResultAddressSearch->coordY) ? $stdClassResultAddressSearch->coordY : null;
|
63 |
-
$this->_microregionId = isset($stdClassResultAddressSearch->microregionId) ? $stdClassResultAddressSearch->microregionId : null;
|
64 |
-
$this->_distanceToSiteCenter = isset($stdClassResultAddressSearch->distanceToSiteCenter) ? $stdClassResultAddressSearch->distanceToSiteCenter : null;
|
65 |
-
$this->_actual = isset($stdClassResultAddressSearch->actual) ? $stdClassResultAddressSearch->actual : null;
|
66 |
-
$this->_coordType = isset($stdClassResultAddressSearch->coordType) ? $stdClassResultAddressSearch->coordType : null;
|
67 |
-
$this->_additionalAddressProcessing = isset($stdClassResultAddressSearch->additionalAddressProcessing) ? $stdClassResultAddressSearch->additionalAddressProcessing : null;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Get text description of the address found
|
72 |
-
* @return string
|
73 |
-
*/
|
74 |
-
public function getText() {
|
75 |
-
return $this->_text;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Get GIS coordinate - X
|
80 |
-
* @return double Signed 64-bit
|
81 |
-
*/
|
82 |
-
public function getCoordX() {
|
83 |
-
return $this->_coordX;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Get GIS coordinate - Y
|
88 |
-
* @return double Signed 64-bit
|
89 |
-
*/
|
90 |
-
public function getCoordY() {
|
91 |
-
return $this->_coordY;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Get microregion ID
|
96 |
-
* @return integer Signed 64-bit
|
97 |
-
*/
|
98 |
-
public function getMicroregionId() {
|
99 |
-
return $this->_microregionId;
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Get sistance to site's center in kilometers (straight line)
|
104 |
-
* @return double Signed 64-bit
|
105 |
-
*/
|
106 |
-
public function getDistanceToSiteCenter() {
|
107 |
-
return $this->_distanceToSiteCenter;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Check if address is actual now
|
112 |
-
* @return boolean
|
113 |
-
*/
|
114 |
-
public function isActual() {
|
115 |
-
return $this->_actual;
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Get GIS coordinates type
|
120 |
-
* @return integer Signed 32-bit
|
121 |
-
*/
|
122 |
-
public function getCoordType() {
|
123 |
-
return $this->_coordType;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Get internal/debug info
|
128 |
-
* @return integer Signed 32-bit
|
129 |
-
*/
|
130 |
-
public function getAdditionalAddressProcessing() {
|
131 |
-
return $this->_additionalAddressProcessing;
|
132 |
-
}
|
133 |
-
}
|
134 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of Speedy address search web service methods
|
4 |
+
*/
|
5 |
+
class ResultAddressSearch {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Text description of the address found
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
private $_text;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* GIS coordinates - X
|
15 |
+
* @var double Signed 64-bit
|
16 |
+
*/
|
17 |
+
private $_coordX;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* GIS coordinates - Y
|
21 |
+
* @var double Signed 64-bit
|
22 |
+
*/
|
23 |
+
private $_coordY;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Microregion ID
|
27 |
+
* @var integer Signed 64-bit
|
28 |
+
*/
|
29 |
+
private $_microregionId;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Distance to site's center in kilometers (straight line)
|
33 |
+
* @var double Signed 64-bit
|
34 |
+
*/
|
35 |
+
private $_distanceToSiteCenter;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Specifies if the address is actual now
|
39 |
+
* @var boolean
|
40 |
+
*/
|
41 |
+
private $_actual;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* GIS coordinates type
|
45 |
+
* @var integer Signed 32-bit
|
46 |
+
*/
|
47 |
+
private $_coordType;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Internal/debug info
|
51 |
+
* @var integer Signed 32-bit
|
52 |
+
*/
|
53 |
+
private $_additionalAddressProcessing;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Constructs new instance of ResultAddressSearch from stdClass
|
57 |
+
* @param stdClass $stdClassResultAddressSearch
|
58 |
+
*/
|
59 |
+
function __construct($stdClassResultAddressSearch) {
|
60 |
+
$this->_text = isset($stdClassResultAddressSearch->text) ? $stdClassResultAddressSearch->text : null;
|
61 |
+
$this->_coordX = isset($stdClassResultAddressSearch->coordX) ? $stdClassResultAddressSearch->coordX : null;
|
62 |
+
$this->_coordY = isset($stdClassResultAddressSearch->coordY) ? $stdClassResultAddressSearch->coordY : null;
|
63 |
+
$this->_microregionId = isset($stdClassResultAddressSearch->microregionId) ? $stdClassResultAddressSearch->microregionId : null;
|
64 |
+
$this->_distanceToSiteCenter = isset($stdClassResultAddressSearch->distanceToSiteCenter) ? $stdClassResultAddressSearch->distanceToSiteCenter : null;
|
65 |
+
$this->_actual = isset($stdClassResultAddressSearch->actual) ? $stdClassResultAddressSearch->actual : null;
|
66 |
+
$this->_coordType = isset($stdClassResultAddressSearch->coordType) ? $stdClassResultAddressSearch->coordType : null;
|
67 |
+
$this->_additionalAddressProcessing = isset($stdClassResultAddressSearch->additionalAddressProcessing) ? $stdClassResultAddressSearch->additionalAddressProcessing : null;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Get text description of the address found
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public function getText() {
|
75 |
+
return $this->_text;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get GIS coordinate - X
|
80 |
+
* @return double Signed 64-bit
|
81 |
+
*/
|
82 |
+
public function getCoordX() {
|
83 |
+
return $this->_coordX;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get GIS coordinate - Y
|
88 |
+
* @return double Signed 64-bit
|
89 |
+
*/
|
90 |
+
public function getCoordY() {
|
91 |
+
return $this->_coordY;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Get microregion ID
|
96 |
+
* @return integer Signed 64-bit
|
97 |
+
*/
|
98 |
+
public function getMicroregionId() {
|
99 |
+
return $this->_microregionId;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Get sistance to site's center in kilometers (straight line)
|
104 |
+
* @return double Signed 64-bit
|
105 |
+
*/
|
106 |
+
public function getDistanceToSiteCenter() {
|
107 |
+
return $this->_distanceToSiteCenter;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check if address is actual now
|
112 |
+
* @return boolean
|
113 |
+
*/
|
114 |
+
public function isActual() {
|
115 |
+
return $this->_actual;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Get GIS coordinates type
|
120 |
+
* @return integer Signed 32-bit
|
121 |
+
*/
|
122 |
+
public function getCoordType() {
|
123 |
+
return $this->_coordType;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Get internal/debug info
|
128 |
+
* @return integer Signed 32-bit
|
129 |
+
*/
|
130 |
+
public function getAdditionalAddressProcessing() {
|
131 |
+
return $this->_additionalAddressProcessing;
|
132 |
+
}
|
133 |
+
}
|
134 |
?>
|
lib/SpeedyEPS/ver01/ResultAmounts.class.php
CHANGED
@@ -1,516 +1,516 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class ResultAmounts {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* The real value of the shipment
|
7 |
-
* @access private
|
8 |
-
* @var double Signed 64-bit double
|
9 |
-
*/
|
10 |
-
private $_insuranceBase;
|
11 |
-
|
12 |
-
/**
|
13 |
-
* The insurance premium (i.e. the price of the "Insurance" complementary service)
|
14 |
-
* @access private
|
15 |
-
* @var double Signed 64-bit double
|
16 |
-
*/
|
17 |
-
private $_insurancePremium;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The net price (of the courier service only; w/o discounts, complementary services, VAT etc.)
|
21 |
-
* @access private
|
22 |
-
* @var double Signed 64-bit double
|
23 |
-
*/
|
24 |
-
private $_net;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* (NEGATIVE value) Fixed discount value
|
28 |
-
* @access private
|
29 |
-
* @var double Signed 64-bit double
|
30 |
-
*/
|
31 |
-
private $_discountFixed;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* (NEGATIVE value) Discount for shipments delivered to a Speedy office by the sender
|
35 |
-
* @access private
|
36 |
-
* @var double Signed 64-bit double
|
37 |
-
*/
|
38 |
-
private $_discountToOffice;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* (NEGATIVE value) Discount for the "To be called" complementary service
|
42 |
-
* @access private
|
43 |
-
* @var double Signed 64-bit double
|
44 |
-
*/
|
45 |
-
private $_discountToBeCalled;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* (NEGATIVE value) Additional discount
|
49 |
-
* @access private
|
50 |
-
* @var double Signed 64-bit double
|
51 |
-
*/
|
52 |
-
private $_discountAdditional;
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Packings value
|
56 |
-
* @access private
|
57 |
-
* @var double Signed 64-bit double
|
58 |
-
*/
|
59 |
-
private $_packings;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* The amount of the "Additional charges for loading/unloading operations" complementary service
|
63 |
-
* @access private
|
64 |
-
* @var double Signed 64-bit double
|
65 |
-
*/
|
66 |
-
private $_tro;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* The amount of the "Fixed time for delivery" complementary service
|
70 |
-
* @access private
|
71 |
-
* @var double Signed 64-bit double
|
72 |
-
*/
|
73 |
-
private $_fixedTimeDelivery;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Fuel surcharge
|
77 |
-
* @access private
|
78 |
-
* @var double Signed 64-bit double
|
79 |
-
*/
|
80 |
-
private $_fuelSurcharge;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Island surcharge (international shipments)
|
84 |
-
* @access private
|
85 |
-
* @var double Signed 64-bit double
|
86 |
-
*/
|
87 |
-
private $_islandSurcharge;
|
88 |
-
|
89 |
-
/**
|
90 |
-
* The "Cash on delivery" amount to be paid to the sender
|
91 |
-
* @access private
|
92 |
-
* @var double Signed 64-bit double
|
93 |
-
*/
|
94 |
-
private $_codBase;
|
95 |
-
|
96 |
-
/**
|
97 |
-
* The price of the "Cash on delivery" complementary service
|
98 |
-
* @access private
|
99 |
-
* @var double Signed 64-bit double
|
100 |
-
*/
|
101 |
-
private $_codPremium;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* VAT (Value added tax)
|
105 |
-
* @access private
|
106 |
-
* @var double Signed 64-bit double
|
107 |
-
*/
|
108 |
-
private $_vat;
|
109 |
-
|
110 |
-
/**
|
111 |
-
* The total amount
|
112 |
-
* @access private
|
113 |
-
* @var double Signed 64-bit double
|
114 |
-
*/
|
115 |
-
private $_total;
|
116 |
-
|
117 |
-
/**
|
118 |
-
* The PERCENTAGE of fixed discount
|
119 |
-
* @access private
|
120 |
-
* @var double Signed 64-bit double
|
121 |
-
*/
|
122 |
-
private $_discPcntFixed;
|
123 |
-
|
124 |
-
/**
|
125 |
-
* The PERCENTAGE of the "brought to office" complementary service
|
126 |
-
* @access private
|
127 |
-
* @var double Signed 64-bit double
|
128 |
-
*/
|
129 |
-
private $_discPcntToOffice;
|
130 |
-
|
131 |
-
/**
|
132 |
-
* The PERCENTAGE of the "To be called" complementary service
|
133 |
-
* @access private
|
134 |
-
* @var double Signed 64-bit double
|
135 |
-
*/
|
136 |
-
private $_discPcntToBeCalled;
|
137 |
-
|
138 |
-
/**
|
139 |
-
* The PERCENTAGE of additional discount
|
140 |
-
* @access private
|
141 |
-
* @var double Signed 64-bit double
|
142 |
-
*/
|
143 |
-
private $_discPcntAdditional;
|
144 |
-
|
145 |
-
/**
|
146 |
-
* The PERCENTAGE of fuel surcharge
|
147 |
-
* @access private
|
148 |
-
* @var double Signed 64-bit double
|
149 |
-
*/
|
150 |
-
private $_pcntFuelSurcharge;
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Constructs new instance of ResultAmounts from stdClass
|
154 |
-
* @param stdClass $stdClassResultAmounts
|
155 |
-
*/
|
156 |
-
function __construct($stdClassResultAmounts) {
|
157 |
-
$this->_insuranceBase = isset($stdClassResultAmounts->insuranceBase) ? $stdClassResultAmounts->insuranceBase : null;
|
158 |
-
$this->_insurancePremium = isset($stdClassResultAmounts->insurancePremium) ? $stdClassResultAmounts->insurancePremium : null;
|
159 |
-
$this->_net = isset($stdClassResultAmounts->net) ? $stdClassResultAmounts->net : null;
|
160 |
-
$this->_discountFixed = isset($stdClassResultAmounts->discountFixed) ? $stdClassResultAmounts->discountFixed : null;
|
161 |
-
$this->_discountToOffice = isset($stdClassResultAmounts->discountToOffice) ? $stdClassResultAmounts->discountToOffice : null;
|
162 |
-
$this->_discountToBeCalled = isset($stdClassResultAmounts->discountToBeCalled) ? $stdClassResultAmounts->discountToBeCalled : null;
|
163 |
-
$this->_discountAdditional = isset($stdClassResultAmounts->discountAdditional) ? $stdClassResultAmounts->discountAdditional : null;
|
164 |
-
$this->_packings = isset($stdClassResultAmounts->packings) ? $stdClassResultAmounts->packings : null;
|
165 |
-
$this->_tro = isset($stdClassResultAmounts->tro) ? $stdClassResultAmounts->tro : null;
|
166 |
-
$this->_fixedTimeDelivery = isset($stdClassResultAmounts->fixedTimeDelivery) ? $stdClassResultAmounts->fixedTimeDelivery : null;
|
167 |
-
$this->_fuelSurcharge = isset($stdClassResultAmounts->fuelSurcharge) ? $stdClassResultAmounts->fuelSurcharge : null;
|
168 |
-
$this->_islandSurcharge = isset($stdClassResultAmounts->islandSurcharge) ? $stdClassResultAmounts->islandSurcharge : null;
|
169 |
-
$this->_codBase = isset($stdClassResultAmounts->codBase) ? $stdClassResultAmounts->codBase : null;
|
170 |
-
$this->_codPremium = isset($stdClassResultAmounts->codPremium) ? $stdClassResultAmounts->codPremium : null;
|
171 |
-
$this->_vat = isset($stdClassResultAmounts->vat) ? $stdClassResultAmounts->vat : null;
|
172 |
-
$this->_total = isset($stdClassResultAmounts->total) ? $stdClassResultAmounts->total : null;
|
173 |
-
$this->_discPcntFixed = isset($stdClassResultAmounts->discPcntFixed) ? $stdClassResultAmounts->discPcntFixed : null;
|
174 |
-
$this->_discPcntToOffice = isset($stdClassResultAmounts->discPcntToOffice) ? $stdClassResultAmounts->discPcntToOffice : null;
|
175 |
-
$this->_discPcntToBeCalled = isset($stdClassResultAmounts->discPcntToBeCalled) ? $stdClassResultAmounts->discPcntToBeCalled : null;
|
176 |
-
$this->_discPcntAdditional = isset($stdClassResultAmounts->discPcntAdditional) ? $stdClassResultAmounts->discPcntAdditional : null;
|
177 |
-
$this->_pcntFuelSurcharge = isset($stdClassResultAmounts->pcntFuelSurcharge) ? $stdClassResultAmounts->pcntFuelSurcharge : null;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Set real value of the shipment
|
182 |
-
* @param double $insuranceBase Signed 64-bit double value
|
183 |
-
*/
|
184 |
-
public function setInsuranceBase($insuranceBase) {
|
185 |
-
$this->_insuranceBase = $insuranceBase;
|
186 |
-
}
|
187 |
-
|
188 |
-
/**
|
189 |
-
* Get real value of the shipment
|
190 |
-
* @return double Signed 64-bit double value
|
191 |
-
*/
|
192 |
-
public function getInsuranceBase() {
|
193 |
-
return $this->_insuranceBase;
|
194 |
-
}
|
195 |
-
|
196 |
-
/**
|
197 |
-
* Set insurance premium (i.e. the price of the "Insurance" complementary service)
|
198 |
-
* @param double $insurancePremium Signed 64-bit double value
|
199 |
-
*/
|
200 |
-
public function setInsurancePremium($insurancePremium) {
|
201 |
-
$this->_insurancePremium = $insurancePremium;
|
202 |
-
}
|
203 |
-
|
204 |
-
/**
|
205 |
-
* Get insurance premium
|
206 |
-
* @return double Signed 64-bit double value
|
207 |
-
*/
|
208 |
-
public function getInsurancePremium() {
|
209 |
-
return $this->_insurancePremium;
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Set net price (of the courier service only; w/o discounts, complementary services, VAT etc.)
|
214 |
-
* @param double $net Signed 64-bit double value
|
215 |
-
*/
|
216 |
-
public function setNet($net) {
|
217 |
-
$this->_net = $net;
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Get net price
|
222 |
-
* @return double Signed 64-bit double value
|
223 |
-
*/
|
224 |
-
public function getNet() {
|
225 |
-
return $this->_net;
|
226 |
-
}
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Set fixed discount value (NEGATIVE value).
|
230 |
-
* @param double $discountFixed Signed 64-bit double value
|
231 |
-
*/
|
232 |
-
public function setDiscountFixed($discountFixed) {
|
233 |
-
$this->_discountFixed = $discountFixed;
|
234 |
-
}
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Get fixed discount value (NEGATIVE value)
|
238 |
-
* @return double Signed 64-bit double value
|
239 |
-
*/
|
240 |
-
public function getDiscountFixed() {
|
241 |
-
return $this->_discountFixed;
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* Set discount for shipments delivered to a Speedy office by the sender (NEGATIVE value).
|
246 |
-
* @param double $discountToOffice Signed 64-bit double value
|
247 |
-
*/
|
248 |
-
public function setDiscountToOffice($discountToOffice) {
|
249 |
-
$this->_discountToOffice = $discountToOffice;
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Get discount for shipments delivered to a Speedy office by the sender (NEGATIVE value)
|
254 |
-
* @return double Signed 64-bit double value
|
255 |
-
*/
|
256 |
-
public function getDiscountToOffice() {
|
257 |
-
return $this->_discountToOffice;
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* Set discount for the "To be called" complementary service (NEGATIVE value).
|
262 |
-
* @param double $discountToBeCalled Signed 64-bit double value
|
263 |
-
*/
|
264 |
-
public function setDiscountToBeCalled($discountToBeCalled) {
|
265 |
-
$this->_discountToBeCalled = $discountToBeCalled;
|
266 |
-
}
|
267 |
-
|
268 |
-
/**
|
269 |
-
* Get discount for the "To be called" complementary service (NEGATIVE value)
|
270 |
-
* @return double Signed 64-bit double value
|
271 |
-
*/
|
272 |
-
public function getDiscountToBeCalled() {
|
273 |
-
return $this->_discountToBeCalled;
|
274 |
-
}
|
275 |
-
|
276 |
-
/**
|
277 |
-
* Set additional discount (NEGATIVE value).
|
278 |
-
* @param double $discountAdditional Signed 64-bit double value
|
279 |
-
*/
|
280 |
-
public function setDiscountAdditional($discountAdditional) {
|
281 |
-
$this->_discountAdditional = $discountAdditional;
|
282 |
-
}
|
283 |
-
|
284 |
-
/**
|
285 |
-
* Get additional discount (NEGATIVE value)
|
286 |
-
* @return double Signed 64-bit double value
|
287 |
-
*/
|
288 |
-
public function getDiscountAdditional() {
|
289 |
-
return $this->_discountAdditional;
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Set packings value
|
294 |
-
* @param double $packings Signed 64-bit double value
|
295 |
-
*/
|
296 |
-
public function setPackings($packings) {
|
297 |
-
$this->_packings = $packings;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Get packings value
|
302 |
-
* @return double Signed 64-bit double value
|
303 |
-
*/
|
304 |
-
public function getPackings() {
|
305 |
-
return $this->_packings;
|
306 |
-
}
|
307 |
-
|
308 |
-
/**
|
309 |
-
* Set amount of the "Additional charges for loading/unloading operations" complementary service
|
310 |
-
* @param double $tro Signed 64-bit double value
|
311 |
-
*/
|
312 |
-
public function setTro($tro) {
|
313 |
-
$this->_tro = $tro;
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Get amount of the "Additional charges for loading/unloading operations" complementary service
|
318 |
-
* @return double Signed 64-bit double value
|
319 |
-
*/
|
320 |
-
public function getTro() {
|
321 |
-
return $this->_tro;
|
322 |
-
}
|
323 |
-
|
324 |
-
/**
|
325 |
-
* Set amount of the "Fixed time for delivery" complementary service
|
326 |
-
* @param double $fixedTimeDelivery Signed 64-bit double value
|
327 |
-
*/
|
328 |
-
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
329 |
-
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
330 |
-
}
|
331 |
-
|
332 |
-
/**
|
333 |
-
* Get amount of the "Fixed time for delivery" complementary service
|
334 |
-
* @return double Signed 64-bit double value
|
335 |
-
*/
|
336 |
-
public function getFixedTimeDelivery() {
|
337 |
-
return $this->_fixedTimeDelivery;
|
338 |
-
}
|
339 |
-
|
340 |
-
/**
|
341 |
-
* Set fuel surcharge
|
342 |
-
* @param double $fuelSurcharge Signed 64-bit double value
|
343 |
-
*/
|
344 |
-
public function setFuelSurcharge($fuelSurcharge) {
|
345 |
-
$this->_fuelSurcharge = $fuelSurcharge;
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Get fuel surcharge
|
350 |
-
* @return double Signed 64-bit double value
|
351 |
-
*/
|
352 |
-
public function getFuelSurcharge() {
|
353 |
-
return $this->_fuelSurcharge;
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Set island surcharge (international shipments)
|
358 |
-
* @param double $islandSurcharge Signed 64-bit double value
|
359 |
-
*/
|
360 |
-
public function setIslandSurcharge($islandSurcharge) {
|
361 |
-
$this->_islandSurcharge = $islandSurcharge;
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Get island surcharge (international shipments)
|
366 |
-
* @return double Signed 64-bit double value
|
367 |
-
*/
|
368 |
-
public function getIslandSurcharge() {
|
369 |
-
return $this->_islandSurcharge;
|
370 |
-
}
|
371 |
-
|
372 |
-
/**
|
373 |
-
* Set "Cash on delivery" amount to be paid to the sender
|
374 |
-
* @param double $codBase Signed 64-bit double value
|
375 |
-
*/
|
376 |
-
public function setCodBase($codBase) {
|
377 |
-
$this->_codBase = $codBase;
|
378 |
-
}
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Get "Cash on delivery" amount to be paid to the sender
|
382 |
-
* @return double Signed 64-bit double value
|
383 |
-
*/
|
384 |
-
public function getCodBase() {
|
385 |
-
return $this->_codBase;
|
386 |
-
}
|
387 |
-
|
388 |
-
/**
|
389 |
-
* Set the price of the "Cash on delivery" complementary service
|
390 |
-
* @param double $codPremium Signed 64-bit double value
|
391 |
-
*/
|
392 |
-
public function setCodPremium($codPremium) {
|
393 |
-
$this->_codPremium = $codPremium;
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* Get the price of the "Cash on delivery" complementary service
|
398 |
-
* @return double Signed 64-bit double value
|
399 |
-
*/
|
400 |
-
public function getCodPremium() {
|
401 |
-
return $this->_codPremium;
|
402 |
-
}
|
403 |
-
|
404 |
-
/**
|
405 |
-
* Set value added tax
|
406 |
-
* @param double $vat Signed 64-bit double value
|
407 |
-
*/
|
408 |
-
public function setVat($vat) {
|
409 |
-
$this->_vat = $vat;
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Get value added tax
|
414 |
-
* @return double Signed 64-bit double value
|
415 |
-
*/
|
416 |
-
public function getVat() {
|
417 |
-
return $this->_vat;
|
418 |
-
}
|
419 |
-
|
420 |
-
/**
|
421 |
-
* Set total amount
|
422 |
-
* @param double $total Signed 64-bit double value
|
423 |
-
*/
|
424 |
-
public function setTotal($total) {
|
425 |
-
$this->_total = $total;
|
426 |
-
}
|
427 |
-
|
428 |
-
/**
|
429 |
-
* Get total amount
|
430 |
-
* @return double Signed 64-bit double value
|
431 |
-
*/
|
432 |
-
public function getTotal() {
|
433 |
-
return $this->_total;
|
434 |
-
}
|
435 |
-
|
436 |
-
/**
|
437 |
-
* Set PERCENTAGE of fixed discount
|
438 |
-
* @param double $discPcntFixed Signed 64-bit double value
|
439 |
-
*/
|
440 |
-
public function setDiscPcntFixed($discPcntFixed) {
|
441 |
-
$this->_discPcntFixed = $discPcntFixed;
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Get PERCENTAGE of fixed discount
|
446 |
-
* @return double Signed 64-bit double value
|
447 |
-
*/
|
448 |
-
public function getDiscPcntFixed() {
|
449 |
-
return $this->_discPcntFixed;
|
450 |
-
}
|
451 |
-
|
452 |
-
/**
|
453 |
-
* Set PERCENTAGE of the "brought to office" complementary service
|
454 |
-
* @param double $discPcntToOffice Signed 64-bit double value
|
455 |
-
*/
|
456 |
-
public function setDiscPcntToOffice($discPcntToOffice) {
|
457 |
-
$this->_discPcntToOffice = $discPcntToOffice;
|
458 |
-
}
|
459 |
-
|
460 |
-
/**
|
461 |
-
* Get PERCENTAGE of the "brought to office" complementary service
|
462 |
-
* @return double Signed 64-bit double value
|
463 |
-
*/
|
464 |
-
public function getDiscPcntToOffice() {
|
465 |
-
return $this->_discPcntToOffice;
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* Set PERCENTAGE of the "To be called" complementary service
|
470 |
-
* @param double $discPcntToBeCalled Signed 64-bit double value
|
471 |
-
*/
|
472 |
-
public function setDiscPcntToBeCalled($discPcntToBeCalled) {
|
473 |
-
$this->_discPcntToBeCalled = $discPcntToBeCalled;
|
474 |
-
}
|
475 |
-
|
476 |
-
/**
|
477 |
-
* Get PERCENTAGE of the "To be called" complementary service
|
478 |
-
* @return double Signed 64-bit double value
|
479 |
-
*/
|
480 |
-
public function getDiscPcntToBeCalled() {
|
481 |
-
return $this->_discPcntToBeCalled;
|
482 |
-
}
|
483 |
-
|
484 |
-
/**
|
485 |
-
* Set PERCENTAGE of additional discount
|
486 |
-
* @param double $discPcntAdditional Signed 64-bit double value
|
487 |
-
*/
|
488 |
-
public function setDiscPcntAdditional($discPcntAdditional) {
|
489 |
-
$this->_discPcntAdditional = $discPcntAdditional;
|
490 |
-
}
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Get PERCENTAGE of additional discount
|
494 |
-
* @return double Signed 64-bit double value
|
495 |
-
*/
|
496 |
-
public function getDiscPcntAdditional() {
|
497 |
-
return $this->_discPcntAdditional;
|
498 |
-
}
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Set PERCENTAGE of fuel surcharge
|
502 |
-
* @param double $pcntFuelSurcharge Signed 64-bit double value
|
503 |
-
*/
|
504 |
-
public function setPcntFuelSurcharge($pcntFuelSurcharge) {
|
505 |
-
$this->_pcntFuelSurcharge = $pcntFuelSurcharge;
|
506 |
-
}
|
507 |
-
|
508 |
-
/**
|
509 |
-
* Get PERCENTAGE of fuel surcharge
|
510 |
-
* @return double Signed 64-bit double value
|
511 |
-
*/
|
512 |
-
public function getPcntFuelSurcharge() {
|
513 |
-
return $this->_pcntFuelSurcharge;
|
514 |
-
}
|
515 |
-
}
|
516 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ResultAmounts {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* The real value of the shipment
|
7 |
+
* @access private
|
8 |
+
* @var double Signed 64-bit double
|
9 |
+
*/
|
10 |
+
private $_insuranceBase;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* The insurance premium (i.e. the price of the "Insurance" complementary service)
|
14 |
+
* @access private
|
15 |
+
* @var double Signed 64-bit double
|
16 |
+
*/
|
17 |
+
private $_insurancePremium;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The net price (of the courier service only; w/o discounts, complementary services, VAT etc.)
|
21 |
+
* @access private
|
22 |
+
* @var double Signed 64-bit double
|
23 |
+
*/
|
24 |
+
private $_net;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* (NEGATIVE value) Fixed discount value
|
28 |
+
* @access private
|
29 |
+
* @var double Signed 64-bit double
|
30 |
+
*/
|
31 |
+
private $_discountFixed;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* (NEGATIVE value) Discount for shipments delivered to a Speedy office by the sender
|
35 |
+
* @access private
|
36 |
+
* @var double Signed 64-bit double
|
37 |
+
*/
|
38 |
+
private $_discountToOffice;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* (NEGATIVE value) Discount for the "To be called" complementary service
|
42 |
+
* @access private
|
43 |
+
* @var double Signed 64-bit double
|
44 |
+
*/
|
45 |
+
private $_discountToBeCalled;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* (NEGATIVE value) Additional discount
|
49 |
+
* @access private
|
50 |
+
* @var double Signed 64-bit double
|
51 |
+
*/
|
52 |
+
private $_discountAdditional;
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Packings value
|
56 |
+
* @access private
|
57 |
+
* @var double Signed 64-bit double
|
58 |
+
*/
|
59 |
+
private $_packings;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* The amount of the "Additional charges for loading/unloading operations" complementary service
|
63 |
+
* @access private
|
64 |
+
* @var double Signed 64-bit double
|
65 |
+
*/
|
66 |
+
private $_tro;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* The amount of the "Fixed time for delivery" complementary service
|
70 |
+
* @access private
|
71 |
+
* @var double Signed 64-bit double
|
72 |
+
*/
|
73 |
+
private $_fixedTimeDelivery;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Fuel surcharge
|
77 |
+
* @access private
|
78 |
+
* @var double Signed 64-bit double
|
79 |
+
*/
|
80 |
+
private $_fuelSurcharge;
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Island surcharge (international shipments)
|
84 |
+
* @access private
|
85 |
+
* @var double Signed 64-bit double
|
86 |
+
*/
|
87 |
+
private $_islandSurcharge;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* The "Cash on delivery" amount to be paid to the sender
|
91 |
+
* @access private
|
92 |
+
* @var double Signed 64-bit double
|
93 |
+
*/
|
94 |
+
private $_codBase;
|
95 |
+
|
96 |
+
/**
|
97 |
+
* The price of the "Cash on delivery" complementary service
|
98 |
+
* @access private
|
99 |
+
* @var double Signed 64-bit double
|
100 |
+
*/
|
101 |
+
private $_codPremium;
|
102 |
+
|
103 |
+
/**
|
104 |
+
* VAT (Value added tax)
|
105 |
+
* @access private
|
106 |
+
* @var double Signed 64-bit double
|
107 |
+
*/
|
108 |
+
private $_vat;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* The total amount
|
112 |
+
* @access private
|
113 |
+
* @var double Signed 64-bit double
|
114 |
+
*/
|
115 |
+
private $_total;
|
116 |
+
|
117 |
+
/**
|
118 |
+
* The PERCENTAGE of fixed discount
|
119 |
+
* @access private
|
120 |
+
* @var double Signed 64-bit double
|
121 |
+
*/
|
122 |
+
private $_discPcntFixed;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* The PERCENTAGE of the "brought to office" complementary service
|
126 |
+
* @access private
|
127 |
+
* @var double Signed 64-bit double
|
128 |
+
*/
|
129 |
+
private $_discPcntToOffice;
|
130 |
+
|
131 |
+
/**
|
132 |
+
* The PERCENTAGE of the "To be called" complementary service
|
133 |
+
* @access private
|
134 |
+
* @var double Signed 64-bit double
|
135 |
+
*/
|
136 |
+
private $_discPcntToBeCalled;
|
137 |
+
|
138 |
+
/**
|
139 |
+
* The PERCENTAGE of additional discount
|
140 |
+
* @access private
|
141 |
+
* @var double Signed 64-bit double
|
142 |
+
*/
|
143 |
+
private $_discPcntAdditional;
|
144 |
+
|
145 |
+
/**
|
146 |
+
* The PERCENTAGE of fuel surcharge
|
147 |
+
* @access private
|
148 |
+
* @var double Signed 64-bit double
|
149 |
+
*/
|
150 |
+
private $_pcntFuelSurcharge;
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Constructs new instance of ResultAmounts from stdClass
|
154 |
+
* @param stdClass $stdClassResultAmounts
|
155 |
+
*/
|
156 |
+
function __construct($stdClassResultAmounts) {
|
157 |
+
$this->_insuranceBase = isset($stdClassResultAmounts->insuranceBase) ? $stdClassResultAmounts->insuranceBase : null;
|
158 |
+
$this->_insurancePremium = isset($stdClassResultAmounts->insurancePremium) ? $stdClassResultAmounts->insurancePremium : null;
|
159 |
+
$this->_net = isset($stdClassResultAmounts->net) ? $stdClassResultAmounts->net : null;
|
160 |
+
$this->_discountFixed = isset($stdClassResultAmounts->discountFixed) ? $stdClassResultAmounts->discountFixed : null;
|
161 |
+
$this->_discountToOffice = isset($stdClassResultAmounts->discountToOffice) ? $stdClassResultAmounts->discountToOffice : null;
|
162 |
+
$this->_discountToBeCalled = isset($stdClassResultAmounts->discountToBeCalled) ? $stdClassResultAmounts->discountToBeCalled : null;
|
163 |
+
$this->_discountAdditional = isset($stdClassResultAmounts->discountAdditional) ? $stdClassResultAmounts->discountAdditional : null;
|
164 |
+
$this->_packings = isset($stdClassResultAmounts->packings) ? $stdClassResultAmounts->packings : null;
|
165 |
+
$this->_tro = isset($stdClassResultAmounts->tro) ? $stdClassResultAmounts->tro : null;
|
166 |
+
$this->_fixedTimeDelivery = isset($stdClassResultAmounts->fixedTimeDelivery) ? $stdClassResultAmounts->fixedTimeDelivery : null;
|
167 |
+
$this->_fuelSurcharge = isset($stdClassResultAmounts->fuelSurcharge) ? $stdClassResultAmounts->fuelSurcharge : null;
|
168 |
+
$this->_islandSurcharge = isset($stdClassResultAmounts->islandSurcharge) ? $stdClassResultAmounts->islandSurcharge : null;
|
169 |
+
$this->_codBase = isset($stdClassResultAmounts->codBase) ? $stdClassResultAmounts->codBase : null;
|
170 |
+
$this->_codPremium = isset($stdClassResultAmounts->codPremium) ? $stdClassResultAmounts->codPremium : null;
|
171 |
+
$this->_vat = isset($stdClassResultAmounts->vat) ? $stdClassResultAmounts->vat : null;
|
172 |
+
$this->_total = isset($stdClassResultAmounts->total) ? $stdClassResultAmounts->total : null;
|
173 |
+
$this->_discPcntFixed = isset($stdClassResultAmounts->discPcntFixed) ? $stdClassResultAmounts->discPcntFixed : null;
|
174 |
+
$this->_discPcntToOffice = isset($stdClassResultAmounts->discPcntToOffice) ? $stdClassResultAmounts->discPcntToOffice : null;
|
175 |
+
$this->_discPcntToBeCalled = isset($stdClassResultAmounts->discPcntToBeCalled) ? $stdClassResultAmounts->discPcntToBeCalled : null;
|
176 |
+
$this->_discPcntAdditional = isset($stdClassResultAmounts->discPcntAdditional) ? $stdClassResultAmounts->discPcntAdditional : null;
|
177 |
+
$this->_pcntFuelSurcharge = isset($stdClassResultAmounts->pcntFuelSurcharge) ? $stdClassResultAmounts->pcntFuelSurcharge : null;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Set real value of the shipment
|
182 |
+
* @param double $insuranceBase Signed 64-bit double value
|
183 |
+
*/
|
184 |
+
public function setInsuranceBase($insuranceBase) {
|
185 |
+
$this->_insuranceBase = $insuranceBase;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Get real value of the shipment
|
190 |
+
* @return double Signed 64-bit double value
|
191 |
+
*/
|
192 |
+
public function getInsuranceBase() {
|
193 |
+
return $this->_insuranceBase;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Set insurance premium (i.e. the price of the "Insurance" complementary service)
|
198 |
+
* @param double $insurancePremium Signed 64-bit double value
|
199 |
+
*/
|
200 |
+
public function setInsurancePremium($insurancePremium) {
|
201 |
+
$this->_insurancePremium = $insurancePremium;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Get insurance premium
|
206 |
+
* @return double Signed 64-bit double value
|
207 |
+
*/
|
208 |
+
public function getInsurancePremium() {
|
209 |
+
return $this->_insurancePremium;
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Set net price (of the courier service only; w/o discounts, complementary services, VAT etc.)
|
214 |
+
* @param double $net Signed 64-bit double value
|
215 |
+
*/
|
216 |
+
public function setNet($net) {
|
217 |
+
$this->_net = $net;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Get net price
|
222 |
+
* @return double Signed 64-bit double value
|
223 |
+
*/
|
224 |
+
public function getNet() {
|
225 |
+
return $this->_net;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Set fixed discount value (NEGATIVE value).
|
230 |
+
* @param double $discountFixed Signed 64-bit double value
|
231 |
+
*/
|
232 |
+
public function setDiscountFixed($discountFixed) {
|
233 |
+
$this->_discountFixed = $discountFixed;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Get fixed discount value (NEGATIVE value)
|
238 |
+
* @return double Signed 64-bit double value
|
239 |
+
*/
|
240 |
+
public function getDiscountFixed() {
|
241 |
+
return $this->_discountFixed;
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Set discount for shipments delivered to a Speedy office by the sender (NEGATIVE value).
|
246 |
+
* @param double $discountToOffice Signed 64-bit double value
|
247 |
+
*/
|
248 |
+
public function setDiscountToOffice($discountToOffice) {
|
249 |
+
$this->_discountToOffice = $discountToOffice;
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Get discount for shipments delivered to a Speedy office by the sender (NEGATIVE value)
|
254 |
+
* @return double Signed 64-bit double value
|
255 |
+
*/
|
256 |
+
public function getDiscountToOffice() {
|
257 |
+
return $this->_discountToOffice;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Set discount for the "To be called" complementary service (NEGATIVE value).
|
262 |
+
* @param double $discountToBeCalled Signed 64-bit double value
|
263 |
+
*/
|
264 |
+
public function setDiscountToBeCalled($discountToBeCalled) {
|
265 |
+
$this->_discountToBeCalled = $discountToBeCalled;
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Get discount for the "To be called" complementary service (NEGATIVE value)
|
270 |
+
* @return double Signed 64-bit double value
|
271 |
+
*/
|
272 |
+
public function getDiscountToBeCalled() {
|
273 |
+
return $this->_discountToBeCalled;
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Set additional discount (NEGATIVE value).
|
278 |
+
* @param double $discountAdditional Signed 64-bit double value
|
279 |
+
*/
|
280 |
+
public function setDiscountAdditional($discountAdditional) {
|
281 |
+
$this->_discountAdditional = $discountAdditional;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Get additional discount (NEGATIVE value)
|
286 |
+
* @return double Signed 64-bit double value
|
287 |
+
*/
|
288 |
+
public function getDiscountAdditional() {
|
289 |
+
return $this->_discountAdditional;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Set packings value
|
294 |
+
* @param double $packings Signed 64-bit double value
|
295 |
+
*/
|
296 |
+
public function setPackings($packings) {
|
297 |
+
$this->_packings = $packings;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Get packings value
|
302 |
+
* @return double Signed 64-bit double value
|
303 |
+
*/
|
304 |
+
public function getPackings() {
|
305 |
+
return $this->_packings;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Set amount of the "Additional charges for loading/unloading operations" complementary service
|
310 |
+
* @param double $tro Signed 64-bit double value
|
311 |
+
*/
|
312 |
+
public function setTro($tro) {
|
313 |
+
$this->_tro = $tro;
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Get amount of the "Additional charges for loading/unloading operations" complementary service
|
318 |
+
* @return double Signed 64-bit double value
|
319 |
+
*/
|
320 |
+
public function getTro() {
|
321 |
+
return $this->_tro;
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Set amount of the "Fixed time for delivery" complementary service
|
326 |
+
* @param double $fixedTimeDelivery Signed 64-bit double value
|
327 |
+
*/
|
328 |
+
public function setFixedTimeDelivery($fixedTimeDelivery) {
|
329 |
+
$this->_fixedTimeDelivery = $fixedTimeDelivery;
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Get amount of the "Fixed time for delivery" complementary service
|
334 |
+
* @return double Signed 64-bit double value
|
335 |
+
*/
|
336 |
+
public function getFixedTimeDelivery() {
|
337 |
+
return $this->_fixedTimeDelivery;
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Set fuel surcharge
|
342 |
+
* @param double $fuelSurcharge Signed 64-bit double value
|
343 |
+
*/
|
344 |
+
public function setFuelSurcharge($fuelSurcharge) {
|
345 |
+
$this->_fuelSurcharge = $fuelSurcharge;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Get fuel surcharge
|
350 |
+
* @return double Signed 64-bit double value
|
351 |
+
*/
|
352 |
+
public function getFuelSurcharge() {
|
353 |
+
return $this->_fuelSurcharge;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Set island surcharge (international shipments)
|
358 |
+
* @param double $islandSurcharge Signed 64-bit double value
|
359 |
+
*/
|
360 |
+
public function setIslandSurcharge($islandSurcharge) {
|
361 |
+
$this->_islandSurcharge = $islandSurcharge;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Get island surcharge (international shipments)
|
366 |
+
* @return double Signed 64-bit double value
|
367 |
+
*/
|
368 |
+
public function getIslandSurcharge() {
|
369 |
+
return $this->_islandSurcharge;
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Set "Cash on delivery" amount to be paid to the sender
|
374 |
+
* @param double $codBase Signed 64-bit double value
|
375 |
+
*/
|
376 |
+
public function setCodBase($codBase) {
|
377 |
+
$this->_codBase = $codBase;
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Get "Cash on delivery" amount to be paid to the sender
|
382 |
+
* @return double Signed 64-bit double value
|
383 |
+
*/
|
384 |
+
public function getCodBase() {
|
385 |
+
return $this->_codBase;
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Set the price of the "Cash on delivery" complementary service
|
390 |
+
* @param double $codPremium Signed 64-bit double value
|
391 |
+
*/
|
392 |
+
public function setCodPremium($codPremium) {
|
393 |
+
$this->_codPremium = $codPremium;
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Get the price of the "Cash on delivery" complementary service
|
398 |
+
* @return double Signed 64-bit double value
|
399 |
+
*/
|
400 |
+
public function getCodPremium() {
|
401 |
+
return $this->_codPremium;
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Set value added tax
|
406 |
+
* @param double $vat Signed 64-bit double value
|
407 |
+
*/
|
408 |
+
public function setVat($vat) {
|
409 |
+
$this->_vat = $vat;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Get value added tax
|
414 |
+
* @return double Signed 64-bit double value
|
415 |
+
*/
|
416 |
+
public function getVat() {
|
417 |
+
return $this->_vat;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Set total amount
|
422 |
+
* @param double $total Signed 64-bit double value
|
423 |
+
*/
|
424 |
+
public function setTotal($total) {
|
425 |
+
$this->_total = $total;
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Get total amount
|
430 |
+
* @return double Signed 64-bit double value
|
431 |
+
*/
|
432 |
+
public function getTotal() {
|
433 |
+
return $this->_total;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Set PERCENTAGE of fixed discount
|
438 |
+
* @param double $discPcntFixed Signed 64-bit double value
|
439 |
+
*/
|
440 |
+
public function setDiscPcntFixed($discPcntFixed) {
|
441 |
+
$this->_discPcntFixed = $discPcntFixed;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Get PERCENTAGE of fixed discount
|
446 |
+
* @return double Signed 64-bit double value
|
447 |
+
*/
|
448 |
+
public function getDiscPcntFixed() {
|
449 |
+
return $this->_discPcntFixed;
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Set PERCENTAGE of the "brought to office" complementary service
|
454 |
+
* @param double $discPcntToOffice Signed 64-bit double value
|
455 |
+
*/
|
456 |
+
public function setDiscPcntToOffice($discPcntToOffice) {
|
457 |
+
$this->_discPcntToOffice = $discPcntToOffice;
|
458 |
+
}
|
459 |
+
|
460 |
+
/**
|
461 |
+
* Get PERCENTAGE of the "brought to office" complementary service
|
462 |
+
* @return double Signed 64-bit double value
|
463 |
+
*/
|
464 |
+
public function getDiscPcntToOffice() {
|
465 |
+
return $this->_discPcntToOffice;
|
466 |
+
}
|
467 |
+
|
468 |
+
/**
|
469 |
+
* Set PERCENTAGE of the "To be called" complementary service
|
470 |
+
* @param double $discPcntToBeCalled Signed 64-bit double value
|
471 |
+
*/
|
472 |
+
public function setDiscPcntToBeCalled($discPcntToBeCalled) {
|
473 |
+
$this->_discPcntToBeCalled = $discPcntToBeCalled;
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Get PERCENTAGE of the "To be called" complementary service
|
478 |
+
* @return double Signed 64-bit double value
|
479 |
+
*/
|
480 |
+
public function getDiscPcntToBeCalled() {
|
481 |
+
return $this->_discPcntToBeCalled;
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Set PERCENTAGE of additional discount
|
486 |
+
* @param double $discPcntAdditional Signed 64-bit double value
|
487 |
+
*/
|
488 |
+
public function setDiscPcntAdditional($discPcntAdditional) {
|
489 |
+
$this->_discPcntAdditional = $discPcntAdditional;
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Get PERCENTAGE of additional discount
|
494 |
+
* @return double Signed 64-bit double value
|
495 |
+
*/
|
496 |
+
public function getDiscPcntAdditional() {
|
497 |
+
return $this->_discPcntAdditional;
|
498 |
+
}
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Set PERCENTAGE of fuel surcharge
|
502 |
+
* @param double $pcntFuelSurcharge Signed 64-bit double value
|
503 |
+
*/
|
504 |
+
public function setPcntFuelSurcharge($pcntFuelSurcharge) {
|
505 |
+
$this->_pcntFuelSurcharge = $pcntFuelSurcharge;
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Get PERCENTAGE of fuel surcharge
|
510 |
+
* @return double Signed 64-bit double value
|
511 |
+
*/
|
512 |
+
public function getPcntFuelSurcharge() {
|
513 |
+
return $this->_pcntFuelSurcharge;
|
514 |
+
}
|
515 |
+
}
|
516 |
?>
|
lib/SpeedyEPS/ver01/ResultBOL.class.php
CHANGED
@@ -1,72 +1,72 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ResultParcelInfo.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are returned as a result of create picking speedy web service calls
|
7 |
-
*/
|
8 |
-
class ResultBOL {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* List of parcels data
|
12 |
-
* @var array List of ResultParcelInfo
|
13 |
-
*/
|
14 |
-
private $_generatedParcels;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Amounts
|
18 |
-
* @var ResultAmounts
|
19 |
-
*/
|
20 |
-
private $_amounts;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Deadline for delivery
|
24 |
-
* @var date
|
25 |
-
*/
|
26 |
-
private $_deadlineDelivery;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Constructs new instance of ResultBOL from stdClass
|
30 |
-
* @param stdClass $stdClassResultBOL
|
31 |
-
*/
|
32 |
-
function __construct($stdClassResultBOL) {
|
33 |
-
$arrResultParcelInfo = array();
|
34 |
-
if (isset($stdClassResultBOL->generatedParcels)) {
|
35 |
-
if (is_array($stdClassResultBOL->generatedParcels)) {
|
36 |
-
for($i = 0; $i < count($stdClassResultBOL->generatedParcels); $i++) {
|
37 |
-
$arrResultParcelInfo[$i] = new ResultParcelInfo($stdClassResultBOL->generatedParcels[$i]);
|
38 |
-
}
|
39 |
-
} else {
|
40 |
-
$arrResultParcelInfo[0] = new ResultParcelInfo($stdClassResultBOL->generatedParcels);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
$this->_generatedParcels = $arrResultParcelInfo;
|
44 |
-
$this->_amounts = isset($stdClassResultBOL->amounts) ? new ResultAmounts($stdClassResultBOL->amounts) : null;
|
45 |
-
$this->_deadlineDelivery = isset($stdClassResultBOL->deadlineDelivery) ? $stdClassResultBOL->deadlineDelivery : null;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Return list of parcels data
|
50 |
-
* @return array List of ResultParcelInfo
|
51 |
-
*/
|
52 |
-
public function getGeneratedParcels() {
|
53 |
-
return $this->_generatedParcels;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Return amounts
|
58 |
-
* @return ResultAmounts
|
59 |
-
*/
|
60 |
-
public function getAmounts() {
|
61 |
-
return $this->_amounts;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Return deadline for delivery
|
66 |
-
* @return date
|
67 |
-
*/
|
68 |
-
public function getDeadlineDelivery() {
|
69 |
-
return $this->_deadlineDelivery;
|
70 |
-
}
|
71 |
-
}
|
72 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultParcelInfo.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of create picking speedy web service calls
|
7 |
+
*/
|
8 |
+
class ResultBOL {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* List of parcels data
|
12 |
+
* @var array List of ResultParcelInfo
|
13 |
+
*/
|
14 |
+
private $_generatedParcels;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Amounts
|
18 |
+
* @var ResultAmounts
|
19 |
+
*/
|
20 |
+
private $_amounts;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Deadline for delivery
|
24 |
+
* @var date
|
25 |
+
*/
|
26 |
+
private $_deadlineDelivery;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Constructs new instance of ResultBOL from stdClass
|
30 |
+
* @param stdClass $stdClassResultBOL
|
31 |
+
*/
|
32 |
+
function __construct($stdClassResultBOL) {
|
33 |
+
$arrResultParcelInfo = array();
|
34 |
+
if (isset($stdClassResultBOL->generatedParcels)) {
|
35 |
+
if (is_array($stdClassResultBOL->generatedParcels)) {
|
36 |
+
for($i = 0; $i < count($stdClassResultBOL->generatedParcels); $i++) {
|
37 |
+
$arrResultParcelInfo[$i] = new ResultParcelInfo($stdClassResultBOL->generatedParcels[$i]);
|
38 |
+
}
|
39 |
+
} else {
|
40 |
+
$arrResultParcelInfo[0] = new ResultParcelInfo($stdClassResultBOL->generatedParcels);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
$this->_generatedParcels = $arrResultParcelInfo;
|
44 |
+
$this->_amounts = isset($stdClassResultBOL->amounts) ? new ResultAmounts($stdClassResultBOL->amounts) : null;
|
45 |
+
$this->_deadlineDelivery = isset($stdClassResultBOL->deadlineDelivery) ? $stdClassResultBOL->deadlineDelivery : null;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Return list of parcels data
|
50 |
+
* @return array List of ResultParcelInfo
|
51 |
+
*/
|
52 |
+
public function getGeneratedParcels() {
|
53 |
+
return $this->_generatedParcels;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Return amounts
|
58 |
+
* @return ResultAmounts
|
59 |
+
*/
|
60 |
+
public function getAmounts() {
|
61 |
+
return $this->_amounts;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Return deadline for delivery
|
66 |
+
* @return date
|
67 |
+
*/
|
68 |
+
public function getDeadlineDelivery() {
|
69 |
+
return $this->_deadlineDelivery;
|
70 |
+
}
|
71 |
+
}
|
72 |
?>
|
lib/SpeedyEPS/ver01/ResultCalculation.class.php
CHANGED
@@ -1,81 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ResultAmounts.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are returned as a result of Speedy caclulcation web service methods
|
7 |
-
*/
|
8 |
-
class ResultCalculation {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Shipment's price (structure with values that form the price)
|
12 |
-
* @access private
|
13 |
-
* @var ResultAmounts Amounts structure
|
14 |
-
*/
|
15 |
-
private $_amounts;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* The pick-up date
|
19 |
-
* @access private
|
20 |
-
* @var date
|
21 |
-
*/
|
22 |
-
private $_takingDate;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Deadline for delivery
|
26 |
-
* @access private
|
27 |
-
* @var date
|
28 |
-
*/
|
29 |
-
private $_deadlineDelivery;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Specifies if the discounts are potentially partial (the final discounts might be bigger depending on the other participants' contracts).
|
33 |
-
* @access private
|
34 |
-
* @var boolean
|
35 |
-
*/
|
36 |
-
private $_partialDiscount;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Constructs new instance of ResultCalculation from stdClass
|
40 |
-
* @param stdClass $stdClassResultCalculation
|
41 |
-
*/
|
42 |
-
function __construct($stdClassResultCalculation) {
|
43 |
-
$this->_amounts = isset($stdClassResultCalculation->amounts) ? new ResultAmounts($stdClassResultCalculation->amounts) : null;
|
44 |
-
$this->_takingDate = isset($stdClassResultCalculation->takingDate) ? $stdClassResultCalculation->takingDate : null;
|
45 |
-
$this->_deadlineDelivery = isset($stdClassResultCalculation->deadlineDelivery) ? $stdClassResultCalculation->deadlineDelivery : null;
|
46 |
-
$this->_partialDiscount = isset($stdClassResultCalculation->partialDiscount) ? $stdClassResultCalculation->partialDiscount : null;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Get shipment's price
|
51 |
-
* @return ResultAmounts Structure with amount values that form the price
|
52 |
-
*/
|
53 |
-
public function getAmounts() {
|
54 |
-
return $this->_amounts;
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Get pick-up date
|
59 |
-
* @return date
|
60 |
-
*/
|
61 |
-
public function getTakingDate() {
|
62 |
-
return $this->_takingDate;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Get deadline for delivery
|
67 |
-
* @return date
|
68 |
-
*/
|
69 |
-
public function getDeadlineDelivery() {
|
70 |
-
return $this->_deadlineDelivery;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Get partial discounts flag
|
75 |
-
* @return boolean
|
76 |
-
*/
|
77 |
-
public function isPartialDiscount() {
|
78 |
-
return $this->_partialDiscount;
|
79 |
-
}
|
80 |
-
}
|
81 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultAmounts.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of Speedy caclulcation web service methods
|
7 |
+
*/
|
8 |
+
class ResultCalculation {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Shipment's price (structure with values that form the price)
|
12 |
+
* @access private
|
13 |
+
* @var ResultAmounts Amounts structure
|
14 |
+
*/
|
15 |
+
private $_amounts;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The pick-up date
|
19 |
+
* @access private
|
20 |
+
* @var date
|
21 |
+
*/
|
22 |
+
private $_takingDate;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Deadline for delivery
|
26 |
+
* @access private
|
27 |
+
* @var date
|
28 |
+
*/
|
29 |
+
private $_deadlineDelivery;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Specifies if the discounts are potentially partial (the final discounts might be bigger depending on the other participants' contracts).
|
33 |
+
* @access private
|
34 |
+
* @var boolean
|
35 |
+
*/
|
36 |
+
private $_partialDiscount;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Constructs new instance of ResultCalculation from stdClass
|
40 |
+
* @param stdClass $stdClassResultCalculation
|
41 |
+
*/
|
42 |
+
function __construct($stdClassResultCalculation) {
|
43 |
+
$this->_amounts = isset($stdClassResultCalculation->amounts) ? new ResultAmounts($stdClassResultCalculation->amounts) : null;
|
44 |
+
$this->_takingDate = isset($stdClassResultCalculation->takingDate) ? $stdClassResultCalculation->takingDate : null;
|
45 |
+
$this->_deadlineDelivery = isset($stdClassResultCalculation->deadlineDelivery) ? $stdClassResultCalculation->deadlineDelivery : null;
|
46 |
+
$this->_partialDiscount = isset($stdClassResultCalculation->partialDiscount) ? $stdClassResultCalculation->partialDiscount : null;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get shipment's price
|
51 |
+
* @return ResultAmounts Structure with amount values that form the price
|
52 |
+
*/
|
53 |
+
public function getAmounts() {
|
54 |
+
return $this->_amounts;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get pick-up date
|
59 |
+
* @return date
|
60 |
+
*/
|
61 |
+
public function getTakingDate() {
|
62 |
+
return $this->_takingDate;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get deadline for delivery
|
67 |
+
* @return date
|
68 |
+
*/
|
69 |
+
public function getDeadlineDelivery() {
|
70 |
+
return $this->_deadlineDelivery;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get partial discounts flag
|
75 |
+
* @return boolean
|
76 |
+
*/
|
77 |
+
public function isPartialDiscount() {
|
78 |
+
return $this->_partialDiscount;
|
79 |
+
}
|
80 |
+
}
|
81 |
?>
|
lib/SpeedyEPS/ver01/ResultCalculationMS.class.php
CHANGED
@@ -1,59 +1,59 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of calculation Speedy web service requestst for multiple services
|
4 |
-
*/
|
5 |
-
class ResultCalculationMS {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Courier service type ID
|
9 |
-
* @var integer Signed 64-bit
|
10 |
-
*/
|
11 |
-
private $_serviceTypeId;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Validation error during calculation attempt
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
private $_errorDescription;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The result of calculation (in case no error has occurred)
|
21 |
-
* @var ResultCalculation
|
22 |
-
*/
|
23 |
-
private $_resultInfo;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Constructs new instance of ResultCalculationMS from stdClass
|
27 |
-
* @param stdClass $stdClassResultCalculationMS
|
28 |
-
*/
|
29 |
-
function __construct($stdClassResultCalculationMS) {
|
30 |
-
$this->_serviceTypeId = isset($stdClassResultCalculationMS->serviceTypeId) ? $stdClassResultCalculationMS->serviceTypeId : null;
|
31 |
-
$this->_errorDescription = isset($stdClassResultCalculationMS->errorDescription) ? $stdClassResultCalculationMS->errorDescription : null;
|
32 |
-
$this->_resultInfo = isset($stdClassResultCalculationMS->resultInfo) ? new ResultCalculation($stdClassResultCalculationMS->resultInfo) : null;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Get courier service type ID
|
37 |
-
* @return integer Signed 64-bit
|
38 |
-
*/
|
39 |
-
public function getServiceTypeId() {
|
40 |
-
return $this->_serviceTypeId;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get validation error during calculation attempt
|
45 |
-
* @return string
|
46 |
-
*/
|
47 |
-
public function getErrorDescription() {
|
48 |
-
return $this->_errorDescription;
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get result of calculation (in case no error has occurred)
|
53 |
-
* @return ResultCalculation
|
54 |
-
*/
|
55 |
-
public function getResultInfo() {
|
56 |
-
return $this->_resultInfo;
|
57 |
-
}
|
58 |
-
}
|
59 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of calculation Speedy web service requestst for multiple services
|
4 |
+
*/
|
5 |
+
class ResultCalculationMS {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Courier service type ID
|
9 |
+
* @var integer Signed 64-bit
|
10 |
+
*/
|
11 |
+
private $_serviceTypeId;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Validation error during calculation attempt
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $_errorDescription;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The result of calculation (in case no error has occurred)
|
21 |
+
* @var ResultCalculation
|
22 |
+
*/
|
23 |
+
private $_resultInfo;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Constructs new instance of ResultCalculationMS from stdClass
|
27 |
+
* @param stdClass $stdClassResultCalculationMS
|
28 |
+
*/
|
29 |
+
function __construct($stdClassResultCalculationMS) {
|
30 |
+
$this->_serviceTypeId = isset($stdClassResultCalculationMS->serviceTypeId) ? $stdClassResultCalculationMS->serviceTypeId : null;
|
31 |
+
$this->_errorDescription = isset($stdClassResultCalculationMS->errorDescription) ? $stdClassResultCalculationMS->errorDescription : null;
|
32 |
+
$this->_resultInfo = isset($stdClassResultCalculationMS->resultInfo) ? new ResultCalculation($stdClassResultCalculationMS->resultInfo) : null;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get courier service type ID
|
37 |
+
* @return integer Signed 64-bit
|
38 |
+
*/
|
39 |
+
public function getServiceTypeId() {
|
40 |
+
return $this->_serviceTypeId;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get validation error during calculation attempt
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public function getErrorDescription() {
|
48 |
+
return $this->_errorDescription;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get result of calculation (in case no error has occurred)
|
53 |
+
* @return ResultCalculation
|
54 |
+
*/
|
55 |
+
public function getResultInfo() {
|
56 |
+
return $this->_resultInfo;
|
57 |
+
}
|
58 |
+
}
|
59 |
?>
|
lib/SpeedyEPS/ver01/ResultClientData.class.php
CHANGED
@@ -1,118 +1,118 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ResultAddress.class.php';
|
4 |
-
require_once 'ResultPhoneNumber.class.php';
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Instances of this class are returned as a result of Speedy web service method calls for client data
|
8 |
-
*/
|
9 |
-
class ResultClientData {
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Client ID
|
13 |
-
* @var integer Signed 64-bit
|
14 |
-
*/
|
15 |
-
private $_clientId;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Name of the client (company or private person)
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
private $_partnerName;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Company department/office
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
private $_objectName;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Address
|
31 |
-
* @var ResultAddress
|
32 |
-
*/
|
33 |
-
private $_address;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Contact name
|
37 |
-
* @var string
|
38 |
-
*/
|
39 |
-
private $_contactName;
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Phone numbers
|
43 |
-
* @var array ResultPhoneNumber
|
44 |
-
*/
|
45 |
-
private $_phones;
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Constructs new instance of ResultClientData
|
49 |
-
* @param stdClass $stdClassResultClientData
|
50 |
-
*/
|
51 |
-
function __construct($stdClassResultClientData) {
|
52 |
-
$this->_clientId = isset($stdClassResultClientData->clientId) ? $stdClassResultClientData->clientId : null;
|
53 |
-
$this->_partnerName = isset($stdClassResultClientData->partnerName) ? $stdClassResultClientData->partnerName : null;
|
54 |
-
$this->_objectName = isset($stdClassResultClientData->objectName) ? $stdClassResultClientData->objectName : null;
|
55 |
-
$this->_address = isset($stdClassResultClientData->address) ? new ResultAddress($stdClassResultClientData->address) : null;
|
56 |
-
$this->_contactName = isset($stdClassResultClientData->contactName) ? $stdClassResultClientData->contactName : null;
|
57 |
-
$arrResultPhoneNumbers = array();
|
58 |
-
if (isset($stdClassResultClientData->phones)) {
|
59 |
-
if (is_array($stdClassResultClientData->phones)) {
|
60 |
-
for($i = 0; $i < count($stdClassResultClientData->phones); $i++) {
|
61 |
-
$arrResultPhoneNumbers[$i] = new ResultPhoneNumber($stdClassResultClientData->phones[$i]);
|
62 |
-
}
|
63 |
-
} else {
|
64 |
-
$arrResultPhoneNumbers[0] = new ResultPhoneNumber($stdClassResultClientData->phones);
|
65 |
-
}
|
66 |
-
}
|
67 |
-
$this->_phones = $arrResultPhoneNumbers;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Get client ID
|
72 |
-
* @return integer Signed 64-bit
|
73 |
-
*/
|
74 |
-
public function getClientId() {
|
75 |
-
return $this->_clientId;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Get name of the client (company or private person)
|
80 |
-
* @return string
|
81 |
-
*/
|
82 |
-
public function getPartnerName() {
|
83 |
-
return $this->_partnerName;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Get company department/office
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public function getObjectName() {
|
91 |
-
return $this->_objectName;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Get address
|
96 |
-
* @return ResultAddress
|
97 |
-
*/
|
98 |
-
public function getAddress() {
|
99 |
-
return $this->_address;
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Get contact name
|
104 |
-
* @return string
|
105 |
-
*/
|
106 |
-
public function getContactName() {
|
107 |
-
return $this->_contactName;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Get phone numbers
|
112 |
-
* @return array ResultPhoneNumber
|
113 |
-
*/
|
114 |
-
public function getPhones() {
|
115 |
-
return $this->_phones;
|
116 |
-
}
|
117 |
-
}
|
118 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultAddress.class.php';
|
4 |
+
require_once 'ResultPhoneNumber.class.php';
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Instances of this class are returned as a result of Speedy web service method calls for client data
|
8 |
+
*/
|
9 |
+
class ResultClientData {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Client ID
|
13 |
+
* @var integer Signed 64-bit
|
14 |
+
*/
|
15 |
+
private $_clientId;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Name of the client (company or private person)
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
private $_partnerName;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Company department/office
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
private $_objectName;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Address
|
31 |
+
* @var ResultAddress
|
32 |
+
*/
|
33 |
+
private $_address;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Contact name
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
private $_contactName;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Phone numbers
|
43 |
+
* @var array ResultPhoneNumber
|
44 |
+
*/
|
45 |
+
private $_phones;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Constructs new instance of ResultClientData
|
49 |
+
* @param stdClass $stdClassResultClientData
|
50 |
+
*/
|
51 |
+
function __construct($stdClassResultClientData) {
|
52 |
+
$this->_clientId = isset($stdClassResultClientData->clientId) ? $stdClassResultClientData->clientId : null;
|
53 |
+
$this->_partnerName = isset($stdClassResultClientData->partnerName) ? $stdClassResultClientData->partnerName : null;
|
54 |
+
$this->_objectName = isset($stdClassResultClientData->objectName) ? $stdClassResultClientData->objectName : null;
|
55 |
+
$this->_address = isset($stdClassResultClientData->address) ? new ResultAddress($stdClassResultClientData->address) : null;
|
56 |
+
$this->_contactName = isset($stdClassResultClientData->contactName) ? $stdClassResultClientData->contactName : null;
|
57 |
+
$arrResultPhoneNumbers = array();
|
58 |
+
if (isset($stdClassResultClientData->phones)) {
|
59 |
+
if (is_array($stdClassResultClientData->phones)) {
|
60 |
+
for($i = 0; $i < count($stdClassResultClientData->phones); $i++) {
|
61 |
+
$arrResultPhoneNumbers[$i] = new ResultPhoneNumber($stdClassResultClientData->phones[$i]);
|
62 |
+
}
|
63 |
+
} else {
|
64 |
+
$arrResultPhoneNumbers[0] = new ResultPhoneNumber($stdClassResultClientData->phones);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
$this->_phones = $arrResultPhoneNumbers;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Get client ID
|
72 |
+
* @return integer Signed 64-bit
|
73 |
+
*/
|
74 |
+
public function getClientId() {
|
75 |
+
return $this->_clientId;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get name of the client (company or private person)
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
public function getPartnerName() {
|
83 |
+
return $this->_partnerName;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get company department/office
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public function getObjectName() {
|
91 |
+
return $this->_objectName;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Get address
|
96 |
+
* @return ResultAddress
|
97 |
+
*/
|
98 |
+
public function getAddress() {
|
99 |
+
return $this->_address;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Get contact name
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
public function getContactName() {
|
107 |
+
return $this->_contactName;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Get phone numbers
|
112 |
+
* @return array ResultPhoneNumber
|
113 |
+
*/
|
114 |
+
public function getPhones() {
|
115 |
+
return $this->_phones;
|
116 |
+
}
|
117 |
+
}
|
118 |
?>
|
lib/SpeedyEPS/ver01/ResultCommonObject.class.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Instances of this class are returned as a result of Speedy web service queries for common objects
|
5 |
-
*/
|
6 |
-
class ResultCommonObject {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Common object ID
|
10 |
-
* @var integer Signed 64-bit
|
11 |
-
*/
|
12 |
-
private $_id;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Common object type
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
private $_type;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Common object name
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_name;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Common object address
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_address;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructs new instance of ResultCommonObject
|
34 |
-
* @param stdClass $stdClassResultCommonObject
|
35 |
-
*/
|
36 |
-
function __construct($stdClassResultCommonObject) {
|
37 |
-
$this->_id = isset($stdClassResultCommonObject->id) ? $stdClassResultCommonObject->id : null;
|
38 |
-
$this->_type = isset($stdClassResultCommonObject->type) ? $stdClassResultCommonObject->type : null;
|
39 |
-
$this->_name = isset($stdClassResultCommonObject->name) ? $stdClassResultCommonObject->name : null;
|
40 |
-
$this->_address = isset($stdClassResultCommonObject->address) ? $stdClassResultCommonObject->address : null;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get quarter ID
|
45 |
-
* @return integer Signed 64-bit quarter ID
|
46 |
-
*/
|
47 |
-
public function getId() {
|
48 |
-
return $this->_id;
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get quarter type
|
53 |
-
* @return string Quarter type
|
54 |
-
*/
|
55 |
-
public function getType() {
|
56 |
-
return $this->_type;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Get quarter name
|
61 |
-
* @return string Quarter name
|
62 |
-
*/
|
63 |
-
public function getName() {
|
64 |
-
return $this->_name;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get common object address
|
69 |
-
* @return string Common object address
|
70 |
-
*/
|
71 |
-
public function getAddress() {
|
72 |
-
return $this->_address;
|
73 |
-
}
|
74 |
-
}
|
75 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Instances of this class are returned as a result of Speedy web service queries for common objects
|
5 |
+
*/
|
6 |
+
class ResultCommonObject {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Common object ID
|
10 |
+
* @var integer Signed 64-bit
|
11 |
+
*/
|
12 |
+
private $_id;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Common object type
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $_type;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Common object name
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_name;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Common object address
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_address;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructs new instance of ResultCommonObject
|
34 |
+
* @param stdClass $stdClassResultCommonObject
|
35 |
+
*/
|
36 |
+
function __construct($stdClassResultCommonObject) {
|
37 |
+
$this->_id = isset($stdClassResultCommonObject->id) ? $stdClassResultCommonObject->id : null;
|
38 |
+
$this->_type = isset($stdClassResultCommonObject->type) ? $stdClassResultCommonObject->type : null;
|
39 |
+
$this->_name = isset($stdClassResultCommonObject->name) ? $stdClassResultCommonObject->name : null;
|
40 |
+
$this->_address = isset($stdClassResultCommonObject->address) ? $stdClassResultCommonObject->address : null;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get quarter ID
|
45 |
+
* @return integer Signed 64-bit quarter ID
|
46 |
+
*/
|
47 |
+
public function getId() {
|
48 |
+
return $this->_id;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get quarter type
|
53 |
+
* @return string Quarter type
|
54 |
+
*/
|
55 |
+
public function getType() {
|
56 |
+
return $this->_type;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get quarter name
|
61 |
+
* @return string Quarter name
|
62 |
+
*/
|
63 |
+
public function getName() {
|
64 |
+
return $this->_name;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get common object address
|
69 |
+
* @return string Common object address
|
70 |
+
*/
|
71 |
+
public function getAddress() {
|
72 |
+
return $this->_address;
|
73 |
+
}
|
74 |
+
}
|
75 |
?>
|
lib/SpeedyEPS/ver01/ResultCourierService.class.php
CHANGED
@@ -1,137 +1,137 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ComplementaryServiceAllowance.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are returned as a result of Speedy web service calls for services
|
7 |
-
*/
|
8 |
-
class ResultCourierService {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Courier service type ID
|
12 |
-
* @var integer Signed 64-bit
|
13 |
-
*/
|
14 |
-
private $_typeId;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Courier service name
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
private $_name;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Specifies if the complementary service "Fixed time for delivery" is banned, allowed or required
|
24 |
-
* @var ComplementaryServiceAllowance
|
25 |
-
*/
|
26 |
-
private $_allowanceFixedTimeDelivery;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Specifies if the complementary service "COD" is banned, allowed or required
|
30 |
-
* @var ComplementaryServiceAllowance
|
31 |
-
*/
|
32 |
-
private $_allowanceCashOnDelivery;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Specifies if the complementary service "Insurance" is banned, allowed or required
|
36 |
-
* @var ComplementaryServiceAllowance
|
37 |
-
*/
|
38 |
-
private $_allowanceInsurance;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Specifies if the complementary service "Return documents" is banned, allowed or required
|
42 |
-
* @var ComplementaryServiceAllowance
|
43 |
-
*/
|
44 |
-
private $_allowanceBackDocumentsRequest;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Specifies if the complementary service "Return receipt" is banned, allowed or required
|
48 |
-
* @var ComplementaryServiceAllowance
|
49 |
-
*/
|
50 |
-
private $_allowanceBackReceiptRequest;
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Specifies if the complementary service "To be called" is banned, allowed or required
|
54 |
-
* @var ComplementaryServiceAllowance
|
55 |
-
*/
|
56 |
-
private $_allowanceToBeCalled;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Constructs new instance of ResultCourierService
|
60 |
-
* @param stdClass $stdClassResultCourierService
|
61 |
-
*/
|
62 |
-
function __construct($stdClassResultCourierService) {
|
63 |
-
$this->_typeId = isset($stdClassResultCourierService->typeId) ? $stdClassResultCourierService->typeId : null;
|
64 |
-
$this->_name = isset($stdClassResultCourierService->name) ? $stdClassResultCourierService->name : null;
|
65 |
-
$this->_allowanceFixedTimeDelivery = isset($stdClassResultCourierService->allowanceFixedTimeDelivery) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceFixedTimeDelivery) : null;
|
66 |
-
$this->_allowanceCashOnDelivery = isset($stdClassResultCourierService->allowanceCashOnDelivery) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceCashOnDelivery) : null;
|
67 |
-
$this->_allowanceInsurance = isset($stdClassResultCourierService->allowanceInsurance) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceInsurance) : null;
|
68 |
-
$this->_allowanceBackDocumentsRequest = isset($stdClassResultCourierService->allowanceBackDocumentsRequest) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceBackDocumentsRequest) : null;
|
69 |
-
$this->_allowanceBackReceiptRequest = isset($stdClassResultCourierService->allowanceBackReceiptRequest) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceBackReceiptRequest) : null;
|
70 |
-
$this->_allowanceToBeCalled = isset($stdClassResultCourierService->allowanceToBeCalled) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceToBeCalled) : null;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Get courier service type ID
|
75 |
-
* @return integer Signed 64-bit
|
76 |
-
*/
|
77 |
-
public function getTypeId() {
|
78 |
-
return $this->_typeId;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Get courier service name
|
83 |
-
* @return string
|
84 |
-
*/
|
85 |
-
public function getName() {
|
86 |
-
return $this->_name;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Get state of complementary service "Fixed time for delivery" - banned, allowed or required
|
91 |
-
* @return ComplementaryServiceAllowance
|
92 |
-
*/
|
93 |
-
public function getAllowanceFixedTimeDelivery() {
|
94 |
-
return $this->_allowanceFixedTimeDelivery;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Get state of complementary service "COD" - banned, allowed or required
|
99 |
-
* @return ComplementaryServiceAllowance
|
100 |
-
*/
|
101 |
-
public function getAllowanceCashOnDelivery() {
|
102 |
-
return $this->_allowanceCashOnDelivery;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get state of complementary service "Insurance" - banned, allowed or required
|
107 |
-
* @return ComplementaryServiceAllowance
|
108 |
-
*/
|
109 |
-
public function getAllowanceInsurance() {
|
110 |
-
return $this->_allowanceInsurance;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Get state of complementary service "Return documents" - banned, allowed or required
|
115 |
-
* @return ComplementaryServiceAllowance
|
116 |
-
*/
|
117 |
-
public function getAllowanceBackDocumentsRequest() {
|
118 |
-
return $this->_allowanceBackDocumentsRequest;
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Get state of complementary service "Return receipt" - banned, allowed or required
|
123 |
-
* @return ComplementaryServiceAllowance
|
124 |
-
*/
|
125 |
-
public function getAllowanceBackReceiptRequest() {
|
126 |
-
return $this->_allowanceBackReceiptRequest;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Get state of complementary service "To be called" - banned, allowed or required
|
131 |
-
* @return ComplementaryServiceAllowance
|
132 |
-
*/
|
133 |
-
public function getAllowanceToBeCalled() {
|
134 |
-
return $this->_allowanceToBeCalled;
|
135 |
-
}
|
136 |
-
}
|
137 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ComplementaryServiceAllowance.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of Speedy web service calls for services
|
7 |
+
*/
|
8 |
+
class ResultCourierService {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Courier service type ID
|
12 |
+
* @var integer Signed 64-bit
|
13 |
+
*/
|
14 |
+
private $_typeId;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Courier service name
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_name;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Specifies if the complementary service "Fixed time for delivery" is banned, allowed or required
|
24 |
+
* @var ComplementaryServiceAllowance
|
25 |
+
*/
|
26 |
+
private $_allowanceFixedTimeDelivery;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Specifies if the complementary service "COD" is banned, allowed or required
|
30 |
+
* @var ComplementaryServiceAllowance
|
31 |
+
*/
|
32 |
+
private $_allowanceCashOnDelivery;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Specifies if the complementary service "Insurance" is banned, allowed or required
|
36 |
+
* @var ComplementaryServiceAllowance
|
37 |
+
*/
|
38 |
+
private $_allowanceInsurance;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Specifies if the complementary service "Return documents" is banned, allowed or required
|
42 |
+
* @var ComplementaryServiceAllowance
|
43 |
+
*/
|
44 |
+
private $_allowanceBackDocumentsRequest;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Specifies if the complementary service "Return receipt" is banned, allowed or required
|
48 |
+
* @var ComplementaryServiceAllowance
|
49 |
+
*/
|
50 |
+
private $_allowanceBackReceiptRequest;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Specifies if the complementary service "To be called" is banned, allowed or required
|
54 |
+
* @var ComplementaryServiceAllowance
|
55 |
+
*/
|
56 |
+
private $_allowanceToBeCalled;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Constructs new instance of ResultCourierService
|
60 |
+
* @param stdClass $stdClassResultCourierService
|
61 |
+
*/
|
62 |
+
function __construct($stdClassResultCourierService) {
|
63 |
+
$this->_typeId = isset($stdClassResultCourierService->typeId) ? $stdClassResultCourierService->typeId : null;
|
64 |
+
$this->_name = isset($stdClassResultCourierService->name) ? $stdClassResultCourierService->name : null;
|
65 |
+
$this->_allowanceFixedTimeDelivery = isset($stdClassResultCourierService->allowanceFixedTimeDelivery) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceFixedTimeDelivery) : null;
|
66 |
+
$this->_allowanceCashOnDelivery = isset($stdClassResultCourierService->allowanceCashOnDelivery) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceCashOnDelivery) : null;
|
67 |
+
$this->_allowanceInsurance = isset($stdClassResultCourierService->allowanceInsurance) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceInsurance) : null;
|
68 |
+
$this->_allowanceBackDocumentsRequest = isset($stdClassResultCourierService->allowanceBackDocumentsRequest) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceBackDocumentsRequest) : null;
|
69 |
+
$this->_allowanceBackReceiptRequest = isset($stdClassResultCourierService->allowanceBackReceiptRequest) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceBackReceiptRequest) : null;
|
70 |
+
$this->_allowanceToBeCalled = isset($stdClassResultCourierService->allowanceToBeCalled) ? new ComplementaryServiceAllowance($stdClassResultCourierService->allowanceToBeCalled) : null;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get courier service type ID
|
75 |
+
* @return integer Signed 64-bit
|
76 |
+
*/
|
77 |
+
public function getTypeId() {
|
78 |
+
return $this->_typeId;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get courier service name
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
public function getName() {
|
86 |
+
return $this->_name;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get state of complementary service "Fixed time for delivery" - banned, allowed or required
|
91 |
+
* @return ComplementaryServiceAllowance
|
92 |
+
*/
|
93 |
+
public function getAllowanceFixedTimeDelivery() {
|
94 |
+
return $this->_allowanceFixedTimeDelivery;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get state of complementary service "COD" - banned, allowed or required
|
99 |
+
* @return ComplementaryServiceAllowance
|
100 |
+
*/
|
101 |
+
public function getAllowanceCashOnDelivery() {
|
102 |
+
return $this->_allowanceCashOnDelivery;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get state of complementary service "Insurance" - banned, allowed or required
|
107 |
+
* @return ComplementaryServiceAllowance
|
108 |
+
*/
|
109 |
+
public function getAllowanceInsurance() {
|
110 |
+
return $this->_allowanceInsurance;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get state of complementary service "Return documents" - banned, allowed or required
|
115 |
+
* @return ComplementaryServiceAllowance
|
116 |
+
*/
|
117 |
+
public function getAllowanceBackDocumentsRequest() {
|
118 |
+
return $this->_allowanceBackDocumentsRequest;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Get state of complementary service "Return receipt" - banned, allowed or required
|
123 |
+
* @return ComplementaryServiceAllowance
|
124 |
+
*/
|
125 |
+
public function getAllowanceBackReceiptRequest() {
|
126 |
+
return $this->_allowanceBackReceiptRequest;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get state of complementary service "To be called" - banned, allowed or required
|
131 |
+
* @return ComplementaryServiceAllowance
|
132 |
+
*/
|
133 |
+
public function getAllowanceToBeCalled() {
|
134 |
+
return $this->_allowanceToBeCalled;
|
135 |
+
}
|
136 |
+
}
|
137 |
?>
|
lib/SpeedyEPS/ver01/ResultCourierServiceExt.class.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ResultCourierService.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are returned as a result of Speedy web service calls for services alloweed between sites
|
7 |
-
*/
|
8 |
-
class ResultCourierServiceExt extends ResultCourierService {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The deadline for shipment delivery
|
12 |
-
* @var datetime
|
13 |
-
*/
|
14 |
-
private $_deliveryDeadline;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Constructs new instance of ResultCourierServiceExt
|
18 |
-
* @param stdClass $stdClassResultCourierServiceExt
|
19 |
-
*/
|
20 |
-
function __construct($stdClassResultCourierServiceExt) {
|
21 |
-
parent::__construct($stdClassResultCourierServiceExt);
|
22 |
-
$this->_deliveryDeadline = isset($stdClassResultCourierServiceExt->deliveryDeadline) ? $stdClassResultCourierServiceExt->deliveryDeadline : null;
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Get deadline for shipment delivery
|
27 |
-
* @return datetime Deadline for shipment delivery
|
28 |
-
*/
|
29 |
-
public function getDeliveryDeadline() {
|
30 |
-
return $this->_deliveryDeadline;
|
31 |
-
}
|
32 |
-
}
|
33 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultCourierService.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of Speedy web service calls for services alloweed between sites
|
7 |
+
*/
|
8 |
+
class ResultCourierServiceExt extends ResultCourierService {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The deadline for shipment delivery
|
12 |
+
* @var datetime
|
13 |
+
*/
|
14 |
+
private $_deliveryDeadline;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Constructs new instance of ResultCourierServiceExt
|
18 |
+
* @param stdClass $stdClassResultCourierServiceExt
|
19 |
+
*/
|
20 |
+
function __construct($stdClassResultCourierServiceExt) {
|
21 |
+
parent::__construct($stdClassResultCourierServiceExt);
|
22 |
+
$this->_deliveryDeadline = isset($stdClassResultCourierServiceExt->deliveryDeadline) ? $stdClassResultCourierServiceExt->deliveryDeadline : null;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get deadline for shipment delivery
|
27 |
+
* @return datetime Deadline for shipment delivery
|
28 |
+
*/
|
29 |
+
public function getDeliveryDeadline() {
|
30 |
+
return $this->_deliveryDeadline;
|
31 |
+
}
|
32 |
+
}
|
33 |
?>
|
lib/SpeedyEPS/ver01/ResultLogin.class.php
CHANGED
@@ -1,47 +1,47 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Instances of this class are returned as a result of login Speedy web service method calls
|
5 |
-
*/
|
6 |
-
class ResultLogin {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The session ID to be used as a parameter in subsequent method calls.
|
10 |
-
* @access private
|
11 |
-
* @var string
|
12 |
-
*/
|
13 |
-
private $_sessionId;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* The logged client's ID (in Speedy's nomenclature).
|
17 |
-
* @access private
|
18 |
-
* @var integer Signed 64-bit integer
|
19 |
-
*/
|
20 |
-
private $_clientId;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Constructs new instance of ResultLogin
|
24 |
-
* @param stdClass $stdClassResultLogin
|
25 |
-
*/
|
26 |
-
function __construct($stdClassResultLogin) {
|
27 |
-
$this->_sessionId = isset($stdClassResultLogin->sessionId) ? $stdClassResultLogin->sessionId : null;
|
28 |
-
$this->_clientId = isset($stdClassResultLogin->clientId) ? $stdClassResultLogin->clientId : null;
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Get session ID to be used as a parameter in subsequent method calls.
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
public function getSessionId() {
|
36 |
-
return $this->_sessionId;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get logged client's ID (in Speedy's nomenclature).
|
41 |
-
* @return integer Signed 64-bit
|
42 |
-
*/
|
43 |
-
public function getClientId() {
|
44 |
-
return $this->_clientId;
|
45 |
-
}
|
46 |
-
}
|
47 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Instances of this class are returned as a result of login Speedy web service method calls
|
5 |
+
*/
|
6 |
+
class ResultLogin {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The session ID to be used as a parameter in subsequent method calls.
|
10 |
+
* @access private
|
11 |
+
* @var string
|
12 |
+
*/
|
13 |
+
private $_sessionId;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The logged client's ID (in Speedy's nomenclature).
|
17 |
+
* @access private
|
18 |
+
* @var integer Signed 64-bit integer
|
19 |
+
*/
|
20 |
+
private $_clientId;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Constructs new instance of ResultLogin
|
24 |
+
* @param stdClass $stdClassResultLogin
|
25 |
+
*/
|
26 |
+
function __construct($stdClassResultLogin) {
|
27 |
+
$this->_sessionId = isset($stdClassResultLogin->sessionId) ? $stdClassResultLogin->sessionId : null;
|
28 |
+
$this->_clientId = isset($stdClassResultLogin->clientId) ? $stdClassResultLogin->clientId : null;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Get session ID to be used as a parameter in subsequent method calls.
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public function getSessionId() {
|
36 |
+
return $this->_sessionId;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get logged client's ID (in Speedy's nomenclature).
|
41 |
+
* @return integer Signed 64-bit
|
42 |
+
*/
|
43 |
+
public function getClientId() {
|
44 |
+
return $this->_clientId;
|
45 |
+
}
|
46 |
+
}
|
47 |
?>
|
lib/SpeedyEPS/ver01/ResultMinMaxReal.class.php
CHANGED
@@ -1,45 +1,45 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of services for allowed float ranges of certain parameters
|
4 |
-
* (f.e. getWightInterval)
|
5 |
-
*/
|
6 |
-
class ResultMinMaxReal {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Min value
|
10 |
-
* @var double 64-bit
|
11 |
-
*/
|
12 |
-
private $_minValue;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Max value
|
16 |
-
* @var double 64-bit
|
17 |
-
*/
|
18 |
-
private $_maxValue;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Constructs new instance of ResultMinMaxReal
|
22 |
-
* @param stdClass $stdClassResultMinMaxReal
|
23 |
-
*/
|
24 |
-
function __construct($stdClassResultMinMaxReal) {
|
25 |
-
$this->_minValue = isset($stdClassResultMinMaxReal->minValue) ? $stdClassResultMinMaxReal->minValue : null;
|
26 |
-
$this->_maxValue = isset($stdClassResultMinMaxReal->maxValue) ? $stdClassResultMinMaxReal->maxValue : null;
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Get min value
|
31 |
-
* @return double 64-bit
|
32 |
-
*/
|
33 |
-
public function getMinValue() {
|
34 |
-
return $this->_minValue;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Get max value
|
39 |
-
* @return double 64-bit
|
40 |
-
*/
|
41 |
-
public function getMaxValue() {
|
42 |
-
return $this->_maxValue;
|
43 |
-
}
|
44 |
-
}
|
45 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of services for allowed float ranges of certain parameters
|
4 |
+
* (f.e. getWightInterval)
|
5 |
+
*/
|
6 |
+
class ResultMinMaxReal {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Min value
|
10 |
+
* @var double 64-bit
|
11 |
+
*/
|
12 |
+
private $_minValue;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Max value
|
16 |
+
* @var double 64-bit
|
17 |
+
*/
|
18 |
+
private $_maxValue;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Constructs new instance of ResultMinMaxReal
|
22 |
+
* @param stdClass $stdClassResultMinMaxReal
|
23 |
+
*/
|
24 |
+
function __construct($stdClassResultMinMaxReal) {
|
25 |
+
$this->_minValue = isset($stdClassResultMinMaxReal->minValue) ? $stdClassResultMinMaxReal->minValue : null;
|
26 |
+
$this->_maxValue = isset($stdClassResultMinMaxReal->maxValue) ? $stdClassResultMinMaxReal->maxValue : null;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Get min value
|
31 |
+
* @return double 64-bit
|
32 |
+
*/
|
33 |
+
public function getMinValue() {
|
34 |
+
return $this->_minValue;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get max value
|
39 |
+
* @return double 64-bit
|
40 |
+
*/
|
41 |
+
public function getMaxValue() {
|
42 |
+
return $this->_maxValue;
|
43 |
+
}
|
44 |
+
}
|
45 |
?>
|
lib/SpeedyEPS/ver01/ResultOffice.class.php
CHANGED
@@ -1,137 +1,137 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ValueAddress.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Instances of this class are returned as a result of Speedy web service queries for offices
|
7 |
-
*/
|
8 |
-
class ResultOffice {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Office ID
|
12 |
-
* @var integer Signed 64-bit
|
13 |
-
*/
|
14 |
-
private $_id;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Office name
|
18 |
-
* @var string
|
19 |
-
*/
|
20 |
-
private $_name;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Serving site ID
|
24 |
-
* @var string
|
25 |
-
*/
|
26 |
-
private $_siteId;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Office address
|
30 |
-
* @var ValueAddress
|
31 |
-
*/
|
32 |
-
private $_address;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Working time for FULL working days - FROM
|
36 |
-
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
37 |
-
*/
|
38 |
-
private $_workingTimeFrom;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Working time for FULL working days - TO
|
42 |
-
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
43 |
-
*/
|
44 |
-
private $_workingTimeTo;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Working time for HALF working days - FROM
|
48 |
-
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
49 |
-
*/
|
50 |
-
private $_workingTimeHalfFrom;
|
51 |
-
|
52 |
-
/**
|
53 |
-
*Working time for HALF working days - TO
|
54 |
-
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
55 |
-
*/
|
56 |
-
private $_workingTimeHalfTo;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Constructs new instance of ResultStreet
|
60 |
-
* @param stdClass $stdClassResultStreet
|
61 |
-
*/
|
62 |
-
function __construct($stdClassResultOffice) {
|
63 |
-
$this->_id = isset($stdClassResultOffice->id) ? $stdClassResultOffice->id : null;
|
64 |
-
$this->_name = isset($stdClassResultOffice->name) ? $stdClassResultOffice->name : null;
|
65 |
-
$this->_siteId = isset($stdClassResultOffice->siteId) ? $stdClassResultOffice->siteId : null;
|
66 |
-
$this->_address = isset($stdClassResultOffice->address) ? new ValueAddress($stdClassResultOffice->address) : null;
|
67 |
-
$this->_workingTimeFrom = isset($stdClassResultOffice->workingTimeFrom) ? $stdClassResultOffice->workingTimeFrom : null;
|
68 |
-
$this->_workingTimeTo = isset($stdClassResultOffice->workingTimeTo) ? $stdClassResultOffice->workingTimeTo : null;
|
69 |
-
$this->_workingTimeHalfFrom = isset($stdClassResultOffice->workingTimeHalfFrom) ? $stdClassResultOffice->workingTimeHalfFrom : null;
|
70 |
-
$this->_workingTimeHalfTo = isset($stdClassResultOffice->workingTimeHalfTo) ? $stdClassResultOffice->workingTimeHalfTo : null;
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Get quarter ID
|
75 |
-
* @return integer Signed 64-bit quarter ID
|
76 |
-
*/
|
77 |
-
public function getId() {
|
78 |
-
return $this->_id;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Get quarter name
|
83 |
-
* @return string Quarter name
|
84 |
-
*/
|
85 |
-
public function getName() {
|
86 |
-
return $this->_name;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Get serving site ID
|
91 |
-
* @return string Serving site ID
|
92 |
-
*/
|
93 |
-
public function getSiteId() {
|
94 |
-
return $this->_siteId;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Get office address
|
99 |
-
* @return ValueAddress Office address
|
100 |
-
*/
|
101 |
-
public function getAddress() {
|
102 |
-
return $this->_address;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Get working time for FULL working days - FROM
|
107 |
-
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
108 |
-
*/
|
109 |
-
public function getWorkingTimeFrom() {
|
110 |
-
return $this->_workingTimeFrom;
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Get working time for FULL working days - TO
|
115 |
-
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
116 |
-
*/
|
117 |
-
public function getWorkingTimeTo() {
|
118 |
-
return $this->_workingTimeTo;
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Get working time for HALF working days - FROM
|
123 |
-
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
124 |
-
*/
|
125 |
-
public function getWorkingTimeHalfFrom() {
|
126 |
-
return $this->_workingTimeHalfFrom;
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Get working time for HALF working days - TO
|
131 |
-
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
132 |
-
*/
|
133 |
-
public function getWorkingTimeHalfTo() {
|
134 |
-
return $this->_workingTimeHalfTo;
|
135 |
-
}
|
136 |
-
}
|
137 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ValueAddress.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of Speedy web service queries for offices
|
7 |
+
*/
|
8 |
+
class ResultOffice {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Office ID
|
12 |
+
* @var integer Signed 64-bit
|
13 |
+
*/
|
14 |
+
private $_id;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Office name
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_name;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Serving site ID
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $_siteId;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Office address
|
30 |
+
* @var ValueAddress
|
31 |
+
*/
|
32 |
+
private $_address;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Working time for FULL working days - FROM
|
36 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
37 |
+
*/
|
38 |
+
private $_workingTimeFrom;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Working time for FULL working days - TO
|
42 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
43 |
+
*/
|
44 |
+
private $_workingTimeTo;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Working time for HALF working days - FROM
|
48 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
49 |
+
*/
|
50 |
+
private $_workingTimeHalfFrom;
|
51 |
+
|
52 |
+
/**
|
53 |
+
*Working time for HALF working days - TO
|
54 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
55 |
+
*/
|
56 |
+
private $_workingTimeHalfTo;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Constructs new instance of ResultStreet
|
60 |
+
* @param stdClass $stdClassResultStreet
|
61 |
+
*/
|
62 |
+
function __construct($stdClassResultOffice) {
|
63 |
+
$this->_id = isset($stdClassResultOffice->id) ? $stdClassResultOffice->id : null;
|
64 |
+
$this->_name = isset($stdClassResultOffice->name) ? $stdClassResultOffice->name : null;
|
65 |
+
$this->_siteId = isset($stdClassResultOffice->siteId) ? $stdClassResultOffice->siteId : null;
|
66 |
+
$this->_address = isset($stdClassResultOffice->address) ? new ValueAddress($stdClassResultOffice->address) : null;
|
67 |
+
$this->_workingTimeFrom = isset($stdClassResultOffice->workingTimeFrom) ? $stdClassResultOffice->workingTimeFrom : null;
|
68 |
+
$this->_workingTimeTo = isset($stdClassResultOffice->workingTimeTo) ? $stdClassResultOffice->workingTimeTo : null;
|
69 |
+
$this->_workingTimeHalfFrom = isset($stdClassResultOffice->workingTimeHalfFrom) ? $stdClassResultOffice->workingTimeHalfFrom : null;
|
70 |
+
$this->_workingTimeHalfTo = isset($stdClassResultOffice->workingTimeHalfTo) ? $stdClassResultOffice->workingTimeHalfTo : null;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get quarter ID
|
75 |
+
* @return integer Signed 64-bit quarter ID
|
76 |
+
*/
|
77 |
+
public function getId() {
|
78 |
+
return $this->_id;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get quarter name
|
83 |
+
* @return string Quarter name
|
84 |
+
*/
|
85 |
+
public function getName() {
|
86 |
+
return $this->_name;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get serving site ID
|
91 |
+
* @return string Serving site ID
|
92 |
+
*/
|
93 |
+
public function getSiteId() {
|
94 |
+
return $this->_siteId;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get office address
|
99 |
+
* @return ValueAddress Office address
|
100 |
+
*/
|
101 |
+
public function getAddress() {
|
102 |
+
return $this->_address;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get working time for FULL working days - FROM
|
107 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
108 |
+
*/
|
109 |
+
public function getWorkingTimeFrom() {
|
110 |
+
return $this->_workingTimeFrom;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get working time for FULL working days - TO
|
115 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
116 |
+
*/
|
117 |
+
public function getWorkingTimeTo() {
|
118 |
+
return $this->_workingTimeTo;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Get working time for HALF working days - FROM
|
123 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
124 |
+
*/
|
125 |
+
public function getWorkingTimeHalfFrom() {
|
126 |
+
return $this->_workingTimeHalfFrom;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get working time for HALF working days - TO
|
131 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
132 |
+
*/
|
133 |
+
public function getWorkingTimeHalfTo() {
|
134 |
+
return $this->_workingTimeHalfTo;
|
135 |
+
}
|
136 |
+
}
|
137 |
?>
|
lib/SpeedyEPS/ver01/ResultOfficeEx.class.php
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultAddressEx.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Instances of this class are returned as a result of Speedy web service queries for offices
|
7 |
+
*/
|
8 |
+
class ResultOfficeEx {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Office ID
|
12 |
+
* @var integer Signed 64-bit
|
13 |
+
*/
|
14 |
+
private $_id;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Office name
|
18 |
+
* @var string
|
19 |
+
*/
|
20 |
+
private $_name;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Serving site ID
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
private $_siteId;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Office address
|
30 |
+
* @var ResultAddressEx
|
31 |
+
*/
|
32 |
+
private $_address;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Working time for FULL working days - FROM
|
36 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
37 |
+
*/
|
38 |
+
private $_workingTimeFrom;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Working time for FULL working days - TO
|
42 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
43 |
+
*/
|
44 |
+
private $_workingTimeTo;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Working time for HALF working days - FROM
|
48 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
49 |
+
*/
|
50 |
+
private $_workingTimeHalfFrom;
|
51 |
+
|
52 |
+
/**
|
53 |
+
*Working time for HALF working days - TO
|
54 |
+
* @var integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
55 |
+
*/
|
56 |
+
private $_workingTimeHalfTo;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Constructs new instance of ResultStreet
|
60 |
+
* @param stdClass $stdClassResultStreet
|
61 |
+
*/
|
62 |
+
function __construct($stdClassResultOffice) {
|
63 |
+
$this->_id = isset($stdClassResultOffice->id) ? $stdClassResultOffice->id : null;
|
64 |
+
$this->_name = isset($stdClassResultOffice->name) ? $stdClassResultOffice->name : null;
|
65 |
+
$this->_siteId = isset($stdClassResultOffice->siteId) ? $stdClassResultOffice->siteId : null;
|
66 |
+
$this->_address = isset($stdClassResultOffice->address) ? new ResultAddressEx($stdClassResultOffice->address) : null;
|
67 |
+
$this->_workingTimeFrom = isset($stdClassResultOffice->workingTimeFrom) ? $stdClassResultOffice->workingTimeFrom : null;
|
68 |
+
$this->_workingTimeTo = isset($stdClassResultOffice->workingTimeTo) ? $stdClassResultOffice->workingTimeTo : null;
|
69 |
+
$this->_workingTimeHalfFrom = isset($stdClassResultOffice->workingTimeHalfFrom) ? $stdClassResultOffice->workingTimeHalfFrom : null;
|
70 |
+
$this->_workingTimeHalfTo = isset($stdClassResultOffice->workingTimeHalfTo) ? $stdClassResultOffice->workingTimeHalfTo : null;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Get quarter ID
|
75 |
+
* @return integer Signed 64-bit quarter ID
|
76 |
+
*/
|
77 |
+
public function getId() {
|
78 |
+
return $this->_id;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Get quarter name
|
83 |
+
* @return string Quarter name
|
84 |
+
*/
|
85 |
+
public function getName() {
|
86 |
+
return $this->_name;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get serving site ID
|
91 |
+
* @return string Serving site ID
|
92 |
+
*/
|
93 |
+
public function getSiteId() {
|
94 |
+
return $this->_siteId;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Get office address
|
99 |
+
* @return ResultAddressEx Office address
|
100 |
+
*/
|
101 |
+
public function getAddress() {
|
102 |
+
return $this->_address;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get working time for FULL working days - FROM
|
107 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
108 |
+
*/
|
109 |
+
public function getWorkingTimeFrom() {
|
110 |
+
return $this->_workingTimeFrom;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Get working time for FULL working days - TO
|
115 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
116 |
+
*/
|
117 |
+
public function getWorkingTimeTo() {
|
118 |
+
return $this->_workingTimeTo;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Get working time for HALF working days - FROM
|
123 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
124 |
+
*/
|
125 |
+
public function getWorkingTimeHalfFrom() {
|
126 |
+
return $this->_workingTimeHalfFrom;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Get working time for HALF working days - TO
|
131 |
+
* @return integer Signed 16-bit integer ("HHmm" format, i.e., the number "1315" means "13:15", "830" means "8:30" etc.)
|
132 |
+
*/
|
133 |
+
public function getWorkingTimeHalfTo() {
|
134 |
+
return $this->_workingTimeHalfTo;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
?>
|
lib/SpeedyEPS/ver01/ResultOrderPickingInfo.class.php
CHANGED
@@ -1,54 +1,54 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of order web service class
|
4 |
-
*/
|
5 |
-
class ResultOrderPickingInfo {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* BOL number
|
9 |
-
* @var integer signed 64-bit
|
10 |
-
*/
|
11 |
-
private $_billOfLading;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* A list of validation errors (empty list means there is no problem with this BOL)
|
15 |
-
* @var array List of strings
|
16 |
-
*/
|
17 |
-
private $_errorDescriptions;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructs new instance of ResultOrderPickingInfo from stdClass
|
21 |
-
* @param stdClass $stdResultOrderPickingInfo
|
22 |
-
*/
|
23 |
-
function __construct($stdResultOrderPickingInfo) {
|
24 |
-
$this->_billOfLading = isset($stdResultOrderPickingInfo->billOfLading) ? $stdResultOrderPickingInfo->billOfLading : null;
|
25 |
-
$arrErrorDescriptions = array();
|
26 |
-
if (isset($stdResultOrderPickingInfo->errorDescriptions)) {
|
27 |
-
if (is_array($stdResultOrderPickingInfo->errorDescriptions)) {
|
28 |
-
for($i = 0; $i < count($stdResultOrderPickingInfo->errorDescriptions); $i++) {
|
29 |
-
$arrErrorDescriptions[$i] = $stdResultOrderPickingInfo->errorDescriptions[$i];
|
30 |
-
}
|
31 |
-
} else {
|
32 |
-
$arrErrorDescriptions[0] = $stdResultOrderPickingInfo->errorDescriptions;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
$this->_errorDescriptions = $arrErrorDescriptions;
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Get BOL number
|
40 |
-
* @return integer signed 64-bit
|
41 |
-
*/
|
42 |
-
public function getBillOfLading() {
|
43 |
-
return $this->_billOfLading;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get list of validation errors (empty list means there is no problem with this BOL)
|
48 |
-
* @return array List of strings
|
49 |
-
*/
|
50 |
-
public function getErrorDescriptions() {
|
51 |
-
return $this->_errorDescriptions;
|
52 |
-
}
|
53 |
-
}
|
54 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of order web service class
|
4 |
+
*/
|
5 |
+
class ResultOrderPickingInfo {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* BOL number
|
9 |
+
* @var integer signed 64-bit
|
10 |
+
*/
|
11 |
+
private $_billOfLading;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* A list of validation errors (empty list means there is no problem with this BOL)
|
15 |
+
* @var array List of strings
|
16 |
+
*/
|
17 |
+
private $_errorDescriptions;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructs new instance of ResultOrderPickingInfo from stdClass
|
21 |
+
* @param stdClass $stdResultOrderPickingInfo
|
22 |
+
*/
|
23 |
+
function __construct($stdResultOrderPickingInfo) {
|
24 |
+
$this->_billOfLading = isset($stdResultOrderPickingInfo->billOfLading) ? $stdResultOrderPickingInfo->billOfLading : null;
|
25 |
+
$arrErrorDescriptions = array();
|
26 |
+
if (isset($stdResultOrderPickingInfo->errorDescriptions)) {
|
27 |
+
if (is_array($stdResultOrderPickingInfo->errorDescriptions)) {
|
28 |
+
for($i = 0; $i < count($stdResultOrderPickingInfo->errorDescriptions); $i++) {
|
29 |
+
$arrErrorDescriptions[$i] = $stdResultOrderPickingInfo->errorDescriptions[$i];
|
30 |
+
}
|
31 |
+
} else {
|
32 |
+
$arrErrorDescriptions[0] = $stdResultOrderPickingInfo->errorDescriptions;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
$this->_errorDescriptions = $arrErrorDescriptions;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get BOL number
|
40 |
+
* @return integer signed 64-bit
|
41 |
+
*/
|
42 |
+
public function getBillOfLading() {
|
43 |
+
return $this->_billOfLading;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get list of validation errors (empty list means there is no problem with this BOL)
|
48 |
+
* @return array List of strings
|
49 |
+
*/
|
50 |
+
public function getErrorDescriptions() {
|
51 |
+
return $this->_errorDescriptions;
|
52 |
+
}
|
53 |
+
}
|
54 |
?>
|
lib/SpeedyEPS/ver01/ResultParcelInfo.class.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of create picking Speedy web service calls
|
4 |
-
*/
|
5 |
-
class ResultParcelInfo {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Parcel's serial number (1, 2, 3, ...)
|
9 |
-
* @var integer Signed 32-bit
|
10 |
-
*/
|
11 |
-
private $_seqNo;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Parcel ID. First parcel's ID is always the same as the BOL number.
|
15 |
-
* @var integer Signed 64-bit
|
16 |
-
*/
|
17 |
-
private $_parcelId;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructs new instance of ResultParcelInfo from stdClass
|
21 |
-
* @param stdClass $stdClassResultParcelInfo
|
22 |
-
*/
|
23 |
-
function __construct($stdClassResultParcelInfo) {
|
24 |
-
$this->_seqNo = isset($stdClassResultParcelInfo->seqNo) ? $stdClassResultParcelInfo->seqNo : null;
|
25 |
-
$this->_parcelId = isset($stdClassResultParcelInfo->parcelId) ? $stdClassResultParcelInfo->parcelId : null;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get parcel's serial number (1, 2, 3, ...)
|
30 |
-
* @return integer Signed 32-bit
|
31 |
-
*/
|
32 |
-
public function getSeqNo() {
|
33 |
-
return $this->_seqNo;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Get parcel ID. First parcel's ID is always the same as the BOL number.
|
38 |
-
* @return integer Signed 64-bit
|
39 |
-
*/
|
40 |
-
public function getParcelId() {
|
41 |
-
return $this->_parcelId;
|
42 |
-
}
|
43 |
-
}
|
44 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of create picking Speedy web service calls
|
4 |
+
*/
|
5 |
+
class ResultParcelInfo {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Parcel's serial number (1, 2, 3, ...)
|
9 |
+
* @var integer Signed 32-bit
|
10 |
+
*/
|
11 |
+
private $_seqNo;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Parcel ID. First parcel's ID is always the same as the BOL number.
|
15 |
+
* @var integer Signed 64-bit
|
16 |
+
*/
|
17 |
+
private $_parcelId;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructs new instance of ResultParcelInfo from stdClass
|
21 |
+
* @param stdClass $stdClassResultParcelInfo
|
22 |
+
*/
|
23 |
+
function __construct($stdClassResultParcelInfo) {
|
24 |
+
$this->_seqNo = isset($stdClassResultParcelInfo->seqNo) ? $stdClassResultParcelInfo->seqNo : null;
|
25 |
+
$this->_parcelId = isset($stdClassResultParcelInfo->parcelId) ? $stdClassResultParcelInfo->parcelId : null;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get parcel's serial number (1, 2, 3, ...)
|
30 |
+
* @return integer Signed 32-bit
|
31 |
+
*/
|
32 |
+
public function getSeqNo() {
|
33 |
+
return $this->_seqNo;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get parcel ID. First parcel's ID is always the same as the BOL number.
|
38 |
+
* @return integer Signed 64-bit
|
39 |
+
*/
|
40 |
+
public function getParcelId() {
|
41 |
+
return $this->_parcelId;
|
42 |
+
}
|
43 |
+
}
|
44 |
?>
|
lib/SpeedyEPS/ver01/ResultPhoneNumber.class.php
CHANGED
@@ -1,44 +1,44 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as part of client data in Speedy web service method calls
|
4 |
-
*/
|
5 |
-
class ResultPhoneNumber {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Phone number (example: "0888123456", "+35932261020" etc.)
|
9 |
-
* @var string
|
10 |
-
*/
|
11 |
-
private $_number;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* An extension number
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
private $_internal;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Constructs new instance of ResultPhoneNumber
|
21 |
-
* @param stdClass $stdClassResultPhoneNumber
|
22 |
-
*/
|
23 |
-
function __construct($stdClassResultPhoneNumber) {
|
24 |
-
$this->_number = isset($stdClassResultPhoneNumber->number) ? $stdClassResultPhoneNumber->number : null;
|
25 |
-
$this->_internal = isset($stdClassResultPhoneNumber->internal) ? $stdClassResultPhoneNumber->internal : null;
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get phone number
|
30 |
-
* @return string
|
31 |
-
*/
|
32 |
-
public function getNumber() {
|
33 |
-
return $this->_number;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Get extension number
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
public function getInternal() {
|
41 |
-
return $this->_internal;
|
42 |
-
}
|
43 |
-
}
|
44 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as part of client data in Speedy web service method calls
|
4 |
+
*/
|
5 |
+
class ResultPhoneNumber {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Phone number (example: "0888123456", "+35932261020" etc.)
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
private $_number;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* An extension number
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $_internal;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Constructs new instance of ResultPhoneNumber
|
21 |
+
* @param stdClass $stdClassResultPhoneNumber
|
22 |
+
*/
|
23 |
+
function __construct($stdClassResultPhoneNumber) {
|
24 |
+
$this->_number = isset($stdClassResultPhoneNumber->number) ? $stdClassResultPhoneNumber->number : null;
|
25 |
+
$this->_internal = isset($stdClassResultPhoneNumber->internal) ? $stdClassResultPhoneNumber->internal : null;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get phone number
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
public function getNumber() {
|
33 |
+
return $this->_number;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get extension number
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public function getInternal() {
|
41 |
+
return $this->_internal;
|
42 |
+
}
|
43 |
+
}
|
44 |
?>
|
lib/SpeedyEPS/ver01/ResultQuarter.class.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Instances of this class are returned as a result of Speedy web service queries for quarters
|
5 |
-
*/
|
6 |
-
class ResultQuarter {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Quarter ID
|
10 |
-
* @var integer Signed 64-bit
|
11 |
-
*/
|
12 |
-
private $_id;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Quarter type
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
private $_type;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Quarter name
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_name;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Actual name (in case "name" is an old name)
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_actualName;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructs new instance of ResultQuarter
|
34 |
-
* @param stdClass $stdClassResultQuarter
|
35 |
-
*/
|
36 |
-
function __construct($stdClassResultQuarter) {
|
37 |
-
$this->_id = isset($stdClassResultQuarter->id) ? $stdClassResultQuarter->id : null;
|
38 |
-
$this->_type = isset($stdClassResultQuarter->type) ? $stdClassResultQuarter->type : null;
|
39 |
-
$this->_name = isset($stdClassResultQuarter->name) ? $stdClassResultQuarter->name : null;
|
40 |
-
$this->_actualName = isset($stdClassResultQuarter->actualName) ? $stdClassResultQuarter->actualName : null;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get quarter ID
|
45 |
-
* @return integer Signed 64-bit quarter ID
|
46 |
-
*/
|
47 |
-
public function getId() {
|
48 |
-
return $this->_id;
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get quarter type
|
53 |
-
* @return string Quarter type
|
54 |
-
*/
|
55 |
-
public function getType() {
|
56 |
-
return $this->_type;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Get quarter name
|
61 |
-
* @return string Quarter name
|
62 |
-
*/
|
63 |
-
public function getName() {
|
64 |
-
return $this->_name;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get quarter actual name in case name is an old name
|
69 |
-
* @return string Quarter actual name
|
70 |
-
*/
|
71 |
-
public function getActualName() {
|
72 |
-
return $this->_actualName;
|
73 |
-
}
|
74 |
-
}
|
75 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Instances of this class are returned as a result of Speedy web service queries for quarters
|
5 |
+
*/
|
6 |
+
class ResultQuarter {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Quarter ID
|
10 |
+
* @var integer Signed 64-bit
|
11 |
+
*/
|
12 |
+
private $_id;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Quarter type
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $_type;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Quarter name
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_name;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Actual name (in case "name" is an old name)
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_actualName;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructs new instance of ResultQuarter
|
34 |
+
* @param stdClass $stdClassResultQuarter
|
35 |
+
*/
|
36 |
+
function __construct($stdClassResultQuarter) {
|
37 |
+
$this->_id = isset($stdClassResultQuarter->id) ? $stdClassResultQuarter->id : null;
|
38 |
+
$this->_type = isset($stdClassResultQuarter->type) ? $stdClassResultQuarter->type : null;
|
39 |
+
$this->_name = isset($stdClassResultQuarter->name) ? $stdClassResultQuarter->name : null;
|
40 |
+
$this->_actualName = isset($stdClassResultQuarter->actualName) ? $stdClassResultQuarter->actualName : null;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get quarter ID
|
45 |
+
* @return integer Signed 64-bit quarter ID
|
46 |
+
*/
|
47 |
+
public function getId() {
|
48 |
+
return $this->_id;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get quarter type
|
53 |
+
* @return string Quarter type
|
54 |
+
*/
|
55 |
+
public function getType() {
|
56 |
+
return $this->_type;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get quarter name
|
61 |
+
* @return string Quarter name
|
62 |
+
*/
|
63 |
+
public function getName() {
|
64 |
+
return $this->_name;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get quarter actual name in case name is an old name
|
69 |
+
* @return string Quarter actual name
|
70 |
+
*/
|
71 |
+
public function getActualName() {
|
72 |
+
return $this->_actualName;
|
73 |
+
}
|
74 |
+
}
|
75 |
?>
|
lib/SpeedyEPS/ver01/ResultSite.class.php
CHANGED
@@ -1,130 +1,130 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'AddrNomen.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* ResultSite instances are returned as a result of sites speedy web service requests
|
7 |
-
*/
|
8 |
-
class ResultSite {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Site ID
|
12 |
-
* @access private
|
13 |
-
* @var integer Signed 64-bit
|
14 |
-
*/
|
15 |
-
private $_id;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Site type
|
19 |
-
* @access private
|
20 |
-
* @var string
|
21 |
-
*/
|
22 |
-
private $_type;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Site name
|
26 |
-
* @access private
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $_name;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Site municipality name
|
33 |
-
* @access private
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
private $_municipality;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Site region name
|
40 |
-
* @access private
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
private $_region;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Site post code
|
47 |
-
* @access private
|
48 |
-
* @var string
|
49 |
-
*/
|
50 |
-
private $_postCode;
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Site address nomenclature.
|
54 |
-
* Specifies if speedy have (or have not) address nomenclature (streets, quarters etc.) for this site
|
55 |
-
* @access private
|
56 |
-
* @var AddrNomen
|
57 |
-
*/
|
58 |
-
private $_addrNomen;
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Constructs new instance of ResultSite
|
62 |
-
* @param stdClass $stdClassResultSite
|
63 |
-
*/
|
64 |
-
function __construct($stdClassResultSite) {
|
65 |
-
$this->_id = isset($stdClassResultSite->id) ? $stdClassResultSite->id : null;
|
66 |
-
$this->_type = isset($stdClassResultSite->type) ? $stdClassResultSite->type : null;
|
67 |
-
$this->_name = isset($stdClassResultSite->name) ? $stdClassResultSite->name : null;
|
68 |
-
$this->_municipality = isset($stdClassResultSite->municipality) ? $stdClassResultSite->municipality : null;
|
69 |
-
$this->_region = isset($stdClassResultSite->region) ? $stdClassResultSite->region : null;
|
70 |
-
$this->_postCode = isset($stdClassResultSite->postCode) ? $stdClassResultSite->postCode : null;
|
71 |
-
$this->_addrNomen = isset($stdClassResultSite->addrNomen) ? new AddrNomen($stdClassResultSite->addrNomen) : null;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Get site ID
|
76 |
-
* @return integer Signed 64-bit
|
77 |
-
*/
|
78 |
-
public function getId() {
|
79 |
-
return $this->_id;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Get site type
|
84 |
-
* @return string Site type
|
85 |
-
*/
|
86 |
-
public function getType() {
|
87 |
-
return $this->_type;
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Get site name
|
92 |
-
* @return string Site name
|
93 |
-
*/
|
94 |
-
public function getName() {
|
95 |
-
return $this->_name;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get site municipality
|
100 |
-
* @return string Site municipality
|
101 |
-
*/
|
102 |
-
public function getMunicipality() {
|
103 |
-
return $this->_municipality;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Get site region
|
108 |
-
* @return string Site region
|
109 |
-
*/
|
110 |
-
public function getRegion() {
|
111 |
-
return $this->_region;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Get site post code
|
116 |
-
* @return string Site post code
|
117 |
-
*/
|
118 |
-
public function getPostCode() {
|
119 |
-
return $this->_postCode;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Get site address nomenclature
|
124 |
-
* @return string Site address nomenclature
|
125 |
-
*/
|
126 |
-
public function getAddrNomen() {
|
127 |
-
return $this->_addrNomen;
|
128 |
-
}
|
129 |
-
}
|
130 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'AddrNomen.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* ResultSite instances are returned as a result of sites speedy web service requests
|
7 |
+
*/
|
8 |
+
class ResultSite {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Site ID
|
12 |
+
* @access private
|
13 |
+
* @var integer Signed 64-bit
|
14 |
+
*/
|
15 |
+
private $_id;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Site type
|
19 |
+
* @access private
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
private $_type;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Site name
|
26 |
+
* @access private
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $_name;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Site municipality name
|
33 |
+
* @access private
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
private $_municipality;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Site region name
|
40 |
+
* @access private
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
private $_region;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Site post code
|
47 |
+
* @access private
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
private $_postCode;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Site address nomenclature.
|
54 |
+
* Specifies if speedy have (or have not) address nomenclature (streets, quarters etc.) for this site
|
55 |
+
* @access private
|
56 |
+
* @var AddrNomen
|
57 |
+
*/
|
58 |
+
private $_addrNomen;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Constructs new instance of ResultSite
|
62 |
+
* @param stdClass $stdClassResultSite
|
63 |
+
*/
|
64 |
+
function __construct($stdClassResultSite) {
|
65 |
+
$this->_id = isset($stdClassResultSite->id) ? $stdClassResultSite->id : null;
|
66 |
+
$this->_type = isset($stdClassResultSite->type) ? $stdClassResultSite->type : null;
|
67 |
+
$this->_name = isset($stdClassResultSite->name) ? $stdClassResultSite->name : null;
|
68 |
+
$this->_municipality = isset($stdClassResultSite->municipality) ? $stdClassResultSite->municipality : null;
|
69 |
+
$this->_region = isset($stdClassResultSite->region) ? $stdClassResultSite->region : null;
|
70 |
+
$this->_postCode = isset($stdClassResultSite->postCode) ? $stdClassResultSite->postCode : null;
|
71 |
+
$this->_addrNomen = isset($stdClassResultSite->addrNomen) ? new AddrNomen($stdClassResultSite->addrNomen) : null;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get site ID
|
76 |
+
* @return integer Signed 64-bit
|
77 |
+
*/
|
78 |
+
public function getId() {
|
79 |
+
return $this->_id;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get site type
|
84 |
+
* @return string Site type
|
85 |
+
*/
|
86 |
+
public function getType() {
|
87 |
+
return $this->_type;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get site name
|
92 |
+
* @return string Site name
|
93 |
+
*/
|
94 |
+
public function getName() {
|
95 |
+
return $this->_name;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Get site municipality
|
100 |
+
* @return string Site municipality
|
101 |
+
*/
|
102 |
+
public function getMunicipality() {
|
103 |
+
return $this->_municipality;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get site region
|
108 |
+
* @return string Site region
|
109 |
+
*/
|
110 |
+
public function getRegion() {
|
111 |
+
return $this->_region;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Get site post code
|
116 |
+
* @return string Site post code
|
117 |
+
*/
|
118 |
+
public function getPostCode() {
|
119 |
+
return $this->_postCode;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get site address nomenclature
|
124 |
+
* @return string Site address nomenclature
|
125 |
+
*/
|
126 |
+
public function getAddrNomen() {
|
127 |
+
return $this->_addrNomen;
|
128 |
+
}
|
129 |
+
}
|
130 |
?>
|
lib/SpeedyEPS/ver01/ResultSiteEx.class.php
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'ResultSite.class.php';
|
4 |
-
|
5 |
-
/**
|
6 |
-
* ResultSite instances are returned as a result of sites speedy web service requests
|
7 |
-
*/
|
8 |
-
class ResultSiteEx {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Site data
|
12 |
-
* @access private
|
13 |
-
* @var ResultSite
|
14 |
-
*/
|
15 |
-
private $_site;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Specifies if there is an exact match
|
19 |
-
* @access private
|
20 |
-
* @var boolean
|
21 |
-
*/
|
22 |
-
private $_exactMatch;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Constructs new instance of ResultSiteEx
|
26 |
-
* @param stdClass $stdClassResultSiteEx
|
27 |
-
*/
|
28 |
-
function __construct($stdClassResultSiteEx) {
|
29 |
-
$this->_site = new ResultSite($stdClassResultSiteEx->site);
|
30 |
-
$this->_exactMatch = isset($stdClassResultSiteEx->exactMatch) ? $stdClassResultSiteEx->exactMatch : null;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Get site data
|
35 |
-
* @return ResultSite
|
36 |
-
*/
|
37 |
-
public function getSite() {
|
38 |
-
return $this->_site;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Get flag if there is an exact match
|
43 |
-
* @return boolean Site type
|
44 |
-
*/
|
45 |
-
public function isExactMatch() {
|
46 |
-
return $this->_exactMatch;
|
47 |
-
}
|
48 |
-
}
|
49 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'ResultSite.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* ResultSite instances are returned as a result of sites speedy web service requests
|
7 |
+
*/
|
8 |
+
class ResultSiteEx {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Site data
|
12 |
+
* @access private
|
13 |
+
* @var ResultSite
|
14 |
+
*/
|
15 |
+
private $_site;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Specifies if there is an exact match
|
19 |
+
* @access private
|
20 |
+
* @var boolean
|
21 |
+
*/
|
22 |
+
private $_exactMatch;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Constructs new instance of ResultSiteEx
|
26 |
+
* @param stdClass $stdClassResultSiteEx
|
27 |
+
*/
|
28 |
+
function __construct($stdClassResultSiteEx) {
|
29 |
+
$this->_site = new ResultSite($stdClassResultSiteEx->site);
|
30 |
+
$this->_exactMatch = isset($stdClassResultSiteEx->exactMatch) ? $stdClassResultSiteEx->exactMatch : null;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get site data
|
35 |
+
* @return ResultSite
|
36 |
+
*/
|
37 |
+
public function getSite() {
|
38 |
+
return $this->_site;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get flag if there is an exact match
|
43 |
+
* @return boolean Site type
|
44 |
+
*/
|
45 |
+
public function isExactMatch() {
|
46 |
+
return $this->_exactMatch;
|
47 |
+
}
|
48 |
+
}
|
49 |
?>
|
lib/SpeedyEPS/ver01/ResultSpecialDeliveryRequirement.class.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of services for special delivery requirements
|
4 |
+
*
|
5 |
+
* @since 2.1.0
|
6 |
+
*/
|
7 |
+
class ResultSpecialDeliveryRequirement {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* A special delivery ID
|
11 |
+
* @var integer 64-bit
|
12 |
+
*/
|
13 |
+
private $_specialDeliveryId;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* A special delivery description
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
private $_specialDeliveryText;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* A special delivery price
|
23 |
+
* @var double (signed 64-bit)
|
24 |
+
*/
|
25 |
+
private $_specialDeliveryPrice;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Constructs new instance of ResultSpecialDeliveryRequirement
|
29 |
+
* @param stdClass $stdClassResultSpecialDeliveryRequirement
|
30 |
+
*/
|
31 |
+
function __construct($stdClassResultSpecialDeliveryRequirement) {
|
32 |
+
$this->_specialDeliveryId = isset($stdClassResultSpecialDeliveryRequirement->specialDeliveryId) ? $stdClassResultSpecialDeliveryRequirement->specialDeliveryId : null;
|
33 |
+
$this->_specialDeliveryText = isset($stdClassResultSpecialDeliveryRequirement->specialDeliveryText) ? $stdClassResultSpecialDeliveryRequirement->specialDeliveryText : null;
|
34 |
+
$this->_specialDeliveryPrice = isset($stdClassResultSpecialDeliveryRequirement->specialDeliveryPrice) ? $stdClassResultSpecialDeliveryRequirement->specialDeliveryPrice : null;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get special delivery id
|
39 |
+
* @return integer (64-bit)
|
40 |
+
*/
|
41 |
+
public function getSpecialDeliveryId() {
|
42 |
+
return $this->_specialDeliveryId;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get special delivery text
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
public function getSpecialDeliveryText() {
|
50 |
+
return $this->_specialDeliveryText;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get special delivery price
|
55 |
+
* @return double signed 64-bit
|
56 |
+
*/
|
57 |
+
public function getSpecialDeliveryPrice() {
|
58 |
+
return $this->_specialDeliveryPrice;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
?>
|
lib/SpeedyEPS/ver01/ResultStreet.class.php
CHANGED
@@ -1,75 +1,75 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Instances of this class are returned as a result of Speedy web service queries for streets
|
5 |
-
*/
|
6 |
-
class ResultStreet {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Street ID
|
10 |
-
* @var integer Signed 64-bit
|
11 |
-
*/
|
12 |
-
private $_id;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Street type
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
private $_type;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Street name
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_name;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Actual name (in case "name" is an old name)
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_actualName;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Constructs new instance of ResultStreet
|
34 |
-
* @param stdClass $stdClassResultStreet
|
35 |
-
*/
|
36 |
-
function __construct($stdClassResultStreet) {
|
37 |
-
$this->_id = isset($stdClassResultStreet->id) ? $stdClassResultStreet->id : null;
|
38 |
-
$this->_type = isset($stdClassResultStreet->type) ? $stdClassResultStreet->type : null;
|
39 |
-
$this->_name = isset($stdClassResultStreet->name) ? $stdClassResultStreet->name : null;
|
40 |
-
$this->_actualName = isset($stdClassResultStreet->actualName) ? $stdClassResultStreet->actualName : null;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get street ID
|
45 |
-
* @return integer Signed 64-bit street ID
|
46 |
-
*/
|
47 |
-
public function getId() {
|
48 |
-
return $this->_id;
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Get street type
|
53 |
-
* @return string Street type
|
54 |
-
*/
|
55 |
-
public function getType() {
|
56 |
-
return $this->_type;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Get street name
|
61 |
-
* @return string Street name
|
62 |
-
*/
|
63 |
-
public function getName() {
|
64 |
-
return $this->_name;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get street actual name in case name is an old name
|
69 |
-
* @return string Street actual name
|
70 |
-
*/
|
71 |
-
public function getActualName() {
|
72 |
-
return $this->_actualName;
|
73 |
-
}
|
74 |
-
}
|
75 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Instances of this class are returned as a result of Speedy web service queries for streets
|
5 |
+
*/
|
6 |
+
class ResultStreet {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Street ID
|
10 |
+
* @var integer Signed 64-bit
|
11 |
+
*/
|
12 |
+
private $_id;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Street type
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
private $_type;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Street name
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_name;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Actual name (in case "name" is an old name)
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_actualName;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Constructs new instance of ResultStreet
|
34 |
+
* @param stdClass $stdClassResultStreet
|
35 |
+
*/
|
36 |
+
function __construct($stdClassResultStreet) {
|
37 |
+
$this->_id = isset($stdClassResultStreet->id) ? $stdClassResultStreet->id : null;
|
38 |
+
$this->_type = isset($stdClassResultStreet->type) ? $stdClassResultStreet->type : null;
|
39 |
+
$this->_name = isset($stdClassResultStreet->name) ? $stdClassResultStreet->name : null;
|
40 |
+
$this->_actualName = isset($stdClassResultStreet->actualName) ? $stdClassResultStreet->actualName : null;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get street ID
|
45 |
+
* @return integer Signed 64-bit street ID
|
46 |
+
*/
|
47 |
+
public function getId() {
|
48 |
+
return $this->_id;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get street type
|
53 |
+
* @return string Street type
|
54 |
+
*/
|
55 |
+
public function getType() {
|
56 |
+
return $this->_type;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get street name
|
61 |
+
* @return string Street name
|
62 |
+
*/
|
63 |
+
public function getName() {
|
64 |
+
return $this->_name;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get street actual name in case name is an old name
|
69 |
+
* @return string Street actual name
|
70 |
+
*/
|
71 |
+
public function getActualName() {
|
72 |
+
return $this->_actualName;
|
73 |
+
}
|
74 |
+
}
|
75 |
?>
|
lib/SpeedyEPS/ver01/ResultTrackPicking.class.php
CHANGED
@@ -1,119 +1,119 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of track picking web service calls
|
4 |
-
*/
|
5 |
-
class ResultTrackPicking {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Date and time
|
9 |
-
* @var date
|
10 |
-
*/
|
11 |
-
private $_moment;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Operation code
|
15 |
-
* @var integer signed 32-bit
|
16 |
-
*/
|
17 |
-
private $_operationCode;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Text description of the operation
|
21 |
-
* @var string
|
22 |
-
*/
|
23 |
-
private $_operationDescription;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Additional note/comment
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $_operationComment;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Site type
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
private $_siteType;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Site name
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $_siteName;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* The name of the person who received the shipment
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_consignee;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Constructs new instance of ResultTrackPicking
|
51 |
-
* @param stdClass $stdClassResultTrackPicking
|
52 |
-
*/
|
53 |
-
function __construct($stdClassResultTrackPicking) {
|
54 |
-
$this->_moment = isset($stdClassResultTrackPicking->moment) ? $stdClassResultTrackPicking->moment : null;
|
55 |
-
$this->_operationCode = isset($stdClassResultTrackPicking->operationCode) ? $stdClassResultTrackPicking->operationCode : null;
|
56 |
-
$this->_operationDescription = isset($stdClassResultTrackPicking->operationDescription) ? $stdClassResultTrackPicking->operationDescription : null;
|
57 |
-
$this->_operationComment = isset($stdClassResultTrackPicking->operationComment) ? $stdClassResultTrackPicking->operationComment : null;
|
58 |
-
$this->_siteType = isset($stdClassResultTrackPicking->siteType) ? $stdClassResultTrackPicking->siteType : null;
|
59 |
-
$this->_siteName = isset($stdClassResultTrackPicking->siteName) ? $stdClassResultTrackPicking->siteName : null;
|
60 |
-
$this->_consignee = isset($stdClassResultTrackPicking->consignee) ? $stdClassResultTrackPicking->consignee : null;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Get date and time of the request
|
65 |
-
* @return date
|
66 |
-
*/
|
67 |
-
public function getMoment() {
|
68 |
-
return $this->_moment;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Get operation code
|
73 |
-
* @return integer signed 32-bit
|
74 |
-
*/
|
75 |
-
public function getOperationCode() {
|
76 |
-
return $this->_operationCode;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Get text description of the operation
|
81 |
-
* @return string
|
82 |
-
*/
|
83 |
-
public function getOperationDescription() {
|
84 |
-
return $this->_operationDescription;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Get additional note/comment
|
89 |
-
* @return string
|
90 |
-
*/
|
91 |
-
public function getOperationComment() {
|
92 |
-
return $this->_operationComment;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get site type
|
97 |
-
* @return string
|
98 |
-
*/
|
99 |
-
public function getSiteType() {
|
100 |
-
return $this->_siteType;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Get site name
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
public function getSiteName() {
|
108 |
-
return $this->_siteName;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Get name of the person who received the shipment
|
113 |
-
* @return string
|
114 |
-
*/
|
115 |
-
public function getConsignee() {
|
116 |
-
return $this->_consignee;
|
117 |
-
}
|
118 |
-
}
|
119 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of track picking web service calls
|
4 |
+
*/
|
5 |
+
class ResultTrackPicking {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Date and time
|
9 |
+
* @var date
|
10 |
+
*/
|
11 |
+
private $_moment;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Operation code
|
15 |
+
* @var integer signed 32-bit
|
16 |
+
*/
|
17 |
+
private $_operationCode;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Text description of the operation
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $_operationDescription;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Additional note/comment
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $_operationComment;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Site type
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $_siteType;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Site name
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private $_siteName;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The name of the person who received the shipment
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_consignee;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Constructs new instance of ResultTrackPicking
|
51 |
+
* @param stdClass $stdClassResultTrackPicking
|
52 |
+
*/
|
53 |
+
function __construct($stdClassResultTrackPicking) {
|
54 |
+
$this->_moment = isset($stdClassResultTrackPicking->moment) ? $stdClassResultTrackPicking->moment : null;
|
55 |
+
$this->_operationCode = isset($stdClassResultTrackPicking->operationCode) ? $stdClassResultTrackPicking->operationCode : null;
|
56 |
+
$this->_operationDescription = isset($stdClassResultTrackPicking->operationDescription) ? $stdClassResultTrackPicking->operationDescription : null;
|
57 |
+
$this->_operationComment = isset($stdClassResultTrackPicking->operationComment) ? $stdClassResultTrackPicking->operationComment : null;
|
58 |
+
$this->_siteType = isset($stdClassResultTrackPicking->siteType) ? $stdClassResultTrackPicking->siteType : null;
|
59 |
+
$this->_siteName = isset($stdClassResultTrackPicking->siteName) ? $stdClassResultTrackPicking->siteName : null;
|
60 |
+
$this->_consignee = isset($stdClassResultTrackPicking->consignee) ? $stdClassResultTrackPicking->consignee : null;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get date and time of the request
|
65 |
+
* @return date
|
66 |
+
*/
|
67 |
+
public function getMoment() {
|
68 |
+
return $this->_moment;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Get operation code
|
73 |
+
* @return integer signed 32-bit
|
74 |
+
*/
|
75 |
+
public function getOperationCode() {
|
76 |
+
return $this->_operationCode;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Get text description of the operation
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
+
public function getOperationDescription() {
|
84 |
+
return $this->_operationDescription;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get additional note/comment
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
+
public function getOperationComment() {
|
92 |
+
return $this->_operationComment;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get site type
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function getSiteType() {
|
100 |
+
return $this->_siteType;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get site name
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
public function getSiteName() {
|
108 |
+
return $this->_siteName;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Get name of the person who received the shipment
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public function getConsignee() {
|
116 |
+
return $this->_consignee;
|
117 |
+
}
|
118 |
+
}
|
119 |
?>
|
lib/SpeedyEPS/ver01/ResultTrackPickingEx.class.php
CHANGED
@@ -1,151 +1,151 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are returned as a result of extended track picking web service calls
|
4 |
-
* @since 1.1
|
5 |
-
*/
|
6 |
-
class ResultTrackPickingEx {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Date and time
|
10 |
-
* @var date
|
11 |
-
*/
|
12 |
-
private $_moment;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Operation code
|
16 |
-
* @var integer signed 32-bit
|
17 |
-
*/
|
18 |
-
private $_operationCode;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Text description of the operation
|
22 |
-
* @var string
|
23 |
-
*/
|
24 |
-
private $_operationDescription;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Additional note/comment
|
28 |
-
* @var string
|
29 |
-
*/
|
30 |
-
private $_operationComment;
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Site type
|
34 |
-
* @var string
|
35 |
-
*/
|
36 |
-
private $_siteType;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Site name
|
40 |
-
* @var string
|
41 |
-
*/
|
42 |
-
private $_siteName;
|
43 |
-
|
44 |
-
/**
|
45 |
-
* The name of the person who received the shipment
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
private $_consignee;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Returning bill of lading
|
52 |
-
* @var integer Signed 64-bit
|
53 |
-
*/
|
54 |
-
private $_returnBillOfLading;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Redirecting bill of lading
|
58 |
-
* @var integer Signed 64-bit
|
59 |
-
*/
|
60 |
-
private $_redirectBillOfLading;
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Constructs new instance of ResultTrackPickingEx
|
64 |
-
* @param stdClass $stdClassResultTrackPickingEx
|
65 |
-
*/
|
66 |
-
function __construct($stdClassResultTrackPickingEx) {
|
67 |
-
$this->_moment = isset($stdClassResultTrackPickingEx->moment) ? $stdClassResultTrackPickingEx->moment : null;
|
68 |
-
$this->_operationCode = isset($stdClassResultTrackPickingEx->operationCode) ? $stdClassResultTrackPickingEx->operationCode : null;
|
69 |
-
$this->_operationDescription = isset($stdClassResultTrackPickingEx->operationDescription) ? $stdClassResultTrackPickingEx->operationDescription : null;
|
70 |
-
$this->_operationComment = isset($stdClassResultTrackPickingEx->operationComment) ? $stdClassResultTrackPickingEx->operationComment : null;
|
71 |
-
$this->_siteType = isset($stdClassResultTrackPickingEx->siteType) ? $stdClassResultTrackPickingEx->siteType : null;
|
72 |
-
$this->_siteName = isset($stdClassResultTrackPickingEx->siteName) ? $stdClassResultTrackPickingEx->siteName : null;
|
73 |
-
$this->_consignee = isset($stdClassResultTrackPickingEx->consignee) ? $stdClassResultTrackPickingEx->consignee : null;
|
74 |
-
$this->_returnBillOfLading = isset($stdClassResultTrackPickingEx->returnBillOfLading) ? $stdClassResultTrackPickingEx->returnBillOfLading : null;
|
75 |
-
$this->_redirectBillOfLading = isset($stdClassResultTrackPickingEx->redirectBillOfLading) ? $stdClassResultTrackPickingEx->redirectBillOfLading : null;
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Get date and time of the request
|
81 |
-
* @return date
|
82 |
-
*/
|
83 |
-
public function getMoment() {
|
84 |
-
return $this->_moment;
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Get operation code
|
89 |
-
* @return integer signed 32-bit
|
90 |
-
*/
|
91 |
-
public function getOperationCode() {
|
92 |
-
return $this->_operationCode;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get text description of the operation
|
97 |
-
* @return string
|
98 |
-
*/
|
99 |
-
public function getOperationDescription() {
|
100 |
-
return $this->_operationDescription;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Get additional note/comment
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
public function getOperationComment() {
|
108 |
-
return $this->_operationComment;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Get site type
|
113 |
-
* @return string
|
114 |
-
*/
|
115 |
-
public function getSiteType() {
|
116 |
-
return $this->_siteType;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Get site name
|
121 |
-
* @return string
|
122 |
-
*/
|
123 |
-
public function getSiteName() {
|
124 |
-
return $this->_siteName;
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Get name of the person who received the shipment
|
129 |
-
* @return string
|
130 |
-
*/
|
131 |
-
public function getConsignee() {
|
132 |
-
return $this->_consignee;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Get returning bill of lading
|
137 |
-
* @return integer signed 64-bit
|
138 |
-
*/
|
139 |
-
public function getReturnBillOfLading() {
|
140 |
-
return $this->_returnBillOfLading;
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Get redirecting bill of lading
|
145 |
-
* @return integer signed 64-bit
|
146 |
-
*/
|
147 |
-
public function getRedirectBillOfLading() {
|
148 |
-
return $this->_redirectBillOfLading;
|
149 |
-
}
|
150 |
-
}
|
151 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are returned as a result of extended track picking web service calls
|
4 |
+
* @since 1.1
|
5 |
+
*/
|
6 |
+
class ResultTrackPickingEx {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Date and time
|
10 |
+
* @var date
|
11 |
+
*/
|
12 |
+
private $_moment;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Operation code
|
16 |
+
* @var integer signed 32-bit
|
17 |
+
*/
|
18 |
+
private $_operationCode;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Text description of the operation
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $_operationDescription;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Additional note/comment
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
private $_operationComment;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Site type
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
private $_siteType;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Site name
|
40 |
+
* @var string
|
41 |
+
*/
|
42 |
+
private $_siteName;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* The name of the person who received the shipment
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
private $_consignee;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Returning bill of lading
|
52 |
+
* @var integer Signed 64-bit
|
53 |
+
*/
|
54 |
+
private $_returnBillOfLading;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Redirecting bill of lading
|
58 |
+
* @var integer Signed 64-bit
|
59 |
+
*/
|
60 |
+
private $_redirectBillOfLading;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Constructs new instance of ResultTrackPickingEx
|
64 |
+
* @param stdClass $stdClassResultTrackPickingEx
|
65 |
+
*/
|
66 |
+
function __construct($stdClassResultTrackPickingEx) {
|
67 |
+
$this->_moment = isset($stdClassResultTrackPickingEx->moment) ? $stdClassResultTrackPickingEx->moment : null;
|
68 |
+
$this->_operationCode = isset($stdClassResultTrackPickingEx->operationCode) ? $stdClassResultTrackPickingEx->operationCode : null;
|
69 |
+
$this->_operationDescription = isset($stdClassResultTrackPickingEx->operationDescription) ? $stdClassResultTrackPickingEx->operationDescription : null;
|
70 |
+
$this->_operationComment = isset($stdClassResultTrackPickingEx->operationComment) ? $stdClassResultTrackPickingEx->operationComment : null;
|
71 |
+
$this->_siteType = isset($stdClassResultTrackPickingEx->siteType) ? $stdClassResultTrackPickingEx->siteType : null;
|
72 |
+
$this->_siteName = isset($stdClassResultTrackPickingEx->siteName) ? $stdClassResultTrackPickingEx->siteName : null;
|
73 |
+
$this->_consignee = isset($stdClassResultTrackPickingEx->consignee) ? $stdClassResultTrackPickingEx->consignee : null;
|
74 |
+
$this->_returnBillOfLading = isset($stdClassResultTrackPickingEx->returnBillOfLading) ? $stdClassResultTrackPickingEx->returnBillOfLading : null;
|
75 |
+
$this->_redirectBillOfLading = isset($stdClassResultTrackPickingEx->redirectBillOfLading) ? $stdClassResultTrackPickingEx->redirectBillOfLading : null;
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Get date and time of the request
|
81 |
+
* @return date
|
82 |
+
*/
|
83 |
+
public function getMoment() {
|
84 |
+
return $this->_moment;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Get operation code
|
89 |
+
* @return integer signed 32-bit
|
90 |
+
*/
|
91 |
+
public function getOperationCode() {
|
92 |
+
return $this->_operationCode;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get text description of the operation
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function getOperationDescription() {
|
100 |
+
return $this->_operationDescription;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get additional note/comment
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
public function getOperationComment() {
|
108 |
+
return $this->_operationComment;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Get site type
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public function getSiteType() {
|
116 |
+
return $this->_siteType;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Get site name
|
121 |
+
* @return string
|
122 |
+
*/
|
123 |
+
public function getSiteName() {
|
124 |
+
return $this->_siteName;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Get name of the person who received the shipment
|
129 |
+
* @return string
|
130 |
+
*/
|
131 |
+
public function getConsignee() {
|
132 |
+
return $this->_consignee;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Get returning bill of lading
|
137 |
+
* @return integer signed 64-bit
|
138 |
+
*/
|
139 |
+
public function getReturnBillOfLading() {
|
140 |
+
return $this->_returnBillOfLading;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Get redirecting bill of lading
|
145 |
+
* @return integer signed 64-bit
|
146 |
+
*/
|
147 |
+
public function getRedirectBillOfLading() {
|
148 |
+
return $this->_redirectBillOfLading;
|
149 |
+
}
|
150 |
+
}
|
151 |
?>
|
lib/SpeedyEPS/ver01/ServerException.class.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Server Exception is thrown in case communication with server failed
|
4 |
-
*/
|
5 |
-
class ServerException extends Exception {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Constructs new instance of exception
|
9 |
-
* @param Exception $previous
|
10 |
-
*/
|
11 |
-
public function __construct($previous) {
|
12 |
-
parent::__construct($previous->getMessage());
|
13 |
-
}
|
14 |
-
}
|
15 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Server Exception is thrown in case communication with server failed
|
4 |
+
*/
|
5 |
+
class ServerException extends Exception {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Constructs new instance of exception
|
9 |
+
* @param Exception $previous
|
10 |
+
*/
|
11 |
+
public function __construct($previous) {
|
12 |
+
parent::__construct($previous->getMessage());
|
13 |
+
}
|
14 |
+
}
|
15 |
?>
|
lib/SpeedyEPS/ver01/Size.class.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Instances of this class are used in parameter classes to specify picking size dimensions
|
4 |
-
*/
|
5 |
-
class Size {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Width (cm). Maximum value is 9999
|
9 |
-
* MANDATORY: NO
|
10 |
-
* @var integer Signed 32-bit
|
11 |
-
*/
|
12 |
-
private $_width;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Height (cm). Maximum value is 9999
|
16 |
-
* MANDATORY: NO
|
17 |
-
* @var integer Signed 32-bit
|
18 |
-
*/
|
19 |
-
private $_height;
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Depth (cm). Maximum value is 9999
|
23 |
-
* MANDATORY: NO
|
24 |
-
* @var integer Signed 32-bit
|
25 |
-
*/
|
26 |
-
private $_depth;
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get width
|
30 |
-
* @return integer Signed 32-bit
|
31 |
-
*/
|
32 |
-
public function getWidth() {
|
33 |
-
return $this->_width;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Set width
|
38 |
-
* @param integer $width Signed 32-bit
|
39 |
-
*/
|
40 |
-
public function setWidth($width) {
|
41 |
-
$this->_width = $width;
|
42 |
-
}
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Get height
|
46 |
-
* @return integer Signed 32-bit
|
47 |
-
*/
|
48 |
-
public function getHeight() {
|
49 |
-
return $this->_height;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Set height
|
54 |
-
* @param integer $height Signed 32-bit
|
55 |
-
*/
|
56 |
-
public function setHeight($height) {
|
57 |
-
$this->_height = $height;
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Get depth
|
62 |
-
* @return integer Signed 32-bit
|
63 |
-
*/
|
64 |
-
public function getDepth() {
|
65 |
-
return $this->_depth;
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Set depth
|
70 |
-
* @param integer $depth Signed 32-bit
|
71 |
-
*/
|
72 |
-
public function setDepth($depth) {
|
73 |
-
$this->_depth = $depth;
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Return standard class from this class
|
78 |
-
* @return stdClass
|
79 |
-
*/
|
80 |
-
public function toStdClass() {
|
81 |
-
$stdClass = new stdClass();
|
82 |
-
$stdClass->width = $this->_width;
|
83 |
-
$stdClass->height = $this->_height;
|
84 |
-
$stdClass->depth = $this->_depth;
|
85 |
-
return $stdClass;
|
86 |
-
}
|
87 |
-
}
|
88 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Instances of this class are used in parameter classes to specify picking size dimensions
|
4 |
+
*/
|
5 |
+
class Size {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Width (cm). Maximum value is 9999
|
9 |
+
* MANDATORY: NO
|
10 |
+
* @var integer Signed 32-bit
|
11 |
+
*/
|
12 |
+
private $_width;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Height (cm). Maximum value is 9999
|
16 |
+
* MANDATORY: NO
|
17 |
+
* @var integer Signed 32-bit
|
18 |
+
*/
|
19 |
+
private $_height;
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Depth (cm). Maximum value is 9999
|
23 |
+
* MANDATORY: NO
|
24 |
+
* @var integer Signed 32-bit
|
25 |
+
*/
|
26 |
+
private $_depth;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get width
|
30 |
+
* @return integer Signed 32-bit
|
31 |
+
*/
|
32 |
+
public function getWidth() {
|
33 |
+
return $this->_width;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Set width
|
38 |
+
* @param integer $width Signed 32-bit
|
39 |
+
*/
|
40 |
+
public function setWidth($width) {
|
41 |
+
$this->_width = $width;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get height
|
46 |
+
* @return integer Signed 32-bit
|
47 |
+
*/
|
48 |
+
public function getHeight() {
|
49 |
+
return $this->_height;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Set height
|
54 |
+
* @param integer $height Signed 32-bit
|
55 |
+
*/
|
56 |
+
public function setHeight($height) {
|
57 |
+
$this->_height = $height;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get depth
|
62 |
+
* @return integer Signed 32-bit
|
63 |
+
*/
|
64 |
+
public function getDepth() {
|
65 |
+
return $this->_depth;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Set depth
|
70 |
+
* @param integer $depth Signed 32-bit
|
71 |
+
*/
|
72 |
+
public function setDepth($depth) {
|
73 |
+
$this->_depth = $depth;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Return standard class from this class
|
78 |
+
* @return stdClass
|
79 |
+
*/
|
80 |
+
public function toStdClass() {
|
81 |
+
$stdClass = new stdClass();
|
82 |
+
$stdClass->width = $this->_width;
|
83 |
+
$stdClass->height = $this->_height;
|
84 |
+
$stdClass->depth = $this->_depth;
|
85 |
+
return $stdClass;
|
86 |
+
}
|
87 |
+
}
|
88 |
?>
|
lib/SpeedyEPS/ver01/ValueAddress.class.php
CHANGED
@@ -1,434 +1,434 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This class is returned in response of Speedy web service method address calls
|
4 |
-
*/
|
5 |
-
class ValueAddress {
|
6 |
-
|
7 |
-
/**
|
8 |
-
* Country ID (ISO)
|
9 |
-
* @var integer Signed 64-bit
|
10 |
-
*/
|
11 |
-
private $_countryId;
|
12 |
-
|
13 |
-
/**
|
14 |
-
* State
|
15 |
-
* @var string
|
16 |
-
*/
|
17 |
-
private $_stateId;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Site ID
|
21 |
-
* @var integer Signed 64-bit
|
22 |
-
*/
|
23 |
-
private $_siteId;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Site name
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
private $_siteName;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Site type
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
private $_siteType;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Municpality name
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $_municipalityName;
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Region name
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_regionName;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Post code
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
private $_postCode;
|
54 |
-
|
55 |
-
/**
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
private $_eknm;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Street name
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
private $_streetName;
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Street type
|
69 |
-
* @var string
|
70 |
-
*/
|
71 |
-
private $_streetType;
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Street ID
|
75 |
-
* @var integer Signed 64-bit
|
76 |
-
*/
|
77 |
-
private $_streetId;
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Quarter name
|
81 |
-
* @var string
|
82 |
-
*/
|
83 |
-
private $_quarterName;
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Quarter type
|
87 |
-
* @var string
|
88 |
-
*/
|
89 |
-
private $_quarterType;
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Quarter ID
|
93 |
-
* @var long Signed 64-bit
|
94 |
-
*/
|
95 |
-
private $_quarterId;
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Street No
|
99 |
-
* @var string
|
100 |
-
*/
|
101 |
-
private $_streetNo;
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Block No
|
105 |
-
* @var string
|
106 |
-
*/
|
107 |
-
private $_blockNo;
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Entrance No
|
111 |
-
* @var string
|
112 |
-
*/
|
113 |
-
private $_entranceNo;
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Floor No
|
117 |
-
* @var string
|
118 |
-
*/
|
119 |
-
private $_floorNo;
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Appartment No
|
123 |
-
* @var string
|
124 |
-
*/
|
125 |
-
private $_apartmentNo;
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Address note
|
129 |
-
* @var string
|
130 |
-
*/
|
131 |
-
private $_addressNote;
|
132 |
-
|
133 |
-
/**
|
134 |
-
* GIS coordinate - X
|
135 |
-
* @var double Signed 64-bit
|
136 |
-
*/
|
137 |
-
private $_coordX;
|
138 |
-
|
139 |
-
/**
|
140 |
-
* GIS coordinate - Y
|
141 |
-
* @var double Signed 64-bit
|
142 |
-
*/
|
143 |
-
private $_coordY;
|
144 |
-
|
145 |
-
/**
|
146 |
-
* GIS coordinates type
|
147 |
-
* @var integer Signed 32-bit
|
148 |
-
*/
|
149 |
-
private $_coordTypeId;
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Common object name
|
153 |
-
* @var string
|
154 |
-
*/
|
155 |
-
private $_commonObjectName;
|
156 |
-
|
157 |
-
/**
|
158 |
-
* Common object ID
|
159 |
-
* @var integer Signed 64-bit
|
160 |
-
*/
|
161 |
-
private $_commonObjectId;
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Flag for full nomenclature
|
165 |
-
* @var boolean
|
166 |
-
*/
|
167 |
-
private $_fullNomenclature;
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Site details
|
171 |
-
* @var string
|
172 |
-
*/
|
173 |
-
private $_siteDetails;
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Constructs new instance of ValueAddress
|
177 |
-
* @param stdClass $stdClassResultStreet
|
178 |
-
*/
|
179 |
-
function __construct($stdClassValueAddress) {
|
180 |
-
$this->_countryId = isset($stdClassValueAddress->countryId) ? $stdClassValueAddress->countryId : null;
|
181 |
-
$this->_stateId = isset($stdClassValueAddress->stateId) ? $stdClassValueAddress->stateId : null;
|
182 |
-
$this->_siteId = isset($stdClassValueAddress->siteId) ? $stdClassValueAddress->siteId : null;
|
183 |
-
$this->_siteName = isset($stdClassValueAddress->siteName) ? $stdClassValueAddress->siteName : null;
|
184 |
-
$this->_siteType = isset($stdClassValueAddress->siteType) ? $stdClassValueAddress->siteType : null;
|
185 |
-
$this->_municipalityName = isset($stdClassValueAddress->municipalityName) ? $stdClassValueAddress->municipalityName : null;
|
186 |
-
$this->_regionName = isset($stdClassValueAddress->regionName) ? $stdClassValueAddress->regionName : null;
|
187 |
-
$this->_postCode = isset($stdClassValueAddress->postCode) ? $stdClassValueAddress->postCode : null;
|
188 |
-
$this->_eknm = isset($stdClassValueAddress->eknm) ? $stdClassValueAddress->eknm : null;
|
189 |
-
$this->_streetName = isset($stdClassValueAddress->streetName) ? $stdClassValueAddress->streetName : null;
|
190 |
-
$this->_streetType = isset($stdClassValueAddress->streetType) ? $stdClassValueAddress->streetType : null;
|
191 |
-
$this->_streetId = isset($stdClassValueAddress->streetId) ? $stdClassValueAddress->streetId : null;
|
192 |
-
$this->_quarterName = isset($stdClassValueAddress->quarterName) ? $stdClassValueAddress->quarterName : null;
|
193 |
-
$this->_quarterType = isset($stdClassValueAddress->quarterType) ? $stdClassValueAddress->quarterType : null;
|
194 |
-
$this->_quarterId = isset($stdClassValueAddress->quarterId) ? $stdClassValueAddress->quarterId : null;
|
195 |
-
$this->_streetNo = isset($stdClassValueAddress->streetNo) ? $stdClassValueAddress->streetNo : null;
|
196 |
-
$this->_blockNo = isset($stdClassValueAddress->blockNo) ? $stdClassValueAddress->blockNo : null;
|
197 |
-
$this->_entranceNo = isset($stdClassValueAddress->entranceNo) ? $stdClassValueAddress->entranceNo : null;
|
198 |
-
$this->_floorNo = isset($stdClassValueAddress->floorNo) ? $stdClassValueAddress->floorNo : null;
|
199 |
-
$this->_apartmentNo = isset($stdClassValueAddress->apartmentNo) ? $stdClassValueAddress->apartmentNo : null;
|
200 |
-
$this->_addressNote = isset($stdClassValueAddress->addressNote) ? $stdClassValueAddress->addressNote : null;
|
201 |
-
$this->_coordX = isset($stdClassValueAddress->coordX) ? $stdClassValueAddress->coordX : null;
|
202 |
-
$this->_coordY = isset($stdClassValueAddress->coordY) ? $stdClassValueAddress->coordY : null;
|
203 |
-
$this->_coordTypeId = isset($stdClassValueAddress->coordTypeId) ? $stdClassValueAddress->coordTypeId : null;
|
204 |
-
$this->_commonObjectName = isset($stdClassValueAddress->commonObjectName) ? $stdClassValueAddress->commonObjectName : null;
|
205 |
-
$this->_commonObjectId = isset($stdClassValueAddress->commonObjectId) ? $stdClassValueAddress->commonObjectId : null;
|
206 |
-
$this->_fullNomenclature = isset($stdClassValueAddress->fullNomenclature) ? $stdClassValueAddress->fullNomenclature : null;
|
207 |
-
$this->_siteDetails = isset($stdClassValueAddress->siteDetails) ? $stdClassValueAddress->siteDetails : null;
|
208 |
-
}
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Get country ID (ISO)
|
212 |
-
* @return integer Signed 64-bit
|
213 |
-
*/
|
214 |
-
public function getCountryId() {
|
215 |
-
return $this->_countryId;
|
216 |
-
}
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Get state ID
|
220 |
-
* @return string
|
221 |
-
*/
|
222 |
-
public function getStateId() {
|
223 |
-
return $this->_stateId;
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Get site ID
|
228 |
-
* @return integer Signed 64-bit
|
229 |
-
*/
|
230 |
-
public function getSiteId() {
|
231 |
-
return $this->_siteId;
|
232 |
-
}
|
233 |
-
|
234 |
-
/**
|
235 |
-
* Get site name
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
public function getSiteName() {
|
239 |
-
return $this->_siteName;
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Get site type
|
244 |
-
* @return string
|
245 |
-
*/
|
246 |
-
public function getSiteType() {
|
247 |
-
return $this->_siteType;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Get municipality name
|
252 |
-
* @return string
|
253 |
-
*/
|
254 |
-
public function getMunicipalityName() {
|
255 |
-
return $this->_municipalityName;
|
256 |
-
}
|
257 |
-
|
258 |
-
/**
|
259 |
-
* Get region name
|
260 |
-
* @return string
|
261 |
-
*/
|
262 |
-
public function getRegionName() {
|
263 |
-
return $this->_regionName;
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* Get post code
|
268 |
-
* @return string
|
269 |
-
*/
|
270 |
-
public function getPostCode() {
|
271 |
-
return $this->_postCode;
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
*
|
276 |
-
* @return string
|
277 |
-
*/
|
278 |
-
public function getEknm() {
|
279 |
-
return $this->_eknm;
|
280 |
-
}
|
281 |
-
|
282 |
-
/**
|
283 |
-
* Get street name
|
284 |
-
* @return string
|
285 |
-
*/
|
286 |
-
public function getStreetName() {
|
287 |
-
return $this->_streetName;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Get street type
|
292 |
-
* @return string
|
293 |
-
*/
|
294 |
-
public function getStreetType() {
|
295 |
-
return $this->_streetType;
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Get street ID
|
300 |
-
* @return integer Signed 64-bit
|
301 |
-
*/
|
302 |
-
public function getStreetId() {
|
303 |
-
return $this->_streetId;
|
304 |
-
}
|
305 |
-
|
306 |
-
/**
|
307 |
-
* Get quarter name
|
308 |
-
* @return string
|
309 |
-
*/
|
310 |
-
public function getQuarterName() {
|
311 |
-
return $this->_quarterName;
|
312 |
-
}
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Get quarter type
|
316 |
-
* @return string
|
317 |
-
*/
|
318 |
-
public function getQuarterType() {
|
319 |
-
return $this->_quarterType;
|
320 |
-
}
|
321 |
-
|
322 |
-
/**
|
323 |
-
* Get quarter ID
|
324 |
-
* @return integer Signed 64-bit
|
325 |
-
*/
|
326 |
-
public function getQuarterId() {
|
327 |
-
return $this->_quarterId;
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Get street No
|
332 |
-
* @return string
|
333 |
-
*/
|
334 |
-
public function getStreetNo() {
|
335 |
-
return $this->_streetNo;
|
336 |
-
}
|
337 |
-
|
338 |
-
/**
|
339 |
-
* Get block No
|
340 |
-
* @return string
|
341 |
-
*/
|
342 |
-
public function getBlockNo() {
|
343 |
-
return $this->_blockNo;
|
344 |
-
}
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Get entrance No
|
348 |
-
* @return string
|
349 |
-
*/
|
350 |
-
public function getEntranceNo() {
|
351 |
-
return $this->_entranceNo;
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Get floor No
|
356 |
-
* @return string
|
357 |
-
*/
|
358 |
-
public function getFloorNo() {
|
359 |
-
return $this->_floorNo;
|
360 |
-
}
|
361 |
-
|
362 |
-
/**
|
363 |
-
* Get appartment No
|
364 |
-
* @return string
|
365 |
-
*/
|
366 |
-
public function getApartmentNo() {
|
367 |
-
return $this->_apartmentNo;
|
368 |
-
}
|
369 |
-
|
370 |
-
/**
|
371 |
-
* Get address note
|
372 |
-
* @return string
|
373 |
-
*/
|
374 |
-
public function getAddressNote() {
|
375 |
-
return $this->_addressNote;
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Get GIS coordinate X
|
380 |
-
* @return double Signed 64-bit
|
381 |
-
*/
|
382 |
-
public function getCoordX() {
|
383 |
-
return $this->_coordX;
|
384 |
-
}
|
385 |
-
|
386 |
-
/**
|
387 |
-
* Get GIS coordinate Y
|
388 |
-
* @return double Signed 64-bit
|
389 |
-
*/
|
390 |
-
public function getCoordY() {
|
391 |
-
return $this->_coordY;
|
392 |
-
}
|
393 |
-
|
394 |
-
/**
|
395 |
-
* Get GIS coordinate type
|
396 |
-
* @return integer Signed 32-bit
|
397 |
-
*/
|
398 |
-
public function getCoordTypeId() {
|
399 |
-
return $this->_coordTypeId;
|
400 |
-
}
|
401 |
-
|
402 |
-
/**
|
403 |
-
* Get common object name
|
404 |
-
* @return string
|
405 |
-
*/
|
406 |
-
public function getCommonObjectName() {
|
407 |
-
return $this->_commonObjectName;
|
408 |
-
}
|
409 |
-
|
410 |
-
/**
|
411 |
-
* Get common object ID
|
412 |
-
* @return integer Signed 64-bit
|
413 |
-
*/
|
414 |
-
public function getCommonObjectId() {
|
415 |
-
return $this->_commonObjectId;
|
416 |
-
}
|
417 |
-
|
418 |
-
/**
|
419 |
-
* Get flag for full noemnclature
|
420 |
-
* @return boolean
|
421 |
-
*/
|
422 |
-
public function isFullNomenclature() {
|
423 |
-
return $this->_fullNomenclature;
|
424 |
-
}
|
425 |
-
|
426 |
-
/**
|
427 |
-
* Get site details
|
428 |
-
* @return string
|
429 |
-
*/
|
430 |
-
public function getSiteDetails() {
|
431 |
-
return $this->_siteDetails;
|
432 |
-
}
|
433 |
-
}
|
434 |
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This class is returned in response of Speedy web service method address calls
|
4 |
+
*/
|
5 |
+
class ValueAddress {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Country ID (ISO)
|
9 |
+
* @var integer Signed 64-bit
|
10 |
+
*/
|
11 |
+
private $_countryId;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* State
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
private $_stateId;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Site ID
|
21 |
+
* @var integer Signed 64-bit
|
22 |
+
*/
|
23 |
+
private $_siteId;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Site name
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
+
private $_siteName;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Site type
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $_siteType;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Municpality name
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private $_municipalityName;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Region name
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_regionName;
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Post code
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
private $_postCode;
|
54 |
+
|
55 |
+
/**
|
56 |
+
*
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
private $_eknm;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Street name
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
private $_streetName;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Street type
|
69 |
+
* @var string
|
70 |
+
*/
|
71 |
+
private $_streetType;
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Street ID
|
75 |
+
* @var integer Signed 64-bit
|
76 |
+
*/
|
77 |
+
private $_streetId;
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Quarter name
|
81 |
+
* @var string
|
82 |
+
*/
|
83 |
+
private $_quarterName;
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Quarter type
|
87 |
+
* @var string
|
88 |
+
*/
|
89 |
+
private $_quarterType;
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Quarter ID
|
93 |
+
* @var long Signed 64-bit
|
94 |
+
*/
|
95 |
+
private $_quarterId;
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Street No
|
99 |
+
* @var string
|
100 |
+
*/
|
101 |
+
private $_streetNo;
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Block No
|
105 |
+
* @var string
|
106 |
+
*/
|
107 |
+
private $_blockNo;
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Entrance No
|
111 |
+
* @var string
|
112 |
+
*/
|
113 |
+
private $_entranceNo;
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Floor No
|
117 |
+
* @var string
|
118 |
+
*/
|
119 |
+
private $_floorNo;
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Appartment No
|
123 |
+
* @var string
|
124 |
+
*/
|
125 |
+
private $_apartmentNo;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Address note
|
129 |
+
* @var string
|
130 |
+
*/
|
131 |
+
private $_addressNote;
|
132 |
+
|
133 |
+
/**
|
134 |
+
* GIS coordinate - X
|
135 |
+
* @var double Signed 64-bit
|
136 |
+
*/
|
137 |
+
private $_coordX;
|
138 |
+
|
139 |
+
/**
|
140 |
+
* GIS coordinate - Y
|
141 |
+
* @var double Signed 64-bit
|
142 |
+
*/
|
143 |
+
private $_coordY;
|
144 |
+
|
145 |
+
/**
|
146 |
+
* GIS coordinates type
|
147 |
+
* @var integer Signed 32-bit
|
148 |
+
*/
|
149 |
+
private $_coordTypeId;
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Common object name
|
153 |
+
* @var string
|
154 |
+
*/
|
155 |
+
private $_commonObjectName;
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Common object ID
|
159 |
+
* @var integer Signed 64-bit
|
160 |
+
*/
|
161 |
+
private $_commonObjectId;
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Flag for full nomenclature
|
165 |
+
* @var boolean
|
166 |
+
*/
|
167 |
+
private $_fullNomenclature;
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Site details
|
171 |
+
* @var string
|
172 |
+
*/
|
173 |
+
private $_siteDetails;
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Constructs new instance of ValueAddress
|
177 |
+
* @param stdClass $stdClassResultStreet
|
178 |
+
*/
|
179 |
+
function __construct($stdClassValueAddress) {
|
180 |
+
$this->_countryId = isset($stdClassValueAddress->countryId) ? $stdClassValueAddress->countryId : null;
|
181 |
+
$this->_stateId = isset($stdClassValueAddress->stateId) ? $stdClassValueAddress->stateId : null;
|
182 |
+
$this->_siteId = isset($stdClassValueAddress->siteId) ? $stdClassValueAddress->siteId : null;
|
183 |
+
$this->_siteName = isset($stdClassValueAddress->siteName) ? $stdClassValueAddress->siteName : null;
|
184 |
+
$this->_siteType = isset($stdClassValueAddress->siteType) ? $stdClassValueAddress->siteType : null;
|
185 |
+
$this->_municipalityName = isset($stdClassValueAddress->municipalityName) ? $stdClassValueAddress->municipalityName : null;
|
186 |
+
$this->_regionName = isset($stdClassValueAddress->regionName) ? $stdClassValueAddress->regionName : null;
|
187 |
+
$this->_postCode = isset($stdClassValueAddress->postCode) ? $stdClassValueAddress->postCode : null;
|
188 |
+
$this->_eknm = isset($stdClassValueAddress->eknm) ? $stdClassValueAddress->eknm : null;
|
189 |
+
$this->_streetName = isset($stdClassValueAddress->streetName) ? $stdClassValueAddress->streetName : null;
|
190 |
+
$this->_streetType = isset($stdClassValueAddress->streetType) ? $stdClassValueAddress->streetType : null;
|
191 |
+
$this->_streetId = isset($stdClassValueAddress->streetId) ? $stdClassValueAddress->streetId : null;
|
192 |
+
$this->_quarterName = isset($stdClassValueAddress->quarterName) ? $stdClassValueAddress->quarterName : null;
|
193 |
+
$this->_quarterType = isset($stdClassValueAddress->quarterType) ? $stdClassValueAddress->quarterType : null;
|
194 |
+
$this->_quarterId = isset($stdClassValueAddress->quarterId) ? $stdClassValueAddress->quarterId : null;
|
195 |
+
$this->_streetNo = isset($stdClassValueAddress->streetNo) ? $stdClassValueAddress->streetNo : null;
|
196 |
+
$this->_blockNo = isset($stdClassValueAddress->blockNo) ? $stdClassValueAddress->blockNo : null;
|
197 |
+
$this->_entranceNo = isset($stdClassValueAddress->entranceNo) ? $stdClassValueAddress->entranceNo : null;
|
198 |
+
$this->_floorNo = isset($stdClassValueAddress->floorNo) ? $stdClassValueAddress->floorNo : null;
|
199 |
+
$this->_apartmentNo = isset($stdClassValueAddress->apartmentNo) ? $stdClassValueAddress->apartmentNo : null;
|
200 |
+
$this->_addressNote = isset($stdClassValueAddress->addressNote) ? $stdClassValueAddress->addressNote : null;
|
201 |
+
$this->_coordX = isset($stdClassValueAddress->coordX) ? $stdClassValueAddress->coordX : null;
|
202 |
+
$this->_coordY = isset($stdClassValueAddress->coordY) ? $stdClassValueAddress->coordY : null;
|
203 |
+
$this->_coordTypeId = isset($stdClassValueAddress->coordTypeId) ? $stdClassValueAddress->coordTypeId : null;
|
204 |
+
$this->_commonObjectName = isset($stdClassValueAddress->commonObjectName) ? $stdClassValueAddress->commonObjectName : null;
|
205 |
+
$this->_commonObjectId = isset($stdClassValueAddress->commonObjectId) ? $stdClassValueAddress->commonObjectId : null;
|
206 |
+
$this->_fullNomenclature = isset($stdClassValueAddress->fullNomenclature) ? $stdClassValueAddress->fullNomenclature : null;
|
207 |
+
$this->_siteDetails = isset($stdClassValueAddress->siteDetails) ? $stdClassValueAddress->siteDetails : null;
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Get country ID (ISO)
|
212 |
+
* @return integer Signed 64-bit
|
213 |
+
*/
|
214 |
+
public function getCountryId() {
|
215 |
+
return $this->_countryId;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Get state ID
|
220 |
+
* @return string
|
221 |
+
*/
|
222 |
+
public function getStateId() {
|
223 |
+
return $this->_stateId;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Get site ID
|
228 |
+
* @return integer Signed 64-bit
|
229 |
+
*/
|
230 |
+
public function getSiteId() {
|
231 |
+
return $this->_siteId;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get site name
|
236 |
+
* @return string
|
237 |
+
*/
|
238 |
+
public function getSiteName() {
|
239 |
+
return $this->_siteName;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Get site type
|
244 |
+
* @return string
|
245 |
+
*/
|
246 |
+
public function getSiteType() {
|
247 |
+
return $this->_siteType;
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Get municipality name
|
252 |
+
* @return string
|
253 |
+
*/
|
254 |
+
public function getMunicipalityName() {
|
255 |
+
return $this->_municipalityName;
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Get region name
|
260 |
+
* @return string
|
261 |
+
*/
|
262 |
+
public function getRegionName() {
|
263 |
+
return $this->_regionName;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Get post code
|
268 |
+
* @return string
|
269 |
+
*/
|
270 |
+
public function getPostCode() {
|
271 |
+
return $this->_postCode;
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
*
|
276 |
+
* @return string
|
277 |
+
*/
|
278 |
+
public function getEknm() {
|
279 |
+
return $this->_eknm;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Get street name
|
284 |
+
* @return string
|
285 |
+
*/
|
286 |
+
public function getStreetName() {
|
287 |
+
return $this->_streetName;
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Get street type
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getStreetType() {
|
295 |
+
return $this->_streetType;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Get street ID
|
300 |
+
* @return integer Signed 64-bit
|
301 |
+
*/
|
302 |
+
public function getStreetId() {
|
303 |
+
return $this->_streetId;
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Get quarter name
|
308 |
+
* @return string
|
309 |
+
*/
|
310 |
+
public function getQuarterName() {
|
311 |
+
return $this->_quarterName;
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Get quarter type
|
316 |
+
* @return string
|
317 |
+
*/
|
318 |
+
public function getQuarterType() {
|
319 |
+
return $this->_quarterType;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Get quarter ID
|
324 |
+
* @return integer Signed 64-bit
|
325 |
+
*/
|
326 |
+
public function getQuarterId() {
|
327 |
+
return $this->_quarterId;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Get street No
|
332 |
+
* @return string
|
333 |
+
*/
|
334 |
+
public function getStreetNo() {
|
335 |
+
return $this->_streetNo;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Get block No
|
340 |
+
* @return string
|
341 |
+
*/
|
342 |
+
public function getBlockNo() {
|
343 |
+
return $this->_blockNo;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get entrance No
|
348 |
+
* @return string
|
349 |
+
*/
|
350 |
+
public function getEntranceNo() {
|
351 |
+
return $this->_entranceNo;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Get floor No
|
356 |
+
* @return string
|
357 |
+
*/
|
358 |
+
public function getFloorNo() {
|
359 |
+
return $this->_floorNo;
|
360 |
+
}
|
361 |
+
|
362 |
+
/**
|
363 |
+
* Get appartment No
|
364 |
+
* @return string
|
365 |
+
*/
|
366 |
+
public function getApartmentNo() {
|
367 |
+
return $this->_apartmentNo;
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Get address note
|
372 |
+
* @return string
|
373 |
+
*/
|
374 |
+
public function getAddressNote() {
|
375 |
+
return $this->_addressNote;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Get GIS coordinate X
|
380 |
+
* @return double Signed 64-bit
|
381 |
+
*/
|
382 |
+
public function getCoordX() {
|
383 |
+
return $this->_coordX;
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Get GIS coordinate Y
|
388 |
+
* @return double Signed 64-bit
|
389 |
+
*/
|
390 |
+
public function getCoordY() {
|
391 |
+
return $this->_coordY;
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Get GIS coordinate type
|
396 |
+
* @return integer Signed 32-bit
|
397 |
+
*/
|
398 |
+
public function getCoordTypeId() {
|
399 |
+
return $this->_coordTypeId;
|
400 |
+
}
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Get common object name
|
404 |
+
* @return string
|
405 |
+
*/
|
406 |
+
public function getCommonObjectName() {
|
407 |
+
return $this->_commonObjectName;
|
408 |
+
}
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Get common object ID
|
412 |
+
* @return integer Signed 64-bit
|
413 |
+
*/
|
414 |
+
public function getCommonObjectId() {
|
415 |
+
return $this->_commonObjectId;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Get flag for full noemnclature
|
420 |
+
* @return boolean
|
421 |
+
*/
|
422 |
+
public function isFullNomenclature() {
|
423 |
+
return $this->_fullNomenclature;
|
424 |
+
}
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Get site details
|
428 |
+
* @return string
|
429 |
+
*/
|
430 |
+
public function getSiteDetails() {
|
431 |
+
return $this->_siteDetails;
|
432 |
+
}
|
433 |
+
}
|
434 |
?>
|
lib/SpeedyEPS/ver01/soap/EPSSOAPInterfaceImpl.class.php
CHANGED
@@ -1,984 +1,1078 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Speedy SOAP EPS ver01 Service Interface Implementation
|
7 |
-
*/
|
8 |
-
class EPSSOAPInterfaceImpl extends SoapClient implements EPSInterface {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Speedy SOAP WSDL version 01 URL
|
12 |
-
* @var string
|
13 |
-
*/
|
14 |
-
const SPEEDY_SOAP_WSDL_V01_URL = 'https://www.speedy.bg/eps/main01.wsdl';
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Constructs new instance of SOAP service
|
18 |
-
* @param string $wsdlURL
|
19 |
-
* @param options[optional]
|
20 |
-
*/
|
21 |
-
function __construct($wsdlURL=self::SPEEDY_SOAP_WSDL_V01_URL, $options=null) {
|
22 |
-
if (is_null($options)) {
|
23 |
-
parent::SoapClient($wsdlURL);
|
24 |
-
} else {
|
25 |
-
parent::SoapClient($wsdlURL, $options);
|
26 |
-
}
|
27 |
-
// echo('<BR>Connected to '.$wsdlURL);
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @see EPSInterface::login()
|
32 |
-
*/
|
33 |
-
public function login($username, $password) {
|
34 |
-
try {
|
35 |
-
$loginSdtClass = new stdClass();
|
36 |
-
$loginSdtClass->username = $username;
|
37 |
-
$loginSdtClass->password = $password;
|
38 |
-
$response = parent::login($loginSdtClass);
|
39 |
-
if (isset($response->return)) {
|
40 |
-
$resultLogin = new ResultLogin($response->return);
|
41 |
-
} else {
|
42 |
-
$resultLogin = null;
|
43 |
-
}
|
44 |
-
return $resultLogin;
|
45 |
-
} catch (SoapFault $sf) {
|
46 |
-
throw new ServerException($sf);
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @see EPSInterface::isSessionActive()
|
52 |
-
*/
|
53 |
-
public function isSessionActive($sessionId, $refreshSession) {
|
54 |
-
try {
|
55 |
-
$isSessionActiveSdtClass = new stdClass();
|
56 |
-
$isSessionActiveSdtClass->sessionId = $sessionId;
|
57 |
-
$isSessionActiveSdtClass->refreshSession = $refreshSession;
|
58 |
-
$response = parent::isSessionActive($isSessionActiveSdtClass);
|
59 |
-
if (isset($response->return)) {
|
60 |
-
$isSessionActiveFlag = $response->return;
|
61 |
-
} else {
|
62 |
-
$isSessionActiveFlag = false;
|
63 |
-
}
|
64 |
-
return $isSessionActiveFlag;
|
65 |
-
} catch (SoapFault $sf) {
|
66 |
-
throw new ServerException($sf);
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* @see EPSInterface::listServices()
|
72 |
-
*/
|
73 |
-
public function listServices($sessionId, $date) {
|
74 |
-
try {
|
75 |
-
$listServicesStdObject = new stdClass();
|
76 |
-
$listServicesStdObject->sessionId = $sessionId;
|
77 |
-
$listServicesStdObject->date = $date;
|
78 |
-
$response = parent::listServices($listServicesStdObject);
|
79 |
-
$arrListServices = array();
|
80 |
-
if (isset($response->return)) {
|
81 |
-
$arrStdServices = $response->return;
|
82 |
-
if (is_array($arrStdServices)) {
|
83 |
-
for($i = 0; $i < count($arrStdServices); $i++) {
|
84 |
-
$arrListServices[$i] = new ResultCourierService($arrStdServices[$i]);
|
85 |
-
}
|
86 |
-
} else {
|
87 |
-
$arrListServices[0] = new ResultCourierService($arrStdServices);
|
88 |
-
}
|
89 |
-
}
|
90 |
-
return $arrListServices;
|
91 |
-
} catch (SoapFault $sf) {
|
92 |
-
throw new ServerException($sf);
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* @see EPSInterface::listServicesForSites()
|
98 |
-
*/
|
99 |
-
public function listServicesForSites($sessionId, $date, $senderSiteId, $receiverSiteId) {
|
100 |
-
try {
|
101 |
-
$listServicesForSitesStdObject = new stdClass();
|
102 |
-
$listServicesForSitesStdObject->sessionId = $sessionId;
|
103 |
-
$listServicesForSitesStdObject->date = $date;
|
104 |
-
$listServicesForSitesStdObject->senderSiteId = $senderSiteId;
|
105 |
-
$listServicesForSitesStdObject->receiverSiteId = $receiverSiteId;
|
106 |
-
$response = parent::listServicesForSites($listServicesForSitesStdObject);
|
107 |
-
$arrServicesForSitesStdObject = array();
|
108 |
-
if (isset($response->return)) {
|
109 |
-
$arrStdServicesForSites = $response->return;
|
110 |
-
if (is_array($arrStdServicesForSites)) {
|
111 |
-
for($i = 0; $i < count($arrStdServicesForSites); $i++) {
|
112 |
-
$arrServicesForSitesStdObject[$i] = new ResultCourierServiceExt($arrStdServicesForSites[$i]);
|
113 |
-
}
|
114 |
-
} else {
|
115 |
-
$arrServicesForSitesStdObject[0] = new ResultCourierServiceExt($arrStdServicesForSites);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
return $arrServicesForSitesStdObject;
|
119 |
-
} catch (SoapFault $sf) {
|
120 |
-
throw new ServerException($sf);
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* @see EPSInterface::listSites()
|
126 |
-
*/
|
127 |
-
public function listSites($sessionId, $type, $name) {
|
128 |
-
try {
|
129 |
-
$listSitesStdObject = new stdClass();
|
130 |
-
$listSitesStdObject->sessionId = $sessionId;
|
131 |
-
$listSitesStdObject->type = $type;
|
132 |
-
$listSitesStdObject->name = $name;
|
133 |
-
$response = parent::listSites($listSitesStdObject);
|
134 |
-
$arrListSites = array();
|
135 |
-
if (isset($response->return)) {
|
136 |
-
$arrStdSites = $response->return;
|
137 |
-
if (is_array($arrStdSites)) {
|
138 |
-
for($i = 0; $i < count($arrStdSites); $i++) {
|
139 |
-
$arrListSites[$i] = new ResultSite($arrStdSites[$i]);
|
140 |
-
}
|
141 |
-
} else {
|
142 |
-
$arrListSites[0] = new ResultSite($arrStdSites);
|
143 |
-
}
|
144 |
-
}
|
145 |
-
return $arrListSites;
|
146 |
-
} catch (SoapFault $sf) {
|
147 |
-
throw new ServerException($sf);
|
148 |
-
}
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* @see EPSInterface::listSites()
|
153 |
-
*/
|
154 |
-
public function listSitesEx($sessionId, $paramFilterSite) {
|
155 |
-
try {
|
156 |
-
$listSitesExStdObject = new stdClass();
|
157 |
-
$listSitesExStdObject->sessionId = $sessionId;
|
158 |
-
$listSitesExStdObject->filter = $paramFilterSite->toStdClass();
|
159 |
-
$response = parent::listSitesEx($listSitesExStdObject);
|
160 |
-
$arrListSitesEx = array();
|
161 |
-
if (isset($response->return)) {
|
162 |
-
$arrStdSitesEx = $response->return;
|
163 |
-
if (is_array($arrStdSitesEx)) {
|
164 |
-
for($i = 0; $i < count($arrStdSitesEx); $i++) {
|
165 |
-
$arrListSitesEx[$i] = new ResultSiteEx($arrStdSitesEx[$i]);
|
166 |
-
}
|
167 |
-
} else {
|
168 |
-
$arrListSitesEx[0] = new ResultSiteEx($arrStdSitesEx);
|
169 |
-
}
|
170 |
-
}
|
171 |
-
return $arrListSitesEx;
|
172 |
-
} catch (SoapFault $sf) {
|
173 |
-
throw new ServerException($sf);
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* @see EPSInterface::getWeightInterval()
|
179 |
-
*/
|
180 |
-
public function getWeightInterval($sessionId, $serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents) {
|
181 |
-
try {
|
182 |
-
$getWeightIntervalStdObject = new stdClass();
|
183 |
-
$getWeightIntervalStdObject->sessionId = $sessionId;
|
184 |
-
$getWeightIntervalStdObject->serviceTypeId = $serviceTypeId;
|
185 |
-
$getWeightIntervalStdObject->senderSiteId = $senderSiteId;
|
186 |
-
$getWeightIntervalStdObject->receiverSiteId = $receiverSiteId;
|
187 |
-
$getWeightIntervalStdObject->date = $date;
|
188 |
-
$getWeightIntervalStdObject->documents = $documents;
|
189 |
-
$response = parent::getWeightInterval($getWeightIntervalStdObject);
|
190 |
-
if (isset($response->return)) {
|
191 |
-
$resultMinMaxReal = new ResultMinMaxReal($response->return);
|
192 |
-
} else {
|
193 |
-
$resultMinMaxReal = null;
|
194 |
-
}
|
195 |
-
return $resultMinMaxReal;
|
196 |
-
} catch (SoapFault $sf) {
|
197 |
-
throw new ServerException($sf);
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* @see EPSInterface::getAddressNomenclature()
|
203 |
-
*/
|
204 |
-
public function getAddressNomenclature($sessionId, $nomenType) {
|
205 |
-
try {
|
206 |
-
$getAddressNomenclatureStdObject = new stdClass();
|
207 |
-
$getAddressNomenclatureStdObject->sessionId = $sessionId;
|
208 |
-
$getAddressNomenclatureStdObject->nomenType = $nomenType;
|
209 |
-
$response = parent::getAddressNomenclature($getAddressNomenclatureStdObject);
|
210 |
-
if (isset($response->return)) {
|
211 |
-
$getAddressNomenclature = $response->return;
|
212 |
-
} else {
|
213 |
-
$getAddressNomenclature = null;
|
214 |
-
}
|
215 |
-
return $getAddressNomenclature;
|
216 |
-
} catch (SoapFault $sf) {
|
217 |
-
throw new ServerException($sf);
|
218 |
-
}
|
219 |
-
}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* @see EPSInterface::listAllSites()
|
223 |
-
*/
|
224 |
-
public function listAllSites($sessionId) {
|
225 |
-
try {
|
226 |
-
$listAllSitesStdObject = new stdClass();
|
227 |
-
$listAllSitesStdObject->sessionId = $sessionId;
|
228 |
-
$response = parent::listAllSites($listAllSitesStdObject);
|
229 |
-
$arrListAllSites = array();
|
230 |
-
if (isset($response->return)) {
|
231 |
-
$arrStdAllSites = $response->return;
|
232 |
-
if (is_array($arrStdAllSites)) {
|
233 |
-
for($i = 0; $i < count($arrStdAllSites); $i++) {
|
234 |
-
$arrListAllSites[$i] = new ResultSite($arrStdAllSites[$i]);
|
235 |
-
}
|
236 |
-
} else {
|
237 |
-
$arrListAllSites[0] = new ResultSite($arrStdAllSites);
|
238 |
-
}
|
239 |
-
}
|
240 |
-
return $arrListAllSites;
|
241 |
-
} catch (SoapFault $sf) {
|
242 |
-
throw new ServerException($sf);
|
243 |
-
}
|
244 |
-
}
|
245 |
-
|
246 |
-
/**
|
247 |
-
* @see EPSInterface::getSiteById()
|
248 |
-
*/
|
249 |
-
public function getSiteById($sessionId, $siteId) {
|
250 |
-
try {
|
251 |
-
$getSiteByIdStdObject = new stdClass();
|
252 |
-
$getSiteByIdStdObject->sessionId = $sessionId;
|
253 |
-
$getSiteByIdStdObject->siteId = $siteId;
|
254 |
-
$response = parent::getSiteById($getSiteByIdStdObject);
|
255 |
-
if (isset($response->return)) {
|
256 |
-
$resultSite = new ResultSite($response->return);
|
257 |
-
} else {
|
258 |
-
$resultSite = null;
|
259 |
-
}
|
260 |
-
return $resultSite;
|
261 |
-
} catch (SoapFault $sf) {
|
262 |
-
throw new ServerException($sf);
|
263 |
-
}
|
264 |
-
}
|
265 |
-
|
266 |
-
/**
|
267 |
-
* @see EPSInterface::getSitesByAddrNomenType()
|
268 |
-
*/
|
269 |
-
public function getSitesByAddrNomenType($sessionId, $addrNomen) {
|
270 |
-
try {
|
271 |
-
$getSitesByAddrNomenTypeStdObject = new stdClass();
|
272 |
-
$getSitesByAddrNomenTypeStdObject->sessionId = $sessionId;
|
273 |
-
$getSitesByAddrNomenTypeStdObject->addrNomen = $addrNomen;
|
274 |
-
$response = parent::getSitesByAddrNomenType($getSitesByAddrNomenTypeStdObject);
|
275 |
-
$arrListSitesByAddrNomenType = array();
|
276 |
-
if (isset($response->return)) {
|
277 |
-
$arrStdSitesByAddrNomenType = $response->return;
|
278 |
-
if (is_array($arrStdSitesByAddrNomenType)) {
|
279 |
-
for($i = 0; $i < count($arrStdSitesByAddrNomenType); $i++) {
|
280 |
-
$arrListSitesByAddrNomenType[$i] = new ResultSite($arrStdSitesByAddrNomenType[$i]);
|
281 |
-
}
|
282 |
-
} else {
|
283 |
-
$arrListSitesByAddrNomenType[0] = new ResultSite($arrStdSitesByAddrNomenType);
|
284 |
-
}
|
285 |
-
}
|
286 |
-
return $arrListSitesByAddrNomenType;
|
287 |
-
} catch (SoapFault $sf) {
|
288 |
-
throw new ServerException($sf);
|
289 |
-
}
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* @see EPSInterface::listStreetTypes()
|
294 |
-
*/
|
295 |
-
public function listStreetTypes($sessionId) {
|
296 |
-
try {
|
297 |
-
$listStreetTypesStdObject = new stdClass();
|
298 |
-
$listStreetTypesStdObject->sessionId = $sessionId;
|
299 |
-
$response = parent::listStreetTypes($listStreetTypesStdObject);
|
300 |
-
$arrListStreetTypes = array();
|
301 |
-
if (isset($response->return)) {
|
302 |
-
$arrStdListStreetTypes = $response->return;
|
303 |
-
if (is_array($arrStdListStreetTypes)) {
|
304 |
-
for($i = 0; $i < count($arrStdListStreetTypes); $i++) {
|
305 |
-
$arrListStreetTypes[$i] = $arrStdListStreetTypes[$i];
|
306 |
-
}
|
307 |
-
} else {
|
308 |
-
$arrListStreetTypes[0] = $arrStdListStreetTypes;
|
309 |
-
}
|
310 |
-
}
|
311 |
-
return $arrListStreetTypes;
|
312 |
-
} catch (SoapFault $sf) {
|
313 |
-
throw new ServerException($sf);
|
314 |
-
}
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* @see EPSInterface::listQuarterTypes()
|
319 |
-
*/
|
320 |
-
public function listQuarterTypes($sessionId) {
|
321 |
-
try {
|
322 |
-
$listQuarterTypesStdObject = new stdClass();
|
323 |
-
$listQuarterTypesStdObject->sessionId = $sessionId;
|
324 |
-
$response = parent::listQuarterTypes($listQuarterTypesStdObject);
|
325 |
-
$arrListQuarterTypes = array();
|
326 |
-
if (isset($response->return)) {
|
327 |
-
$arrStdListQuarterTypes = $response->return;
|
328 |
-
if (is_array($arrStdListQuarterTypes)) {
|
329 |
-
for($i = 0; $i < count($arrStdListQuarterTypes); $i++) {
|
330 |
-
$arrListQuarterTypes[$i] = $arrStdListQuarterTypes[$i];
|
331 |
-
}
|
332 |
-
} else {
|
333 |
-
$arrListQuarterTypes[0] = $arrStdListQuarterTypes;
|
334 |
-
}
|
335 |
-
}
|
336 |
-
return $arrListQuarterTypes;
|
337 |
-
} catch (SoapFault $sf) {
|
338 |
-
throw new ServerException($sf);
|
339 |
-
}
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* @see EPSInterface::listStreets()
|
344 |
-
*/
|
345 |
-
public function listStreets($sessionId, $name, $siteId) {
|
346 |
-
try {
|
347 |
-
$listStreetsStdObject = new stdClass();
|
348 |
-
$listStreetsStdObject->sessionId = $sessionId;
|
349 |
-
$listStreetsStdObject->name = $name;
|
350 |
-
$listStreetsStdObject->siteId = $siteId;
|
351 |
-
$response = parent::listStreets($listStreetsStdObject);
|
352 |
-
$arrlistStreets = array();
|
353 |
-
if (isset($response->return)) {
|
354 |
-
$arrStdListStreets = $response->return;
|
355 |
-
if (is_array($arrStdListStreets)) {
|
356 |
-
for($i = 0; $i < count($arrStdListStreets); $i++) {
|
357 |
-
$arrlistStreets[$i] = new ResultStreet($arrStdListStreets[$i]);
|
358 |
-
}
|
359 |
-
} else {
|
360 |
-
$arrlistStreets[0] = new ResultStreet($arrStdListStreets);
|
361 |
-
}
|
362 |
-
}
|
363 |
-
return $arrlistStreets;
|
364 |
-
} catch (SoapFault $sf) {
|
365 |
-
throw new ServerException($sf);
|
366 |
-
}
|
367 |
-
}
|
368 |
-
|
369 |
-
/**
|
370 |
-
* @see EPSInterface::listQuarters()
|
371 |
-
*/
|
372 |
-
public function listQuarters($sessionId, $name, $siteId) {
|
373 |
-
try {
|
374 |
-
$listQuartersStdObject = new stdClass();
|
375 |
-
$listQuartersStdObject->sessionId = $sessionId;
|
376 |
-
$listQuartersStdObject->name = $name;
|
377 |
-
$listQuartersStdObject->siteId = $siteId;
|
378 |
-
$response = parent::listQuarters($listQuartersStdObject);
|
379 |
-
$arrListQuarters = array();
|
380 |
-
if (isset($response->return)) {
|
381 |
-
$arrStdListQuarters = $response->return;
|
382 |
-
if (is_array($arrStdListQuarters)) {
|
383 |
-
for($i = 0; $i < count($arrStdListQuarters); $i++) {
|
384 |
-
$arrListQuarters[$i] = new ResultQuarter($arrStdListQuarters[$i]);
|
385 |
-
}
|
386 |
-
} else {
|
387 |
-
$arrListQuarters[0] = new ResultQuarter($arrStdListQuarters);
|
388 |
-
}
|
389 |
-
}
|
390 |
-
return $arrListQuarters;
|
391 |
-
} catch (SoapFault $sf) {
|
392 |
-
throw new ServerException($sf);
|
393 |
-
}
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* @see EPSInterface::listCommonObjects()
|
398 |
-
*/
|
399 |
-
public function listCommonObjects($sessionId, $name, $siteId) {
|
400 |
-
try {
|
401 |
-
$listCommonObjectsStdObject = new stdClass();
|
402 |
-
$listCommonObjectsStdObject->sessionId = $sessionId;
|
403 |
-
$listCommonObjectsStdObject->name = $name;
|
404 |
-
$listCommonObjectsStdObject->siteId = $siteId;
|
405 |
-
$response = parent::listCommonObjects($listCommonObjectsStdObject);
|
406 |
-
$arrListCommonObjects = array();
|
407 |
-
if (isset($response->return)) {
|
408 |
-
$arrStdListCommonObjects = $response->return;
|
409 |
-
if (is_array($arrStdListCommonObjects)) {
|
410 |
-
for($i = 0; $i < count($arrStdListCommonObjects); $i++) {
|
411 |
-
$arrListCommonObjects[$i] = new ResultCommonObject($arrStdListCommonObjects[$i]);
|
412 |
-
}
|
413 |
-
} else {
|
414 |
-
$arrListCommonObjects[0] = new ResultCommonObject($arrStdListCommonObjects);
|
415 |
-
}
|
416 |
-
}
|
417 |
-
return $arrListCommonObjects;
|
418 |
-
} catch (SoapFault $sf) {
|
419 |
-
throw new ServerException($sf);
|
420 |
-
}
|
421 |
-
}
|
422 |
-
|
423 |
-
/**
|
424 |
-
* @see EPSInterface::listBlocks()
|
425 |
-
*/
|
426 |
-
public function listBlocks($sessionId, $name, $siteId) {
|
427 |
-
try {
|
428 |
-
$listBlocksStdObject = new stdClass();
|
429 |
-
$listBlocksStdObject->sessionId = $sessionId;
|
430 |
-
$listBlocksStdObject->name = $name;
|
431 |
-
$listBlocksStdObject->siteId = $siteId;
|
432 |
-
$response = parent::listBlocks($listBlocksStdObject);
|
433 |
-
$arrListBlocks = array();
|
434 |
-
if (isset($response->return)) {
|
435 |
-
$arrStdListBlocks = $response->return;
|
436 |
-
if (is_array($arrStdListBlocks)) {
|
437 |
-
for($i = 0; $i < count($arrStdListBlocks); $i++) {
|
438 |
-
$arrListBlocks[$i] = $arrStdListBlocks[$i];
|
439 |
-
}
|
440 |
-
} else {
|
441 |
-
$arrListBlocks[0] = $arrStdListBlocks;
|
442 |
-
}
|
443 |
-
}
|
444 |
-
return $arrListBlocks;
|
445 |
-
} catch (SoapFault $sf) {
|
446 |
-
throw new ServerException($sf);
|
447 |
-
}
|
448 |
-
}
|
449 |
-
|
450 |
-
/**
|
451 |
-
* @see EPSInterface::listOffices()
|
452 |
-
*/
|
453 |
-
public function listOffices($sessionId, $name, $siteId) {
|
454 |
-
try {
|
455 |
-
$listOfficesStdObject = new stdClass();
|
456 |
-
$listOfficesStdObject->sessionId = $sessionId;
|
457 |
-
$listOfficesStdObject->name = $name;
|
458 |
-
$listOfficesStdObject->siteId = $siteId;
|
459 |
-
$response = parent::listOffices($listOfficesStdObject);
|
460 |
-
$arrListOffices = array();
|
461 |
-
if (isset($response->return)) {
|
462 |
-
$arrStdListOffices = $response->return;
|
463 |
-
if (is_array($arrStdListOffices)) {
|
464 |
-
for($i = 0; $i < count($arrStdListOffices); $i++) {
|
465 |
-
$arrListOffices[$i] = new ResultOffice($arrStdListOffices[$i]);
|
466 |
-
}
|
467 |
-
} else {
|
468 |
-
$arrListOffices[0] = new ResultOffice($arrStdListOffices);
|
469 |
-
}
|
470 |
-
}
|
471 |
-
return $arrListOffices;
|
472 |
-
} catch (SoapFault $sf) {
|
473 |
-
throw new ServerException($sf);
|
474 |
-
}
|
475 |
-
}
|
476 |
-
|
477 |
-
/**
|
478 |
-
* @see EPSInterface::getClientById($sessionId, $clientId)
|
479 |
-
*/
|
480 |
-
public function getClientById($sessionId, $clientId) {
|
481 |
-
try {
|
482 |
-
$getClientByIdStdObject = new stdClass();
|
483 |
-
$getClientByIdStdObject->sessionId = $sessionId;
|
484 |
-
$getClientByIdStdObject->clientId = $clientId;
|
485 |
-
$response = parent::getClientById($getClientByIdStdObject);
|
486 |
-
if (isset($response->return)) {
|
487 |
-
$resultClientData = new ResultClientData($response->return);
|
488 |
-
} else {
|
489 |
-
$resultClientData = null;
|
490 |
-
}
|
491 |
-
return $resultClientData;
|
492 |
-
} catch (SoapFault $sf) {
|
493 |
-
throw new ServerException($sf);
|
494 |
-
}
|
495 |
-
}
|
496 |
-
|
497 |
-
/**
|
498 |
-
* @see EPSInterface::getAllowedDaysForTaking()
|
499 |
-
*/
|
500 |
-
public function getAllowedDaysForTaking($sessionId, $serviceTypeId, $senderSiteId, $senderOfficeId, $minDate) {
|
501 |
-
try {
|
502 |
-
$getAllowedDaysForTakingStdObject = new stdClass();
|
503 |
-
$getAllowedDaysForTakingStdObject->sessionId = $sessionId;
|
504 |
-
$getAllowedDaysForTakingStdObject->serviceTypeId = $serviceTypeId;
|
505 |
-
$getAllowedDaysForTakingStdObject->senderSiteId = $senderSiteId;
|
506 |
-
$getAllowedDaysForTakingStdObject->senderOfficeId = $senderOfficeId;
|
507 |
-
$getAllowedDaysForTakingStdObject->minDate = $minDate;
|
508 |
-
$response = parent::getAllowedDaysForTaking($getAllowedDaysForTakingStdObject);
|
509 |
-
$arrGetAllowedDaysForTaking = array();
|
510 |
-
if (isset($response->return)) {
|
511 |
-
$arrStdGetAllowedDaysForTaking = $response->return;
|
512 |
-
if (is_array($arrStdGetAllowedDaysForTaking)) {
|
513 |
-
for($i = 0; $i < count($arrStdGetAllowedDaysForTaking); $i++) {
|
514 |
-
$arrGetAllowedDaysForTaking[$i] = $arrStdGetAllowedDaysForTaking[$i];
|
515 |
-
}
|
516 |
-
} else {
|
517 |
-
$arrGetAllowedDaysForTaking[0] = $arrStdGetAllowedDaysForTaking;
|
518 |
-
}
|
519 |
-
}
|
520 |
-
return $arrGetAllowedDaysForTaking;
|
521 |
-
} catch (SoapFault $sf) {
|
522 |
-
throw new ServerException($sf);
|
523 |
-
}
|
524 |
-
}
|
525 |
-
|
526 |
-
/**
|
527 |
-
* @see EPSInterface::addressSearch()
|
528 |
-
*/
|
529 |
-
public function addressSearch($sessionId, $address) {
|
530 |
-
try {
|
531 |
-
$addressSearchStdObject = new stdClass();
|
532 |
-
$addressSearchStdObject->sessionId = $sessionId;
|
533 |
-
$addressSearchStdObject->address = $address->toStdClass();
|
534 |
-
$response = parent::addressSearch($addressSearchStdObject);
|
535 |
-
$arrAddressSearch = array();
|
536 |
-
if (isset($response->return)) {
|
537 |
-
$arrStdAddressSearch = $response->return;
|
538 |
-
if (is_array($arrStdAddressSearch)) {
|
539 |
-
for($i = 0; $i < count($arrStdAddressSearch); $i++) {
|
540 |
-
$arrAddressSearch[$i] = new ResultAddressSearch($arrStdAddressSearch[$i]);
|
541 |
-
}
|
542 |
-
} else {
|
543 |
-
$arrAddressSearch[0] = new ResultAddressSearch($arrStdAddressSearch);
|
544 |
-
}
|
545 |
-
}
|
546 |
-
return $arrAddressSearch;
|
547 |
-
} catch (SoapFault $sf) {
|
548 |
-
throw new ServerException($sf);
|
549 |
-
}
|
550 |
-
}
|
551 |
-
|
552 |
-
/**
|
553 |
-
* @see EPSInterface::calculate()
|
554 |
-
*/
|
555 |
-
public function calculate($sessionId, $calculation) {
|
556 |
-
try {
|
557 |
-
$calculateStdObject = new stdClass();
|
558 |
-
$calculateStdObject->sessionId = $sessionId;
|
559 |
-
$calculateStdObject->calculation = $calculation->toStdClass();
|
560 |
-
$response = parent::calculate($calculateStdObject);
|
561 |
-
if (isset($response->return)) {
|
562 |
-
$resultCalculation = new ResultCalculation($response->return);
|
563 |
-
} else {
|
564 |
-
$resultCalculation = null;
|
565 |
-
}
|
566 |
-
return $resultCalculation;
|
567 |
-
} catch (SoapFault $sf) {
|
568 |
-
throw new ServerException($sf);
|
569 |
-
}
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* @see EPSInterface::calculateMultipleServices()
|
574 |
-
*/
|
575 |
-
public function calculateMultipleServices($sessionId, $calculation, $serviceTypeIds) {
|
576 |
-
try {
|
577 |
-
$calculateMultipleServicesStdObject = new stdClass();
|
578 |
-
$calculateMultipleServicesStdObject->sessionId = $sessionId;
|
579 |
-
$calculateMultipleServicesStdObject->calculation = $calculation->toStdClass();
|
580 |
-
$calculateMultipleServicesStdObject->serviceTypeIds = $serviceTypeIds;
|
581 |
-
$calculateMultipleServicesStdObject->calculation->serviceTypeId = ParamCalculation::CALCULATE_MULTUPLE_SERVICES_SERVICE_TYPE_ID;
|
582 |
-
$response = parent::calculateMultipleServices($calculateMultipleServicesStdObject);
|
583 |
-
$arrCalculateMultipleServices = array();
|
584 |
-
if (isset($response->return)) {
|
585 |
-
$arrStdCalculateMultipleServices = $response->return;
|
586 |
-
if (is_array($arrStdCalculateMultipleServices)) {
|
587 |
-
for($i = 0; $i < count($arrStdCalculateMultipleServices); $i++) {
|
588 |
-
$arrCalculateMultipleServices[$i] = new ResultCalculationMS($arrStdCalculateMultipleServices[$i]);
|
589 |
-
}
|
590 |
-
} else {
|
591 |
-
$arrCalculateMultipleServices[0] = new ResultCalculationMS($arrStdCalculateMultipleServices);
|
592 |
-
}
|
593 |
-
}
|
594 |
-
return $arrCalculateMultipleServices;
|
595 |
-
} catch (SoapFault $sf) {
|
596 |
-
throw new ServerException($sf);
|
597 |
-
}
|
598 |
-
}
|
599 |
-
|
600 |
-
/**
|
601 |
-
* @see EPSInterface::calculatePicking()
|
602 |
-
*/
|
603 |
-
public function calculatePicking($sessionId, $picking) {
|
604 |
-
try {
|
605 |
-
$calculatePickingStdObject = new stdClass();
|
606 |
-
$calculatePickingStdObject->sessionId = $sessionId;
|
607 |
-
$calculatePickingStdObject->picking = $picking->toStdClass();
|
608 |
-
$response = parent::calculatePicking($calculatePickingStdObject);
|
609 |
-
if (isset($response->return)) {
|
610 |
-
$resultCalculation = new ResultCalculation($response->return);
|
611 |
-
} else {
|
612 |
-
$resultCalculation = null;
|
613 |
-
}
|
614 |
-
return $resultCalculation;
|
615 |
-
} catch (SoapFault $sf) {
|
616 |
-
throw new ServerException($sf);
|
617 |
-
}
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* @see EPSInterface::createBillOfLading()
|
622 |
-
*/
|
623 |
-
public function createBillOfLading($sessionId, $picking) {
|
624 |
-
try {
|
625 |
-
$createBillOfLadingStdObject = new stdClass();
|
626 |
-
$createBillOfLadingStdObject->sessionId = $sessionId;
|
627 |
-
$createBillOfLadingStdObject->picking = $picking->toStdClass();
|
628 |
-
$response = parent::createBillOfLading($createBillOfLadingStdObject);
|
629 |
-
if (isset($response->return)) {
|
630 |
-
$resultBOL = new ResultBOL($response->return);
|
631 |
-
} else {
|
632 |
-
$resultBOL = null;
|
633 |
-
}
|
634 |
-
return $resultBOL;
|
635 |
-
} catch (SoapFault $sf) {
|
636 |
-
throw new ServerException($sf);
|
637 |
-
}
|
638 |
-
}
|
639 |
-
|
640 |
-
/**
|
641 |
-
* @see EPSInterface::createPDF()
|
642 |
-
*/
|
643 |
-
public function createPDF($sessionId, $params) {
|
644 |
-
try {
|
645 |
-
$createPDFStdObject = new stdClass();
|
646 |
-
$createPDFStdObject->sessionId = $sessionId;
|
647 |
-
$createPDFStdObject->params = $params->toStdClass();
|
648 |
-
$response = parent::createPDF($createPDFStdObject);
|
649 |
-
if (isset($response->return)) {
|
650 |
-
$resultPDF = $response->return;
|
651 |
-
} else {
|
652 |
-
$resultPDF = null;
|
653 |
-
}
|
654 |
-
return $resultPDF;
|
655 |
-
} catch (SoapFault $sf) {
|
656 |
-
throw new ServerException($sf);
|
657 |
-
}
|
658 |
-
}
|
659 |
-
|
660 |
-
/**
|
661 |
-
* @see EPSInterface::createBillOfLadingPDF()
|
662 |
-
*/
|
663 |
-
public function createBillOfLadingPDF($sessionId, $billOfLading, $includeAutoPrintJS) {
|
664 |
-
try {
|
665 |
-
$createBillOfLadingPDFStdObject = new stdClass();
|
666 |
-
$createBillOfLadingPDFStdObject->sessionId = $sessionId;
|
667 |
-
$createBillOfLadingPDFStdObject->billOfLading = $billOfLading;
|
668 |
-
$createBillOfLadingPDFStdObject->includeAutoPrintJS = $includeAutoPrintJS;
|
669 |
-
$response = parent::createBillOfLadingPDF($createBillOfLadingPDFStdObject);
|
670 |
-
if (isset($response->return)) {
|
671 |
-
$resultPDF = $response->return;
|
672 |
-
} else {
|
673 |
-
$resultPDF = null;
|
674 |
-
}
|
675 |
-
return $resultPDF;
|
676 |
-
} catch (SoapFault $sf) {
|
677 |
-
throw new ServerException($sf);
|
678 |
-
}
|
679 |
-
}
|
680 |
-
|
681 |
-
/**
|
682 |
-
* @see EPSInterface::createCustomTravelLabelPDFType1()
|
683 |
-
*/
|
684 |
-
public function createCustomTravelLabelPDFType1($sessionId, $parcelId) {
|
685 |
-
try {
|
686 |
-
$createCustomTravelLabelPDFType1StdObject = new stdClass();
|
687 |
-
$createCustomTravelLabelPDFType1StdObject->sessionId = $sessionId;
|
688 |
-
$createCustomTravelLabelPDFType1StdObject->parcelId = $parcelId;
|
689 |
-
$response = parent::createCustomTravelLabelPDFType1($createCustomTravelLabelPDFType1StdObject);
|
690 |
-
if (isset($response->return)) {
|
691 |
-
$resultPDF = $response->return;
|
692 |
-
} else {
|
693 |
-
$resultPDF = null;
|
694 |
-
}
|
695 |
-
return $resultPDF;
|
696 |
-
} catch (SoapFault $sf) {
|
697 |
-
throw new ServerException($sf);
|
698 |
-
}
|
699 |
-
}
|
700 |
-
|
701 |
-
/**
|
702 |
-
* @see EPSInterface::invalidatePicking()
|
703 |
-
*/
|
704 |
-
public function invalidatePicking($sessionId, $billOfLading) {
|
705 |
-
try {
|
706 |
-
$invalidatePickingStdObject = new stdClass();
|
707 |
-
$invalidatePickingStdObject->sessionId = $sessionId;
|
708 |
-
$invalidatePickingStdObject->billOfLading = $billOfLading;
|
709 |
-
parent::invalidatePicking($invalidatePickingStdObject);
|
710 |
-
} catch (SoapFault $sf) {
|
711 |
-
throw new ServerException($sf);
|
712 |
-
}
|
713 |
-
}
|
714 |
-
|
715 |
-
/**
|
716 |
-
* @see EPSInterface::updateBillOfLading()
|
717 |
-
*/
|
718 |
-
public function updateBillOfLading($sessionId, $picking) {
|
719 |
-
try {
|
720 |
-
$updateBillOfLadingStdObject = new stdClass();
|
721 |
-
$updateBillOfLadingStdObject->sessionId = $sessionId;
|
722 |
-
$updateBillOfLadingStdObject->picking = $picking->toStdClass();
|
723 |
-
$response = parent::updateBillOfLading($updateBillOfLadingStdObject);
|
724 |
-
if (isset($response->return)) {
|
725 |
-
$resultBOL = new ResultBOL($response->return);
|
726 |
-
} else {
|
727 |
-
$resultBOL = null;
|
728 |
-
}
|
729 |
-
return $resultBOL;
|
730 |
-
} catch (SoapFault $sf) {
|
731 |
-
throw new ServerException($sf);
|
732 |
-
}
|
733 |
-
}
|
734 |
-
|
735 |
-
/**
|
736 |
-
* @see EPSInterface::addParcel()
|
737 |
-
*/
|
738 |
-
public function addParcel($sessionId, $parcel) {
|
739 |
-
try {
|
740 |
-
$addParcelStdObject = new stdClass();
|
741 |
-
$addParcelStdObject->sessionId = $sessionId;
|
742 |
-
$addParcelStdObject->parcel = $parcel->toStdClass();
|
743 |
-
$response = parent::addParcel($addParcelStdObject);
|
744 |
-
if (isset($response->return)) {
|
745 |
-
$result = $response->return;
|
746 |
-
} else {
|
747 |
-
$result = null;
|
748 |
-
}
|
749 |
-
return $result;
|
750 |
-
} catch (SoapFault $sf) {
|
751 |
-
throw new ServerException($sf);
|
752 |
-
}
|
753 |
-
}
|
754 |
-
|
755 |
-
/**
|
756 |
-
* @see EPSInterface::finalizeBillOfLadingCreation()
|
757 |
-
*/
|
758 |
-
public function finalizeBillOfLadingCreation($sessionId, $billOfLading) {
|
759 |
-
try {
|
760 |
-
$finalizeBillOfLadingCreationStdObject = new stdClass();
|
761 |
-
$finalizeBillOfLadingCreationStdObject->sessionId = $sessionId;
|
762 |
-
$finalizeBillOfLadingCreationStdObject->billOfLading = $billOfLading;
|
763 |
-
$response = parent::finalizeBillOfLadingCreation($finalizeBillOfLadingCreationStdObject);
|
764 |
-
if (isset($response->return)) {
|
765 |
-
$resultBOL = new ResultBOL($response->return);
|
766 |
-
} else {
|
767 |
-
$resultBOL = null;
|
768 |
-
}
|
769 |
-
return $resultBOL;
|
770 |
-
} catch (SoapFault $sf) {
|
771 |
-
throw new ServerException($sf);
|
772 |
-
}
|
773 |
-
}
|
774 |
-
|
775 |
-
/**
|
776 |
-
* @see EPSInterface::createOrder()
|
777 |
-
*/
|
778 |
-
public function createOrder($sessionId, $order) {
|
779 |
-
try {
|
780 |
-
$createOrderStdObject = new stdClass();
|
781 |
-
$createOrderStdObject->sessionId = $sessionId;
|
782 |
-
$createOrderStdObject->order = $order->toStdClass();
|
783 |
-
$response = parent::createOrder($createOrderStdObject);
|
784 |
-
$arrCreateOrder = array();
|
785 |
-
if (isset($response->return)) {
|
786 |
-
$arrStdCreateOrder = $response->return;
|
787 |
-
if (is_array($arrStdCreateOrder)) {
|
788 |
-
for($i = 0; $i < count($arrStdCreateOrder); $i++) {
|
789 |
-
$arrCreateOrder[$i] = new ResultOrderPickingInfo($arrStdCreateOrder[$i]);
|
790 |
-
}
|
791 |
-
} else {
|
792 |
-
$arrCreateOrder[0] = new ResultOrderPickingInfo($arrStdCreateOrder);
|
793 |
-
}
|
794 |
-
}
|
795 |
-
return $arrCreateOrder;
|
796 |
-
} catch (SoapFault $sf) {
|
797 |
-
throw new ServerException($sf);
|
798 |
-
}
|
799 |
-
}
|
800 |
-
|
801 |
-
/**
|
802 |
-
* @see EPSInterface::getPickingParcels()
|
803 |
-
*/
|
804 |
-
public function getPickingParcels($sessionId, $billOfLading) {
|
805 |
-
try {
|
806 |
-
$getPickingParcelsStdObject = new stdClass();
|
807 |
-
$getPickingParcelsStdObject->sessionId = $sessionId;
|
808 |
-
$getPickingParcelsStdObject->billOfLading = $billOfLading;
|
809 |
-
$response = parent::getPickingParcels($getPickingParcelsStdObject);
|
810 |
-
$arrResultParcelInfo = array();
|
811 |
-
if (isset($response->return)) {
|
812 |
-
$arrStdResultParcelInfo = $response->return;
|
813 |
-
if (is_array($arrStdResultParcelInfo)) {
|
814 |
-
for($i = 0; $i < count($arrStdResultParcelInfo); $i++) {
|
815 |
-
$arrResultParcelInfo[$i] = new ResultParcelInfo($arrStdResultParcelInfo[$i]);
|
816 |
-
}
|
817 |
-
} else {
|
818 |
-
$arrResultParcelInfo[0] = new ResultParcelInfo($arrStdResultParcelInfo);
|
819 |
-
}
|
820 |
-
}
|
821 |
-
return $arrResultParcelInfo;
|
822 |
-
} catch (SoapFault $sf) {
|
823 |
-
throw new ServerException($sf);
|
824 |
-
}
|
825 |
-
}
|
826 |
-
|
827 |
-
/**
|
828 |
-
* @see EPSInterface::trackPicking()
|
829 |
-
*/
|
830 |
-
public function trackPicking($sessionId, $billOfLading) {
|
831 |
-
try {
|
832 |
-
$trackPickingStdObject = new stdClass();
|
833 |
-
$trackPickingStdObject->sessionId = $sessionId;
|
834 |
-
$trackPickingStdObject->billOfLading = $billOfLading;
|
835 |
-
$response = parent::trackPicking($trackPickingStdObject);
|
836 |
-
$arrResultTrackPicking = array();
|
837 |
-
if (isset($response->return)) {
|
838 |
-
$arrStdResultTrackPicking = $response->return;
|
839 |
-
if (is_array($arrStdResultTrackPicking)) {
|
840 |
-
for($i = 0; $i < count($arrStdResultTrackPicking); $i++) {
|
841 |
-
$arrResultTrackPicking[$i] = new ResultTrackPicking($arrStdResultTrackPicking[$i]);
|
842 |
-
}
|
843 |
-
} else {
|
844 |
-
$arrResultTrackPicking[0] = new ResultTrackPicking($arrStdResultTrackPicking);
|
845 |
-
}
|
846 |
-
}
|
847 |
-
return $arrResultTrackPicking;
|
848 |
-
} catch (SoapFault $sf) {
|
849 |
-
throw new ServerException($sf);
|
850 |
-
}
|
851 |
-
}
|
852 |
-
|
853 |
-
/**
|
854 |
-
* @see EPSInterface::trackPickingEx()
|
855 |
-
*/
|
856 |
-
public function trackPickingEx($sessionId, $billOfLading, $language) {
|
857 |
-
try {
|
858 |
-
$trackPickingExStdObject = new stdClass();
|
859 |
-
$trackPickingExStdObject->sessionId = $sessionId;
|
860 |
-
$trackPickingExStdObject->billOfLading = $billOfLading;
|
861 |
-
$trackPickingExStdObject->language = $language;
|
862 |
-
$response = parent::trackPickingEx($trackPickingExStdObject);
|
863 |
-
$arrResultTrackPickingEx = array();
|
864 |
-
|
865 |
-
if (isset($response->return)) {
|
866 |
-
$arrStdResultTrackPickingEx = $response->return;
|
867 |
-
if (is_array($arrStdResultTrackPickingEx)) {
|
868 |
-
for($i = 0; $i < count($arrStdResultTrackPickingEx); $i++) {
|
869 |
-
$arrResultTrackPickingEx[$i] = new ResultTrackPickingEx($arrStdResultTrackPickingEx[$i]);
|
870 |
-
}
|
871 |
-
} else {
|
872 |
-
$arrResultTrackPickingEx[0] = new ResultTrackPickingEx($arrStdResultTrackPickingEx);
|
873 |
-
}
|
874 |
-
}
|
875 |
-
return $arrResultTrackPickingEx;
|
876 |
-
} catch (SoapFault $sf) {
|
877 |
-
throw new ServerException($sf);
|
878 |
-
}
|
879 |
-
}
|
880 |
-
|
881 |
-
/**
|
882 |
-
* @see EPSInterface::searchPickingsByRefNumber()
|
883 |
-
*/
|
884 |
-
public function searchPickingsByRefNumber($sessionId, $params) {
|
885 |
-
try {
|
886 |
-
$searchPickingsByRefNumberStdObject = new stdClass();
|
887 |
-
$searchPickingsByRefNumberStdObject->sessionId = $sessionId;
|
888 |
-
$searchPickingsByRefNumberStdObject->params = $params->toStdClass();
|
889 |
-
$response = parent::searchPickingsByRefNumber($searchPickingsByRefNumberStdObject);
|
890 |
-
$arrSearchPickingsByRefNumber = array();
|
891 |
-
if (isset($response->return)) {
|
892 |
-
$arrStdSearchPickingsByRefNumber = $response->return;
|
893 |
-
if (is_array($arrStdSearchPickingsByRefNumber)) {
|
894 |
-
for($i = 0; $i < count($arrStdSearchPickingsByRefNumber); $i++) {
|
895 |
-
$arrSearchPickingsByRefNumber[$i] = $arrStdSearchPickingsByRefNumber[$i];
|
896 |
-
}
|
897 |
-
} else {
|
898 |
-
$arrSearchPickingsByRefNumber[0] = $arrStdSearchPickingsByRefNumber;
|
899 |
-
}
|
900 |
-
}
|
901 |
-
return $arrSearchPickingsByRefNumber;
|
902 |
-
} catch (SoapFault $sf) {
|
903 |
-
throw new ServerException($sf);
|
904 |
-
}
|
905 |
-
}
|
906 |
-
|
907 |
-
/**
|
908 |
-
* @see EPSInterface::trackParcel()
|
909 |
-
*/
|
910 |
-
public function trackParcel($sessionId, $parcelId, $language) {
|
911 |
-
try {
|
912 |
-
$trackParcelStdObject = new stdClass();
|
913 |
-
$trackParcelStdObject->sessionId = $sessionId;
|
914 |
-
$trackParcelStdObject->parcelId = $parcelId;
|
915 |
-
$trackParcelStdObject->language = $language;
|
916 |
-
$response = parent::trackParcel($trackParcelStdObject);
|
917 |
-
$arrResultTrackParcel = array();
|
918 |
-
|
919 |
-
if (isset($response->return)) {
|
920 |
-
$arrStdResultTrackParcel = $response->return;
|
921 |
-
if (is_array($arrStdResultTrackParcel)) {
|
922 |
-
for($i = 0; $i < count($arrStdResultTrackParcel); $i++) {
|
923 |
-
$arrResultTrackParcel[$i] = new ResultTrackPickingEx($arrStdResultTrackParcel[$i]);
|
924 |
-
}
|
925 |
-
} else {
|
926 |
-
$arrResultTrackParcel[0] = new ResultTrackPickingEx($arrStdResultTrackParcel);
|
927 |
-
}
|
928 |
-
}
|
929 |
-
return $arrResultTrackParcel;
|
930 |
-
} catch (SoapFault $sf) {
|
931 |
-
throw new ServerException($sf);
|
932 |
-
}
|
933 |
-
}
|
934 |
-
|
935 |
-
/**
|
936 |
-
* @see EPSInterface::getMicroregionId
|
937 |
-
*/
|
938 |
-
public function getMicroregionId($sessionId, $coordX, $coordY) {
|
939 |
-
try {
|
940 |
-
$getMicroregionIdSdtClass = new stdClass();
|
941 |
-
$getMicroregionIdSdtClass->sessionId = $sessionId;
|
942 |
-
$getMicroregionIdSdtClass->coordX = $coordX;
|
943 |
-
$getMicroregionIdSdtClass->coordY = $coordY;
|
944 |
-
$response = parent::getMicroregionId($getMicroregionIdSdtClass);
|
945 |
-
if (isset($response->return)) {
|
946 |
-
$microregionId = $response->return;
|
947 |
-
} else {
|
948 |
-
$microregionId = null;
|
949 |
-
}
|
950 |
-
return $microregionId;
|
951 |
-
} catch (SoapFault $sf) {
|
952 |
-
throw new ServerException($sf);
|
953 |
-
}
|
954 |
-
}
|
955 |
-
|
956 |
-
/**
|
957 |
-
* @see EPSInterface::searchClients()
|
958 |
-
*/
|
959 |
-
public function searchClients($sessionId, $clientQuery) {
|
960 |
-
try {
|
961 |
-
|
962 |
-
$searchClientsStdObject
|
963 |
-
$searchClientsStdObject->
|
964 |
-
$
|
965 |
-
$
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
$arrStdResultClientData
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'EPSInterface.class.php';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Speedy SOAP EPS ver01 Service Interface Implementation
|
7 |
+
*/
|
8 |
+
class EPSSOAPInterfaceImpl extends SoapClient implements EPSInterface {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Speedy SOAP WSDL version 01 URL
|
12 |
+
* @var string
|
13 |
+
*/
|
14 |
+
const SPEEDY_SOAP_WSDL_V01_URL = 'https://www.speedy.bg/eps/main01.wsdl';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Constructs new instance of SOAP service
|
18 |
+
* @param string $wsdlURL
|
19 |
+
* @param options[optional]
|
20 |
+
*/
|
21 |
+
function __construct($wsdlURL=self::SPEEDY_SOAP_WSDL_V01_URL, $options=null) {
|
22 |
+
if (is_null($options)) {
|
23 |
+
parent::SoapClient($wsdlURL);
|
24 |
+
} else {
|
25 |
+
parent::SoapClient($wsdlURL, $options);
|
26 |
+
}
|
27 |
+
// echo('<BR>Connected to '.$wsdlURL);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @see EPSInterface::login()
|
32 |
+
*/
|
33 |
+
public function login($username, $password) {
|
34 |
+
try {
|
35 |
+
$loginSdtClass = new stdClass();
|
36 |
+
$loginSdtClass->username = $username;
|
37 |
+
$loginSdtClass->password = $password;
|
38 |
+
$response = parent::login($loginSdtClass);
|
39 |
+
if (isset($response->return)) {
|
40 |
+
$resultLogin = new ResultLogin($response->return);
|
41 |
+
} else {
|
42 |
+
$resultLogin = null;
|
43 |
+
}
|
44 |
+
return $resultLogin;
|
45 |
+
} catch (SoapFault $sf) {
|
46 |
+
throw new ServerException($sf);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @see EPSInterface::isSessionActive()
|
52 |
+
*/
|
53 |
+
public function isSessionActive($sessionId, $refreshSession) {
|
54 |
+
try {
|
55 |
+
$isSessionActiveSdtClass = new stdClass();
|
56 |
+
$isSessionActiveSdtClass->sessionId = $sessionId;
|
57 |
+
$isSessionActiveSdtClass->refreshSession = $refreshSession;
|
58 |
+
$response = parent::isSessionActive($isSessionActiveSdtClass);
|
59 |
+
if (isset($response->return)) {
|
60 |
+
$isSessionActiveFlag = $response->return;
|
61 |
+
} else {
|
62 |
+
$isSessionActiveFlag = false;
|
63 |
+
}
|
64 |
+
return $isSessionActiveFlag;
|
65 |
+
} catch (SoapFault $sf) {
|
66 |
+
throw new ServerException($sf);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @see EPSInterface::listServices()
|
72 |
+
*/
|
73 |
+
public function listServices($sessionId, $date) {
|
74 |
+
try {
|
75 |
+
$listServicesStdObject = new stdClass();
|
76 |
+
$listServicesStdObject->sessionId = $sessionId;
|
77 |
+
$listServicesStdObject->date = $date;
|
78 |
+
$response = parent::listServices($listServicesStdObject);
|
79 |
+
$arrListServices = array();
|
80 |
+
if (isset($response->return)) {
|
81 |
+
$arrStdServices = $response->return;
|
82 |
+
if (is_array($arrStdServices)) {
|
83 |
+
for($i = 0; $i < count($arrStdServices); $i++) {
|
84 |
+
$arrListServices[$i] = new ResultCourierService($arrStdServices[$i]);
|
85 |
+
}
|
86 |
+
} else {
|
87 |
+
$arrListServices[0] = new ResultCourierService($arrStdServices);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
return $arrListServices;
|
91 |
+
} catch (SoapFault $sf) {
|
92 |
+
throw new ServerException($sf);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @see EPSInterface::listServicesForSites()
|
98 |
+
*/
|
99 |
+
public function listServicesForSites($sessionId, $date, $senderSiteId, $receiverSiteId) {
|
100 |
+
try {
|
101 |
+
$listServicesForSitesStdObject = new stdClass();
|
102 |
+
$listServicesForSitesStdObject->sessionId = $sessionId;
|
103 |
+
$listServicesForSitesStdObject->date = $date;
|
104 |
+
$listServicesForSitesStdObject->senderSiteId = $senderSiteId;
|
105 |
+
$listServicesForSitesStdObject->receiverSiteId = $receiverSiteId;
|
106 |
+
$response = parent::listServicesForSites($listServicesForSitesStdObject);
|
107 |
+
$arrServicesForSitesStdObject = array();
|
108 |
+
if (isset($response->return)) {
|
109 |
+
$arrStdServicesForSites = $response->return;
|
110 |
+
if (is_array($arrStdServicesForSites)) {
|
111 |
+
for($i = 0; $i < count($arrStdServicesForSites); $i++) {
|
112 |
+
$arrServicesForSitesStdObject[$i] = new ResultCourierServiceExt($arrStdServicesForSites[$i]);
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
$arrServicesForSitesStdObject[0] = new ResultCourierServiceExt($arrStdServicesForSites);
|
116 |
+
}
|
117 |
+
}
|
118 |
+
return $arrServicesForSitesStdObject;
|
119 |
+
} catch (SoapFault $sf) {
|
120 |
+
throw new ServerException($sf);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @see EPSInterface::listSites()
|
126 |
+
*/
|
127 |
+
public function listSites($sessionId, $type, $name) {
|
128 |
+
try {
|
129 |
+
$listSitesStdObject = new stdClass();
|
130 |
+
$listSitesStdObject->sessionId = $sessionId;
|
131 |
+
$listSitesStdObject->type = $type;
|
132 |
+
$listSitesStdObject->name = $name;
|
133 |
+
$response = parent::listSites($listSitesStdObject);
|
134 |
+
$arrListSites = array();
|
135 |
+
if (isset($response->return)) {
|
136 |
+
$arrStdSites = $response->return;
|
137 |
+
if (is_array($arrStdSites)) {
|
138 |
+
for($i = 0; $i < count($arrStdSites); $i++) {
|
139 |
+
$arrListSites[$i] = new ResultSite($arrStdSites[$i]);
|
140 |
+
}
|
141 |
+
} else {
|
142 |
+
$arrListSites[0] = new ResultSite($arrStdSites);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
return $arrListSites;
|
146 |
+
} catch (SoapFault $sf) {
|
147 |
+
throw new ServerException($sf);
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @see EPSInterface::listSites()
|
153 |
+
*/
|
154 |
+
public function listSitesEx($sessionId, $paramFilterSite) {
|
155 |
+
try {
|
156 |
+
$listSitesExStdObject = new stdClass();
|
157 |
+
$listSitesExStdObject->sessionId = $sessionId;
|
158 |
+
$listSitesExStdObject->filter = $paramFilterSite->toStdClass();
|
159 |
+
$response = parent::listSitesEx($listSitesExStdObject);
|
160 |
+
$arrListSitesEx = array();
|
161 |
+
if (isset($response->return)) {
|
162 |
+
$arrStdSitesEx = $response->return;
|
163 |
+
if (is_array($arrStdSitesEx)) {
|
164 |
+
for($i = 0; $i < count($arrStdSitesEx); $i++) {
|
165 |
+
$arrListSitesEx[$i] = new ResultSiteEx($arrStdSitesEx[$i]);
|
166 |
+
}
|
167 |
+
} else {
|
168 |
+
$arrListSitesEx[0] = new ResultSiteEx($arrStdSitesEx);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
return $arrListSitesEx;
|
172 |
+
} catch (SoapFault $sf) {
|
173 |
+
throw new ServerException($sf);
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* @see EPSInterface::getWeightInterval()
|
179 |
+
*/
|
180 |
+
public function getWeightInterval($sessionId, $serviceTypeId, $senderSiteId, $receiverSiteId, $date, $documents) {
|
181 |
+
try {
|
182 |
+
$getWeightIntervalStdObject = new stdClass();
|
183 |
+
$getWeightIntervalStdObject->sessionId = $sessionId;
|
184 |
+
$getWeightIntervalStdObject->serviceTypeId = $serviceTypeId;
|
185 |
+
$getWeightIntervalStdObject->senderSiteId = $senderSiteId;
|
186 |
+
$getWeightIntervalStdObject->receiverSiteId = $receiverSiteId;
|
187 |
+
$getWeightIntervalStdObject->date = $date;
|
188 |
+
$getWeightIntervalStdObject->documents = $documents;
|
189 |
+
$response = parent::getWeightInterval($getWeightIntervalStdObject);
|
190 |
+
if (isset($response->return)) {
|
191 |
+
$resultMinMaxReal = new ResultMinMaxReal($response->return);
|
192 |
+
} else {
|
193 |
+
$resultMinMaxReal = null;
|
194 |
+
}
|
195 |
+
return $resultMinMaxReal;
|
196 |
+
} catch (SoapFault $sf) {
|
197 |
+
throw new ServerException($sf);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* @see EPSInterface::getAddressNomenclature()
|
203 |
+
*/
|
204 |
+
public function getAddressNomenclature($sessionId, $nomenType) {
|
205 |
+
try {
|
206 |
+
$getAddressNomenclatureStdObject = new stdClass();
|
207 |
+
$getAddressNomenclatureStdObject->sessionId = $sessionId;
|
208 |
+
$getAddressNomenclatureStdObject->nomenType = $nomenType;
|
209 |
+
$response = parent::getAddressNomenclature($getAddressNomenclatureStdObject);
|
210 |
+
if (isset($response->return)) {
|
211 |
+
$getAddressNomenclature = $response->return;
|
212 |
+
} else {
|
213 |
+
$getAddressNomenclature = null;
|
214 |
+
}
|
215 |
+
return $getAddressNomenclature;
|
216 |
+
} catch (SoapFault $sf) {
|
217 |
+
throw new ServerException($sf);
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* @see EPSInterface::listAllSites()
|
223 |
+
*/
|
224 |
+
public function listAllSites($sessionId) {
|
225 |
+
try {
|
226 |
+
$listAllSitesStdObject = new stdClass();
|
227 |
+
$listAllSitesStdObject->sessionId = $sessionId;
|
228 |
+
$response = parent::listAllSites($listAllSitesStdObject);
|
229 |
+
$arrListAllSites = array();
|
230 |
+
if (isset($response->return)) {
|
231 |
+
$arrStdAllSites = $response->return;
|
232 |
+
if (is_array($arrStdAllSites)) {
|
233 |
+
for($i = 0; $i < count($arrStdAllSites); $i++) {
|
234 |
+
$arrListAllSites[$i] = new ResultSite($arrStdAllSites[$i]);
|
235 |
+
}
|
236 |
+
} else {
|
237 |
+
$arrListAllSites[0] = new ResultSite($arrStdAllSites);
|
238 |
+
}
|
239 |
+
}
|
240 |
+
return $arrListAllSites;
|
241 |
+
} catch (SoapFault $sf) {
|
242 |
+
throw new ServerException($sf);
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* @see EPSInterface::getSiteById()
|
248 |
+
*/
|
249 |
+
public function getSiteById($sessionId, $siteId) {
|
250 |
+
try {
|
251 |
+
$getSiteByIdStdObject = new stdClass();
|
252 |
+
$getSiteByIdStdObject->sessionId = $sessionId;
|
253 |
+
$getSiteByIdStdObject->siteId = $siteId;
|
254 |
+
$response = parent::getSiteById($getSiteByIdStdObject);
|
255 |
+
if (isset($response->return)) {
|
256 |
+
$resultSite = new ResultSite($response->return);
|
257 |
+
} else {
|
258 |
+
$resultSite = null;
|
259 |
+
}
|
260 |
+
return $resultSite;
|
261 |
+
} catch (SoapFault $sf) {
|
262 |
+
throw new ServerException($sf);
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* @see EPSInterface::getSitesByAddrNomenType()
|
268 |
+
*/
|
269 |
+
public function getSitesByAddrNomenType($sessionId, $addrNomen) {
|
270 |
+
try {
|
271 |
+
$getSitesByAddrNomenTypeStdObject = new stdClass();
|
272 |
+
$getSitesByAddrNomenTypeStdObject->sessionId = $sessionId;
|
273 |
+
$getSitesByAddrNomenTypeStdObject->addrNomen = $addrNomen;
|
274 |
+
$response = parent::getSitesByAddrNomenType($getSitesByAddrNomenTypeStdObject);
|
275 |
+
$arrListSitesByAddrNomenType = array();
|
276 |
+
if (isset($response->return)) {
|
277 |
+
$arrStdSitesByAddrNomenType = $response->return;
|
278 |
+
if (is_array($arrStdSitesByAddrNomenType)) {
|
279 |
+
for($i = 0; $i < count($arrStdSitesByAddrNomenType); $i++) {
|
280 |
+
$arrListSitesByAddrNomenType[$i] = new ResultSite($arrStdSitesByAddrNomenType[$i]);
|
281 |
+
}
|
282 |
+
} else {
|
283 |
+
$arrListSitesByAddrNomenType[0] = new ResultSite($arrStdSitesByAddrNomenType);
|
284 |
+
}
|
285 |
+
}
|
286 |
+
return $arrListSitesByAddrNomenType;
|
287 |
+
} catch (SoapFault $sf) {
|
288 |
+
throw new ServerException($sf);
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* @see EPSInterface::listStreetTypes()
|
294 |
+
*/
|
295 |
+
public function listStreetTypes($sessionId) {
|
296 |
+
try {
|
297 |
+
$listStreetTypesStdObject = new stdClass();
|
298 |
+
$listStreetTypesStdObject->sessionId = $sessionId;
|
299 |
+
$response = parent::listStreetTypes($listStreetTypesStdObject);
|
300 |
+
$arrListStreetTypes = array();
|
301 |
+
if (isset($response->return)) {
|
302 |
+
$arrStdListStreetTypes = $response->return;
|
303 |
+
if (is_array($arrStdListStreetTypes)) {
|
304 |
+
for($i = 0; $i < count($arrStdListStreetTypes); $i++) {
|
305 |
+
$arrListStreetTypes[$i] = $arrStdListStreetTypes[$i];
|
306 |
+
}
|
307 |
+
} else {
|
308 |
+
$arrListStreetTypes[0] = $arrStdListStreetTypes;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
return $arrListStreetTypes;
|
312 |
+
} catch (SoapFault $sf) {
|
313 |
+
throw new ServerException($sf);
|
314 |
+
}
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* @see EPSInterface::listQuarterTypes()
|
319 |
+
*/
|
320 |
+
public function listQuarterTypes($sessionId) {
|
321 |
+
try {
|
322 |
+
$listQuarterTypesStdObject = new stdClass();
|
323 |
+
$listQuarterTypesStdObject->sessionId = $sessionId;
|
324 |
+
$response = parent::listQuarterTypes($listQuarterTypesStdObject);
|
325 |
+
$arrListQuarterTypes = array();
|
326 |
+
if (isset($response->return)) {
|
327 |
+
$arrStdListQuarterTypes = $response->return;
|
328 |
+
if (is_array($arrStdListQuarterTypes)) {
|
329 |
+
for($i = 0; $i < count($arrStdListQuarterTypes); $i++) {
|
330 |
+
$arrListQuarterTypes[$i] = $arrStdListQuarterTypes[$i];
|
331 |
+
}
|
332 |
+
} else {
|
333 |
+
$arrListQuarterTypes[0] = $arrStdListQuarterTypes;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
return $arrListQuarterTypes;
|
337 |
+
} catch (SoapFault $sf) {
|
338 |
+
throw new ServerException($sf);
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* @see EPSInterface::listStreets()
|
344 |
+
*/
|
345 |
+
public function listStreets($sessionId, $name, $siteId) {
|
346 |
+
try {
|
347 |
+
$listStreetsStdObject = new stdClass();
|
348 |
+
$listStreetsStdObject->sessionId = $sessionId;
|
349 |
+
$listStreetsStdObject->name = $name;
|
350 |
+
$listStreetsStdObject->siteId = $siteId;
|
351 |
+
$response = parent::listStreets($listStreetsStdObject);
|
352 |
+
$arrlistStreets = array();
|
353 |
+
if (isset($response->return)) {
|
354 |
+
$arrStdListStreets = $response->return;
|
355 |
+
if (is_array($arrStdListStreets)) {
|
356 |
+
for($i = 0; $i < count($arrStdListStreets); $i++) {
|
357 |
+
$arrlistStreets[$i] = new ResultStreet($arrStdListStreets[$i]);
|
358 |
+
}
|
359 |
+
} else {
|
360 |
+
$arrlistStreets[0] = new ResultStreet($arrStdListStreets);
|
361 |
+
}
|
362 |
+
}
|
363 |
+
return $arrlistStreets;
|
364 |
+
} catch (SoapFault $sf) {
|
365 |
+
throw new ServerException($sf);
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* @see EPSInterface::listQuarters()
|
371 |
+
*/
|
372 |
+
public function listQuarters($sessionId, $name, $siteId) {
|
373 |
+
try {
|
374 |
+
$listQuartersStdObject = new stdClass();
|
375 |
+
$listQuartersStdObject->sessionId = $sessionId;
|
376 |
+
$listQuartersStdObject->name = $name;
|
377 |
+
$listQuartersStdObject->siteId = $siteId;
|
378 |
+
$response = parent::listQuarters($listQuartersStdObject);
|
379 |
+
$arrListQuarters = array();
|
380 |
+
if (isset($response->return)) {
|
381 |
+
$arrStdListQuarters = $response->return;
|
382 |
+
if (is_array($arrStdListQuarters)) {
|
383 |
+
for($i = 0; $i < count($arrStdListQuarters); $i++) {
|
384 |
+
$arrListQuarters[$i] = new ResultQuarter($arrStdListQuarters[$i]);
|
385 |
+
}
|
386 |
+
} else {
|
387 |
+
$arrListQuarters[0] = new ResultQuarter($arrStdListQuarters);
|
388 |
+
}
|
389 |
+
}
|
390 |
+
return $arrListQuarters;
|
391 |
+
} catch (SoapFault $sf) {
|
392 |
+
throw new ServerException($sf);
|
393 |
+
}
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* @see EPSInterface::listCommonObjects()
|
398 |
+
*/
|
399 |
+
public function listCommonObjects($sessionId, $name, $siteId) {
|
400 |
+
try {
|
401 |
+
$listCommonObjectsStdObject = new stdClass();
|
402 |
+
$listCommonObjectsStdObject->sessionId = $sessionId;
|
403 |
+
$listCommonObjectsStdObject->name = $name;
|
404 |
+
$listCommonObjectsStdObject->siteId = $siteId;
|
405 |
+
$response = parent::listCommonObjects($listCommonObjectsStdObject);
|
406 |
+
$arrListCommonObjects = array();
|
407 |
+
if (isset($response->return)) {
|
408 |
+
$arrStdListCommonObjects = $response->return;
|
409 |
+
if (is_array($arrStdListCommonObjects)) {
|
410 |
+
for($i = 0; $i < count($arrStdListCommonObjects); $i++) {
|
411 |
+
$arrListCommonObjects[$i] = new ResultCommonObject($arrStdListCommonObjects[$i]);
|
412 |
+
}
|
413 |
+
} else {
|
414 |
+
$arrListCommonObjects[0] = new ResultCommonObject($arrStdListCommonObjects);
|
415 |
+
}
|
416 |
+
}
|
417 |
+
return $arrListCommonObjects;
|
418 |
+
} catch (SoapFault $sf) {
|
419 |
+
throw new ServerException($sf);
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* @see EPSInterface::listBlocks()
|
425 |
+
*/
|
426 |
+
public function listBlocks($sessionId, $name, $siteId) {
|
427 |
+
try {
|
428 |
+
$listBlocksStdObject = new stdClass();
|
429 |
+
$listBlocksStdObject->sessionId = $sessionId;
|
430 |
+
$listBlocksStdObject->name = $name;
|
431 |
+
$listBlocksStdObject->siteId = $siteId;
|
432 |
+
$response = parent::listBlocks($listBlocksStdObject);
|
433 |
+
$arrListBlocks = array();
|
434 |
+
if (isset($response->return)) {
|
435 |
+
$arrStdListBlocks = $response->return;
|
436 |
+
if (is_array($arrStdListBlocks)) {
|
437 |
+
for($i = 0; $i < count($arrStdListBlocks); $i++) {
|
438 |
+
$arrListBlocks[$i] = $arrStdListBlocks[$i];
|
439 |
+
}
|
440 |
+
} else {
|
441 |
+
$arrListBlocks[0] = $arrStdListBlocks;
|
442 |
+
}
|
443 |
+
}
|
444 |
+
return $arrListBlocks;
|
445 |
+
} catch (SoapFault $sf) {
|
446 |
+
throw new ServerException($sf);
|
447 |
+
}
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
* @see EPSInterface::listOffices()
|
452 |
+
*/
|
453 |
+
public function listOffices($sessionId, $name, $siteId) {
|
454 |
+
try {
|
455 |
+
$listOfficesStdObject = new stdClass();
|
456 |
+
$listOfficesStdObject->sessionId = $sessionId;
|
457 |
+
$listOfficesStdObject->name = $name;
|
458 |
+
$listOfficesStdObject->siteId = $siteId;
|
459 |
+
$response = parent::listOffices($listOfficesStdObject);
|
460 |
+
$arrListOffices = array();
|
461 |
+
if (isset($response->return)) {
|
462 |
+
$arrStdListOffices = $response->return;
|
463 |
+
if (is_array($arrStdListOffices)) {
|
464 |
+
for($i = 0; $i < count($arrStdListOffices); $i++) {
|
465 |
+
$arrListOffices[$i] = new ResultOffice($arrStdListOffices[$i]);
|
466 |
+
}
|
467 |
+
} else {
|
468 |
+
$arrListOffices[0] = new ResultOffice($arrStdListOffices);
|
469 |
+
}
|
470 |
+
}
|
471 |
+
return $arrListOffices;
|
472 |
+
} catch (SoapFault $sf) {
|
473 |
+
throw new ServerException($sf);
|
474 |
+
}
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* @see EPSInterface::getClientById($sessionId, $clientId)
|
479 |
+
*/
|
480 |
+
public function getClientById($sessionId, $clientId) {
|
481 |
+
try {
|
482 |
+
$getClientByIdStdObject = new stdClass();
|
483 |
+
$getClientByIdStdObject->sessionId = $sessionId;
|
484 |
+
$getClientByIdStdObject->clientId = $clientId;
|
485 |
+
$response = parent::getClientById($getClientByIdStdObject);
|
486 |
+
if (isset($response->return)) {
|
487 |
+
$resultClientData = new ResultClientData($response->return);
|
488 |
+
} else {
|
489 |
+
$resultClientData = null;
|
490 |
+
}
|
491 |
+
return $resultClientData;
|
492 |
+
} catch (SoapFault $sf) {
|
493 |
+
throw new ServerException($sf);
|
494 |
+
}
|
495 |
+
}
|
496 |
+
|
497 |
+
/**
|
498 |
+
* @see EPSInterface::getAllowedDaysForTaking()
|
499 |
+
*/
|
500 |
+
public function getAllowedDaysForTaking($sessionId, $serviceTypeId, $senderSiteId, $senderOfficeId, $minDate) {
|
501 |
+
try {
|
502 |
+
$getAllowedDaysForTakingStdObject = new stdClass();
|
503 |
+
$getAllowedDaysForTakingStdObject->sessionId = $sessionId;
|
504 |
+
$getAllowedDaysForTakingStdObject->serviceTypeId = $serviceTypeId;
|
505 |
+
$getAllowedDaysForTakingStdObject->senderSiteId = $senderSiteId;
|
506 |
+
$getAllowedDaysForTakingStdObject->senderOfficeId = $senderOfficeId;
|
507 |
+
$getAllowedDaysForTakingStdObject->minDate = $minDate;
|
508 |
+
$response = parent::getAllowedDaysForTaking($getAllowedDaysForTakingStdObject);
|
509 |
+
$arrGetAllowedDaysForTaking = array();
|
510 |
+
if (isset($response->return)) {
|
511 |
+
$arrStdGetAllowedDaysForTaking = $response->return;
|
512 |
+
if (is_array($arrStdGetAllowedDaysForTaking)) {
|
513 |
+
for($i = 0; $i < count($arrStdGetAllowedDaysForTaking); $i++) {
|
514 |
+
$arrGetAllowedDaysForTaking[$i] = $arrStdGetAllowedDaysForTaking[$i];
|
515 |
+
}
|
516 |
+
} else {
|
517 |
+
$arrGetAllowedDaysForTaking[0] = $arrStdGetAllowedDaysForTaking;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
return $arrGetAllowedDaysForTaking;
|
521 |
+
} catch (SoapFault $sf) {
|
522 |
+
throw new ServerException($sf);
|
523 |
+
}
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* @see EPSInterface::addressSearch()
|
528 |
+
*/
|
529 |
+
public function addressSearch($sessionId, $address) {
|
530 |
+
try {
|
531 |
+
$addressSearchStdObject = new stdClass();
|
532 |
+
$addressSearchStdObject->sessionId = $sessionId;
|
533 |
+
$addressSearchStdObject->address = $address->toStdClass();
|
534 |
+
$response = parent::addressSearch($addressSearchStdObject);
|
535 |
+
$arrAddressSearch = array();
|
536 |
+
if (isset($response->return)) {
|
537 |
+
$arrStdAddressSearch = $response->return;
|
538 |
+
if (is_array($arrStdAddressSearch)) {
|
539 |
+
for($i = 0; $i < count($arrStdAddressSearch); $i++) {
|
540 |
+
$arrAddressSearch[$i] = new ResultAddressSearch($arrStdAddressSearch[$i]);
|
541 |
+
}
|
542 |
+
} else {
|
543 |
+
$arrAddressSearch[0] = new ResultAddressSearch($arrStdAddressSearch);
|
544 |
+
}
|
545 |
+
}
|
546 |
+
return $arrAddressSearch;
|
547 |
+
} catch (SoapFault $sf) {
|
548 |
+
throw new ServerException($sf);
|
549 |
+
}
|
550 |
+
}
|
551 |
+
|
552 |
+
/**
|
553 |
+
* @see EPSInterface::calculate()
|
554 |
+
*/
|
555 |
+
public function calculate($sessionId, $calculation) {
|
556 |
+
try {
|
557 |
+
$calculateStdObject = new stdClass();
|
558 |
+
$calculateStdObject->sessionId = $sessionId;
|
559 |
+
$calculateStdObject->calculation = $calculation->toStdClass();
|
560 |
+
$response = parent::calculate($calculateStdObject);
|
561 |
+
if (isset($response->return)) {
|
562 |
+
$resultCalculation = new ResultCalculation($response->return);
|
563 |
+
} else {
|
564 |
+
$resultCalculation = null;
|
565 |
+
}
|
566 |
+
return $resultCalculation;
|
567 |
+
} catch (SoapFault $sf) {
|
568 |
+
throw new ServerException($sf);
|
569 |
+
}
|
570 |
+
}
|
571 |
+
|
572 |
+
/**
|
573 |
+
* @see EPSInterface::calculateMultipleServices()
|
574 |
+
*/
|
575 |
+
public function calculateMultipleServices($sessionId, $calculation, $serviceTypeIds) {
|
576 |
+
try {
|
577 |
+
$calculateMultipleServicesStdObject = new stdClass();
|
578 |
+
$calculateMultipleServicesStdObject->sessionId = $sessionId;
|
579 |
+
$calculateMultipleServicesStdObject->calculation = $calculation->toStdClass();
|
580 |
+
$calculateMultipleServicesStdObject->serviceTypeIds = $serviceTypeIds;
|
581 |
+
$calculateMultipleServicesStdObject->calculation->serviceTypeId = ParamCalculation::CALCULATE_MULTUPLE_SERVICES_SERVICE_TYPE_ID;
|
582 |
+
$response = parent::calculateMultipleServices($calculateMultipleServicesStdObject);
|
583 |
+
$arrCalculateMultipleServices = array();
|
584 |
+
if (isset($response->return)) {
|
585 |
+
$arrStdCalculateMultipleServices = $response->return;
|
586 |
+
if (is_array($arrStdCalculateMultipleServices)) {
|
587 |
+
for($i = 0; $i < count($arrStdCalculateMultipleServices); $i++) {
|
588 |
+
$arrCalculateMultipleServices[$i] = new ResultCalculationMS($arrStdCalculateMultipleServices[$i]);
|
589 |
+
}
|
590 |
+
} else {
|
591 |
+
$arrCalculateMultipleServices[0] = new ResultCalculationMS($arrStdCalculateMultipleServices);
|
592 |
+
}
|
593 |
+
}
|
594 |
+
return $arrCalculateMultipleServices;
|
595 |
+
} catch (SoapFault $sf) {
|
596 |
+
throw new ServerException($sf);
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
/**
|
601 |
+
* @see EPSInterface::calculatePicking()
|
602 |
+
*/
|
603 |
+
public function calculatePicking($sessionId, $picking) {
|
604 |
+
try {
|
605 |
+
$calculatePickingStdObject = new stdClass();
|
606 |
+
$calculatePickingStdObject->sessionId = $sessionId;
|
607 |
+
$calculatePickingStdObject->picking = $picking->toStdClass();
|
608 |
+
$response = parent::calculatePicking($calculatePickingStdObject);
|
609 |
+
if (isset($response->return)) {
|
610 |
+
$resultCalculation = new ResultCalculation($response->return);
|
611 |
+
} else {
|
612 |
+
$resultCalculation = null;
|
613 |
+
}
|
614 |
+
return $resultCalculation;
|
615 |
+
} catch (SoapFault $sf) {
|
616 |
+
throw new ServerException($sf);
|
617 |
+
}
|
618 |
+
}
|
619 |
+
|
620 |
+
/**
|
621 |
+
* @see EPSInterface::createBillOfLading()
|
622 |
+
*/
|
623 |
+
public function createBillOfLading($sessionId, $picking) {
|
624 |
+
try {
|
625 |
+
$createBillOfLadingStdObject = new stdClass();
|
626 |
+
$createBillOfLadingStdObject->sessionId = $sessionId;
|
627 |
+
$createBillOfLadingStdObject->picking = $picking->toStdClass();
|
628 |
+
$response = parent::createBillOfLading($createBillOfLadingStdObject);
|
629 |
+
if (isset($response->return)) {
|
630 |
+
$resultBOL = new ResultBOL($response->return);
|
631 |
+
} else {
|
632 |
+
$resultBOL = null;
|
633 |
+
}
|
634 |
+
return $resultBOL;
|
635 |
+
} catch (SoapFault $sf) {
|
636 |
+
throw new ServerException($sf);
|
637 |
+
}
|
638 |
+
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* @see EPSInterface::createPDF()
|
642 |
+
*/
|
643 |
+
public function createPDF($sessionId, $params) {
|
644 |
+
try {
|
645 |
+
$createPDFStdObject = new stdClass();
|
646 |
+
$createPDFStdObject->sessionId = $sessionId;
|
647 |
+
$createPDFStdObject->params = $params->toStdClass();
|
648 |
+
$response = parent::createPDF($createPDFStdObject);
|
649 |
+
if (isset($response->return)) {
|
650 |
+
$resultPDF = $response->return;
|
651 |
+
} else {
|
652 |
+
$resultPDF = null;
|
653 |
+
}
|
654 |
+
return $resultPDF;
|
655 |
+
} catch (SoapFault $sf) {
|
656 |
+
throw new ServerException($sf);
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
/**
|
661 |
+
* @see EPSInterface::createBillOfLadingPDF()
|
662 |
+
*/
|
663 |
+
public function createBillOfLadingPDF($sessionId, $billOfLading, $includeAutoPrintJS) {
|
664 |
+
try {
|
665 |
+
$createBillOfLadingPDFStdObject = new stdClass();
|
666 |
+
$createBillOfLadingPDFStdObject->sessionId = $sessionId;
|
667 |
+
$createBillOfLadingPDFStdObject->billOfLading = $billOfLading;
|
668 |
+
$createBillOfLadingPDFStdObject->includeAutoPrintJS = $includeAutoPrintJS;
|
669 |
+
$response = parent::createBillOfLadingPDF($createBillOfLadingPDFStdObject);
|
670 |
+
if (isset($response->return)) {
|
671 |
+
$resultPDF = $response->return;
|
672 |
+
} else {
|
673 |
+
$resultPDF = null;
|
674 |
+
}
|
675 |
+
return $resultPDF;
|
676 |
+
} catch (SoapFault $sf) {
|
677 |
+
throw new ServerException($sf);
|
678 |
+
}
|
679 |
+
}
|
680 |
+
|
681 |
+
/**
|
682 |
+
* @see EPSInterface::createCustomTravelLabelPDFType1()
|
683 |
+
*/
|
684 |
+
public function createCustomTravelLabelPDFType1($sessionId, $parcelId) {
|
685 |
+
try {
|
686 |
+
$createCustomTravelLabelPDFType1StdObject = new stdClass();
|
687 |
+
$createCustomTravelLabelPDFType1StdObject->sessionId = $sessionId;
|
688 |
+
$createCustomTravelLabelPDFType1StdObject->parcelId = $parcelId;
|
689 |
+
$response = parent::createCustomTravelLabelPDFType1($createCustomTravelLabelPDFType1StdObject);
|
690 |
+
if (isset($response->return)) {
|
691 |
+
$resultPDF = $response->return;
|
692 |
+
} else {
|
693 |
+
$resultPDF = null;
|
694 |
+
}
|
695 |
+
return $resultPDF;
|
696 |
+
} catch (SoapFault $sf) {
|
697 |
+
throw new ServerException($sf);
|
698 |
+
}
|
699 |
+
}
|
700 |
+
|
701 |
+
/**
|
702 |
+
* @see EPSInterface::invalidatePicking()
|
703 |
+
*/
|
704 |
+
public function invalidatePicking($sessionId, $billOfLading) {
|
705 |
+
try {
|
706 |
+
$invalidatePickingStdObject = new stdClass();
|
707 |
+
$invalidatePickingStdObject->sessionId = $sessionId;
|
708 |
+
$invalidatePickingStdObject->billOfLading = $billOfLading;
|
709 |
+
parent::invalidatePicking($invalidatePickingStdObject);
|
710 |
+
} catch (SoapFault $sf) {
|
711 |
+
throw new ServerException($sf);
|
712 |
+
}
|
713 |
+
}
|
714 |
+
|
715 |
+
/**
|
716 |
+
* @see EPSInterface::updateBillOfLading()
|
717 |
+
*/
|
718 |
+
public function updateBillOfLading($sessionId, $picking) {
|
719 |
+
try {
|
720 |
+
$updateBillOfLadingStdObject = new stdClass();
|
721 |
+
$updateBillOfLadingStdObject->sessionId = $sessionId;
|
722 |
+
$updateBillOfLadingStdObject->picking = $picking->toStdClass();
|
723 |
+
$response = parent::updateBillOfLading($updateBillOfLadingStdObject);
|
724 |
+
if (isset($response->return)) {
|
725 |
+
$resultBOL = new ResultBOL($response->return);
|
726 |
+
} else {
|
727 |
+
$resultBOL = null;
|
728 |
+
}
|
729 |
+
return $resultBOL;
|
730 |
+
} catch (SoapFault $sf) {
|
731 |
+
throw new ServerException($sf);
|
732 |
+
}
|
733 |
+
}
|
734 |
+
|
735 |
+
/**
|
736 |
+
* @see EPSInterface::addParcel()
|
737 |
+
*/
|
738 |
+
public function addParcel($sessionId, $parcel) {
|
739 |
+
try {
|
740 |
+
$addParcelStdObject = new stdClass();
|
741 |
+
$addParcelStdObject->sessionId = $sessionId;
|
742 |
+
$addParcelStdObject->parcel = $parcel->toStdClass();
|
743 |
+
$response = parent::addParcel($addParcelStdObject);
|
744 |
+
if (isset($response->return)) {
|
745 |
+
$result = $response->return;
|
746 |
+
} else {
|
747 |
+
$result = null;
|
748 |
+
}
|
749 |
+
return $result;
|
750 |
+
} catch (SoapFault $sf) {
|
751 |
+
throw new ServerException($sf);
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
/**
|
756 |
+
* @see EPSInterface::finalizeBillOfLadingCreation()
|
757 |
+
*/
|
758 |
+
public function finalizeBillOfLadingCreation($sessionId, $billOfLading) {
|
759 |
+
try {
|
760 |
+
$finalizeBillOfLadingCreationStdObject = new stdClass();
|
761 |
+
$finalizeBillOfLadingCreationStdObject->sessionId = $sessionId;
|
762 |
+
$finalizeBillOfLadingCreationStdObject->billOfLading = $billOfLading;
|
763 |
+
$response = parent::finalizeBillOfLadingCreation($finalizeBillOfLadingCreationStdObject);
|
764 |
+
if (isset($response->return)) {
|
765 |
+
$resultBOL = new ResultBOL($response->return);
|
766 |
+
} else {
|
767 |
+
$resultBOL = null;
|
768 |
+
}
|
769 |
+
return $resultBOL;
|
770 |
+
} catch (SoapFault $sf) {
|
771 |
+
throw new ServerException($sf);
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
+
* @see EPSInterface::createOrder()
|
777 |
+
*/
|
778 |
+
public function createOrder($sessionId, $order) {
|
779 |
+
try {
|
780 |
+
$createOrderStdObject = new stdClass();
|
781 |
+
$createOrderStdObject->sessionId = $sessionId;
|
782 |
+
$createOrderStdObject->order = $order->toStdClass();
|
783 |
+
$response = parent::createOrder($createOrderStdObject);
|
784 |
+
$arrCreateOrder = array();
|
785 |
+
if (isset($response->return)) {
|
786 |
+
$arrStdCreateOrder = $response->return;
|
787 |
+
if (is_array($arrStdCreateOrder)) {
|
788 |
+
for($i = 0; $i < count($arrStdCreateOrder); $i++) {
|
789 |
+
$arrCreateOrder[$i] = new ResultOrderPickingInfo($arrStdCreateOrder[$i]);
|
790 |
+
}
|
791 |
+
} else {
|
792 |
+
$arrCreateOrder[0] = new ResultOrderPickingInfo($arrStdCreateOrder);
|
793 |
+
}
|
794 |
+
}
|
795 |
+
return $arrCreateOrder;
|
796 |
+
} catch (SoapFault $sf) {
|
797 |
+
throw new ServerException($sf);
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
/**
|
802 |
+
* @see EPSInterface::getPickingParcels()
|
803 |
+
*/
|
804 |
+
public function getPickingParcels($sessionId, $billOfLading) {
|
805 |
+
try {
|
806 |
+
$getPickingParcelsStdObject = new stdClass();
|
807 |
+
$getPickingParcelsStdObject->sessionId = $sessionId;
|
808 |
+
$getPickingParcelsStdObject->billOfLading = $billOfLading;
|
809 |
+
$response = parent::getPickingParcels($getPickingParcelsStdObject);
|
810 |
+
$arrResultParcelInfo = array();
|
811 |
+
if (isset($response->return)) {
|
812 |
+
$arrStdResultParcelInfo = $response->return;
|
813 |
+
if (is_array($arrStdResultParcelInfo)) {
|
814 |
+
for($i = 0; $i < count($arrStdResultParcelInfo); $i++) {
|
815 |
+
$arrResultParcelInfo[$i] = new ResultParcelInfo($arrStdResultParcelInfo[$i]);
|
816 |
+
}
|
817 |
+
} else {
|
818 |
+
$arrResultParcelInfo[0] = new ResultParcelInfo($arrStdResultParcelInfo);
|
819 |
+
}
|
820 |
+
}
|
821 |
+
return $arrResultParcelInfo;
|
822 |
+
} catch (SoapFault $sf) {
|
823 |
+
throw new ServerException($sf);
|
824 |
+
}
|
825 |
+
}
|
826 |
+
|
827 |
+
/**
|
828 |
+
* @see EPSInterface::trackPicking()
|
829 |
+
*/
|
830 |
+
public function trackPicking($sessionId, $billOfLading) {
|
831 |
+
try {
|
832 |
+
$trackPickingStdObject = new stdClass();
|
833 |
+
$trackPickingStdObject->sessionId = $sessionId;
|
834 |
+
$trackPickingStdObject->billOfLading = $billOfLading;
|
835 |
+
$response = parent::trackPicking($trackPickingStdObject);
|
836 |
+
$arrResultTrackPicking = array();
|
837 |
+
if (isset($response->return)) {
|
838 |
+
$arrStdResultTrackPicking = $response->return;
|
839 |
+
if (is_array($arrStdResultTrackPicking)) {
|
840 |
+
for($i = 0; $i < count($arrStdResultTrackPicking); $i++) {
|
841 |
+
$arrResultTrackPicking[$i] = new ResultTrackPicking($arrStdResultTrackPicking[$i]);
|
842 |
+
}
|
843 |
+
} else {
|
844 |
+
$arrResultTrackPicking[0] = new ResultTrackPicking($arrStdResultTrackPicking);
|
845 |
+
}
|
846 |
+
}
|
847 |
+
return $arrResultTrackPicking;
|
848 |
+
} catch (SoapFault $sf) {
|
849 |
+
throw new ServerException($sf);
|
850 |
+
}
|
851 |
+
}
|
852 |
+
|
853 |
+
/**
|
854 |
+
* @see EPSInterface::trackPickingEx()
|
855 |
+
*/
|
856 |
+
public function trackPickingEx($sessionId, $billOfLading, $language) {
|
857 |
+
try {
|
858 |
+
$trackPickingExStdObject = new stdClass();
|
859 |
+
$trackPickingExStdObject->sessionId = $sessionId;
|
860 |
+
$trackPickingExStdObject->billOfLading = $billOfLading;
|
861 |
+
$trackPickingExStdObject->language = $language;
|
862 |
+
$response = parent::trackPickingEx($trackPickingExStdObject);
|
863 |
+
$arrResultTrackPickingEx = array();
|
864 |
+
|
865 |
+
if (isset($response->return)) {
|
866 |
+
$arrStdResultTrackPickingEx = $response->return;
|
867 |
+
if (is_array($arrStdResultTrackPickingEx)) {
|
868 |
+
for($i = 0; $i < count($arrStdResultTrackPickingEx); $i++) {
|
869 |
+
$arrResultTrackPickingEx[$i] = new ResultTrackPickingEx($arrStdResultTrackPickingEx[$i]);
|
870 |
+
}
|
871 |
+
} else {
|
872 |
+
$arrResultTrackPickingEx[0] = new ResultTrackPickingEx($arrStdResultTrackPickingEx);
|
873 |
+
}
|
874 |
+
}
|
875 |
+
return $arrResultTrackPickingEx;
|
876 |
+
} catch (SoapFault $sf) {
|
877 |
+
throw new ServerException($sf);
|
878 |
+
}
|
879 |
+
}
|
880 |
+
|
881 |
+
/**
|
882 |
+
* @see EPSInterface::searchPickingsByRefNumber()
|
883 |
+
*/
|
884 |
+
public function searchPickingsByRefNumber($sessionId, $params) {
|
885 |
+
try {
|
886 |
+
$searchPickingsByRefNumberStdObject = new stdClass();
|
887 |
+
$searchPickingsByRefNumberStdObject->sessionId = $sessionId;
|
888 |
+
$searchPickingsByRefNumberStdObject->params = $params->toStdClass();
|
889 |
+
$response = parent::searchPickingsByRefNumber($searchPickingsByRefNumberStdObject);
|
890 |
+
$arrSearchPickingsByRefNumber = array();
|
891 |
+
if (isset($response->return)) {
|
892 |
+
$arrStdSearchPickingsByRefNumber = $response->return;
|
893 |
+
if (is_array($arrStdSearchPickingsByRefNumber)) {
|
894 |
+
for($i = 0; $i < count($arrStdSearchPickingsByRefNumber); $i++) {
|
895 |
+
$arrSearchPickingsByRefNumber[$i] = $arrStdSearchPickingsByRefNumber[$i];
|
896 |
+
}
|
897 |
+
} else {
|
898 |
+
$arrSearchPickingsByRefNumber[0] = $arrStdSearchPickingsByRefNumber;
|
899 |
+
}
|
900 |
+
}
|
901 |
+
return $arrSearchPickingsByRefNumber;
|
902 |
+
} catch (SoapFault $sf) {
|
903 |
+
throw new ServerException($sf);
|
904 |
+
}
|
905 |
+
}
|
906 |
+
|
907 |
+
/**
|
908 |
+
* @see EPSInterface::trackParcel()
|
909 |
+
*/
|
910 |
+
public function trackParcel($sessionId, $parcelId, $language) {
|
911 |
+
try {
|
912 |
+
$trackParcelStdObject = new stdClass();
|
913 |
+
$trackParcelStdObject->sessionId = $sessionId;
|
914 |
+
$trackParcelStdObject->parcelId = $parcelId;
|
915 |
+
$trackParcelStdObject->language = $language;
|
916 |
+
$response = parent::trackParcel($trackParcelStdObject);
|
917 |
+
$arrResultTrackParcel = array();
|
918 |
+
|
919 |
+
if (isset($response->return)) {
|
920 |
+
$arrStdResultTrackParcel = $response->return;
|
921 |
+
if (is_array($arrStdResultTrackParcel)) {
|
922 |
+
for($i = 0; $i < count($arrStdResultTrackParcel); $i++) {
|
923 |
+
$arrResultTrackParcel[$i] = new ResultTrackPickingEx($arrStdResultTrackParcel[$i]);
|
924 |
+
}
|
925 |
+
} else {
|
926 |
+
$arrResultTrackParcel[0] = new ResultTrackPickingEx($arrStdResultTrackParcel);
|
927 |
+
}
|
928 |
+
}
|
929 |
+
return $arrResultTrackParcel;
|
930 |
+
} catch (SoapFault $sf) {
|
931 |
+
throw new ServerException($sf);
|
932 |
+
}
|
933 |
+
}
|
934 |
+
|
935 |
+
/**
|
936 |
+
* @see EPSInterface::getMicroregionId
|
937 |
+
*/
|
938 |
+
public function getMicroregionId($sessionId, $coordX, $coordY) {
|
939 |
+
try {
|
940 |
+
$getMicroregionIdSdtClass = new stdClass();
|
941 |
+
$getMicroregionIdSdtClass->sessionId = $sessionId;
|
942 |
+
$getMicroregionIdSdtClass->coordX = $coordX;
|
943 |
+
$getMicroregionIdSdtClass->coordY = $coordY;
|
944 |
+
$response = parent::getMicroregionId($getMicroregionIdSdtClass);
|
945 |
+
if (isset($response->return)) {
|
946 |
+
$microregionId = $response->return;
|
947 |
+
} else {
|
948 |
+
$microregionId = null;
|
949 |
+
}
|
950 |
+
return $microregionId;
|
951 |
+
} catch (SoapFault $sf) {
|
952 |
+
throw new ServerException($sf);
|
953 |
+
}
|
954 |
+
}
|
955 |
+
|
956 |
+
/**
|
957 |
+
* @see EPSInterface::searchClients()
|
958 |
+
*/
|
959 |
+
public function searchClients($sessionId, $clientQuery) {
|
960 |
+
try {
|
961 |
+
$searchClientsStdObject = new stdClass();
|
962 |
+
$searchClientsStdObject->sessionId = $sessionId;
|
963 |
+
$searchClientsStdObject->clientQuery = $clientQuery->toStdClass();
|
964 |
+
$response = parent::searchClients($searchClientsStdObject);
|
965 |
+
$arrResultClientData = array();
|
966 |
+
|
967 |
+
if (isset($response->return)) {
|
968 |
+
$arrStdResultClientData = $response->return;
|
969 |
+
if (is_array($arrStdResultClientData)) {
|
970 |
+
for($i = 0; $i < count($arrStdResultClientData); $i++) {
|
971 |
+
$arrResultClientData[$i] = new ResultClientData($arrStdResultClientData[$i]);
|
972 |
+
}
|
973 |
+
} else {
|
974 |
+
$arrResultClientData[0] = new ResultClientData($arrStdResultClientData);
|
975 |
+
}
|
976 |
+
}
|
977 |
+
return $arrResultClientData;
|
978 |
+
} catch (SoapFault $sf) {
|
979 |
+
throw new ServerException($sf);
|
980 |
+
}
|
981 |
+
}
|
982 |
+
|
983 |
+
/**
|
984 |
+
* @see EPSInterface::listSpecialDeliveryRequirements()
|
985 |
+
*/
|
986 |
+
public function listSpecialDeliveryRequirements($sessionId) {
|
987 |
+
try {
|
988 |
+
$listSpecialDeliveryRequirementsStdObject = new stdClass();
|
989 |
+
$listSpecialDeliveryRequirementsStdObject->sessionId = $sessionId;
|
990 |
+
$response = parent::listSpecialDeliveryRequirements($listSpecialDeliveryRequirementsStdObject);
|
991 |
+
$arrResultSpecialDeliveryRequirement = array();
|
992 |
+
|
993 |
+
if (isset($response->return)) {
|
994 |
+
$arrStdResultSpecialDeliveryRequirement = $response->return;
|
995 |
+
if (is_array($arrStdResultSpecialDeliveryRequirement)) {
|
996 |
+
for($i = 0; $i < count($arrStdResultSpecialDeliveryRequirement); $i++) {
|
997 |
+
$arrResultSpecialDeliveryRequirement[$i] = new ResultSpecialDeliveryRequirement($arrStdResultSpecialDeliveryRequirement[$i]);
|
998 |
+
}
|
999 |
+
} else {
|
1000 |
+
$arrResultSpecialDeliveryRequirement[0] = new ResultSpecialDeliveryRequirement($arrStdResultSpecialDeliveryRequirement);
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
+
return $arrResultSpecialDeliveryRequirement;
|
1004 |
+
} catch (SoapFault $sf) {
|
1005 |
+
throw new ServerException($sf);
|
1006 |
+
}
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
/**
|
1010 |
+
* @see EPSInterface::validateAddress()
|
1011 |
+
*/
|
1012 |
+
public function validateAddress($sessionId, $address, $validationMode) {
|
1013 |
+
try {
|
1014 |
+
$validateAddressStdObject = new stdClass();
|
1015 |
+
$validateAddressStdObject->sessionId = $sessionId;
|
1016 |
+
$validateAddressStdObject->address = $address->toStdClass();
|
1017 |
+
$validateAddressStdObject->validationMode = $validationMode;
|
1018 |
+
$response = parent::validateAddress($validateAddressStdObject);
|
1019 |
+
return $response->return;
|
1020 |
+
} catch (SoapFault $sf) {
|
1021 |
+
throw new ServerException($sf);
|
1022 |
+
}
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* @see EPSInterface::listContractClients()
|
1027 |
+
*/
|
1028 |
+
public function listContractClients($sessionId) {
|
1029 |
+
try {
|
1030 |
+
$listContractClientsStdObject = new stdClass();
|
1031 |
+
$listContractClientsStdObject->sessionId = $sessionId;
|
1032 |
+
$response = parent::listContractClients($listContractClientsStdObject);
|
1033 |
+
$arrResultContractClients = array();
|
1034 |
+
|
1035 |
+
if (isset($response->return)) {
|
1036 |
+
$arrStdResultContractClients = $response->return;
|
1037 |
+
if (is_array($arrStdResultContractClients)) {
|
1038 |
+
for($i = 0; $i < count($arrStdResultContractClients); $i++) {
|
1039 |
+
$arrResultContractClients[$i] = new ResultClientData($arrStdResultContractClients[$i]);
|
1040 |
+
}
|
1041 |
+
} else {
|
1042 |
+
$arrResultContractClients[0] = new ResultClientData($arrStdResultContractClients);
|
1043 |
+
}
|
1044 |
+
}
|
1045 |
+
return $arrResultContractClients;
|
1046 |
+
} catch (SoapFault $sf) {
|
1047 |
+
throw new ServerException($sf);
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
|
1051 |
+
/**
|
1052 |
+
* @see EPSInterface::listOfficesEx()
|
1053 |
+
*/
|
1054 |
+
public function listOfficesEx($sessionId, $name, $siteId) {
|
1055 |
+
try {
|
1056 |
+
$listOfficesExStdObject = new stdClass();
|
1057 |
+
$listOfficesExStdObject->sessionId = $sessionId;
|
1058 |
+
$listOfficesExStdObject->name = $name;
|
1059 |
+
$listOfficesExStdObject->siteId = $siteId;
|
1060 |
+
$response = parent::listOfficesEx($listOfficesExStdObject);
|
1061 |
+
$arrListOfficesEx = array();
|
1062 |
+
if (isset($response->return)) {
|
1063 |
+
$arrStdListOfficesEx = $response->return;
|
1064 |
+
if (is_array($arrStdListOfficesEx)) {
|
1065 |
+
for($i = 0; $i < count($arrStdListOfficesEx); $i++) {
|
1066 |
+
$arrListOfficesEx[$i] = new ResultOfficeEx($arrStdListOfficesEx[$i]);
|
1067 |
+
}
|
1068 |
+
} else {
|
1069 |
+
$arrListOfficesEx[0] = new ResultOfficeEx($arrStdListOfficesEx);
|
1070 |
+
}
|
1071 |
+
}
|
1072 |
+
return $arrListOfficesEx;
|
1073 |
+
} catch (SoapFault $sf) {
|
1074 |
+
throw new ServerException($sf);
|
1075 |
+
}
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
?>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Speedy_Shipping</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>Speedy</name><user>evgeni</user><email>evgeni@omg-m.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Speedy"><dir name="Speedyshipping"><dir name="Block"><dir name="Adminhtml"><file name="Billoflading.php" hash="5ff4f88bece3607c615152f78c448520"/><dir name="Requestcourier"><file name="Grid.php" hash="1cf35ad632bbfd748acc377294ceaa64"/><dir name="Renderer"><file name="Cancelbutton.php" hash="895663d2b4a3ed8ef83a2f47cc1260c3"/><file name="Created.php" hash="e4319a0fd1c80d0e9164bf678f8a509f"/><file name="Requestbutton.php" hash="66fe360ec85a73a27200e7f83ab9b9a7"/><file name="Viewbol.php" hash="f5a61d534ece18b78907207411cae952"/><file name="Vieworder.php" hash="fb6c0ac4134d26a705f2c7bdc658f035"/></dir><file name="Requestcontainer.php" hash="bf03f9fdef44ac754ebfc89b136a1580"/></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Billing"><file name="Address.php" hash="575ebbda49b25e95f37bca49cfba623d"/></dir><dir name="Shipping"><file name="Address.php" hash="14c1dc61fcfa00a7f685e2c025f31901"/><file name="Form.php" hash="90112a2a3ed59b021d8fcd347e7b5292"/></dir><dir name="Speedy"><file name="Form.php" hash="5d33815cc6bf12e2bb77bdb7aa7b8468"/></dir><file name="Totals.php" hash="da5b3fe05aca0194f12dcc239be47d45"/></dir></dir></dir></dir><dir name="Customer"><dir name="Address"><file name="Edit.php" hash="29852467e29ecd706303e0ffc85ed009"/></dir></dir><dir name="Onepage"><dir name="Billing"><file name="Billing.php" hash="d9e3d433518bfd225b4774389eaa6507"/></dir><file name="Paymentinfo.php" hash="e8f37098f3cd8c820d30db33d6c8bb51"/><file name="Pickupform.php" hash="6185b390e0438a3c588d3bf8362c54cc"/><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="72f3789bb35612be09bb50f6f9f1b443"/></dir><file name="Shipping.php" hash="8f27033a68264f2f2f45fa808cbe7751"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f87f9903ff7b03630377b9a5e0def6a6"/><file name="Exceptionmap.php" hash="5efa0d9221546f4a3b29f98d260998a8"/><file name="Transliterate.php" hash="fc82a61a3c5efe1c5f5c4ea5a21cdeea"/><dir name="Validate"><file name="Address.php" hash="ad1aea0ca237b264d066f82028e832b2"/></dir></dir><dir name="Model"><dir name="Autocomplete"><file name="Address.php" hash="89a22a6ab16f780ad0e6f2c343d183be"/></dir><dir name="Carrier"><dir name="Receiverdata"><file name="Receiverdata.php" hash="fc9e1cef902f8126705493ef62698975"/></dir><dir name="Senderdata"><file name="Senderdata.php" hash="a29434d47a760d0b26c05da5ce5a8053"/></dir><file name="Shippingmethod.php" hash="1e8c20eebcc347e924d34be9304d3551"/><dir name="Source"><file name="Calculation.php" hash="7d5e43623523d7bc78cb3eac887d7180"/><file name="Deferreddays.php" hash="c0b4154d31d5080a5970eab4ba5f9315"/><file name="Method.php" hash="3a27c91b9c707dd9204baf7ffa814a12"/><file name="Office.php" hash="38d718531131f17dc452a72370d7e5f6"/></dir></dir><file name="Observer.php" hash="8dcb88f716b76e5b9f8a05b6e2c79851"/><dir name="Rate"><file name="Result.php" hash="9e57224fe86a696a8c51e47c1808226f"/></dir><dir name="Resource"><dir name="Saveorder"><file name="Collection.php" hash="45cbc13c07ab7ac7e495bdead549c655"/></dir><file name="Saveorder.php" hash="ebb22be5c4334a201bd6b09d72e96cbe"/><file name="Setup.php" hash="f4fd4f27ba10a9fc68e272a475ff2156"/></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><file name="Rate.php" hash="82282b54b161255665c888ff9cd7fc6d"/></dir></dir></dir><file name="Saveorder.php" hash="4bbd01470d9ffa1d305fcf7210f88726"/></dir><dir name="controllers"><file name="AddressController.php" hash="42edea2936784d3f00d4780dc2a640ed"/><dir name="Adminhtml"><file name="AddressController.php" hash="adbc2db67d5bc7702d8c33361fdcbfd1"/><file name="PrintController.php" hash="c722b2a189a64c9e70cb7e9e3836fd24"/></dir></dir><dir name="etc"><file name="config.xml" hash="a8162ce42bbdd7d7141b406033a11d72"/><file name="system.xml" hash="b44c12d60310eec180b255b578d0c5be"/></dir><dir name="sql"><dir name="speedyshippingmodule_setup"><file name="mysql4-install-1.0.3.php" hash="e47bd46333355a9e1fe5884ed0ad7f2e"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="speedy_shipping.xml" hash="93bad292fed577e9c79c830aa47ebd61"/></dir><dir name="template"><dir name="speedy_speedyshipping"><file name="billoflading.phtml" hash="9e366339161b40450c06b6a308563858"/><dir name="customer"><dir name="edit"><dir name="tab"><file name="addresses.phtml" hash="d30d71600b33872075dc0bc2b7bc3137"/></dir></dir></dir><file name="pickupform.phtml" hash="3d148363527cf10c0fa8a3aa1c692ac7"/><dir name="sales"><dir name="order"><dir name="create"><dir name="billing"><dir name="method"><file name="paymentInfo.phtml" hash="6ddeb20940f4bc37b6b04bd8edaa8976"/></dir></dir><dir name="form"><file name="address.phtml" hash="89f7c6fed1c073f771d47783f74607b9"/></dir><dir name="shipping"><dir name="method"><file name="form.phtml" hash="b5f040a5519c9625f363a0569b8b2488"/></dir></dir><file name="totals.phtml" hash="cada285fd005956398d6d1d18d437892"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="speedy_shipping.xml" hash="5f02e9289e6246a9d1ef89742c15b189"/></dir><dir name="template"><dir name="speedy_speedyshipping"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="aa31e2d8ed516b9a2bb83ecd615c3acc"/><dir name="payment_method"><file name="paymentInfo.phtml" hash="2dab065f047e4930a3aca4ad892c441f"/></dir><file name="shipping.phtml" hash="8218d46b80cf05cc9a3f5aae8f3490b9"/><dir name="shipping_method"><file name="available.phtml" hash="fb72213016fd67183f325e6f964c9946"/><file name="pickupform.phtml" hash="3532d6961b4744b1a1585704885fd4ed"/><file name="shipping_method.phtml" hash="8683ed86bd37ca7de4ce2305f92b4aea"/></dir></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="312b8c51c05b2855e986f9c19d4686f7"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Speedyshipping.xml" hash="8c0140e2babc0757f6c350f0f74c80fc"/></dir></target><target name="magelib"><dir name="SpeedyEPS"><dir name="util"><file name="Util.class.php" hash="3ab58ce524807ad46ca0a5f61ef54880"/></dir><dir name="ver01"><file name="AddrNomen.class.php" hash="76b8c168b03faa92f0f7d88c9ff1ac9d"/><file name="ClientException.class.php" hash="f6c7b7fc1f7688c34a8cf08174984bc0"/><file name="ComplementaryServiceAllowance.class.php" hash="3c19719bf8259ff11911a5b7efe48162"/><file name="EPSFacade.class.php" hash="e76648c744f3576afdf8f21ad5b0deb5"/><file name="EPSInterface.class.php" hash="364b502ff4b886cfaca845aae0071677"/><file name="FixedDiscountCardId.class.php" hash="c1a5b1fbe82c0f3e1255d58a553d868a"/><file name="ParamAddress.class.php" hash="9909379d2c137f8abcfe923184099913"/><file name="ParamAddressSearch.class.php" hash="1aa38443a890cdac4c72ef060c4a2b38"/><file name="ParamBarcodeInfo.class.php" hash="093c8ebe0af5ecc116027ef5e7c34963"/><file name="ParamCalculation.class.php" hash="a5810270eea55575091f2bdfa2d01809"/><file name="ParamClientData.class.php" hash="5372f9b3c0a5ba0afe7e03ffb864ad2f"/><file name="ParamClientSearch.class.php" hash="1635cf5cab0938c0b3841ab44e6ffa85"/><file name="ParamFilterSite.class.php" hash="d6779be70c4b3dbd3b46107e2376d24e"/><file name="ParamLanguage.class.php" hash="45948d35e08ea3603f14188aa749a183"/><file name="ParamOrder.class.php" hash="d5c313213948de49caf4cc6258aa6a45"/><file name="ParamPDF.class.php" hash="15ede157a824a7f40dffce6920cf6393"/><file name="ParamParcel.class.php" hash="5fb683f33a075172d388812446e6c08d"/><file name="ParamParcelInfo.class.php" hash="2246e4b0c6afb0088d9ee8eb2404cca3"/><file name="ParamPhoneNumber.class.php" hash="5b7fcf54cb3411c11af4837a580358f1"/><file name="ParamPicking.class.php" hash="410e0a7ffac91278f409c90986e532df"/><file name="ParamSearchByRefNum.class.php" hash="6fc27f25f4bbca373be1d93cb1dcc14a"/><file name="ResultAddress.class.php" hash="e5107cd6b9b4b5746ee0ec99c46b810b"/><file name="ResultAddressSearch.class.php" hash="ff6c6d71bb2a9a8f1665d32d7508bad2"/><file name="ResultAmounts.class.php" hash="4faa2ba701861a9e8b7d564abbed3932"/><file name="ResultBOL.class.php" hash="97dd9ccb3220e6527ff2ce64d4b549f2"/><file name="ResultCalculation.class.php" hash="98186469364caa296ad1cef1e7b5cf2c"/><file name="ResultCalculationMS.class.php" hash="ea2183e0dce591413af835444cdb354f"/><file name="ResultClientData.class.php" hash="b60023b5d7d9aabe165e9e81cf77cadd"/><file name="ResultCommonObject.class.php" hash="85c8215a0494419500989a32494572f3"/><file name="ResultCourierService.class.php" hash="22af6f05b3c12f1e19a77261943e2736"/><file name="ResultCourierServiceExt.class.php" hash="a6a7a6e010b68cbdf979551607d167a0"/><file name="ResultLogin.class.php" hash="f6a7faec19df8aa7ce949a62dcde2eed"/><file name="ResultMinMaxReal.class.php" hash="5bfaec9dc14bd89f22b500f420ba105b"/><file name="ResultOffice.class.php" hash="29cceaff82231ea2b1b9c10a114eff39"/><file name="ResultOrderPickingInfo.class.php" hash="c2e63290948103310f5225c04a3fc926"/><file name="ResultParcelInfo.class.php" hash="735a6a87ca6782888efb4af9a16a058d"/><file name="ResultPhoneNumber.class.php" hash="819224fa8152f2eca10a012d9f6320a7"/><file name="ResultQuarter.class.php" hash="4d280afd09edc2777a34252b40ed8524"/><file name="ResultSite.class.php" hash="0015c2d3786fc999a556459458a295ae"/><file name="ResultSiteEx.class.php" hash="cf09cf3da53a3a1b7c27e9be69766731"/><file name="ResultStreet.class.php" hash="69c5c79d76f1924f0ce011f3e3666539"/><file name="ResultTrackPicking.class.php" hash="4998f1e500ef13073633626c96a526f5"/><file name="ResultTrackPickingEx.class.php" hash="d50aa504123a5ced9d83cc538e7aaf98"/><file name="ServerException.class.php" hash="66a766c5a18062a4a53ec70452c21e97"/><file name="Size.class.php" hash="effe8ab18c3cc5560f4aa39771b9bcbe"/><file name="ValueAddress.class.php" hash="2669535c76c7f045730edee6eb2c6a15"/><dir name="soap"><file name="EPSSOAPInterfaceImpl.class.php" hash="cde457da0afd8cb10b2945269f282fde"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="speedy"><dir name="css"><file name="hideEditAddress.css" hash="1b03b3bf871c23565428454442c88cad"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="adffefb9419589d6b897a81877e85e42"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="5a6524e1e6c434435238b5c93e583b6f"/><file name="ui-bg_flat_10_000000_40x100.png" hash="3d978d04a04f319ce2412b1c11afa926"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="bb29642d42ead99b3f719a1c7c838026"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="dc52f3b6718f318deb7813c5115137c5"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e25e9547ddaa4fad97741b252ba9f800"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="661db0dc3da9538d25ffd010dc514751"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="d78652f40e0c1f0281988aacd8269833"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="3d9bb8f4d52f22fd5d494e87518766c0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.2.custom.min.css" hash="63a7972fe14211955df1b5631d2bfba1"/><file name="jquery.autocomplete.css" hash="e1efb0a6e3da2b6ac201dc98c585aec8"/></dir><dir name="images"><file name="indicator.gif" hash="03ce3dcc84af110e9da8699a841e5200"/></dir><dir name="js"><file name="jquery-1.9.1.min.js" hash="ba714fde311a118967b9d8cb017c81f6"/><file name="jquery-ui-1.10.2.custom.min.js" hash="34f617d6fa9771c9cec61e9f6b729cf4"/><file name="noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="office_pickup.js" hash="9179598fcbec42db94cef23b1c1c11b9"/><file name="validateAddress.js" hash="038138a28bb228c9cc3ce3aed93f6e74"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="speedy"><dir name="css"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="8bede029bbc5dfdc51c03c31c42c69b6"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="0e22f1e0b51bab992d835373d8687aff"/><file name="ui-bg_flat_10_000000_40x100.png" hash="f1d874a7f2f98005ef41142e7c529afb"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="0239611116cbcf93c7cd902997df0c2b"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="e08a0b044bc2699a3dd6ac4d081736d4"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="d985d3e1f3980efaa8a9482da6282a6a"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="22d6e00af67ff329b00e70164acbfa6e"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="148fa5a4d59240f3b1322e52c0b42646"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="8a5e1b98c9b8a758fb45e982724cc1d0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="adffefb9419589d6b897a81877e85e42"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="5a6524e1e6c434435238b5c93e583b6f"/><file name="ui-bg_flat_10_000000_40x100.png" hash="3d978d04a04f319ce2412b1c11afa926"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="bb29642d42ead99b3f719a1c7c838026"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="dc52f3b6718f318deb7813c5115137c5"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e25e9547ddaa4fad97741b252ba9f800"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="661db0dc3da9538d25ffd010dc514751"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="d78652f40e0c1f0281988aacd8269833"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="3d9bb8f4d52f22fd5d494e87518766c0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.2.custom.min.css" hash="b14e6e4dfddacb48689578a9f9b69837"/><file name="jquery-ui-1.10.3.custom.min.css" hash="61770a422674ed451871ecdcf75ea67d"/><file name="jquery.autocomplete.css" hash="e1efb0a6e3da2b6ac201dc98c585aec8"/></dir><dir name="images"><file name="indicator.gif" hash="14c56c5a40e61aea738e46b66d4d8c90"/></dir><dir name="js"><file name="jquery-1.9.1.min.js" hash="64bfec2cb1cc2bf57e66c0c8e519d170"/><file name="jquery-ui-1.10.3.custom.min.js" hash="ca78f74e4ebf73b646c14f7803031e48"/><file name="noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="office_pickup.js" hash="d02e878c2bd3b2f2ed518e3d04ca04dc"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="speedyTranslate.csv" hash="57b741661de15bc115810ab0bfcba3e2"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.2</min><max>1.8.0.0</max></package><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Speedy_Shipping</name>
|
4 |
+
<version>1.0.8</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software License (OSL 3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Third release, that includes various improvements and bug fixes.</summary>
|
10 |
+
<description>Third release, that includes various improvements and bug fixes.</description>
|
11 |
+
<notes>Third release, that includes various improvements and bug fixes.</notes>
|
12 |
<authors><author><name>Speedy</name><user>evgeni</user><email>evgeni@omg-m.com</email></author></authors>
|
13 |
+
<date>2014-02-07</date>
|
14 |
+
<time>09:29:21</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Speedy"><dir name="Speedyshipping"><dir name="Block"><dir name="Adminhtml"><file name="Billoflading.php" hash="5ff4f88bece3607c615152f78c448520"/><dir name="Requestcourier"><file name="Grid.php" hash="8520b4ec798043ca38346452948c2d4d"/><dir name="Renderer"><file name="Cancelbutton.php" hash="895663d2b4a3ed8ef83a2f47cc1260c3"/><file name="Created.php" hash="3ab6eba87f8986ce55c823327ec60e79"/><file name="Datecreated.php" hash="36ca56ed37cb572c19bcb7e7e7dff081"/><file name="Requestbutton.php" hash="66fe360ec85a73a27200e7f83ab9b9a7"/><file name="Viewbol.php" hash="f5a61d534ece18b78907207411cae952"/><file name="Vieworder.php" hash="fb6c0ac4134d26a705f2c7bdc658f035"/></dir><file name="Requestcontainer.php" hash="5529d32f1698e12dc2cf078c68a53797"/></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Billing"><file name="Address.php" hash="575ebbda49b25e95f37bca49cfba623d"/></dir><dir name="Shipping"><file name="Address.php" hash="14c1dc61fcfa00a7f685e2c025f31901"/><file name="Form.php" hash="90112a2a3ed59b021d8fcd347e7b5292"/></dir><dir name="Speedy"><file name="Form.php" hash="5d33815cc6bf12e2bb77bdb7aa7b8468"/></dir><file name="Totals.php" hash="da5b3fe05aca0194f12dcc239be47d45"/></dir></dir></dir></dir><dir name="Customer"><dir name="Address"><file name="Edit.php" hash="29852467e29ecd706303e0ffc85ed009"/></dir></dir><dir name="Onepage"><dir name="Billing"><file name="Billing.php" hash="d9e3d433518bfd225b4774389eaa6507"/></dir><file name="Paymentinfo.php" hash="ce4784716a4db7acb32dc96c1220581c"/><file name="Pickupform.php" hash="6185b390e0438a3c588d3bf8362c54cc"/><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="72f3789bb35612be09bb50f6f9f1b443"/></dir><file name="Shipping.php" hash="8f27033a68264f2f2f45fa808cbe7751"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="f87f9903ff7b03630377b9a5e0def6a6"/><file name="Exceptionmap.php" hash="5efa0d9221546f4a3b29f98d260998a8"/><file name="Transliterate.php" hash="fc82a61a3c5efe1c5f5c4ea5a21cdeea"/><dir name="Validate"><file name="Address.php" hash="ad1aea0ca237b264d066f82028e832b2"/></dir></dir><dir name="Model"><dir name="Autocomplete"><file name="Address.php" hash="137aa5588f59a924edda84bbb8956a7a"/></dir><dir name="Carrier"><dir name="Receiverdata"><file name="Receiverdata.php" hash="fc9e1cef902f8126705493ef62698975"/></dir><dir name="Senderdata"><file name="Senderdata.php" hash="a29434d47a760d0b26c05da5ce5a8053"/></dir><file name="Shippingmethod.php" hash="62482b4fb59cd07331282d416246f550"/><dir name="Source"><file name="Calculation.php" hash="7d5e43623523d7bc78cb3eac887d7180"/><file name="Deferreddays.php" hash="c0b4154d31d5080a5970eab4ba5f9315"/><file name="Method.php" hash="3a27c91b9c707dd9204baf7ffa814a12"/><file name="Office.php" hash="38d718531131f17dc452a72370d7e5f6"/></dir></dir><file name="Observer.php" hash="3b91dadda3e464e116ac8ee9f0aef593"/><dir name="Rate"><file name="Result.php" hash="9e57224fe86a696a8c51e47c1808226f"/></dir><dir name="Resource"><dir name="Saveorder"><file name="Collection.php" hash="45cbc13c07ab7ac7e495bdead549c655"/></dir><file name="Saveorder.php" hash="ebb22be5c4334a201bd6b09d72e96cbe"/><file name="Setup.php" hash="f4fd4f27ba10a9fc68e272a475ff2156"/></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><file name="Rate.php" hash="82282b54b161255665c888ff9cd7fc6d"/></dir></dir></dir><file name="Saveorder.php" hash="4bbd01470d9ffa1d305fcf7210f88726"/></dir><dir name="controllers"><file name="AddressController.php" hash="42edea2936784d3f00d4780dc2a640ed"/><dir name="Adminhtml"><file name="AddressController.php" hash="adbc2db67d5bc7702d8c33361fdcbfd1"/><file name="PrintController.php" hash="517160123ac83fa48cf4d54b91c251f4"/></dir></dir><dir name="etc"><file name="config.xml" hash="b3b7436f5fb50d687b47d48592fd3217"/><file name="system.xml" hash="b44c12d60310eec180b255b578d0c5be"/></dir><dir name="sql"><dir name="speedyshippingmodule_setup"><file name="mysql4-install-1.0.3.php" hash="4b1bc73ff91011b3c41a2b7adf107f3d"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="d12a72ecbd7d8e31a0e3c6c300d8f09c"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="speedy_shipping.xml" hash="93bad292fed577e9c79c830aa47ebd61"/></dir><dir name="template"><dir name="speedy_speedyshipping"><file name="billoflading.phtml" hash="9e366339161b40450c06b6a308563858"/><dir name="customer"><dir name="edit"><dir name="tab"><file name="addresses.phtml" hash="d30d71600b33872075dc0bc2b7bc3137"/></dir></dir></dir><file name="pickupform.phtml" hash="3d148363527cf10c0fa8a3aa1c692ac7"/><dir name="sales"><dir name="order"><dir name="create"><dir name="billing"><dir name="method"><file name="paymentInfo.phtml" hash="6ddeb20940f4bc37b6b04bd8edaa8976"/></dir></dir><dir name="form"><file name="address.phtml" hash="1e9f7732ace0dfe1c2017881ed0d54f0"/></dir><dir name="shipping"><dir name="method"><file name="form.phtml" hash="b5f040a5519c9625f363a0569b8b2488"/></dir></dir><file name="totals.phtml" hash="cada285fd005956398d6d1d18d437892"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="speedy_shipping.xml" hash="5f02e9289e6246a9d1ef89742c15b189"/></dir><dir name="template"><dir name="speedy_speedyshipping"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="e255c4f6ce491e82021757b39732c446"/><dir name="payment_method"><file name="paymentInfo.phtml" hash="2dab065f047e4930a3aca4ad892c441f"/></dir><file name="shipping.phtml" hash="78a089629a4bc13b9e3af82720480ec2"/><dir name="shipping_method"><file name="available.phtml" hash="fb72213016fd67183f325e6f964c9946"/><file name="pickupform.phtml" hash="3532d6961b4744b1a1585704885fd4ed"/><file name="shipping_method.phtml" hash="8683ed86bd37ca7de4ce2305f92b4aea"/></dir></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="5ffbe13ca235e88c7c4de64a8769f8e1"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Speedyshipping.xml" hash="038a5736a03ed141cb17dd19ac9a18b0"/></dir></target><target name="magelib"><dir name="SpeedyEPS"><dir name="util"><file name="Util.class.php" hash="e384756acbad8853c999e0435e833c19"/></dir><dir name="ver01"><file name="AddrNomen.class.php" hash="bba4d58eca6ffda35d1c07d93bfd84be"/><file name="ClientException.class.php" hash="67265022fa5937ae84f20d9f7a3e99cc"/><file name="ComplementaryServiceAllowance.class.php" hash="58e1d0e355943629ff80d53db973a9a9"/><file name="EPSFacade.class.php" hash="8f983ad98a7bf6681e877d8e9c86913a"/><file name="EPSInterface.class.php" hash="86b9399be96a3fb84022427500f44b89"/><file name="FixedDiscountCardId.class.php" hash="4a1467f2013014d509141f1f5f1b9566"/><file name="ParamAddress.class.php" hash="cb62ee0575f4e07473a31ec318dc17aa"/><file name="ParamAddressSearch.class.php" hash="88b70ef9c7709cd4b1aa568dd71532d4"/><file name="ParamBarcodeInfo.class.php" hash="fd17f2426934f53ec9617a96bdb096c0"/><file name="ParamCalculation.class.php" hash="356eab248f4594071ea8f6234e996f49"/><file name="ParamClientData.class.php" hash="069fef2d83e83b40370603d3c75a9d44"/><file name="ParamClientSearch.class.php" hash="51c779373bd3494254be8279139b9826"/><file name="ParamFilterSite.class.php" hash="87776edd43e27f494bec344c97207c40"/><file name="ParamLanguage.class.php" hash="fcfb607cbdb1c4edd0ff2e4b3818510d"/><file name="ParamOrder.class.php" hash="eb177c74d52d9e6a69ce1fd34535ea82"/><file name="ParamPDF.class.php" hash="28248201e71d34368bb2b76c58a16da9"/><file name="ParamParcel.class.php" hash="27fd8bd37e83ac815d07d77d440de398"/><file name="ParamParcelInfo.class.php" hash="c401926930556e8074e594cc0d00c8a9"/><file name="ParamPhoneNumber.class.php" hash="53e20f2f8354d2caaac519abcfd81187"/><file name="ParamPicking.class.php" hash="27963623f3ce27a4d0cc47532a146629"/><file name="ParamSearchByRefNum.class.php" hash="14544cd4c6f6718bc68e2f4f2c6fe5f5"/><file name="ResultAddress.class.php" hash="6d52168fad35f83777dea137c0ce9b2b"/><file name="ResultAddressEx.class.php" hash="fe9b6dc03c00a41040cbb4e402fdd9e6"/><file name="ResultAddressSearch.class.php" hash="c9b8a3aba12bed01b37245c4a2303907"/><file name="ResultAmounts.class.php" hash="756e363bf2d6a130d54e364319901c32"/><file name="ResultBOL.class.php" hash="e095318e59be096cb949309834a863ba"/><file name="ResultCalculation.class.php" hash="90710f9860d920d763b423c77ffdc88a"/><file name="ResultCalculationMS.class.php" hash="f991bc662dba556c7c7bc749d09ecb12"/><file name="ResultClientData.class.php" hash="3e1ea047f22ee3cfa02a128e9ce1d65e"/><file name="ResultCommonObject.class.php" hash="2e8a719333466499dbef0102c7858a23"/><file name="ResultCourierService.class.php" hash="aaf63c267a548cc82b1784f5d41c9924"/><file name="ResultCourierServiceExt.class.php" hash="2f26760369b55d00a827577d573f7e5f"/><file name="ResultLogin.class.php" hash="6d9507e82eb5af820665480f83d8bec9"/><file name="ResultMinMaxReal.class.php" hash="681aa4bbc9f580f7551a1820f9186fad"/><file name="ResultOffice.class.php" hash="4f911e40d8aaaf95761c63bb79d12e17"/><file name="ResultOfficeEx.class.php" hash="94af3cafc5105b4274a2c2fe866d0d18"/><file name="ResultOrderPickingInfo.class.php" hash="72dcf1587374afe319cebd49e8a30fa3"/><file name="ResultParcelInfo.class.php" hash="cfd36bbf6b4c93e80e713c85f127a027"/><file name="ResultPhoneNumber.class.php" hash="e8484071762d91059097dc9d98755090"/><file name="ResultQuarter.class.php" hash="9bc9d441128e5edc551c2c52ef473f57"/><file name="ResultSite.class.php" hash="05ed7eafcb8e13f74bb9f25d96f08af0"/><file name="ResultSiteEx.class.php" hash="ecdbf452151030e8d1d35300b7f4f76b"/><file name="ResultSpecialDeliveryRequirement.class.php" hash="23e952f1ef346ce34c1f3bf47e92c426"/><file name="ResultStreet.class.php" hash="7d625402e05cfcf205b31ba32650bcb4"/><file name="ResultTrackPicking.class.php" hash="b8ab206baacab06b2d2a447e57f881c4"/><file name="ResultTrackPickingEx.class.php" hash="96e9130d61f8e2346d8b03b9ad481fd7"/><file name="ServerException.class.php" hash="b11fc48eb537992e8c506807e7edd9d2"/><file name="Size.class.php" hash="ae535b7511bc31b61d1fd4b832da2536"/><file name="ValueAddress.class.php" hash="ed2e937685f7eab4745da049bf4b4364"/><dir name="soap"><file name="EPSSOAPInterfaceImpl.class.php" hash="eb825d3fc83763fbda78a3ea25f5357b"/></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="speedy"><dir name="css"><file name="hideEditAddress.css" hash="1b03b3bf871c23565428454442c88cad"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="adffefb9419589d6b897a81877e85e42"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="5a6524e1e6c434435238b5c93e583b6f"/><file name="ui-bg_flat_10_000000_40x100.png" hash="3d978d04a04f319ce2412b1c11afa926"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="bb29642d42ead99b3f719a1c7c838026"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="dc52f3b6718f318deb7813c5115137c5"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e25e9547ddaa4fad97741b252ba9f800"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="661db0dc3da9538d25ffd010dc514751"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="d78652f40e0c1f0281988aacd8269833"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="3d9bb8f4d52f22fd5d494e87518766c0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.2.custom.min.css" hash="63a7972fe14211955df1b5631d2bfba1"/><file name="jquery.autocomplete.css" hash="e1efb0a6e3da2b6ac201dc98c585aec8"/></dir><dir name="images"><file name="indicator.gif" hash="03ce3dcc84af110e9da8699a841e5200"/></dir><dir name="js"><file name="jquery-1.9.1.min.js" hash="ba714fde311a118967b9d8cb017c81f6"/><file name="jquery-ui-1.10.2.custom.min.js" hash="34f617d6fa9771c9cec61e9f6b729cf4"/><file name="noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="office_pickup.js" hash="10b7a65ac1be1f7b6ea7d48c5ffe636f"/><file name="validateAddress.js" hash="8068636cc411772b62bd95b67cf387b5"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="speedy"><dir name="css"><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><dir name="images"><file name="animated-overlay.gif" hash="2b912f7c0653008ca28ebacda49025e7"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="8bede029bbc5dfdc51c03c31c42c69b6"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="0e22f1e0b51bab992d835373d8687aff"/><file name="ui-bg_flat_10_000000_40x100.png" hash="f1d874a7f2f98005ef41142e7c529afb"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="0239611116cbcf93c7cd902997df0c2b"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="e08a0b044bc2699a3dd6ac4d081736d4"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="d985d3e1f3980efaa8a9482da6282a6a"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="22d6e00af67ff329b00e70164acbfa6e"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="148fa5a4d59240f3b1322e52c0b42646"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="8a5e1b98c9b8a758fb45e982724cc1d0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="adffefb9419589d6b897a81877e85e42"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="5a6524e1e6c434435238b5c93e583b6f"/><file name="ui-bg_flat_10_000000_40x100.png" hash="3d978d04a04f319ce2412b1c11afa926"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="bb29642d42ead99b3f719a1c7c838026"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="dc52f3b6718f318deb7813c5115137c5"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e25e9547ddaa4fad97741b252ba9f800"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="661db0dc3da9538d25ffd010dc514751"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="d78652f40e0c1f0281988aacd8269833"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="3d9bb8f4d52f22fd5d494e87518766c0"/><file name="ui-icons_222222_256x240.png" hash="a1b3887a86cf1791f23c0b53b4d3585f"/><file name="ui-icons_228ef1_256x240.png" hash="73044fed6bab2c5ed02eed93b7d3adaa"/><file name="ui-icons_ef8c08_256x240.png" hash="1eec256e4f7b8324e619aae36ecfbfbd"/><file name="ui-icons_ffd27a_256x240.png" hash="c1a79bd65be08aa2be391cba2321f448"/><file name="ui-icons_ffffff_256x240.png" hash="e3f4748b19b87aadaa924d85f0882432"/></dir><file name="jquery-ui-1.10.2.custom.min.css" hash="b14e6e4dfddacb48689578a9f9b69837"/><file name="jquery-ui-1.10.3.custom.min.css" hash="61770a422674ed451871ecdcf75ea67d"/><file name="jquery.autocomplete.css" hash="e1efb0a6e3da2b6ac201dc98c585aec8"/></dir><dir name="images"><file name="indicator.gif" hash="14c56c5a40e61aea738e46b66d4d8c90"/></dir><dir name="js"><file name="jquery-1.9.1.min.js" hash="64bfec2cb1cc2bf57e66c0c8e519d170"/><file name="jquery-ui-1.10.3.custom.min.js" hash="ca78f74e4ebf73b646c14f7803031e48"/><file name="noconflict.js" hash="e2060c4e5e5955c824723b13a212d3ec"/><file name="office_pickup.js" hash="bb1e057ac565deffebb14749e4bd76de"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="speedyTranslate.csv" hash="b9ae594ca70799e046b806b7895c6fad"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.2</min><max>1.8.0.0</max></package><extension><name>soap</name><min></min><max></max></extension></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/default/default/speedy/js/office_pickup.js
CHANGED
@@ -94,7 +94,53 @@ AdminOrder.addMethods({
|
|
94 |
this.loadArea(['shipping_method', 'totals', 'billing_method'], true, {collect_shipping_rates: 1});
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
|
|
98 |
});
|
99 |
|
100 |
$j('document').ready(function() {
|
94 |
this.loadArea(['shipping_method', 'totals', 'billing_method'], true, {collect_shipping_rates: 1});
|
95 |
}
|
96 |
|
97 |
+
},
|
98 |
+
resetShippingMethod : function(data){
|
99 |
+
data['reset_shipping'] = 1;
|
100 |
+
this.isShippingMethodReseted = true;
|
101 |
+
this.loadArea(['shipping_method', 'billing_method', 'shipping_address', 'totals', 'giftmessage', 'items'], true, data);
|
102 |
+
},
|
103 |
+
changeAddressField : function(event){
|
104 |
+
var field = Event.element(event);
|
105 |
+
var re = /[^\[]*\[([^\]]*)_address\]\[([^\]]*)\](\[(\d)\])?/;
|
106 |
+
var matchRes = field.name.match(re);
|
107 |
+
|
108 |
+
if (!matchRes) {
|
109 |
+
return;
|
110 |
+
}
|
111 |
+
|
112 |
+
var type = matchRes[1];
|
113 |
+
var name = matchRes[2];
|
114 |
+
var data;
|
115 |
+
|
116 |
+
if(this.isBillingField(field.id)){
|
117 |
+
data = this.serializeData(this.billingAddressContainer)
|
118 |
+
}
|
119 |
+
else{
|
120 |
+
data = this.serializeData(this.shippingAddressContainer)
|
121 |
+
}
|
122 |
+
data = data.toObject();
|
123 |
+
|
124 |
+
if( (type == 'billing' && this.shippingAsBilling)
|
125 |
+
|| (type == 'shipping' && !this.shippingAsBilling) ) {
|
126 |
+
data['reset_shipping'] = true;
|
127 |
+
}
|
128 |
+
|
129 |
+
data['order['+type+'_address][customer_address_id]'] = $('order-'+type+'_address_customer_address_id').value;
|
130 |
+
|
131 |
+
if (data['reset_shipping']) {
|
132 |
+
this.resetShippingMethod(data);
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
this.saveData(data);
|
136 |
+
if (name == 'country_id' || name == 'customer_address_id') {
|
137 |
+
this.loadArea(['shipping_method', 'billing_method', 'totals', 'items'], true, data);
|
138 |
+
}
|
139 |
+
// added for reloading of default sender and default recipient for giftmessages
|
140 |
+
//this.loadArea(['giftmessage'], true, data);
|
141 |
+
}
|
142 |
}
|
143 |
+
|
144 |
});
|
145 |
|
146 |
$j('document').ready(function() {
|
skin/adminhtml/default/default/speedy/js/validateAddress.js
CHANGED
@@ -59,7 +59,7 @@ $j(document).ready(function(evt){
|
|
59 |
var isValid = 0;
|
60 |
|
61 |
if (quarter || (quarter_id !="0" && quarter_id !="")) {
|
62 |
-
if ((street && number || street_id && number) || blockNo) {
|
63 |
isValid = 1;
|
64 |
}
|
65 |
|
59 |
var isValid = 0;
|
60 |
|
61 |
if (quarter || (quarter_id !="0" && quarter_id !="")) {
|
62 |
+
if ((street && number || street_id && number) || blockNo || number) {
|
63 |
isValid = 1;
|
64 |
}
|
65 |
|
skin/frontend/base/default/speedy/js/office_pickup.js
CHANGED
@@ -113,8 +113,8 @@ $j('document').ready(function() {
|
|
113 |
})
|
114 |
|
115 |
|
116 |
-
|
117 |
-
|
118 |
|
119 |
|
120 |
|
@@ -151,18 +151,18 @@ $j('document').ready(function() {
|
|
151 |
price = priceWithoutTax;
|
152 |
}
|
153 |
else if (showBoth) {
|
154 |
-
|
155 |
}
|
156 |
} else {
|
157 |
price = '0.00';
|
158 |
}
|
159 |
-
|
160 |
-
|
161 |
-
price += ' лв.'+')'
|
162 |
-
|
163 |
price += ' лв.';
|
164 |
-
|
165 |
-
|
166 |
$j('p#fixed_price_view').show().text('Надбавка "Фиксиран час":' + price)
|
167 |
|
168 |
} else {
|
@@ -198,22 +198,25 @@ $j('document').ready(function() {
|
|
198 |
|
199 |
var priceWithoutTax = $j(finalSelector).find('input:hidden.speedy_exacthour_withouttax').val()
|
200 |
var price = '';
|
|
|
201 |
if (!isFreeMethod.length) {
|
202 |
if (includeTax) {
|
203 |
price = priceWithTax;
|
204 |
}
|
205 |
else if (excludeTax) {
|
206 |
-
price +=
|
207 |
}
|
208 |
else if (showBoth) {
|
209 |
-
price +=
|
210 |
}
|
|
|
|
|
211 |
}
|
212 |
-
if(showBoth){
|
213 |
-
price += ' лв.'+')'
|
214 |
-
|
215 |
price += ' лв.';
|
216 |
-
|
217 |
$j('p#fixed_price_view').show().text('Надбавка "Фиксиран час":' + price)
|
218 |
$j('#speedy_exact_picking_data input:text').removeAttr('disabled')
|
219 |
} else {
|
113 |
})
|
114 |
|
115 |
|
116 |
+
|
117 |
+
|
118 |
|
119 |
|
120 |
|
151 |
price = priceWithoutTax;
|
152 |
}
|
153 |
else if (showBoth) {
|
154 |
+
price += priceWithoutTax + ' лв. (Вкл. данък: ' + priceWithTax;
|
155 |
}
|
156 |
} else {
|
157 |
price = '0.00';
|
158 |
}
|
159 |
+
|
160 |
+
if (showBoth && !isFreeMethod.length) {
|
161 |
+
price += ' лв.' + ')'
|
162 |
+
} else {
|
163 |
price += ' лв.';
|
164 |
+
}
|
165 |
+
|
166 |
$j('p#fixed_price_view').show().text('Надбавка "Фиксиран час":' + price)
|
167 |
|
168 |
} else {
|
198 |
|
199 |
var priceWithoutTax = $j(finalSelector).find('input:hidden.speedy_exacthour_withouttax').val()
|
200 |
var price = '';
|
201 |
+
|
202 |
if (!isFreeMethod.length) {
|
203 |
if (includeTax) {
|
204 |
price = priceWithTax;
|
205 |
}
|
206 |
else if (excludeTax) {
|
207 |
+
price += priceWithoutTax;
|
208 |
}
|
209 |
else if (showBoth) {
|
210 |
+
price += priceWithoutTax + ' лв. (Вкл. данък: ' + priceWithTax;
|
211 |
}
|
212 |
+
} else {
|
213 |
+
price = '0.00';
|
214 |
}
|
215 |
+
if (showBoth && !isFreeMethod.length) {
|
216 |
+
price += ' лв.' + ')'
|
217 |
+
} else {
|
218 |
price += ' лв.';
|
219 |
+
}
|
220 |
$j('p#fixed_price_view').show().text('Надбавка "Фиксиран час":' + price)
|
221 |
$j('#speedy_exact_picking_data input:text').removeAttr('disabled')
|
222 |
} else {
|