aftership-tracking-sdk 9.0.0 → 10.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +14 -13
  4. data/lib/aftership-tracking-sdk/api/courier.rb +3 -3
  5. data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +55 -1
  6. data/lib/aftership-tracking-sdk/api/tracking.rb +16 -16
  7. data/lib/aftership-tracking-sdk/models/additional_fields_v1.rb +3 -3
  8. data/lib/aftership-tracking-sdk/models/checkpoint.rb +22 -12
  9. data/lib/aftership-tracking-sdk/models/courier.rb +7 -7
  10. data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +47 -67
  11. data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +63 -83
  12. data/lib/aftership-tracking-sdk/models/{next_couriers_tracking.rb → customers_create_tracking_request.rb} +37 -37
  13. data/lib/aftership-tracking-sdk/models/customers_create_tracking_response.rb +193 -0
  14. data/lib/aftership-tracking-sdk/models/customers_delete_tracking_by_id_response.rb +193 -0
  15. data/lib/aftership-tracking-sdk/models/customers_get_tracking_by_id_response.rb +193 -0
  16. data/lib/aftership-tracking-sdk/models/customers_mark_tracking_completed_by_id_response.rb +193 -0
  17. data/lib/aftership-tracking-sdk/models/customers_retrack_tracking_by_id_response.rb +193 -0
  18. data/lib/aftership-tracking-sdk/models/customers_tracking.rb +193 -0
  19. data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_request.rb +193 -0
  20. data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_response.rb +193 -0
  21. data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +63 -83
  22. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +6 -6
  23. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +6 -6
  24. data/lib/aftership-tracking-sdk/models/destination_address_predict_request.rb +193 -0
  25. data/lib/aftership-tracking-sdk/models/destination_address_predict_response.rb +193 -0
  26. data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +24 -24
  27. data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_request.rb +183 -0
  28. data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_response.rb +193 -0
  29. data/lib/aftership-tracking-sdk/models/{next_couriers_delete_tracking_by_id_response.rb → first_mile_create_tracking_response.rb} +29 -29
  30. data/lib/aftership-tracking-sdk/models/{next_couriers_get_tracking_by_id_response.rb → first_mile_delete_tracking_by_id_response.rb} +29 -29
  31. data/lib/aftership-tracking-sdk/models/first_mile_get_tracking_by_id_response.rb +193 -0
  32. data/lib/aftership-tracking-sdk/models/first_mile_mark_tracking_completed_by_id_response.rb +193 -0
  33. data/lib/aftership-tracking-sdk/models/first_mile_retrack_tracking_by_id_response.rb +193 -0
  34. data/lib/aftership-tracking-sdk/models/{next_couriers_mark_tracking_completed_by_id_response.rb → first_mile_tracking.rb} +29 -29
  35. data/lib/aftership-tracking-sdk/models/first_mile_update_tracking_by_id_response.rb +193 -0
  36. data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +63 -83
  37. data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_request.rb → last_mile_create_tracking_request.rb} +13 -13
  38. data/lib/aftership-tracking-sdk/models/last_mile_create_tracking_response.rb +203 -0
  39. data/lib/aftership-tracking-sdk/models/last_mile_delete_tracking_by_id_response.rb +203 -0
  40. data/lib/aftership-tracking-sdk/models/last_mile_get_tracking_by_id_response.rb +203 -0
  41. data/lib/aftership-tracking-sdk/models/last_mile_mark_tracking_completed_by_id_response.rb +203 -0
  42. data/lib/aftership-tracking-sdk/models/last_mile_retrack_tracking_by_id_response.rb +203 -0
  43. data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_response.rb → last_mile_tracking.rb} +33 -23
  44. data/lib/aftership-tracking-sdk/models/last_mile_update_tracking_by_id_response.rb +203 -0
  45. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +63 -83
  46. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_request.rb +163 -0
  47. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_response.rb +163 -0
  48. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +6 -6
  49. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +6 -6
  50. data/lib/aftership-tracking-sdk/models/origin_address_predict_request.rb +193 -0
  51. data/lib/aftership-tracking-sdk/models/origin_address_predict_response.rb +193 -0
  52. data/lib/aftership-tracking-sdk/models/predict_request.rb +223 -0
  53. data/lib/aftership-tracking-sdk/models/predict_response.rb +273 -0
  54. data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +63 -83
  55. data/lib/aftership-tracking-sdk/models/tracking.rb +63 -83
  56. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +37 -57
  57. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +63 -83
  58. data/lib/aftership-tracking-sdk/models/weight_predict_request.rb +163 -0
  59. data/lib/aftership-tracking-sdk/models/weight_predict_response.rb +163 -0
  60. data/lib/aftership-tracking-sdk/version.rb +1 -1
  61. metadata +41 -13
  62. data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +0 -193
  63. data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_id_response.rb +0 -193
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d9d12ffc6b5d7c5d11af738b1f88ebd102376ebe94f368eb517f8cee2fe7a9a
4
- data.tar.gz: 530e87b908b936d8f9279cdf39e4c56583b651afe0a05121297ed05a10d785e7
3
+ metadata.gz: bcaae1dbe0f4f17afeb9938bf331240e48bb821ae0833e15887faa690367d8c1
4
+ data.tar.gz: e1740ed9eb9f88d2786a0f3dbe2620369176bca385c4b2ca707dc83bfc99bbb6
5
5
  SHA512:
