aftership-tracking-sdk 9.0.0 → 11.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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +16 -19
  4. data/lib/aftership-tracking-sdk/api/courier.rb +16 -60
  5. data/lib/aftership-tracking-sdk/api/courier_connection.rb +283 -0
  6. data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +55 -1
  7. data/lib/aftership-tracking-sdk/api/tracking.rb +17 -17
  8. data/lib/aftership-tracking-sdk/models/{additional_fields_v1.rb → additional_fields.rb} +9 -9
  9. data/lib/aftership-tracking-sdk/models/checkpoint.rb +24 -14
  10. data/lib/aftership-tracking-sdk/models/courier.rb +17 -7
  11. data/lib/aftership-tracking-sdk/models/courier_connection.rb +193 -0
  12. data/lib/aftership-tracking-sdk/models/courier_connection_response_for_get_courier_connections.rb +163 -0
  13. data/lib/aftership-tracking-sdk/models/{courier_response_v1.rb → courier_response.rb} +6 -6
  14. data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +55 -105
  15. data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +53 -113
  16. data/lib/aftership-tracking-sdk/models/credential_field.rb +173 -0
  17. data/lib/aftership-tracking-sdk/models/{get_user_couriers_response.rb → credentials_courier.rb} +9 -19
  18. data/lib/aftership-tracking-sdk/models/customers_create_tracking_request.rb +193 -0
  19. data/lib/aftership-tracking-sdk/models/customers_create_tracking_response.rb +193 -0
  20. data/lib/aftership-tracking-sdk/models/customers_delete_tracking_by_id_response.rb +193 -0
  21. data/lib/aftership-tracking-sdk/models/customers_get_tracking_by_id_response.rb +193 -0
  22. data/lib/aftership-tracking-sdk/models/customers_mark_tracking_completed_by_id_response.rb +193 -0
  23. data/lib/aftership-tracking-sdk/models/customers_retrack_tracking_by_id_response.rb +193 -0
  24. data/lib/aftership-tracking-sdk/models/customers_tracking.rb +193 -0
  25. data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_request.rb +193 -0
  26. data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_response.rb +193 -0
  27. data/lib/aftership-tracking-sdk/models/data_courier_connection_response_for_get_courier_connections.rb +163 -0
  28. data/lib/aftership-tracking-sdk/models/{data_courier_response_v1.rb → data_courier_response.rb} +2 -2
  29. data/lib/aftership-tracking-sdk/models/{data_tracking_response_get_multiple_v1.rb → data_tracking_response_for_get_trackings.rb} +4 -4
  30. data/lib/aftership-tracking-sdk/models/delete_courier_connections_by_id_response.rb +193 -0
  31. data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +53 -113
  32. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +6 -6
  33. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +6 -6
  34. data/lib/aftership-tracking-sdk/models/destination_address_predict_request.rb +193 -0
  35. data/lib/aftership-tracking-sdk/models/destination_address_predict_response.rb +193 -0
  36. data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +26 -46
  37. data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_request.rb +183 -0
  38. data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_response.rb +193 -0
  39. data/lib/aftership-tracking-sdk/models/{next_couriers_delete_tracking_by_id_response.rb → first_mile_create_tracking_response.rb} +29 -29
  40. data/lib/aftership-tracking-sdk/models/first_mile_delete_tracking_by_id_response.rb +193 -0
  41. data/lib/aftership-tracking-sdk/models/first_mile_get_tracking_by_id_response.rb +193 -0
  42. data/lib/aftership-tracking-sdk/models/first_mile_mark_tracking_completed_by_id_response.rb +193 -0
  43. data/lib/aftership-tracking-sdk/models/first_mile_retrack_tracking_by_id_response.rb +193 -0
  44. data/lib/aftership-tracking-sdk/models/{next_couriers_get_tracking_by_id_response.rb → first_mile_tracking.rb} +29 -29
  45. data/lib/aftership-tracking-sdk/models/first_mile_update_tracking_by_id_response.rb +193 -0
  46. data/lib/aftership-tracking-sdk/models/get_courier_connections_by_id_response.rb +193 -0
  47. data/lib/aftership-tracking-sdk/models/get_courier_connections_response.rb +163 -0
  48. data/lib/aftership-tracking-sdk/models/{get_all_couriers_response.rb → get_couriers_response.rb} +2 -2
  49. data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +53 -113
  50. data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_request.rb → last_mile_create_tracking_request.rb} +13 -13
  51. data/lib/aftership-tracking-sdk/models/last_mile_create_tracking_response.rb +203 -0
  52. data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_response.rb → last_mile_delete_tracking_by_id_response.rb} +33 -23
  53. data/lib/aftership-tracking-sdk/models/last_mile_get_tracking_by_id_response.rb +203 -0
  54. data/lib/aftership-tracking-sdk/models/last_mile_mark_tracking_completed_by_id_response.rb +203 -0
  55. data/lib/aftership-tracking-sdk/models/last_mile_retrack_tracking_by_id_response.rb +203 -0
  56. data/lib/aftership-tracking-sdk/models/{next_couriers_mark_tracking_completed_by_id_response.rb → last_mile_tracking.rb} +33 -23
  57. data/lib/aftership-tracking-sdk/models/last_mile_update_tracking_by_id_response.rb +203 -0
  58. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_create_tracking_response.rb +10 -0
  59. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +10 -0
  60. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +10 -0
  61. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +10 -0
  62. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +10 -0
  63. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_tracking.rb +10 -0
  64. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_id_response.rb +10 -0
  65. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request.rb +10 -0
  66. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +53 -113
  67. data/lib/aftership-tracking-sdk/models/{meta_v1.rb → meta.rb} +2 -2
  68. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_request.rb +163 -0
  69. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_response.rb +163 -0
  70. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +6 -6
  71. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +6 -6
  72. data/lib/aftership-tracking-sdk/models/origin_address_predict_request.rb +193 -0
  73. data/lib/aftership-tracking-sdk/models/origin_address_predict_response.rb +193 -0
  74. data/lib/aftership-tracking-sdk/models/pagination_data_courier_connection_response_for_get_courier_connections.rb +173 -0
  75. data/lib/aftership-tracking-sdk/models/{pagination_data_tracking_response_get_multiple_v1.rb → pagination_data_tracking_response_for_get_trackings.rb} +2 -2
  76. data/lib/aftership-tracking-sdk/models/pagination_get_courier_connections_response.rb +173 -0
  77. data/lib/aftership-tracking-sdk/models/post_courier_connections_request.rb +163 -0
  78. data/lib/aftership-tracking-sdk/models/post_courier_connections_response.rb +193 -0
  79. data/lib/aftership-tracking-sdk/models/predict_request.rb +223 -0
  80. data/lib/aftership-tracking-sdk/models/predict_response.rb +273 -0
  81. data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_request.rb +153 -0
  82. data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_response.rb +193 -0
  83. data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +53 -113
  84. data/lib/aftership-tracking-sdk/models/{slug_group_v1.rb → slug_group.rb} +3 -3
  85. data/lib/aftership-tracking-sdk/models/{tag_v1.rb → tag.rb} +3 -3
  86. data/lib/aftership-tracking-sdk/models/tracking.rb +53 -113
  87. data/lib/aftership-tracking-sdk/models/{tracking_response_v1.rb → tracking_response.rb} +4 -4
  88. data/lib/aftership-tracking-sdk/models/{tracking_response_get_multiple_v1.rb → tracking_response_for_get_trackings.rb} +6 -6
  89. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +23 -83
  90. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +53 -113
  91. data/lib/aftership-tracking-sdk/models/weight_predict_request.rb +163 -0
  92. data/lib/aftership-tracking-sdk/models/weight_predict_response.rb +163 -0
  93. data/lib/aftership-tracking-sdk/version.rb +1 -1
  94. metadata +67 -25
  95. data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +0 -193
  96. data/lib/aftership-tracking-sdk/models/next_couriers_tracking.rb +0 -193
  97. data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_id_response.rb +0 -193
