1 | <?php |
||
11 | class Transaction extends ObjectInformation |
||
12 | { |
||
13 | use ReadableAttributes { |
||
14 | mayHaveAsString as public getCustomsNote; |
||
15 | mayHaveAsString as public getSubmissionNote; |
||
16 | mayHaveAsString as public getMetadata; |
||
17 | toArray as public __toArray; |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Indicates the status of the Transaction. |
||
22 | * - "WAITING" |
||
23 | * - "QUEUED" |
||
24 | * - "SUCCESS" |
||
25 | * - "ERROR" |
||
26 | * - "REFUNDED" |
||
27 | * - "REFUNDPENDING" |
||
28 | * - "REFUNDREJECTED" |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | public function getObjectStatus() |
||
36 | |||
37 | /** |
||
38 | * Indicates whether the transaction has been sent to the corresponding carrier's test or production server. |
||
39 | * |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function getWasTest() |
||
46 | |||
47 | /** |
||
48 | * Rate object id. |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getRate() |
||
56 | |||
57 | /** |
||
58 | * The carrier-specific tracking number that can be used to track the Shipment. |
||
59 | * A value will only be returned if the Rate is for a trackable Shipment and if the Transactions has been processed successfully. |
||
|
|||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getTrackingNumber() |
||
67 | |||
68 | /** |
||
69 | * The tracking information we currently have on file for this shipment. We regularly update this information. |
||
70 | * |
||
71 | * @return TrackingStatus |
||
72 | */ |
||
73 | public function getTrackingStatus() |
||
77 | |||
78 | /** |
||
79 | * @return TrackingHistory |
||
80 | */ |
||
81 | public function getTrackingHistory() |
||
88 | |||
89 | /** |
||
90 | * A link to track this item on the carrier-provided tracking website. |
||
91 | * A value will only be returned if tracking is available and the carrier provides such a service. |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getTrackingUrlProvider() |
||
99 | |||
100 | /** |
||
101 | * A URL pointing directly to the label in the format you've set in your settings. |
||
102 | * A value will only be returned if the Transactions has been processed successfully. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getLabelUrl() |
||
110 | |||
111 | /** |
||
112 | * A URL pointing to the commercial invoice as a 8.5x11 inch PDF file. |
||
113 | * A value will only be returned if the Transactions has been processed successfully and if the shipment is international. |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getCommercialInvoiceUrl() |
||
121 | |||
122 | /** |
||
123 | * An array containing elements of the following schema: |
||
124 | * "code" (string): an identifier for the corresponding message (not always available") |
||
125 | * "message" (string): a publishable message containing further information. |
||
126 | * |
||
127 | * @return array |
||
128 | */ |
||
129 | public function getMessages() |
||
133 | |||
134 | /** |
||
135 | * @return mixed|null |
||
136 | */ |
||
137 | public function getOrder() |
||
141 | |||
142 | /** |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getMetadata() |
||
149 | |||
150 | public function toArray() |
||
158 | } |
||
159 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.