6
- metadata.gz: 3d0feb6a923e8ce8a90c8f45e1ed8fb4b24fa36986f5cbebfb43b4dff2e0cb3c0f24ebde2503b31824ac1b0986f1d86b407c672eb2f8efbf1c2a9466d61256cc
7
- data.tar.gz: 716dab6a4e838afc02c865b53c6bcc7d6306633166abf6788c5edaf21cb90ec38835e0ae67632bc193140b7d97c69d8769501757afb8f691c92bd36d82edfc90
6
+ metadata.gz: 58f2e8c868cf552bcdb5d8ca549d8225ae84edc643e343a37b18ae3f184a20f01eb5cf752fc9f9516445c8f75c472c3d5bf5a4b358515bbe5337dc6828f3f064
7
+ data.tar.gz: 6156e693a96f7d9ef3413003df2601b45a77ae17d44cae796a4ffa9179f03b2c68a0e8c515d8fac92356ffd849487ab49790c86332906ac049e9df47b2dee519
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 AfterShip
3
+ Copyright (c) 2025 AfterShip
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -42,6 +42,7 @@ Each SDK version is designed to work with a specific API version. Please refer t
42
42
 
43
43
  | SDK Version | Supported API Version | Branch |
44
44
  | ----------- | --------------------- | ----------------------------------------------------------- |
45
+ | 10.x.x | 2025-01 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2025-01 |
45
46
  | 9.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-10 |
46
47
  | 8.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-07 |
47
48
  | 7.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-ruby/tree/2024-04 |
@@ -57,7 +58,7 @@ gem install aftership-tracking-sdk
57
58
  Or add a line to your Gemfile
58
59
 
59
60
  ```bash
60
- gem 'aftership-tracking-sdk', '~> 9.0.0'
61
+ gem 'aftership-tracking-sdk', '~> 10.0.0'
61
62
  ```
62
63
 
63
64
  ## Constructor
@@ -94,20 +95,20 @@ end
94
95
 
95
96
  ## Rate Limiter
96
97
 
97
- See the [Rate Limit](https://www.aftership.com/docs/tracking/2024-10/quickstart/rate-limit) to understand the AfterShip rate limit policy.
98
+ See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-01/quickstart/rate-limit) to understand the AfterShip rate limit policy.
98
99
 
99
100
  ## Error Handling
100
101
 