@@ -3,22 +3,10 @@
3
3
  module AftershipAPI::Model
4
4
  class UpdateTrackingByIdRequest
5
5
 
6
- # The phone number(s) to receive sms notifications. Input `[]` to clear the value of this field. Supports up to 3 phone numbers.
7
- # smses?: String[];
8
- attr_accessor :smses
9
-
10
- # Email address(es) to receive email notifications. Input `[]` to clear the value of this field. Supports up to 3 email addresses.
11
- # emails?: String[];
12
- attr_accessor :emails
13
-
14
6
  # By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number).
15
7
  # title?: String;
16
8
  attr_accessor :title
17
9
 
18
- # Customer name of the tracking.
19
- # customer_name?: String;
20
- attr_accessor :customer_name
21
-
22
10
  # A globally-unique identifier for the order.
23
11
  # order_id?: String;
24
12
  attr_accessor :order_id
@@ -67,7 +55,7 @@ module AftershipAPI::Model
67
55
  # tracking_key?: String;
68
56
  attr_accessor :tracking_key
69
57
 
70
- # Additional field required by some carriers to retrieve the tracking info. The date the shipment was sent, using the format YYYYMMDD. Refer to our article on for more details.
58
+ # The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field.
71
59
  # tracking_ship_date?: String;
72
60
  attr_accessor :tracking_ship_date
