aftership-tracking-sdk 14.0.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -3
- data/lib/aftership-tracking-sdk/api/courier.rb +2 -2
- data/lib/aftership-tracking-sdk/api/courier_connection.rb +5 -5
- data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +2 -2
- data/lib/aftership-tracking-sdk/api/tracking.rb +7 -7
- data/lib/aftership-tracking-sdk/models/checkpoint.rb +10 -0
- data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +10 -0
- data/lib/aftership-tracking-sdk/models/create_tracking_request_customers.rb +10 -0
- data/lib/aftership-tracking-sdk/models/create_tracking_request_shipment_direction.rb +26 -0
- data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request_destination_address.rb +2 -2
- data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request_origin_address.rb +2 -2
- data/lib/aftership-tracking-sdk/models/tracking.rb +60 -0
- data/lib/aftership-tracking-sdk/models/tracking_customers.rb +10 -0
- data/lib/aftership-tracking-sdk/models/tracking_forward_shipment.rb +151 -0
- data/lib/aftership-tracking-sdk/models/tracking_multi_piece_info.rb +161 -0
- data/lib/aftership-tracking-sdk/models/tracking_multi_piece_info_pieces.rb +181 -0
- data/lib/aftership-tracking-sdk/models/tracking_multi_piece_info_pieces_type.rb +26 -0
- data/lib/aftership-tracking-sdk/models/tracking_multi_piece_info_type.rb +26 -0
- data/lib/aftership-tracking-sdk/models/tracking_proof_of_delivery.rb +161 -0
- data/lib/aftership-tracking-sdk/models/tracking_response.rb +1 -1
- data/lib/aftership-tracking-sdk/models/tracking_return_shipment.rb +171 -0
- data/lib/aftership-tracking-sdk/models/tracking_shipment_dimensions.rb +181 -0
- data/lib/aftership-tracking-sdk/models/tracking_shipment_direction.rb +27 -0
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +10 -0
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request_customers.rb +10 -0
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request_shipment_direction.rb +26 -0
- data/lib/aftership-tracking-sdk/version.rb +1 -1
- metadata +13 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbba5a57b94fdd58712b2a33c84075631a22e1900c5f0201c00927dd99c3b5e1
|
|
4
|
+
data.tar.gz: 518931d07ea93e956e9608fc265d85e53b1828df913249ec0f23a0fdf51386b2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e8d3545a88eb3c4329d40b5dc32d0f6a7f803bc4efe83a8e61b25c6387e601a07e72158f16bdc67a70f33254ca333b888de85f5f8a59d2436cc30293a1d7f6e
|
|
7
|
+
data.tar.gz: 543b9f144163ecc63565bee5657d427fc7f43f65d5c4a540c3d5344c5b86d7bcb1651595cc9425df2dc1f96ad9cabb1e1ee664e2f10f520c9d5e8a0731ad3b6d
|
data/README.md
CHANGED
|
@@ -38,8 +38,8 @@ Before you begin to integrate:
|
|
|
38
38
|
|
|
39
39
|
### API and SDK Version
|
|
40
40
|
|
|
41
|
-
- SDK Version:
|
|
42
|
-
- API Version: 2026-
|
|
41
|
+
- SDK Version: 15.0.0
|
|
42
|
+
- API Version: 2026-07
|
|
43
43
|
## Quick Start
|
|
44
44
|
|
|
45
45
|
### Installation
|
|
@@ -50,7 +50,7 @@ gem install aftership-tracking-sdk
|
|
|
50
50
|
Or add a line to your Gemfile
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
gem 'aftership-tracking-sdk', '~>
|
|
53
|
+
gem 'aftership-tracking-sdk', '~> 15.0.0'
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Constructor
|
|
@@ -89,6 +89,27 @@ end
|
|
|
89
89
|
|
|
90
90
|
See the [Rate Limit](https://www.aftership.com/docs/tracking/quickstart/rate-limit) to understand the AfterShip rate limit policy.
|
|
91
91
|
|
|
92
|
+
The API returns its current rate limit status in the headers of every response, and the SDK exposes these headers on both successful responses and rate-limited errors, so you can monitor your consumption proactively instead of waiting for `429` errors.
|
|
93
|
+
|
|
94
|
+
| Header | Description |
|
|
95
|
+
| ----------------------- | ---------------------------------------------------------- |
|
|
96
|
+
| `X-RateLimit-Limit` | The rate limit ceiling for the current endpoint per second |
|
|
97
|
+
| `X-RateLimit-Remaining` | The number of requests left for the 1-second window |
|
|
98
|
+
| `X-RateLimit-Reset` | The Unix timestamp when the rate limit will be reset |
|
|
99
|
+
|
|
100
|
+
Every successful response exposes a `response_header` hash (case-insensitive lookup) alongside `data`. Taking the Quick Start example above:
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
remaining = response.response_header['x-ratelimit-remaining'].to_i
|
|
104
|
+
reset_at = response.response_header['x-ratelimit-reset'].to_i
|
|
105
|
+
|
|
106
|
+
if remaining <= 1
|
|
107
|
+
# Throttle or defer lower-priority requests until reset_at
|
|
108
|
+
end
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
When the rate limit is exceeded, the request fails with a `429` error that carries the same headers — see [Error Handling](#error-handling).
|
|
112
|
+
|
|
92
113
|
## Error Handling
|
|
93
114
|
|
|
94
115
|
The SDK will return an error object when there is any error during the request, with the following specification:
|
|
@@ -23,7 +23,7 @@ module AftershipAPI
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
# resource path
|
|
26
|
-
local_var_path = "/tracking/2026-
|
|
26
|
+
local_var_path = "/tracking/2026-07/couriers"
|
|
27
27
|
method = :'GET'
|
|
28
28
|
|
|
29
29
|
# query parameters
|
|
@@ -72,7 +72,7 @@ module AftershipAPI
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
# resource path
|
|
75
|
-
local_var_path = "/tracking/2026-
|
|
75
|
+
local_var_path = "/tracking/2026-07/couriers/detect"
|
|
76
76
|
method = :'POST'
|
|
77
77
|
|
|
78
78
|
# query parameters
|
|
@@ -24,7 +24,7 @@ module AftershipAPI
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
# resource path
|
|
27
|
-
local_var_path = "/tracking/2026-
|
|
27
|
+
local_var_path = "/tracking/2026-07/courier-connections"
|
|
28
28
|
method = :'GET'
|
|
29
29
|
|
|
30
30
|
# query parameters
|
|
@@ -74,7 +74,7 @@ module AftershipAPI
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
# resource path
|
|
77
|
-
local_var_path = "/tracking/2026-
|
|
77
|
+
local_var_path = "/tracking/2026-07/courier-connections"
|
|
78
78
|
method = :'POST'
|
|
79
79
|
|
|
80
80
|
# query parameters
|
|
@@ -122,7 +122,7 @@ module AftershipAPI
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
# resource path
|
|
125
|
-
local_var_path = "/tracking/2026-
|
|
125
|
+
local_var_path = "/tracking/2026-07/courier-connections/#{id}"
|
|
126
126
|
method = :'GET'
|
|
127
127
|
|
|
128
128
|
# query parameters
|
|
@@ -173,7 +173,7 @@ module AftershipAPI
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
# resource path
|
|
176
|
-
local_var_path = "/tracking/2026-
|
|
176
|
+
local_var_path = "/tracking/2026-07/courier-connections/#{id}"
|
|
177
177
|
method = :'PATCH'
|
|
178
178
|
|
|
179
179
|
# query parameters
|
|
@@ -221,7 +221,7 @@ module AftershipAPI
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
# resource path
|
|
224
|
-
local_var_path = "/tracking/2026-
|
|
224
|
+
local_var_path = "/tracking/2026-07/courier-connections/#{id}"
|
|
225
225
|
method = :'DELETE'
|
|
226
226
|
|
|
227
227
|
# query parameters
|
|
@@ -24,7 +24,7 @@ module AftershipAPI
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
# resource path
|
|
27
|
-
local_var_path = "/tracking/2026-
|
|
27
|
+
local_var_path = "/tracking/2026-07/estimated-delivery-date/predict"
|
|
28
28
|
method = :'POST'
|
|
29
29
|
|
|
30
30
|
# query parameters
|
|
@@ -71,7 +71,7 @@ module AftershipAPI
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
# resource path
|
|
74
|
-
local_var_path = "/tracking/2026-
|
|
74
|
+
local_var_path = "/tracking/2026-07/estimated-delivery-date/predict-batch"
|
|
75
75
|
method = :'POST'
|
|
76
76
|
|
|
77
77
|
# query parameters
|
|
@@ -39,7 +39,7 @@ module AftershipAPI
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
# resource path
|
|
42
|
-
local_var_path = "/tracking/2026-
|
|
42
|
+
local_var_path = "/tracking/2026-07/trackings"
|
|
43
43
|
method = :'GET'
|
|
44
44
|
|
|
45
45
|
# query parameters
|
|
@@ -104,7 +104,7 @@ module AftershipAPI
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
# resource path
|
|
107
|
-
local_var_path = "/tracking/2026-
|
|
107
|
+
local_var_path = "/tracking/2026-07/trackings"
|
|
108
108
|
method = :'POST'
|
|
109
109
|
|
|
110
110
|
# query parameters
|
|
@@ -154,7 +154,7 @@ module AftershipAPI
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
# resource path
|
|
157
|
-
local_var_path = "/tracking/2026-
|
|
157
|
+
local_var_path = "/tracking/2026-07/trackings/#{id}"
|
|
158
158
|
method = :'GET'
|
|
159
159
|
|
|
160
160
|
# query parameters
|
|
@@ -207,7 +207,7 @@ module AftershipAPI
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
# resource path
|
|
210
|
-
local_var_path = "/tracking/2026-
|
|
210
|
+
local_var_path = "/tracking/2026-07/trackings/#{id}"
|
|
211
211
|
method = :'PUT'
|
|
212
212
|
|
|
213
213
|
# query parameters
|
|
@@ -255,7 +255,7 @@ module AftershipAPI
|
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
# resource path
|
|
258
|
-
local_var_path = "/tracking/2026-
|
|
258
|
+
local_var_path = "/tracking/2026-07/trackings/#{id}"
|
|
259
259
|
method = :'DELETE'
|
|
260
260
|
|
|
261
261
|
# query parameters
|
|
@@ -303,7 +303,7 @@ module AftershipAPI
|
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
# resource path
|
|
306
|
-
local_var_path = "/tracking/2026-
|
|
306
|
+
local_var_path = "/tracking/2026-07/trackings/#{id}/retrack"
|
|
307
307
|
method = :'POST'
|
|
308
308
|
|
|
309
309
|
# query parameters
|
|
@@ -354,7 +354,7 @@ module AftershipAPI
|
|
|
354
354
|
|
|
355
355
|
|
|
356
356
|
# resource path
|
|
357
|
-
local_var_path = "/tracking/2026-
|
|
357
|
+
local_var_path = "/tracking/2026-07/trackings/#{id}/mark-as-completed"
|
|
358
358
|
method = :'POST'
|
|
359
359
|
|
|
360
360
|
# query parameters
|
|
@@ -70,6 +70,10 @@ module AftershipAPI::Model
|
|
|
70
70
|
# source?: CheckpointSource;
|
|
71
71
|
attr_accessor :source
|
|
72
72
|
|
|
73
|
+
# Unique hash identifier for each checkpoint event, could be used for deduplication.
|
|
74
|
+
# hash?: String;
|
|
75
|
+
attr_accessor :hash
|
|
76
|
+
|
|
73
77
|
# Initializes the object
|
|
74
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
79
|
def initialize(attributes = {})
|
|
@@ -148,6 +152,10 @@ module AftershipAPI::Model
|
|
|
148
152
|
if attributes.key?(:'source')
|
|
149
153
|
self.source = attributes[:'source']
|
|
150
154
|
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'hash')
|
|
157
|
+
self.hash = attributes[:'hash']
|
|
158
|
+
end
|
|
151
159
|
end
|
|
152
160
|
|
|
153
161
|
# Attribute type mapping.
|
|
@@ -170,6 +178,7 @@ module AftershipAPI::Model
|
|
|
170
178
|
:'raw_tag' => :'String',
|
|
171
179
|
:'events' => :'Array<CheckpointEvents>',
|
|
172
180
|
:'source' => :'CheckpointSource',
|
|
181
|
+
:'hash' => :'String',
|
|
173
182
|
}
|
|
174
183
|
end
|
|
175
184
|
|
|
@@ -193,6 +202,7 @@ module AftershipAPI::Model
|
|
|
193
202
|
:'raw_tag' => :'raw_tag',
|
|
194
203
|
:'events' => :'events',
|
|
195
204
|
:'source' => :'source',
|
|
205
|
+
:'hash' => :'hash',
|
|
196
206
|
}
|
|
197
207
|
end
|
|
198
208
|
|
|
@@ -146,6 +146,10 @@ module AftershipAPI::Model
|
|
|
146
146
|
# customers?: CreateTrackingRequestCustomers[];
|
|
147
147
|
attr_accessor :customers
|
|
148
148
|
|
|
149
|
+
# Indicates the business direction of the shipment in the e-commerce fulfillment lifecycle.Possible values:- `forward`: A forward (outbound-to-customer) shipment created for order fulfillment.- `return`: A return (customer-to-merchant) shipment created for after-sales return or exchange.When provided, this field gives AfterShip additional context about the shipment's intent, enabling more accurate status identification.
|
|
150
|
+
# shipment_direction?: CreateTrackingRequestShipmentDirection;
|
|
151
|
+
attr_accessor :shipment_direction
|
|
152
|
+
|
|
149
153
|
# Initializes the object
|
|
150
154
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
155
|
def initialize(attributes = {})
|
|
@@ -300,6 +304,10 @@ module AftershipAPI::Model
|
|
|
300
304
|
if attributes.key?(:'customers')
|
|
301
305
|
self.customers = attributes[:'customers']
|
|
302
306
|
end
|
|
307
|
+
|
|
308
|
+
if attributes.key?(:'shipment_direction')
|
|
309
|
+
self.shipment_direction = attributes[:'shipment_direction']
|
|
310
|
+
end
|
|
303
311
|
end
|
|
304
312
|
|
|
305
313
|
# Attribute type mapping.
|
|
@@ -341,6 +349,7 @@ module AftershipAPI::Model
|
|
|
341
349
|
:'shipping_method' => :'String',
|
|
342
350
|
:'last_mile' => :'CreateTrackingRequestLastMile',
|
|
343
351
|
:'customers' => :'Array<CreateTrackingRequestCustomers>',
|
|
352
|
+
:'shipment_direction' => :'CreateTrackingRequestShipmentDirection',
|
|
344
353
|
}
|
|
345
354
|
end
|
|
346
355
|
|
|
@@ -383,6 +392,7 @@ module AftershipAPI::Model
|
|
|
383
392
|
:'shipping_method' => :'shipping_method',
|
|
384
393
|
:'last_mile' => :'last_mile',
|
|
385
394
|
:'customers' => :'customers',
|
|
395
|
+
:'shipment_direction' => :'shipment_direction',
|
|
386
396
|
}
|
|
387
397
|
end
|
|
388
398
|
|
|
@@ -22,6 +22,10 @@ module AftershipAPI::Model
|
|
|
22
22
|
# language?: String;
|
|
23
23
|
attr_accessor :language
|
|
24
24
|
|
|
25
|
+
# The customer's identifier on the merchant or platform (for example, Shopify) side.
|
|
26
|
+
# id?: String;
|
|
27
|
+
attr_accessor :id
|
|
28
|
+
|
|
25
29
|
# Initializes the object
|
|
26
30
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
27
31
|
def initialize(attributes = {})
|
|
@@ -52,6 +56,10 @@ module AftershipAPI::Model
|
|
|
52
56
|
if attributes.key?(:'language')
|
|
53
57
|
self.language = attributes[:'language']
|
|
54
58
|
end
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'id')
|
|
61
|
+
self.id = attributes[:'id']
|
|
62
|
+
end
|
|
55
63
|
end
|
|
56
64
|
|
|
57
65
|
# Attribute type mapping.
|
|
@@ -62,6 +70,7 @@ module AftershipAPI::Model
|
|
|
62
70
|
:'phone_number' => :'String',
|
|
63
71
|
:'email' => :'String',
|
|
64
72
|
:'language' => :'String',
|
|
73
|
+
:'id' => :'String',
|
|
65
74
|
}
|
|
66
75
|
end
|
|
67
76
|
|
|
@@ -73,6 +82,7 @@ module AftershipAPI::Model
|
|
|
73
82
|
:'phone_number' => :'phone_number',
|
|
74
83
|
:'email' => :'email',
|
|
75
84
|
:'language' => :'language',
|
|
85
|
+
:'id' => :'id',
|
|
76
86
|
}
|
|
77
87
|
end
|
|
78
88
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
|
2
|
+
# Do not edit the class manually.
|
|
3
|
+
module AftershipAPI::Model
|
|
4
|
+
class CreateTrackingRequestShipmentDirection
|
|
5
|
+
FORWARD = "forward".freeze
|
|
6
|
+
RETURN = "return".freeze
|
|
7
|
+
def self.all_vars
|
|
8
|
+
@all_vars ||= [FORWARD, RETURN,].freeze
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Builds the enum from string
|
|
12
|
+
# @param value [String] The enum value in the form of the string
|
|
13
|
+
# @return [String] The enum value
|
|
14
|
+
def self.build_from_hash(value)
|
|
15
|
+
new.build_from_hash(value)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Builds the enum from string
|
|
19
|
+
# @param value [String] The enum value in the form of the string
|
|
20
|
+
# @return [String] The enum value
|
|
21
|
+
def build_from_hash(value)
|
|
22
|
+
return value if CreateTrackingRequestShipmentDirection.all_vars.include?(value)
|
|
23
|
+
raise "Invalid ENUM value #{value} for class #CreateTrackingRequestShipmentDirection"
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request_destination_address.rb
CHANGED
|
@@ -6,7 +6,7 @@ module AftershipAPI::Model
|
|
|
6
6
|
# country_region: String;
|
|
7
7
|
attr_accessor :country_region
|
|
8
8
|
|
|
9
|
-
# State, province, or the equivalent location of the destination address where the package will be delivered
|
|
9
|
+
# State, province, or the equivalent location of the destination address where the package will be delivered.</br><span style=color:#ff6b2b;padding:2px>**Either `destination_address.state` or `destination_address.postal_code` is required.**</span>
|
|
10
10
|
# state?: String;
|
|
11
11
|
attr_accessor :state
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ module AftershipAPI::Model
|
|
|
14
14
|
# city?: String;
|
|
15
15
|
attr_accessor :city
|
|
16
16
|
|
|
17
|
-
# Postal code of the destination address
|
|
17
|
+
# Postal code of the destination address.</br><span style=color:#ff6b2b;padding:2px>**Either `destination_address.state` or `destination_address.postal_code` is required.**</span>
|
|
18
18
|
# postal_code?: String;
|
|
19
19
|
attr_accessor :postal_code
|
|
20
20
|
|
|
@@ -6,7 +6,7 @@ module AftershipAPI::Model
|
|
|
6
6
|
# country_region: String;
|
|
7
7
|
attr_accessor :country_region
|
|
8
8
|
|
|
9
|
-
# State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. Either `origin_address.state` or `origin_address.postal_code` is required
|
|
9
|
+
# State, province, or the equivalent location of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without state. </br><span style=color:#ff6b2b;padding:2px>**Either `origin_address.state` or `origin_address.postal_code` is required.**</span>
|
|
10
10
|
# state?: String;
|
|
11
11
|
attr_accessor :state
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ module AftershipAPI::Model
|
|
|
14
14
|
# city?: String;
|
|
15
15
|
attr_accessor :city
|
|
16
16
|
|
|
17
|
-
# Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. Either `origin_address.state` or `origin_address.postal_code` is required
|
|
17
|
+
# Postal code of the origin address. Use 3 letters of ISO 3166-1 country/region code for countries/regions without postal code. </br><span style=color:#ff6b2b;padding:2px>**Either `origin_address.state` or `origin_address.postal_code` is required.**</span>
|
|
18
18
|
# postal_code?: String;
|
|
19
19
|
attr_accessor :postal_code
|
|
20
20
|
|
|
@@ -122,6 +122,10 @@ module AftershipAPI::Model
|
|
|
122
122
|
# shipment_weight?: TrackingShipmentWeight;
|
|
123
123
|
attr_accessor :shipment_weight
|
|
124
124
|
|
|
125
|
+
# Physical dimensions of the package (length, width and height).
|
|
126
|
+
# shipment_dimensions?: TrackingShipmentDimensions;
|
|
127
|
+
attr_accessor :shipment_dimensions
|
|
128
|
+
|
|
125
129
|
# Signed by information for delivered shipment.
|
|
126
130
|
# signed_by?: String;
|
|
127
131
|
attr_accessor :signed_by
|
|
@@ -298,6 +302,26 @@ module AftershipAPI::Model
|
|
|
298
302
|
# customers?: TrackingCustomers[];
|
|
299
303
|
attr_accessor :customers
|
|
300
304
|
|
|
305
|
+
# An array of proof of delivery (POD) records, such as a signature or photo captured upon successful delivery.This field returns a value only after the feature is enabled. Please contact your customer success manager if you'd like to know more.
|
|
306
|
+
# proof_of_delivery?: TrackingProofOfDelivery[];
|
|
307
|
+
attr_accessor :proof_of_delivery
|
|
308
|
+
|
|
309
|
+
# Multi-piece shipment refers to a scenario where a single shipment order is fulfilled by multiple physical packages. Each piece has its own carrier-assigned tracking number, but all pieces belong to the same shipment. This commonly occurs when an order is too large to fit in one box, or when items are packed separately for handling reasons.This field contains multi-piece shipment metadata describing a group of packages that belong to the same shipment.This field returns a value only when your subscription plan includes a multi-piece feature. To enable, go to .
|
|
310
|
+
# multi_piece_info?: TrackingMultiPieceInfo;
|
|
311
|
+
attr_accessor :multi_piece_info
|
|
312
|
+
|
|
313
|
+
# Indicates the business direction of the shipment in the e-commerce fulfillment lifecycle.Possible values:- `forward`: A forward (outbound-to-customer) shipment created for order fulfillment.- `return`: A return (customer-to-merchant) shipment created for after-sales return or exchange.This field is populated in either of the following cases:1. You explicitly provided it when creating the tracking.2. AfterShip automatically detected a linked forward or return shipment.It also determines which related shipment object (`forward_shipment` or `return_shipment`) may appear in the response.
|
|
314
|
+
# shipment_direction?: TrackingShipmentDirection;
|
|
315
|
+
attr_accessor :shipment_direction
|
|
316
|
+
|
|
317
|
+
# The associated return shipment linked to the current outbound shipment.This field is only present when `shipment_direction = "forward"` and AfterShip has detected a linked return shipment.
|
|
318
|
+
# return_shipment?: TrackingReturnShipment;
|
|
319
|
+
attr_accessor :return_shipment
|
|
320
|
+
|
|
321
|
+
# The original outbound shipment linked to this return. Use this to trace a return back to its source delivery.This field is only present when `shipment_direction = "return"` and AfterShip has detected a linked forward shipment.
|
|
322
|
+
# forward_shipment?: TrackingForwardShipment;
|
|
323
|
+
attr_accessor :forward_shipment
|
|
324
|
+
|
|
301
325
|
# Initializes the object
|
|
302
326
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
303
327
|
def initialize(attributes = {})
|
|
@@ -429,6 +453,10 @@ module AftershipAPI::Model
|
|
|
429
453
|
self.shipment_weight = attributes[:'shipment_weight']
|
|
430
454
|
end
|
|
431
455
|
|
|
456
|
+
if attributes.key?(:'shipment_dimensions')
|
|
457
|
+
self.shipment_dimensions = attributes[:'shipment_dimensions']
|
|
458
|
+
end
|
|
459
|
+
|
|
432
460
|
if attributes.key?(:'signed_by')
|
|
433
461
|
self.signed_by = attributes[:'signed_by']
|
|
434
462
|
end
|
|
@@ -604,6 +632,26 @@ module AftershipAPI::Model
|
|
|
604
632
|
if attributes.key?(:'customers')
|
|
605
633
|
self.customers = attributes[:'customers']
|
|
606
634
|
end
|
|
635
|
+
|
|
636
|
+
if attributes.key?(:'proof_of_delivery')
|
|
637
|
+
self.proof_of_delivery = attributes[:'proof_of_delivery']
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
if attributes.key?(:'multi_piece_info')
|
|
641
|
+
self.multi_piece_info = attributes[:'multi_piece_info']
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
if attributes.key?(:'shipment_direction')
|
|
645
|
+
self.shipment_direction = attributes[:'shipment_direction']
|
|
646
|
+
end
|
|
647
|
+
|
|
648
|
+
if attributes.key?(:'return_shipment')
|
|
649
|
+
self.return_shipment = attributes[:'return_shipment']
|
|
650
|
+
end
|
|
651
|
+
|
|
652
|
+
if attributes.key?(:'forward_shipment')
|
|
653
|
+
self.forward_shipment = attributes[:'forward_shipment']
|
|
654
|
+
end
|
|
607
655
|
end
|
|
608
656
|
|
|
609
657
|
# Attribute type mapping.
|
|
@@ -639,6 +687,7 @@ module AftershipAPI::Model
|
|
|
639
687
|
:'shipment_delivery_date' => :'String',
|
|
640
688
|
:'shipment_type' => :'String',
|
|
641
689
|
:'shipment_weight' => :'TrackingShipmentWeight',
|
|
690
|
+
:'shipment_dimensions' => :'TrackingShipmentDimensions',
|
|
642
691
|
:'signed_by' => :'String',
|
|
643
692
|
:'source' => :'String',
|
|
644
693
|
:'tag' => :'Tag',
|
|
@@ -683,6 +732,11 @@ module AftershipAPI::Model
|
|
|
683
732
|
:'first_mile' => :'TrackingFirstMile',
|
|
684
733
|
:'last_mile' => :'TrackingLastMile',
|
|
685
734
|
:'customers' => :'Array<TrackingCustomers>',
|
|
735
|
+
:'proof_of_delivery' => :'Array<TrackingProofOfDelivery>',
|
|
736
|
+
:'multi_piece_info' => :'TrackingMultiPieceInfo',
|
|
737
|
+
:'shipment_direction' => :'TrackingShipmentDirection',
|
|
738
|
+
:'return_shipment' => :'TrackingReturnShipment',
|
|
739
|
+
:'forward_shipment' => :'TrackingForwardShipment',
|
|
686
740
|
}
|
|
687
741
|
end
|
|
688
742
|
|
|
@@ -719,6 +773,7 @@ module AftershipAPI::Model
|
|
|
719
773
|
:'shipment_delivery_date' => :'shipment_delivery_date',
|
|
720
774
|
:'shipment_type' => :'shipment_type',
|
|
721
775
|
:'shipment_weight' => :'shipment_weight',
|
|
776
|
+
:'shipment_dimensions' => :'shipment_dimensions',
|
|
722
777
|
:'signed_by' => :'signed_by',
|
|
723
778
|
:'source' => :'source',
|
|
724
779
|
:'tag' => :'tag',
|
|
@@ -763,6 +818,11 @@ module AftershipAPI::Model
|
|
|
763
818
|
:'first_mile' => :'first_mile',
|
|
764
819
|
:'last_mile' => :'last_mile',
|
|
765
820
|
:'customers' => :'customers',
|
|
821
|
+
:'proof_of_delivery' => :'proof_of_delivery',
|
|
822
|
+
:'multi_piece_info' => :'multi_piece_info',
|
|
823
|
+
:'shipment_direction' => :'shipment_direction',
|
|
824
|
+
:'return_shipment' => :'return_shipment',
|
|
825
|
+
:'forward_shipment' => :'forward_shipment',
|
|
766
826
|
}
|
|
767
827
|
end
|
|
768
828
|
|
|
@@ -22,6 +22,10 @@ module AftershipAPI::Model
|
|
|
22
22
|
# language?: String;
|
|
23
23
|
attr_accessor :language
|
|
24
24
|
|
|
25
|
+
# The customer's identifier on the merchant or platform (for example, Shopify) side.
|
|
26
|
+
# id?: String;
|
|
27
|
+
attr_accessor :id
|
|
28
|
+
|
|
25
29
|
# Initializes the object
|
|
26
30
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
27
31
|
def initialize(attributes = {})
|
|
@@ -52,6 +56,10 @@ module AftershipAPI::Model
|
|
|
52
56
|
if attributes.key?(:'language')
|
|
53
57
|
self.language = attributes[:'language']
|
|
54
58
|
end
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'id')
|
|
61
|
+
self.id = attributes[:'id']
|
|
62
|
+
end
|
|
55
63
|
end
|
|
56
64
|
|
|
57
65
|
# Attribute type mapping.
|
|
@@ -62,6 +70,7 @@ module AftershipAPI::Model
|
|
|
62
70
|
:'phone_number' => :'String',
|
|
63
71
|
:'email' => :'String',
|
|
64
72
|
:'language' => :'String',
|
|
73
|
+
:'id' => :'String',
|
|
65
74
|
}
|
|
66
75
|
end
|
|
67
76
|
|
|
@@ -73,6 +82,7 @@ module AftershipAPI::Model
|
|
|
73
82
|
:'phone_number' => :'phone_number',
|
|
74
83
|
:'email' => :'email',
|
|
75
84
|
:'language' => :'language',
|
|
85
|
+
:'id' => :'id',
|
|
76
86
|
}
|
|
77
87
|
end
|
|
78
88
|
|