101
102
  The SDK will return an error object when there is any error during the request, with the following specification:
102
103
 
103
- | Name | Type | Description |
104
- | ------------- | ------ | ------------------------------ |
105
- | message | string | Detail message of the error |
106
- | code | enum | Error code enum for API Error. |
107
- | meta_code | number | API response meta code. |
108
- | status_code | number | HTTP status code. |
109
- | response_body | string | API response body. |
110
-
104
+ | Name | Type | Description |
105
+ | --------------- | ------ | ------------------------------ |
106
+ | message | string | Detail message of the error |
107
+ | code | enum | Error code enum for API Error. |
108
+ | meta_code | number | API response meta code. |
109
+ | status_code | number | HTTP status code. |
110
+ | response_body | string | API response body. |
111
+ | response_headers | object | API response header. |
111
112
 
112
113
  ### Error List
113
114
 
@@ -241,11 +242,11 @@ edd = AftershipAPI::Model::EstimatedDeliveryDateRequest.new
241
242
  edd.slug = "<slug>"
242
243
  edd.pickup_time = "2024-08-01 06:42:30"
243
244
  origin = AftershipAPI::Model::OriginAddressEstimatedDeliveryDateRequest.new
244
- origin.country = "<ISO 3166-1 country/region code>"
245
+ origin.country_region = "<ISO 3166-1 country/region code>"
245
246
  origin.state = "<ISO 3166-1 country/region code>"
246
247
 
247
248
  dest = AftershipAPI::Model::DestinationAddressEstimatedDeliveryDateRequest.new
248
- dest.country = "<ISO 3166-1 country/region code>"
249
+ dest.country_region = "<ISO 3166-1 country/region code>"
249
250
  dest.state = "<ISO 3166-1 country/region code>"
250
251
 
251
252
  edd.origin_address = origin
@@ -265,6 +266,6 @@ If you get stuck, we're here to help:
265
266
  - Contact AfterShip official support via support@aftership.com
266
267
 
267
268
  ## License
268
- Copyright (c) 2024 AfterShip
269
+ Copyright (c) 2025 AfterShip
269
270
 
270
271
  Licensed under the MIT license.
@@ -33,7 +33,7 @@ module AftershipAPI
33
33
 
34
34
 
35
35
  # resource path
36
- local_var_path = "/tracking/2024-10/couriers/detect"
36
+ local_var_path = "/tracking/2025-01/couriers/detect"
37
37
  method = :'POST'
38
38
 
39
39
  # query parameters
@@ -81,7 +81,7 @@ module AftershipAPI
81
81
 
82
82
 
83
83
  # resource path
84
- local_var_path = "/tracking/2024-10/couriers/all"
84
+ local_var_path = "/tracking/2025-01/couriers/all"
85
85
  method = :'GET'
86
86
 
87
87
  # query parameters
@@ -129,7 +129,7 @@ module AftershipAPI
129
129
 
130
130
 
131
131
  # resource path
132
- local_var_path = "/tracking/2024-10/couriers"
132
+ local_var_path = "/tracking/2025-01/couriers"
133
133
  method = :'GET'
134
134
 
135
135
  # query parameters
@@ -10,6 +10,60 @@ module AftershipAPI
10
10
  @api_client = api_client
11
11
  end
12
12
 