73
61
 
@@ -84,8 +72,8 @@ module AftershipAPI::Model
84
72
  attr_accessor :shipment_type
85
73
 
86
74
  # The for more details.
87
- # origin_country_iso3?: String;
88
- attr_accessor :origin_country_iso3
75
+ # origin_country_region?: String;
76
+ attr_accessor :origin_country_region
89
77
 
90
78
  # The state of the sender’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc.
91
79
  # origin_state?: String;
@@ -104,8 +92,8 @@ module AftershipAPI::Model
104
92
  attr_accessor :origin_raw_location
105
93
 
106
94
  # The for more details.
107
- # destination_country_iso3?: String;
108
- attr_accessor :destination_country_iso3
95
+ # destination_country_region?: String;
96
+ attr_accessor :destination_country_region
109
97
 
110
98
  # The state of the recipient’s address. This can help AfterShip with various functions like tracking, carrier auto-detection and auto-correction, calculating an EDD, etc. Also the additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details.
111
99
  # destination_state?: String;
@@ -123,22 +111,6 @@ module AftershipAPI::Model
123
111
  # destination_raw_location?: String;
124
112
  attr_accessor :destination_raw_location
125
113
 
126
- # (Legacy) Replaced by `origin_country_iso3`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details.
127
- # tracking_origin_country?: String;
128
- attr_accessor :tracking_origin_country
129
-
130
- # (Legacy) Replaced by `destination_country_iso3`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details.
131
- # tracking_destination_country?: String;
132
- attr_accessor :tracking_destination_country
133
-
134
- # (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details.
135
- # tracking_postal_code?: String;
136
- attr_accessor :tracking_postal_code
137
-
138
- # (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details.
139
- # tracking_state?: String;
140
- attr_accessor :tracking_state
141
-
142
114
  # The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations .
143
115
  # location_id?: String;
144
116
  attr_accessor :location_id
@@ -147,6 +119,10 @@ module AftershipAPI::Model
147
119
  # shipping_method?: String;
148
120
  attr_accessor :shipping_method
149
121
 
122
+ # The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.
123
+ # customers?: CustomersUpdateTrackingByIdRequest[];
124
+ attr_accessor :customers
125
+
150
126
  # Initializes the object
151
127
  # @param [Hash] attributes Model attributes in the form of hash
152
128
  def initialize(attributes = {})
@@ -158,22 +134,10 @@ module AftershipAPI::Model
158
134
  h[k.to_sym] = v
159
135
  }
160
136
 
161
- if attributes.key?(:'smses')
162
- self.smses = attributes[:'smses']
163
- end
164
-
165
- if attributes.key?(:'emails')
166
- self.emails = attributes[:'emails']
167
- end
168
-
169
137
  if attributes.key?(:'title')
170
138
  self.title = attributes[:'title']
171
139
  end
172
140
 
173
- if attributes.key?(:'customer_name')
174
- self.customer_name = attributes[:'customer_name']
175
- end
176
-
177
141
  if attributes.key?(:'order_id')
178
142
  self.order_id = attributes[:'order_id']
179
143
  end
@@ -238,8 +202,8 @@ module AftershipAPI::Model
238
202
  self.shipment_type = attributes[:'shipment_type']
239
203
  end
240
204
 
241
- if attributes.key?(:'origin_country_iso3')
242
- self.origin_country_iso3 = attributes[:'origin_country_iso3']
205
+ if attributes.key?(:'origin_country_region')
206
+ self.origin_country_region = attributes[:'origin_country_region']
243
207
  end
244
208
 
245
209
  if attributes.key?(:'origin_state')
@@ -258,8 +222,8 @@ module AftershipAPI::Model
258
222
  self.origin_raw_location = attributes[:'origin_raw_location']
259
223
  end
260
224
 
261
- if attributes.key?(:'destination_country_iso3')
262
- self.destination_country_iso3 = attributes[:'destination_country_iso3']
225
+ if attributes.key?(:'destination_country_region')
226
+ self.destination_country_region = attributes[:'destination_country_region']
263
227
  end
264
228
 
265
229
  if attributes.key?(:'destination_state')
