@@ -8,8 +8,8 @@ |
||
| 8 | 8 | |
| 9 | 9 | class POA implements NodeInterface |
| 10 | 10 | { |
| 11 | - const POA_ONE_TIME = '1'; // One Time POA |
|
| 12 | - const POA_BLANKET = '2'; // Blanket POA |
|
| 11 | + const POA_ONE_TIME = '1'; // One Time POA |
|
| 12 | + const POA_BLANKET = '2'; // Blanket POA |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @var string |
@@ -8,9 +8,9 @@ |
||
| 8 | 8 | |
| 9 | 9 | class ShipperFiled implements NodeInterface |
| 10 | 10 | { |
| 11 | - const SF_ITN = 'A'; // Requires the ITN |
|
| 12 | - const SF_EXEMPTION_LEGEND = 'B'; // Requires the Exemption Legend |
|
| 13 | - const SF_POST_DEPARTURE_FILING = 'C'; // Requires Post Departure Filing Citation |
|
| 11 | + const SF_ITN = 'A'; // Requires the ITN |
|
| 12 | + const SF_EXEMPTION_LEGEND = 'B'; // Requires the Exemption Legend |
|
| 13 | + const SF_POST_DEPARTURE_FILING = 'C'; // Requires Post Departure Filing Citation |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @var string |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | |
| 9 | 9 | class EEIFilingOption implements NodeInterface |
| 10 | 10 | { |
| 11 | - const FO_SHIPPER = '1'; // Shipper Filed |
|
| 12 | - const FO_UPS = '3'; // UPS Filed |
|
| 11 | + const FO_SHIPPER = '1'; // Shipper Filed |
|
| 12 | + const FO_UPS = '3'; // UPS Filed |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @var string |
@@ -4,11 +4,11 @@ |
||
| 4 | 4 | |
| 5 | 5 | class StatusType |
| 6 | 6 | { |
| 7 | - const ST_IN_TRANSIT = 'I'; // In Transit |
|
| 8 | - const ST_DELIVERED = 'D'; // Delivered |
|
| 9 | - const ST_EXCEPTION = 'X'; // Exception |
|
| 10 | - const ST_PICKUP = 'P'; // Pickup |
|
| 11 | - const ST_MANIFEST_PICKUP = 'M'; // Manifest Pickup |
|
| 7 | + const ST_IN_TRANSIT = 'I'; // In Transit |
|
| 8 | + const ST_DELIVERED = 'D'; // Delivered |
|
| 9 | + const ST_EXCEPTION = 'X'; // Exception |
|
| 10 | + const ST_PICKUP = 'P'; // Pickup |
|
| 11 | + const ST_MANIFEST_PICKUP = 'M'; // Manifest Pickup |
|
| 12 | 12 | |
| 13 | 13 | public $Code; |
| 14 | 14 | public $Description; |
@@ -186,46 +186,46 @@ |
||
| 186 | 186 | $patterns = [ |
| 187 | 187 | |
| 188 | 188 | // UPS Mail Innovations tracking numbers |
| 189 | - '/^MI\d{6}\d{1,22}$/',// MI 000000 00000000+ |
|
| 189 | + '/^MI\d{6}\d{1,22}$/', // MI 000000 00000000+ |
|
| 190 | 190 | |
| 191 | 191 | // USPS - Certified Mail |
| 192 | - '/^94071\d{17}$/', // 9407 1000 0000 0000 0000 00 |
|
| 193 | - '/^7\d{19}$/', // 7000 0000 0000 0000 0000 |
|
| 192 | + '/^94071\d{17}$/', // 9407 1000 0000 0000 0000 00 |
|
| 193 | + '/^7\d{19}$/', // 7000 0000 0000 0000 0000 |
|
| 194 | 194 | |
| 195 | 195 | // USPS - Collect on Delivery |
| 196 | - '/^93033\d{17}$/', // 9303 3000 0000 0000 0000 00 |
|
| 197 | - '/^M\d{9}$/', // M000 0000 00 |
|
| 196 | + '/^93033\d{17}$/', // 9303 3000 0000 0000 0000 00 |
|
| 197 | + '/^M\d{9}$/', // M000 0000 00 |
|
| 198 | 198 | |
| 199 | 199 | // USPS - Global Express Guaranteed |
| 200 | - '/^82\d{10}$/', // 82 000 000 00 |
|
| 200 | + '/^82\d{10}$/', // 82 000 000 00 |
|
| 201 | 201 | |
| 202 | 202 | // USPS - Priority Mail Express International |
| 203 | - '/^EC\d{9}US$/', // EC 000 000 000 US |
|
| 203 | + '/^EC\d{9}US$/', // EC 000 000 000 US |
|
| 204 | 204 | |
| 205 | 205 | // USPS Innovations Expedited |
| 206 | - '/^927\d{23}$/', // 9270 8900 8900 8900 8900 8900 00 |
|
| 206 | + '/^927\d{23}$/', // 9270 8900 8900 8900 8900 8900 00 |
|
| 207 | 207 | |
| 208 | 208 | // USPS - Priority Mail Express |
| 209 | - '/^927\d{19}$/', // 9270 1000 0000 0000 0000 00 |
|
| 210 | - '/^EA\d{9}US$/', // EA 000 000 000 US |
|
| 209 | + '/^927\d{19}$/', // 9270 1000 0000 0000 0000 00 |
|
| 210 | + '/^EA\d{9}US$/', // EA 000 000 000 US |
|
| 211 | 211 | |
| 212 | 212 | // USPS - Priority Mail International |
| 213 | - '/^CP\d{9}US$/', // CP 000 000 000 US |
|
| 213 | + '/^CP\d{9}US$/', // CP 000 000 000 US |
|
| 214 | 214 | |
| 215 | 215 | // USPS - Priority Mail |
| 216 | - '/^92055\d{17}$/', // 9205 5000 0000 0000 0000 00 |
|
| 217 | - '/^14\d{18}$/', // 1400 0000 0000 0000 0000 |
|
| 216 | + '/^92055\d{17}$/', // 9205 5000 0000 0000 0000 00 |
|
| 217 | + '/^14\d{18}$/', // 1400 0000 0000 0000 0000 |
|
| 218 | 218 | |
| 219 | 219 | // USPS - Registered Mail |
| 220 | - '/^92088\d{17}$/', // 9208 8000 0000 0000 0000 00 |
|
| 221 | - '/^RA\d{9}US$/', // RA 000 000 000 US |
|
| 220 | + '/^92088\d{17}$/', // 9208 8000 0000 0000 0000 00 |
|
| 221 | + '/^RA\d{9}US$/', // RA 000 000 000 US |
|
| 222 | 222 | |
| 223 | 223 | // USPS - Signature Confirmation |
| 224 | - '/^9202\d{16}US$/', // 9202 1000 0000 0000 0000 00 |
|
| 225 | - '/^23\d{16}US$/', // 2300 0000 0000 0000 0000 |
|
| 224 | + '/^9202\d{16}US$/', // 9202 1000 0000 0000 0000 00 |
|
| 225 | + '/^23\d{16}US$/', // 2300 0000 0000 0000 0000 |
|
| 226 | 226 | |
| 227 | 227 | // USPS - Tracking |
| 228 | - '/^94\d{20}$/', // 9400 1000 0000 0000 0000 00 |
|
| 228 | + '/^94\d{20}$/', // 9400 1000 0000 0000 0000 00 |
|
| 229 | 229 | '/^03\d{18}$/' // 0300 0000 0000 0000 0000 |
| 230 | 230 | ]; |
| 231 | 231 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * |
| 42 | 42 | * @throws Exception |
| 43 | 43 | * |
| 44 | - * @return TimeInTransitRequest |
|
| 44 | + * @return TimeInTransitResponse |
|
| 45 | 45 | */ |
| 46 | 46 | public function getTimeInTransit(TimeInTransitRequest $shipment) |
| 47 | 47 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | 'endpointurl' => $this->getEndpointUrl(), |
| 102 | 102 | ]); |
| 103 | 103 | |
| 104 | - $this->logger->debug('Request: ' . $this->getRequest(), [ |
|
| 104 | + $this->logger->debug('Request: '.$this->getRequest(), [ |
|
| 105 | 105 | 'id' => $id, |
| 106 | 106 | 'endpointurl' => $this->getEndpointUrl(), |
| 107 | 107 | ]); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $response = $this->client->post( |
| 111 | 111 | $this->getEndpointUrl(), |
| 112 | 112 | [ |
| 113 | - 'body' => $this->getAccess() . $this->getRequest(), |
|
| 113 | + 'body' => $this->getAccess().$this->getRequest(), |
|
| 114 | 114 | 'headers' => [ |
| 115 | 115 | 'Content-type' => 'application/x-www-form-urlencoded; charset=utf-8', |
| 116 | 116 | 'Accept-Charset' => 'UTF-8', |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | 'endpointurl' => $this->getEndpointUrl(), |
| 127 | 127 | ]); |
| 128 | 128 | |
| 129 | - $this->logger->debug('Response: ' . $body, [ |
|
| 129 | + $this->logger->debug('Response: '.$body, [ |
|
| 130 | 130 | 'id' => $id, |
| 131 | 131 | 'endpointurl' => $this->getEndpointUrl(), |
| 132 | 132 | ]); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | return $responseInstance->setText($body)->setResponse($xml); |
| 143 | 143 | } elseif ($xml->Response->ResponseStatusCode == 0) { |
| 144 | - throw new InvalidResponseException('Failure: ' . $xml->Response->Error->ErrorDescription . ' (' . $xml->Response->Error->ErrorCode . ')'); |
|
| 144 | + throw new InvalidResponseException('Failure: '.$xml->Response->Error->ErrorDescription.' ('.$xml->Response->Error->ErrorCode.')'); |
|
| 145 | 145 | } |
| 146 | 146 | } else { |
| 147 | 147 | throw new InvalidResponseException('Failure: response is in an unexpected format.'); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | 'endpointurl' => $this->getEndpointUrl(), |
| 154 | 154 | ]); |
| 155 | 155 | |
| 156 | - throw new RequestException('Failure: ' . $e->getMessage()); |
|
| 156 | + throw new RequestException('Failure: '.$e->getMessage()); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
@@ -60,8 +60,8 @@ |
||
| 60 | 60 | */ |
| 61 | 61 | public function setService(Service $service) |
| 62 | 62 | { |
| 63 | - $this->Service = $service; |
|
| 64 | - $this->service = $service; |
|
| 63 | + $this->Service = $service; |
|
| 64 | + $this->service = $service; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -4,174 +4,174 @@ |
||
| 4 | 4 | |
| 5 | 5 | trait EstimatedArrivalTrait |
| 6 | 6 | { |
| 7 | - private $Arrival; |
|
| 8 | - private $Pickup; |
|
| 9 | - private $DayOfWeek; |
|
| 10 | - private $CustomerCenterCutoff; |
|
| 11 | - private $DelayCount; |
|
| 12 | - private $HolidayCount; |
|
| 13 | - private $RestDays; |
|
| 14 | - private $TotalTransitDays; |
|
| 15 | - |
|
| 16 | - /** |
|
| 17 | - * @param \stdClass|null $response |
|
| 18 | - */ |
|
| 19 | - public function build(\stdClass $response = null) |
|
| 20 | - { |
|
| 7 | + private $Arrival; |
|
| 8 | + private $Pickup; |
|
| 9 | + private $DayOfWeek; |
|
| 10 | + private $CustomerCenterCutoff; |
|
| 11 | + private $DelayCount; |
|
| 12 | + private $HolidayCount; |
|
| 13 | + private $RestDays; |
|
| 14 | + private $TotalTransitDays; |
|
| 15 | + |
|
| 16 | + /** |
|
| 17 | + * @param \stdClass|null $response |
|
| 18 | + */ |
|
| 19 | + public function build(\stdClass $response = null) |
|
| 20 | + { |
|
| 21 | 21 | if (null !== $response) { |
| 22 | - if (isset($response->Arrival)) { |
|
| 22 | + if (isset($response->Arrival)) { |
|
| 23 | 23 | $this->Arrival = new Arrival($response->Arrival); |
| 24 | - } |
|
| 25 | - if (isset($response->Pickup)) { |
|
| 24 | + } |
|
| 25 | + if (isset($response->Pickup)) { |
|
| 26 | 26 | $this->Pickup = new Pickup($response->Pickup); |
| 27 | - } |
|
| 28 | - if (isset($response->HolidayCount)) { |
|
| 27 | + } |
|
| 28 | + if (isset($response->HolidayCount)) { |
|
| 29 | 29 | $this->HolidayCount = $response->HolidayCount; |
| 30 | - } |
|
| 31 | - if (isset($response->DelayCount)) { |
|
| 30 | + } |
|
| 31 | + if (isset($response->DelayCount)) { |
|
| 32 | 32 | $this->DelayCount = $response->DelayCount; |
| 33 | - } |
|
| 34 | - if (isset($response->DayOfWeek)) { |
|
| 33 | + } |
|
| 34 | + if (isset($response->DayOfWeek)) { |
|
| 35 | 35 | $this->DayOfWeek = $response->DayOfWeek; |
| 36 | - } |
|
| 37 | - if (isset($response->TotalTransitDays)) { |
|
| 36 | + } |
|
| 37 | + if (isset($response->TotalTransitDays)) { |
|
| 38 | 38 | $this->TotalTransitDays = $response->TotalTransitDays; |
| 39 | - } |
|
| 40 | - if (isset($response->CustomerCenterCutoff)) { |
|
| 39 | + } |
|
| 40 | + if (isset($response->CustomerCenterCutoff)) { |
|
| 41 | 41 | $this->CustomerCenterCutoff = $response->CustomerCenterCutoff; |
| 42 | - } |
|
| 43 | - if (isset($response->RestDays)) { |
|
| 42 | + } |
|
| 43 | + if (isset($response->RestDays)) { |
|
| 44 | 44 | $this->RestDays = $response->RestDays; |
| 45 | - } |
|
| 45 | + } |
|
| 46 | + } |
|
| 46 | 47 | } |
| 47 | - } |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @return Arrival |
|
| 51 | - */ |
|
| 52 | - public function getArrival() |
|
| 53 | - { |
|
| 49 | + /** |
|
| 50 | + * @return Arrival |
|
| 51 | + */ |
|
| 52 | + public function getArrival() |
|
| 53 | + { |
|
| 54 | 54 | return $this->Arrival; |
| 55 | - } |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @param Arrival $Arrival |
|
| 59 | - */ |
|
| 60 | - public function setArrival($Arrival) |
|
| 61 | - { |
|
| 57 | + /** |
|
| 58 | + * @param Arrival $Arrival |
|
| 59 | + */ |
|
| 60 | + public function setArrival($Arrival) |
|
| 61 | + { |
|
| 62 | 62 | $this->Arrival = $Arrival; |
| 63 | - } |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - /** |
|
| 66 | - * @return Pickup |
|
| 67 | - */ |
|
| 68 | - public function getPickup() |
|
| 69 | - { |
|
| 65 | + /** |
|
| 66 | + * @return Pickup |
|
| 67 | + */ |
|
| 68 | + public function getPickup() |
|
| 69 | + { |
|
| 70 | 70 | return $this->Pickup; |
| 71 | - } |
|
| 71 | + } |
|
| 72 | 72 | |
| 73 | - /** |
|
| 74 | - * @param Pickup $Pickup |
|
| 75 | - */ |
|
| 76 | - public function setPickup($Pickup) |
|
| 77 | - { |
|
| 73 | + /** |
|
| 74 | + * @param Pickup $Pickup |
|
| 75 | + */ |
|
| 76 | + public function setPickup($Pickup) |
|
| 77 | + { |
|
| 78 | 78 | $this->Pickup = $Pickup; |
| 79 | - } |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * @return mixed |
|
| 83 | - */ |
|
| 84 | - public function getDayOfWeek() |
|
| 85 | - { |
|
| 81 | + /** |
|
| 82 | + * @return mixed |
|
| 83 | + */ |
|
| 84 | + public function getDayOfWeek() |
|
| 85 | + { |
|
| 86 | 86 | return $this->DayOfWeek; |
| 87 | - } |
|
| 87 | + } |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * @param mixed $DayOfWeek |
|
| 91 | - */ |
|
| 92 | - public function setDayOfWeek($DayOfWeek) |
|
| 93 | - { |
|
| 89 | + /** |
|
| 90 | + * @param mixed $DayOfWeek |
|
| 91 | + */ |
|
| 92 | + public function setDayOfWeek($DayOfWeek) |
|
| 93 | + { |
|
| 94 | 94 | $this->DayOfWeek = $DayOfWeek; |
| 95 | - } |
|
| 95 | + } |
|
| 96 | 96 | |
| 97 | - /** |
|
| 98 | - * @return mixed |
|
| 99 | - */ |
|
| 100 | - public function getCustomerCenterCutoff() |
|
| 101 | - { |
|
| 97 | + /** |
|
| 98 | + * @return mixed |
|
| 99 | + */ |
|
| 100 | + public function getCustomerCenterCutoff() |
|
| 101 | + { |
|
| 102 | 102 | return $this->CustomerCenterCutoff; |
| 103 | - } |
|
| 103 | + } |
|
| 104 | 104 | |
| 105 | - /** |
|
| 106 | - * @param mixed $CustomerCenterCutoff |
|
| 107 | - */ |
|
| 108 | - public function setCustomerCenterCutoff($CustomerCenterCutoff) |
|
| 109 | - { |
|
| 105 | + /** |
|
| 106 | + * @param mixed $CustomerCenterCutoff |
|
| 107 | + */ |
|
| 108 | + public function setCustomerCenterCutoff($CustomerCenterCutoff) |
|
| 109 | + { |
|
| 110 | 110 | $this->CustomerCenterCutoff = $CustomerCenterCutoff; |
| 111 | - } |
|
| 111 | + } |
|
| 112 | 112 | |
| 113 | - /** |
|
| 114 | - * @return mixed |
|
| 115 | - */ |
|
| 116 | - public function getDelayCount() |
|
| 117 | - { |
|
| 113 | + /** |
|
| 114 | + * @return mixed |
|
| 115 | + */ |
|
| 116 | + public function getDelayCount() |
|
| 117 | + { |
|
| 118 | 118 | return $this->DelayCount; |
| 119 | - } |
|
| 119 | + } |
|
| 120 | 120 | |
| 121 | - /** |
|
| 122 | - * @param mixed $DelayCount |
|
| 123 | - */ |
|
| 124 | - public function setDelayCount($DelayCount) |
|
| 125 | - { |
|
| 121 | + /** |
|
| 122 | + * @param mixed $DelayCount |
|
| 123 | + */ |
|
| 124 | + public function setDelayCount($DelayCount) |
|
| 125 | + { |
|
| 126 | 126 | $this->DelayCount = $DelayCount; |
| 127 | - } |
|
| 127 | + } |
|
| 128 | 128 | |
| 129 | - /** |
|
| 130 | - * @return mixed |
|
| 131 | - */ |
|
| 132 | - public function getHolidayCount() |
|
| 133 | - { |
|
| 129 | + /** |
|
| 130 | + * @return mixed |
|
| 131 | + */ |
|
| 132 | + public function getHolidayCount() |
|
| 133 | + { |
|
| 134 | 134 | return $this->HolidayCount; |
| 135 | - } |
|
| 135 | + } |
|
| 136 | 136 | |
| 137 | - /** |
|
| 138 | - * @param mixed $HolidayCount |
|
| 139 | - */ |
|
| 140 | - public function setHolidayCount($HolidayCount) |
|
| 141 | - { |
|
| 137 | + /** |
|
| 138 | + * @param mixed $HolidayCount |
|
| 139 | + */ |
|
| 140 | + public function setHolidayCount($HolidayCount) |
|
| 141 | + { |
|
| 142 | 142 | $this->HolidayCount = $HolidayCount; |
| 143 | - } |
|
| 143 | + } |
|
| 144 | 144 | |
| 145 | - /** |
|
| 146 | - * @return mixed |
|
| 147 | - */ |
|
| 148 | - public function getRestDays() |
|
| 149 | - { |
|
| 145 | + /** |
|
| 146 | + * @return mixed |
|
| 147 | + */ |
|
| 148 | + public function getRestDays() |
|
| 149 | + { |
|
| 150 | 150 | return $this->RestDays; |
| 151 | - } |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | - /** |
|
| 154 | - * @param mixed $RestDays |
|
| 155 | - */ |
|
| 156 | - public function setRestDays($RestDays) |
|
| 157 | - { |
|
| 153 | + /** |
|
| 154 | + * @param mixed $RestDays |
|
| 155 | + */ |
|
| 156 | + public function setRestDays($RestDays) |
|
| 157 | + { |
|
| 158 | 158 | $this->RestDays = $RestDays; |
| 159 | - } |
|
| 159 | + } |
|
| 160 | 160 | |
| 161 | - /** |
|
| 162 | - * @return mixed |
|
| 163 | - */ |
|
| 164 | - public function getTotalTransitDays() |
|
| 165 | - { |
|
| 161 | + /** |
|
| 162 | + * @return mixed |
|
| 163 | + */ |
|
| 164 | + public function getTotalTransitDays() |
|
| 165 | + { |
|
| 166 | 166 | return $this->TotalTransitDays; |
| 167 | - } |
|
| 167 | + } |
|
| 168 | 168 | |
| 169 | - /** |
|
| 170 | - * @param mixed $TotalTransitDays |
|
| 171 | - */ |
|
| 172 | - public function setTotalTransitDays($TotalTransitDays) |
|
| 173 | - { |
|
| 169 | + /** |
|
| 170 | + * @param mixed $TotalTransitDays |
|
| 171 | + */ |
|
| 172 | + public function setTotalTransitDays($TotalTransitDays) |
|
| 173 | + { |
|
| 174 | 174 | $this->TotalTransitDays = $TotalTransitDays; |
| 175 | - } |
|
| 175 | + } |
|
| 176 | 176 | |
| 177 | 177 | } |