13
+ # predict
14
+ # > The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.You can use to activate this feature.
15
+
16
+ # @param body [Model::PredictRequest]
17
+ # @param [Hash] opts the optional parameters
18
+ # @return [Model::PredictResponse]
19
+ def predict(body:,opts: {})
20
+ if "" != ""
21
+ body = {:'' => body}
22
+ end
23
+ opts[:body] = body
24
+ data, _status_code, _headers = predict_with_http_info(opts: opts)
25
+ data
26
+ end
27
+
28
+ def predict_with_http_info(opts: {})
29
+ if @api_client.config.debugging
30
+ @api_client.config.logger.debug 'Calling API: EstimatedDeliveryDateApi.predict ...'
31
+ end
32
+
33
+
34
+
35
+ # resource path
36
+ local_var_path = "/tracking/2025-01/estimated-delivery-date/predict"
37
+ method = :'POST'
38
+
39
+ # query parameters
40
+ query_params = opts[:query_params] || {}
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+
44
+ # http body (model)
45
+ post_body = opts[:body]
46
+
47
+ # return_type
48
+ return_type = 'PredictResponse'
49
+
50
+ new_options = opts.merge(
51
+ :operation => :"EstimatedDeliveryDateApi.predict",
52
+ :header_params => header_params,
53
+ :query_params => query_params,
54
+ :body => post_body,
55
+ :return_type => return_type,
56
+ :response_legacy_tag => "",
57
+ :is_paging => false
58
+ )
59
+
60
+ data, status_code, headers = @api_client.call_api(method, local_var_path, new_options)
61
+ if @api_client.config.debugging
62
+ @api_client.config.logger.debug "API called: EstimatedDeliveryDateApi#predict\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
63
+ end
64
+ return data, status_code, headers
65
+ end
66
+
13
67
  # predict_batch
14
68
  # > The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.You can use to activate this feature.Supported functionalities require:1. One `EstimatedDeliveryDate` object for one prediction result.2. Maximum 5 `EstimatedDeliveryDate` objects are allowed.3. API call will fail if any of the requests `EstimatedDeliveryDate` objects do not meet the specification requirement.
15
69
 
@@ -33,7 +87,7 @@ module AftershipAPI
33
87
 
34
88
 
35
89
  # resource path
36
- local_var_path = "/tracking/2024-10/estimated-delivery-date/predict-batch"
90
+ local_var_path = "/tracking/2025-01/estimated-delivery-date/predict-batch"
37
91
  method = :'POST'
38
92
 
39
93
  # query parameters
@@ -33,7 +33,7 @@ module AftershipAPI
33
33
 
34
34
 
35
35
  # resource path
36
- local_var_path = "/tracking/2024-10/trackings"
36
+ local_var_path = "/tracking/2025-01/trackings"
37
37
  method = :'POST'
38
38
 
39
39
  # query parameters
@@ -85,7 +85,7 @@ module AftershipAPI
85
85
 
86
86
 
87
87
  # resource path
88
- local_var_path = "/tracking/2024-10/trackings/#{id}"
88
+ local_var_path = "/tracking/2025-01/trackings/#{id}"
89
89
  method = :'DELETE'
90
90
 
91
91
  # query parameters
@@ -120,7 +120,7 @@ module AftershipAPI
120
120
  # Get tracking results of a single tracking.
121
121
  # @param id [String] tracking ID
122
122
  # @param [Hash] opts the optional parameters
123
- # @option opts [String] :fields List of fields to include in the response. Use comma for multiple values. Fields to include: `tracking_postal_code`, `tracking_ship_date`, `tracking_account_number`, `tracking_key`, `tracking_origin_country`, `tracking_destination_country`, `tracking_state`, `title`, `order_id`, `tag`, `checkpoints`
123
+ # @option opts [String] :fields List of fields to include in the response. Use comma for multiple values. Fields to include: `tracking_postal_code`, `tracking_ship_date`, `tracking_account_number`, `tracking_key`, `tracking_origin_country_region`, `tracking_destination_country_region`, `tracking_state`, `title`, `order_id`, `tag`, `checkpoints`
124
124
  # @option opts [String] :lang Translate checkpoint messages from the carrier’s provided language to the target language. Supported target languages include:</br>&nbsp;&nbsp;&nbsp;&nbsp;- English (en)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French (fr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French Canadian (fr-CA)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Arabic (ar)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Bulgarian (bg)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Catalan (ca)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Croatian (hr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Czech (cs)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Danish (da)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Dutch (nl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Estonian (et)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Filipino (tl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Finnish (fi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- German (de)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Greek (el)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hebrew (he)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hindi (hi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hungarian (hu)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Indonesian (id)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Italian (it)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Japanese (ja)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Korean (ko)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Latvian (lv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Lithuanian (lt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Malay (ms)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Polish (pl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Portuguese (pt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Romanian (ro)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Russian (ru)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Serbian (sr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovak (sk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovenian (sl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Spanish (es)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Swedish (sv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Thai (th)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Turkish (tr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Ukrainian (uk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Vietnamese (vi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Simplified Chinese (zh-Hans)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Traditional Chinese (zh-Hant)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Norwegian (nb)</br>