@@ -278,22 +242,6 @@ module AftershipAPI::Model
278
242
  self.destination_raw_location = attributes[:'destination_raw_location']
279
243
  end
280
244
 
281
- if attributes.key?(:'tracking_origin_country')
282
- self.tracking_origin_country = attributes[:'tracking_origin_country']
283
- end
284
-
285
- if attributes.key?(:'tracking_destination_country')
286
- self.tracking_destination_country = attributes[:'tracking_destination_country']
287
- end
288
-
289
- if attributes.key?(:'tracking_postal_code')
290
- self.tracking_postal_code = attributes[:'tracking_postal_code']
291
- end
292
-
293
- if attributes.key?(:'tracking_state')
294
- self.tracking_state = attributes[:'tracking_state']
295
- end
296
-
297
245
  if attributes.key?(:'location_id')
298
246
  self.location_id = attributes[:'location_id']
299
247
  end
@@ -301,15 +249,16 @@ module AftershipAPI::Model
301
249
  if attributes.key?(:'shipping_method')
302
250
  self.shipping_method = attributes[:'shipping_method']
303
251
  end
252
+
253
+ if attributes.key?(:'customers')
254
+ self.customers = attributes[:'customers']
255
+ end
304
256
  end
305
257
 
306
258
  # Attribute type mapping.
307
259
  def self.openapi_types
308
260
  {
309
- :'smses' => :'Array<String>',
310
- :'emails' => :'Array<String>',
311
261
  :'title' => :'String',
312
- :'customer_name' => :'String',
313
262
  :'order_id' => :'String',
314
263
  :'order_id_path' => :'String',
315
264
  :'custom_fields' => :'Object',
@@ -326,32 +275,26 @@ module AftershipAPI::Model
326
275
  :'order_number' => :'String',
327
276
  :'order_date' => :'String',
328
277
  :'shipment_type' => :'String',
329
- :'origin_country_iso3' => :'String',
278
+ :'origin_country_region' => :'String',
330
279
  :'origin_state' => :'String',
331
280
  :'origin_city' => :'String',
332
281
  :'origin_postal_code' => :'String',
333
282
  :'origin_raw_location' => :'String',
334
- :'destination_country_iso3' => :'String',
283
+ :'destination_country_region' => :'String',
335
284
  :'destination_state' => :'String',
336
285
  :'destination_city' => :'String',
337
286
  :'destination_postal_code' => :'String',
338
287
  :'destination_raw_location' => :'String',
339
- :'tracking_origin_country' => :'String',
340
- :'tracking_destination_country' => :'String',
341
- :'tracking_postal_code' => :'String',
342
- :'tracking_state' => :'String',
343
288
  :'location_id' => :'String',
344
289
  :'shipping_method' => :'String',
290
+ :'customers' => :'Array<CustomersUpdateTrackingByIdRequest>',
345
291
  }
346
292
  end
347
293
 
348
294
  # Attribute mapping from ruby-style variable name to JSON key.
349
295
  def self.attribute_map
350
296
  {
351
- :'smses' => :'smses',
352
- :'emails' => :'emails',
353
297
  :'title' => :'title',
354
- :'customer_name' => :'customer_name',
355
298
  :'order_id' => :'order_id',
356
299
  :'order_id_path' => :'order_id_path',
357
300
  :'custom_fields' => :'custom_fields',
@@ -368,22 +311,19 @@ module AftershipAPI::Model
368
311
  :'order_number' => :'order_number',
369
312
  :'order_date' => :'order_date',
370
313
  :'shipment_type' => :'shipment_type',
371
- :'origin_country_iso3' => :'origin_country_iso3',
314
+ :'origin_country_region' => :'origin_country_region',
372
315
  :'origin_state' => :'origin_state',
373
316
  :'origin_city' => :'origin_city',
374
317
  :'origin_postal_code' => :'origin_postal_code',
375
318
  :'origin_raw_location' => :'origin_raw_location',
376
- :'destination_country_iso3' => :'destination_country_iso3',
319
+ :'destination_country_region' => :'destination_country_region',
377
320
  :'destination_state' => :'destination_state',
378
321
  :'destination_city' => :'destination_city',
379
322
  :'destination_postal_code' => :'destination_postal_code',
380
323
  :'destination_raw_location' => :'destination_raw_location',
381
- :'tracking_origin_country' => :'tracking_origin_country',
382
- :'tracking_destination_country' => :'tracking_destination_country',
383
- :'tracking_postal_code' => :'tracking_postal_code',
384
- :'tracking_state' => :'tracking_state',
385
324
  :'location_id' => :'location_id',
386
325
  :'shipping_method' => :'shipping_method',
326
+ :'customers' => :'customers',
387
327
  }
