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 | mayHaveAsBoolean as public getNotificationEmailFrom; |
||
18 | mayHaveAsBoolean as public getNotificationEmailTo; |
||
19 | mayHaveAsString as public getNotificationEmailOther; |
||
20 | toArray as public __toArray; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Indicates the status of the Transaction. |
||
25 | * - "WAITING" |
||
26 | * - "QUEUED" |
||
27 | * - "SUCCESS" |
||
28 | * - "ERROR" |
||
29 | * - "REFUNDED" |
||
30 | * - "REFUNDPENDING" |
||
31 | * - "REFUNDREJECTED" |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getObjectStatus() |
||
39 | |||
40 | /** |
||
41 | * Indicates whether the transaction has been sent to the corresponding carrier's test or production server. |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function getWasTest() |
||
49 | |||
50 | /** |
||
51 | * Rate object id. |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getRate() |
||
59 | |||
60 | /** |
||
61 | * The carrier-specific tracking number that can be used to track the Shipment. |
||
62 | * A value will only be returned if the Rate is for a trackable Shipment and if the Transactions has been processed successfully. |
||
|
|||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getTrackingNumber() |
||
70 | |||
71 | /** |
||
72 | * The tracking information we currently have on file for this shipment. We regularly update this information. |
||
73 | * |
||
74 | * @return TrackingStatus |
||
75 | */ |
||
76 | public function getTrackingStatus() |
||
80 | |||
81 | /** |
||
82 | * @return TrackingHistory |
||
83 | */ |
||
84 | public function getTrackingHistory() |
||
91 | |||
92 | /** |
||
93 | * A link to track this item on the carrier-provided tracking website. |
||
94 | * A value will only be returned if tracking is available and the carrier provides such a service. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getTrackingUrlProvider() |
||
102 | |||
103 | /** |
||
104 | * A URL pointing directly to the label in the format you've set in your settings. |
||
105 | * A value will only be returned if the Transactions has been processed successfully. |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getLabelUrl() |
||
113 | |||
114 | /** |
||
115 | * A URL pointing to the commercial invoice as a 8.5x11 inch PDF file. |
||
116 | * A value will only be returned if the Transactions has been processed successfully and if the shipment is international. |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getCommercialInvoiceUrl() |
||
124 | |||
125 | /** |
||
126 | * An array containing elements of the following schema: |
||
127 | * "code" (string): an identifier for the corresponding message (not always available") |
||
128 | * "message" (string): a publishable message containing further information. |
||
129 | * |
||
130 | * @return array |
||
131 | */ |
||
132 | public function getMessages() |
||
136 | |||
137 | /** |
||
138 | * @return mixed|null |
||
139 | */ |
||
140 | public function getOrder() |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getMetadata() |
||
152 | |||
153 | public function toArray() |
||
161 | } |
||
162 |
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.