125
125
  # @return [Model::GetTrackingByIdResponse]
126
126
  def get_tracking_by_id(id:, opts: {})
@@ -139,7 +139,7 @@ module AftershipAPI
139
139
 
140
140
 
141
141
  # resource path
142
- local_var_path = "/tracking/2024-10/trackings/#{id}"
142
+ local_var_path = "/tracking/2025-01/trackings/#{id}"
143
143
  method = :'GET'
144
144
 
145
145
  # query parameters
@@ -177,20 +177,20 @@ module AftershipAPI
177
177
  # @param [Hash] opts the optional parameters
178
178
  # @option opts [String] :cursor A string representing the cursor value for the current page of results.
179
179
  # @option opts [Integer] :limit Number of trackings each page contain. (Default: 100, Max: 200)
180
- # @option opts [String] :keyword Search the content of the tracking record fields: `tracking_number`, `title`, `order_id`, `customer_name`, `custom_fields`, `emails`, `smses`
180
+ # @option opts [String] :keyword Search the content of the tracking record fields: `tracking_number`, `title`, `order_id`, `customers[x].name`, `custom_fields`, `customers[x].email`, `customers[x].phone_number`
181
181
  # @option opts [String] :tracking_numbers Tracking number of shipments. Use comma to separate multiple values (Example: RA123456789US,LE123456789US). Supports up to 50 tracking numbers.
182
182
  # @option opts [String] :slug Unique courier code Use comma for multiple values. (Example: dhl,ups,usps)
183
183
  # @option opts [Integer] :transit_time Total delivery time in days.- When the shipment is delivered: Transit time = Delivered date - Picked up date- When the shipment is not delivered: Transit time = Current date - Picked up dateValue as `null` for the shipment without pickup date.
184
184
  # @option opts [String] :origin Origin country/region of trackings. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)
185
185
  # @option opts [String] :destination Destination country/region of trackings. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)
186
186
  # @option opts [String] :tag Current status of tracking. Values include `Pending`, `InfoReceived`, `InTransit`, `OutForDelivery`, `AttemptFail`, `Delivered`, `AvailableForPickup`, `Exception`, `Expired` (See tag definition)
187
- # @option opts [String] :created_at_min Start date and time of trackings created. AfterShip only stores data of 120 days.(Defaults: 30 days ago, Example: 2013-03-15T16:41:56+08:00)
188
- # @option opts [String] :created_at_max End date and time of trackings created.(Defaults: now, Example: 2013-04-15T16:41:56+08:00)
189
- # @option opts [String] :updated_at_min Start date and time of trackings updated. (Example: 2013-04-15T16:41:56+08:00)
190
- # @option opts [String] :updated_at_max End date and time of trackings updated. (Example: 2013-04-15T16:41:56+08:00)
187
+ # @option opts [String] :created_at_min Start date and time of trackings created. AfterShip only stores data of 120 days. Please make sure the value of the parameter is properly escaped in
188
+ # @option opts [String] :created_at_max End date and time of trackings created. Please make sure the value of the parameter is properly escaped in
189
+ # @option opts [String] :updated_at_min Start date and time of trackings updated. Please make sure the value of the parameter is properly escaped in
190
+ # @option opts [String] :updated_at_max End date and time of trackings updated. Please make sure the value of the parameter is properly escaped in
191
191
  # @option opts [String] :fields List of fields to include in the response. Use comma for multiple values. Available options: `title`, `order_id`, `tag`, `checkpoints`. Example: `title,order_id`