388
328
  end
389
329
 
@@ -3,7 +3,7 @@
3
3
  module AftershipAPI::Model
4
4
  class UpdateTrackingByIdResponse
5
5
 
6
- # Tracking ID.
6
+ # A system-generated tracking ID by default, which can be customized by the user when creating a tracking.
7
7
  # id?: String;
8
8
  attr_accessor :id
9
9
 
@@ -19,10 +19,6 @@ module AftershipAPI::Model
19
19
  # updated_at?: String;
20
20
  attr_accessor :updated_at
21
21
 
22
- # (Legacy) The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.
23
- # last_updated_at?: String;
24
- attr_accessor :last_updated_at
25
-
26
22
  # Tracking number.
27
23
  # tracking_number?: String;
28
24
  attr_accessor :tracking_number
@@ -31,7 +27,7 @@ module AftershipAPI::Model
31
27
  # slug?: String;
32
28
  attr_accessor :slug
33
29
 
34
- # Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update.
30
+ # Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.
35
31
  # active?: Boolean;
36
32
  attr_accessor :active
37
33
 
@@ -39,17 +35,13 @@ module AftershipAPI::Model
39
35
  # custom_fields?: Object;
40
36
  attr_accessor :custom_fields
41
37
 
42
- # Customer name of the tracking.
43
- # customer_name?: String;
44
- attr_accessor :customer_name
45
-
46
38
  # Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date.
47
39
  # transit_time?: Integer;
48
40
  attr_accessor :transit_time
49
41
 
50
42
  # The for the origin country/region. E.g. USA for the United States.
51
- # origin_country_iso3?: String;
52
- attr_accessor :origin_country_iso3
43
+ # origin_country_region?: String;
44
+ attr_accessor :origin_country_region
53
45
 
54
46
  # The state of the sender’s address.
55
47
  # origin_state?: String;
@@ -68,8 +60,8 @@ module AftershipAPI::Model
68
60
  attr_accessor :origin_raw_location
69
61
 
70
62
  # The for the destination country/region. E.g. USA for the United States.
71
- # destination_country_iso3?: String;
72
- attr_accessor :destination_country_iso3
63
+ # destination_country_region?: String;
64
+ attr_accessor :destination_country_region
73
65
 
74
66
  # The state of the recipient’s address.
75
67
  # destination_state?: String;
@@ -88,12 +80,8 @@ module AftershipAPI::Model
88
80
  attr_accessor :destination_raw_location
89
81
 
90
82
  # Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country.
91
- # courier_destination_country_iso3?: String;
92
- attr_accessor :courier_destination_country_iso3
93
-
94
- # Email address(es) to receive email notifications.
95
- # emails?: String[];
96
- attr_accessor :emails
83
+ # courier_destination_country_region?: String;
84
+ attr_accessor :courier_destination_country_region
97
85
 
98
86
  # The field contains the estimated delivery date provided by the carrier.
99
87
  # courier_estimated_delivery_date?: CourierEstimatedDeliveryDateUpdateTrackingByIdResponse;
@@ -139,16 +127,12 @@ module AftershipAPI::Model
139
127
  # signed_by?: String;
140
128
  attr_accessor :signed_by
141
129
 
142
- # The phone number(s) to receive sms notifications. Phone number should begin with `+` and `Area Code` before phone number.
143
- # smses?: String[];
144
- attr_accessor :smses
145
-
146
130
  # Source of how this tracking is added.
147
131
  # source?: String;
148
132
  attr_accessor :source
149
133
 
150
134
  # Current status of tracking. (
151
- # tag?: TagV1;
135
+ # tag?: Tag;
152
136
  attr_accessor :tag
153
137
 
154
138
  # Current subtag of tracking. (
@@ -231,7 +215,7 @@ module AftershipAPI::Model
231
215
  # tracking_key?: String;
232
216
  attr_accessor :tracking_key
233
217
 
234
- # Additional field required by some carriers to retrieve the tracking info. The date the shipment was sent, using the format YYYYMMDD. Refer to our article on for more details.
218
+ # The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field.
235
219
  # tracking_ship_date?: String;
236
220
  attr_accessor :tracking_ship_date
237
221
 
@@ -275,26 +259,6 @@ module AftershipAPI::Model
275
259
  # courier_connection_id?: String;
276
260
  attr_accessor :courier_connection_id