192
192
  # @option opts [String] :return_to_sender Select return to sender, the value should be `true` or `false`, with optional comma separated.
193
- # @option opts [String] :courier_destination_country_iso3 Destination country/region of trackings returned by courier. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)
193
+ # @option opts [String] :courier_destination_country_region Destination country/region of trackings returned by courier. Use ISO Alpha-3 (three letters). Use comma for multiple values. (Example: USA,HKG)
194
194
  # @option opts [String] :shipment_tags Tags you added to your shipments to help categorize and filter them easily. Use a comma to separate multiple values (Example: a,b)
195
195
  # @option opts [String] :order_id A globally-unique identifier for the order. Use comma for multiple values.(Example: 6845a095a27a4caeb27487806f058add,4845a095a27a4caeb27487806f058abc)
196
196
  # @return [Model::GetTrackingsResponse]
@@ -207,7 +207,7 @@ module AftershipAPI
207
207
 
208
208
 
209
209
  # resource path
210
- local_var_path = "/tracking/2024-10/trackings"
210
+ local_var_path = "/tracking/2025-01/trackings"
211
211
  method = :'GET'
212
212
 
213
213
  # query parameters
@@ -227,7 +227,7 @@ module AftershipAPI
227
227
  query_params[:'updated_at_max'] = opts[:'updated_at_max'] if !opts[:'updated_at_max'].nil?
228
228
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
229
229
  query_params[:'return_to_sender'] = opts[:'return_to_sender'] if !opts[:'return_to_sender'].nil?
230
- query_params[:'courier_destination_country_iso3'] = opts[:'courier_destination_country_iso3'] if !opts[:'courier_destination_country_iso3'].nil?
230
+ query_params[:'courier_destination_country_region'] = opts[:'courier_destination_country_region'] if !opts[:'courier_destination_country_region'].nil?
231
231
  query_params[:'shipment_tags'] = opts[:'shipment_tags'] if !opts[:'shipment_tags'].nil?
232
232
  query_params[:'order_id'] = opts[:'order_id'] if !opts[:'order_id'].nil?
233
233
  # header parameters
@@ -246,7 +246,7 @@ module AftershipAPI
246
246
  :body => post_body,
247
247
  :return_type => return_type,
248
248
  :response_legacy_tag => "",
249
- :is_paging => false
249
+ :is_paging => true
250
250
  )
251
251
 
252
252
  data, status_code, headers = @api_client.call_api(method, local_var_path, new_options)
@@ -283,7 +283,7 @@ module AftershipAPI
283
283
 
284
284
 
285
285
  # resource path
286
- local_var_path = "/tracking/2024-10/trackings/#{id}/mark-as-completed"
286
+ local_var_path = "/tracking/2025-01/trackings/#{id}/mark-as-completed"
287
287
  method = :'POST'
288
288
 
289
289
  # query parameters
@@ -335,7 +335,7 @@ module AftershipAPI
335
335
 
336
336
 
337
337
  # resource path
338
- local_var_path = "/tracking/2024-10/trackings/#{id}/retrack"
338
+ local_var_path = "/tracking/2025-01/trackings/#{id}/retrack"
339
339
  method = :'POST'
340
340
 
341
341
  # query parameters
@@ -393,7 +393,7 @@ module AftershipAPI
393
393
 
394
394
 
395
395
  # resource path
396
- local_var_path = "/tracking/2024-10/trackings/#{id}"
396
+ local_var_path = "/tracking/2025-01/trackings/#{id}"
397
397
  method = :'PUT'
398
398
 
399
399
  # query parameters
@@ -7,11 +7,11 @@ module AftershipAPI::Model
7
7
  TRACKING_POSTAL_CODE = "tracking_postal_code".freeze
8
8
  TRACKING_SHIP_DATE = "tracking_ship_date".freeze
9
9
  TRACKING_KEY = "tracking_key".freeze
10
- TRACKING_ORIGIN_COUNTRY = "tracking_origin_country".freeze
11
- TRACKING_DESTINATION_COUNTRY = "tracking_destination_country".freeze
10
+ TRACKING_ORIGIN_COUNTRY_REGION = "tracking_origin_country_region".freeze
11
+ TRACKING_DESTINATION_COUNTRY_REGION = "tracking_destination_country_region".freeze
12
12
  TRACKING_STATE = "tracking_state".freeze
13
13
  def self.all_vars
14
- @all_vars ||= [TRACKING_ACCOUNT_NUMBER,TRACKING_POSTAL_CODE,TRACKING_SHIP_DATE,TRACKING_KEY,TRACKING_ORIGIN_COUNTRY,TRACKING_DESTINATION_COUNTRY,TRACKING_STATE,].freeze
14
+ @all_vars ||= [TRACKING_ACCOUNT_NUMBER,TRACKING_POSTAL_CODE,TRACKING_SHIP_DATE,TRACKING_KEY,TRACKING_ORIGIN_COUNTRY_REGION,TRACKING_DESTINATION_COUNTRY_REGION,TRACKING_STATE,].freeze
15
15
  end
16
16
 
17
17
  # Builds the enum from string
@@ -36,12 +36,12 @@ module AftershipAPI::Model
36
36
  attr_accessor :coordinate
37
37
 
38
38
  # Country/Region ISO Alpha-3 (three letters) of the checkpoint
39
- # country_iso3?: String;
40
- attr_accessor :country_iso3
39
+ # country_region?: String;
40
+ attr_accessor :country_region
41
41
 
42
42
  # Country/Region name of the checkpoint, may also contain other location info.
43
- # country_name?: String;
44
- attr_accessor :country_name
43
+ # country_region_name?: String;
44
+ attr_accessor :country_region_name
45
45
 
46
46
  # Checkpoint message
47
47
  # message?: String;
@@ -67,6 +67,10 @@ module AftershipAPI::Model
67
67
  # events?: EventsCheckpoint[];
68
68
  attr_accessor :events
69
69
 
70
+ # The source of the checkpoint, which can either be from the carrier or when the user marks the tracking as completed.
71
+ # source?: String;
72
+ attr_accessor :source
73
+
70
74
  # Initializes the object
71
75
  # @param [Hash] attributes Model attributes in the form of hash
72
76
  def initialize(attributes = {})
@@ -110,12 +114,12 @@ module AftershipAPI::Model
110
114
  self.coordinate = attributes[:'coordinate']
111
115
  end
112
116
 
113
- if attributes.key?(:'country_iso3')
114
- self.country_iso3 = attributes[:'country_iso3']
117
+ if attributes.key?(:'country_region')
118
+ self.country_region = attributes[:'country_region']
115
119
  end
116
120
 
117
- if attributes.key?(:'country_name')
118
- self.country_name = attributes[:'country_name']
121
+ if attributes.key?(:'country_region_name')
122
+ self.country_region_name = attributes[:'country_region_name']
119
123
  end
120
124
 
121
125
  if attributes.key?(:'message')
@@ -141,6 +145,10 @@ module AftershipAPI::Model
141
145
  if attributes.key?(:'events')
142
146
  self.events = attributes[:'events']
143
147
  end
148
+
149
+ if attributes.key?(:'source')
150
+ self.source = attributes[:'source']
151
+ end
144
152
  end
145
153
 
146
154
  # Attribute type mapping.
@@ -154,14 +162,15 @@ module AftershipAPI::Model
154
162
  :'state' => :'String',