277
261
 
278
- # The next couriers get the second carrier information from user or AfterShip.
279
- # next_couriers?: NextCouriersUpdateTrackingByIdResponse[];
280
- attr_accessor :next_couriers
281
-
282
- # (Legacy) Replaced by `origin_country_iso3`. Additional field required by some carriers to retrieve the tracking info. The origin country/region of the shipment. Refer to our article on for more details.
283
- # tracking_origin_country?: String;
284
- attr_accessor :tracking_origin_country
285
-
286
- # (Legacy) Replaced by `destination_country_iso3`. Additional field required by some carriers to retrieve the tracking info. The destination country/region of the shipment. Refer to our article on for more details.
287
- # tracking_destination_country?: String;
288
- attr_accessor :tracking_destination_country
289
-
290
- # (Legacy) Replaced by `destination_postal_code`. Additional field required by some carriers to retrieve the tracking info. The postal code of the recipient’s address. Refer to our article on for more details.
291
- # tracking_postal_code?: String;
292
- attr_accessor :tracking_postal_code
293
-
294
- # (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details.
295
- # tracking_state?: String;
296
- attr_accessor :tracking_state
297
-
298
262
  # The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more.
299
263
  # carbon_emissions?: CarbonEmissionsUpdateTrackingByIdResponse;
300
264
  attr_accessor :carbon_emissions
@@ -327,6 +291,18 @@ module AftershipAPI::Model
327
291
  # aftership_tracking_order_url?: String;
328
292
  attr_accessor :aftership_tracking_order_url
329
293
 
294
+ # The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object.
295
+ # first_mile?: FirstMileUpdateTrackingByIdResponse;
296
+ attr_accessor :first_mile
297
+
298
+ # This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically.
299
+ # last_mile?: LastMileUpdateTrackingByIdResponse;
300
+ attr_accessor :last_mile
301
+
302
+ # The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.
303
+ # customers?: CustomersUpdateTrackingByIdResponse[];
304
+ attr_accessor :customers
305
+
330
306
  # Initializes the object
331
307
  # @param [Hash] attributes Model attributes in the form of hash
332
308
  def initialize(attributes = {})
@@ -354,10 +330,6 @@ module AftershipAPI::Model
354
330
  self.updated_at = attributes[:'updated_at']
355
331
  end
356
332
 
357
- if attributes.key?(:'last_updated_at')
358
- self.last_updated_at = attributes[:'last_updated_at']
359
- end
360
-
361
333
  if attributes.key?(:'tracking_number')
362
334
  self.tracking_number = attributes[:'tracking_number']
363
335
  end
@@ -374,16 +346,12 @@ module AftershipAPI::Model
374
346
  self.custom_fields = attributes[:'custom_fields']
375
347
  end
376
348
 
377
- if attributes.key?(:'customer_name')
378
- self.customer_name = attributes[:'customer_name']
379
- end
380
-
381
349
  if attributes.key?(:'transit_time')
382
350
  self.transit_time = attributes[:'transit_time']
383
351
  end
384
352
 
385
- if attributes.key?(:'origin_country_iso3')
386
- self.origin_country_iso3 = attributes[:'origin_country_iso3']
353
+ if attributes.key?(:'origin_country_region')
354
+ self.origin_country_region = attributes[:'origin_country_region']
387
355
  end
388
356
 
389
357
  if attributes.key?(:'origin_state')
@@ -402,8 +370,8 @@ module AftershipAPI::Model
402
370
  self.origin_raw_location = attributes[:'origin_raw_location']
403
371
  end
404
372
 
405
- if attributes.key?(:'destination_country_iso3')
406
- self.destination_country_iso3 = attributes[:'destination_country_iso3']
373
+ if attributes.key?(:'destination_country_region')
374
+ self.destination_country_region = attributes[:'destination_country_region']
407
375
  end
408
376
 
409
377
  if attributes.key?(:'destination_state')
@@ -422,12 +390,8 @@ module AftershipAPI::Model
422
390
  self.destination_raw_location = attributes[:'destination_raw_location']
423
391
  end
424
392
 
425
- if attributes.key?(:'courier_destination_country_iso3')
426
- self.courier_destination_country_iso3 = attributes[:'courier_destination_country_iso3']
427
- end
428
-
429
- if attributes.key?(:'emails')
430
- self.emails = attributes[:'emails']
393
+ if attributes.key?(:'courier_destination_country_region')
394
+ self.courier_destination_country_region = attributes[:'courier_destination_country_region']
431
395
  end