155
163
  :'zip' => :'String',
156
164
  :'coordinate' => :'CoordinateCheckpoint',
157
- :'country_iso3' => :'String',
158
- :'country_name' => :'String',
165
+ :'country_region' => :'String',
166
+ :'country_region_name' => :'String',
159
167
  :'message' => :'String',
160
168
  :'tag' => :'TagV1',
161
169
  :'subtag' => :'String',
162
170
  :'subtag_message' => :'String',
163
171
  :'raw_tag' => :'String',
164
172
  :'events' => :'Array<EventsCheckpoint>',
173
+ :'source' => :'String',
165
174
  }
166
175
  end
167
176
 
@@ -176,14 +185,15 @@ module AftershipAPI::Model
176
185
  :'state' => :'state',
177
186
  :'zip' => :'zip',
178
187
  :'coordinate' => :'coordinate',
179
- :'country_iso3' => :'country_iso3',
180
- :'country_name' => :'country_name',
188
+ :'country_region' => :'country_region',
189
+ :'country_region_name' => :'country_region_name',
181
190
  :'message' => :'message',
182
191
  :'tag' => :'tag',
183
192
  :'subtag' => :'subtag',
184
193
  :'subtag_message' => :'subtag_message',
185
194
  :'raw_tag' => :'raw_tag',
186
195
  :'events' => :'events',
196
+ :'source' => :'source',
187
197
  }
188
198
  end
189
199
 
@@ -23,7 +23,7 @@ module AftershipAPI::Model
23
23
  # web_url?: String;
24
24
  attr_accessor :web_url
25
25
 
26
- # The extra fields need for tracking, such as `tracking_account_number`, `tracking_postal_code`, `tracking_ship_date`, `tracking_key`, `tracking_destination_country`
26
+ # The extra fields need for tracking, such as `tracking_account_number`, `tracking_postal_code`, `tracking_ship_date`, `tracking_key`, `tracking_destination_country_region`
27
27
  # required_fields?: String[];
28
28
  attr_accessor :required_fields
29
29
 
@@ -40,8 +40,8 @@ module AftershipAPI::Model
40
40
  attr_accessor :support_languages
41
41
 
42
42
  # Country/Region code (ISO Alpha-3) where the courier provides service
43
- # service_from_country_iso3?: String[];
44
- attr_accessor :service_from_country_iso3
43
+ # service_from_country_regions?: String[];
44
+ attr_accessor :service_from_country_regions
45
45
 
46
46
  # Initializes the object
47
47
  # @param [Hash] attributes Model attributes in the form of hash
@@ -90,8 +90,8 @@ module AftershipAPI::Model
90
90
  self.support_languages = attributes[:'support_languages']
91
91
  end
92
92
 
93
- if attributes.key?(:'service_from_country_iso3')
94
- self.service_from_country_iso3 = attributes[:'service_from_country_iso3']
93
+ if attributes.key?(:'service_from_country_regions')
94
+ self.service_from_country_regions = attributes[:'service_from_country_regions']
95
95
  end
96
96
  end
97
97
 
@@ -107,7 +107,7 @@ module AftershipAPI::Model
107
107
  :'optional_fields' => :'Array<String>',
108
108
  :'default_language' => :'String',
109
109
  :'support_languages' => :'Array<String>',
110
- :'service_from_country_iso3' => :'Array<String>',
110
+ :'service_from_country_regions' => :'Array<String>',
111
111
  }
112
112
  end
113
113
 
@@ -123,7 +123,7 @@ module AftershipAPI::Model
123
123
  :'optional_fields' => :'optional_fields',
124
124
  :'default_language' => :'default_language',
125
125
  :'support_languages' => :'support_languages',
126
- :'service_from_country_iso3' => :'service_from_country_iso3',
126
+ :'service_from_country_regions' => :'service_from_country_regions',
127
127
  }
128
128
  end
129
129