432
396
 
433
397
  if attributes.key?(:'courier_estimated_delivery_date')
@@ -474,10 +438,6 @@ module AftershipAPI::Model
474
438
  self.signed_by = attributes[:'signed_by']
475
439
  end
476
440
 
477
- if attributes.key?(:'smses')
478
- self.smses = attributes[:'smses']
479
- end
480
-
481
441
  if attributes.key?(:'source')
482
442
  self.source = attributes[:'source']
483
443
  end
@@ -610,26 +570,6 @@ module AftershipAPI::Model
610
570
  self.courier_connection_id = attributes[:'courier_connection_id']
611
571
  end
612
572
 
613
- if attributes.key?(:'next_couriers')
614
- self.next_couriers = attributes[:'next_couriers']
615
- end
616
-
617
- if attributes.key?(:'tracking_origin_country')
618
- self.tracking_origin_country = attributes[:'tracking_origin_country']
619
- end
620
-
621
- if attributes.key?(:'tracking_destination_country')
622
- self.tracking_destination_country = attributes[:'tracking_destination_country']
623
- end
624
-
625
- if attributes.key?(:'tracking_postal_code')
626
- self.tracking_postal_code = attributes[:'tracking_postal_code']
627
- end
628
-
629
- if attributes.key?(:'tracking_state')
630
- self.tracking_state = attributes[:'tracking_state']
631
- end
632
-
633
573
  if attributes.key?(:'carbon_emissions')
634
574
  self.carbon_emissions = attributes[:'carbon_emissions']
635
575
  end
@@ -661,6 +601,18 @@ module AftershipAPI::Model
661
601
  if attributes.key?(:'aftership_tracking_order_url')
662
602
  self.aftership_tracking_order_url = attributes[:'aftership_tracking_order_url']
663
603
  end
604
+
605
+ if attributes.key?(:'first_mile')
606
+ self.first_mile = attributes[:'first_mile']
607
+ end
608
+
609
+ if attributes.key?(:'last_mile')
610
+ self.last_mile = attributes[:'last_mile']
611
+ end
612
+
613
+ if attributes.key?(:'customers')
614
+ self.customers = attributes[:'customers']
615
+ end
664
616
  end
665
617
 
666
618
  # Attribute type mapping.
@@ -670,25 +622,22 @@ module AftershipAPI::Model
670
622
  :'legacy_id' => :'String',
671
623
  :'created_at' => :'String',
672
624
  :'updated_at' => :'String',
673
- :'last_updated_at' => :'String',
674
625
  :'tracking_number' => :'String',
675
626
  :'slug' => :'String',
676
627
  :'active' => :'Boolean',
677
628
  :'custom_fields' => :'Object',
678
- :'customer_name' => :'String',
679
629
  :'transit_time' => :'Integer',
680
- :'origin_country_iso3' => :'String',
630
+ :'origin_country_region' => :'String',
681
631
  :'origin_state' => :'String',
682
632
  :'origin_city' => :'String',
683
633
  :'origin_postal_code' => :'String',
684
634
  :'origin_raw_location' => :'String',
685
- :'destination_country_iso3' => :'String',
635
+ :'destination_country_region' => :'String',
686
636
  :'destination_state' => :'String',
687
637
  :'destination_city' => :'String',
688
638
  :'destination_postal_code' => :'String',
689
639
  :'destination_raw_location' => :'String',
690
- :'courier_destination_country_iso3' => :'String',
691
- :'emails' => :'Array<String>',
640
+ :'courier_destination_country_region' => :'String',
692
641
  :'courier_estimated_delivery_date' => :'CourierEstimatedDeliveryDateUpdateTrackingByIdResponse',
693
642
  :'note' => :'String',
694
643
  :'order_id' => :'String',
@@ -700,9 +649,8 @@ module AftershipAPI::Model
700
649
  :'shipment_type' => :'String',
701
650
  :'shipment_weight' => :'ShipmentWeightUpdateTrackingByIdResponse',
702
651
  :'signed_by' => :'String',
703
- :'smses' => :'Array<String>',
704
652
  :'source' => :'String',
705
- :'tag' => :'TagV1',
653
+ :'tag' => :'Tag',
706
654
  :'subtag' => :'String',
707
655
  :'subtag_message' => :'String',
708
656
  :'title' => :'String',
@@ -734,11 +682,6 @@ module AftershipAPI::Model
734
682
  :'latest_estimated_delivery' => :'LatestEstimatedDeliveryUpdateTrackingByIdResponse',
735
683
  :'shipment_tags' => :'Array<String>',
736
684
  :'courier_connection_id' => :'String',
737
- :'next_couriers' => :'Array<NextCouriersUpdateTrackingByIdResponse>',
738
- :'tracking_origin_country' => :'String',
739
- :'tracking_destination_country' => :'String',
740
- :'tracking_postal_code' => :'String',
741
- :'tracking_state' => :'String',
742
685
  :'carbon_emissions' => :'CarbonEmissionsUpdateTrackingByIdResponse',
743
686
  :'location_id' => :'String',
744
687
  :'shipping_method' => :'String',
@@ -747,6 +690,9 @@ module AftershipAPI::Model
747
690
  :'delivery_location_type' => :'String',
748
691
  :'aftership_tracking_url' => :'String',
749
692
  :'aftership_tracking_order_url' => :'String',
693
+ :'first_mile' => :'FirstMileUpdateTrackingByIdResponse',
694
+ :'last_mile' => :'LastMileUpdateTrackingByIdResponse',
695
+ :'customers' => :'Array<CustomersUpdateTrackingByIdResponse>',
750
696
  }
751
697
  end
752
698
 
@@ -757,25 +703,22 @@ module AftershipAPI::Model
757
703
  :'legacy_id' => :'legacy_id',
758
704
  :'created_at' => :'created_at',
759
705
  :'updated_at' => :'updated_at',
760
- :'last_updated_at' => :'last_updated_at',
761
706
  :'tracking_number' => :'tracking_number',
762
707
  :'slug' => :'slug',
763
708
  :'active' => :'active',
764
709
  :'custom_fields' => :'custom_fields',
765
- :'customer_name' => :'customer_name',
766
710
  :'transit_time' => :'transit_time',
767
- :'origin_country_iso3' => :'origin_country_iso3',
711
+ :'origin_country_region' => :'origin_country_region',
768
712
  :'origin_state' => :'origin_state',
769
713
  :'origin_city' => :'origin_city',
770
714
  :'origin_postal_code' => :'origin_postal_code',
771
715
  :'origin_raw_location' => :'origin_raw_location',
772
- :'destination_country_iso3' => :'destination_country_iso3',
716
+ :'destination_country_region' => :'destination_country_region',
773
717
  :'destination_state' => :'destination_state',
774
718
  :'destination_city' => :'destination_city',
775
719
  :'destination_postal_code' => :'destination_postal_code',
776
720
  :'destination_raw_location' => :'destination_raw_location',
777
- :'courier_destination_country_iso3' => :'courier_destination_country_iso3',
778
- :'emails' => :'emails',
721
+ :'courier_destination_country_region' => :'courier_destination_country_region',
779
722
  :'courier_estimated_delivery_date' => :'courier_estimated_delivery_date',
780
723
  :'note' => :'note',
781
724
  :'order_id' => :'order_id',
@@ -787,7 +730,6 @@ module AftershipAPI::Model
787
730
  :'shipment_type' => :'shipment_type',
788
731
  :'shipment_weight' => :'shipment_weight',
789
732
  :'signed_by' => :'signed_by',
790
- :'smses' => :'smses',
791
733
  :'source' => :'source',
792
734
  :'tag' => :'tag',
793
735
  :'subtag' => :'subtag',
@@ -821,11 +763,6 @@ module AftershipAPI::Model
821
763
  :'latest_estimated_delivery' => :'latest_estimated_delivery',
822
764
  :'shipment_tags' => :'shipment_tags',
823
765
  :'courier_connection_id' => :'courier_connection_id',
824
- :'next_couriers' => :'next_couriers',
825
- :'tracking_origin_country' => :'tracking_origin_country',
826
- :'tracking_destination_country' => :'tracking_destination_country',
827
- :'tracking_postal_code' => :'tracking_postal_code',
828
- :'tracking_state' => :'tracking_state',
829
766
  :'carbon_emissions' => :'carbon_emissions',
830
767
  :'location_id' => :'location_id',
831
768
  :'shipping_method' => :'shipping_method',
@@ -834,6 +771,9 @@ module AftershipAPI::Model
834
771
  :'delivery_location_type' => :'delivery_location_type',
835
772
  :'aftership_tracking_url' => :'aftership_tracking_url',
836
773
  :'aftership_tracking_order_url' => :'aftership_tracking_order_url',
774
+ :'first_mile' => :'first_mile',
775
+ :'last_mile' => :'last_mile',
776
+ :'customers' => :'customers',
837
777
  }
838
778
  end
839
779