aftership-tracking-sdk 13.0.0 → 14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 797c70d4a91c7d50a97997267ad8f6b6f55781ba87962d10e8932683b4f79ad2
4
- data.tar.gz: 20180484c5f2e18da713f51404fa4742718b5aebb51c92d5a207ca293e0f2eb3
3
+ metadata.gz: 474413a4c8935bc40c471bf8a9f21d1c3d901c62734c7c6ac4917cd28e244497
4
+ data.tar.gz: a350b494cb8b2627ab671071992559d2667fc30971e338563d46060479034fd0
5
5
  SHA512:
6
- metadata.gz: af4839a8968503bdd46f74a51f7644b515fec28f41159d4dd2edbf1c2297e3082049ddc510d64b6865b34dd506aef51672f821994a8365b649bb8b3986691765
7
- data.tar.gz: c3c754e064f3ffb5ade7d5215d135ce1af92a325ffd5e8947fbe189f1026f636a134fc3500f38ced6023649d7b1d63bb6f82284c02dfc062c8fb669102f38ea2
6
+ metadata.gz: c9438daae22ec630ec1273a1f798a6cb5394c54d055ef46ddbde014e045f1f548b3230781e9b98459f98f1040c1cc9999118378fd91390931cf0c92a74d19850
7
+ data.tar.gz: 16ffa4134e3dcd4721165dead5f13e4134df5d6ab9fdd0557c127bb2a588d452691046c2b88f140cdf7463e40a7a1a5560e3251ffdfe508ba1a79277bc09a02d
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: 2025-07
41
+ - SDK Version: 14.0.0
42
+ - API Version: 2026-01
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', '~> 13.0.0'
53
+ gem 'aftership-tracking-sdk', '~> 14.0.0'
54
54
  ```
55
55
 
56
56
  ## Constructor
@@ -23,7 +23,7 @@ module AftershipAPI
23
23
 
24
24
 
25
25
  # resource path
26
- local_var_path = "/tracking/2025-07/couriers"
26
+ local_var_path = "/tracking/2026-01/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/2025-07/couriers/detect"
75
+ local_var_path = "/tracking/2026-01/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/2025-07/courier-connections"
27
+ local_var_path = "/tracking/2026-01/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/2025-07/courier-connections"
77
+ local_var_path = "/tracking/2026-01/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/2025-07/courier-connections/#{id}"
125
+ local_var_path = "/tracking/2026-01/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/2025-07/courier-connections/#{id}"
176
+ local_var_path = "/tracking/2026-01/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/2025-07/courier-connections/#{id}"
224
+ local_var_path = "/tracking/2026-01/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/2025-07/estimated-delivery-date/predict"
27
+ local_var_path = "/tracking/2026-01/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/2025-07/estimated-delivery-date/predict-batch"
74
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings"
42
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings"
107
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings/#{id}"
157
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings/#{id}"
210
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings/#{id}"
258
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings/#{id}/retrack"
306
+ local_var_path = "/tracking/2026-01/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/2025-07/trackings/#{id}/mark-as-completed"
357
+ local_var_path = "/tracking/2026-01/trackings/#{id}/mark-as-completed"
358
358
  method = :'POST'
359
359
 
360
360
  # query parameters
@@ -27,8 +27,8 @@ module AftershipAPI::Model
27
27
  attr_accessor :state
28
28
 
29
29
  # Postal code info provided by carrier
30
- # zip?: String;
31
- attr_accessor :zip
30
+ # postal_code?: String;
31
+ attr_accessor :postal_code
32
32
 
33
33
  # The latitude and longitude coordinates indicate the precise location of the shipments that are currently in transit.
34
34
  # coordinate?: CheckpointCoordinate;
@@ -105,8 +105,8 @@ module AftershipAPI::Model
105
105
  self.state = attributes[:'state']
106
106
  end
107
107
 
108
- if attributes.key?(:'zip')
109
- self.zip = attributes[:'zip']
108
+ if attributes.key?(:'postal_code')
109
+ self.postal_code = attributes[:'postal_code']
110
110
  end
111
111
 
112
112
  if attributes.key?(:'coordinate')
@@ -159,7 +159,7 @@ module AftershipAPI::Model
159
159
  :'location' => :'String',
160
160
  :'city' => :'String',
161
161
  :'state' => :'String',
162
- :'zip' => :'String',
162
+ :'postal_code' => :'String',
163
163
  :'coordinate' => :'CheckpointCoordinate',
164
164
  :'country_region' => :'String',
165
165
  :'country_region_name' => :'String',
@@ -182,7 +182,7 @@ module AftershipAPI::Model
182
182
  :'location' => :'location',
183
183
  :'city' => :'city',
184
184
  :'state' => :'state',
185
- :'zip' => :'zip',
185
+ :'postal_code' => :'postal_code',
186
186
  :'coordinate' => :'coordinate',
187
187
  :'country_region' => :'country_region',
188
188
  :'country_region_name' => :'country_region_name',
@@ -34,18 +34,18 @@ module AftershipAPI::Model
34
34
  # language?: String;
35
35
  attr_accessor :language
36
36
 
37
- # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
38
- # order_promised_delivery_date?: String;
37
+ # The promised delivery date of the order in shipment recipient’s timezone.
38
+ # order_promised_delivery_date?: CreateTrackingRequestOrderPromisedDeliveryDate;
39
39
  attr_accessor :order_promised_delivery_date
40
40
 
41
- # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
42
- # delivery_type?: CreateTrackingRequestDeliveryType;
43
- attr_accessor :delivery_type
44
-
45
41
  # Shipment pickup location for receiver
46
42
  # pickup_location?: String;
47
43
  attr_accessor :pickup_location
48
44
 
45
+ # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
46
+ # delivery_type?: CreateTrackingRequestDeliveryType;
47
+ attr_accessor :delivery_type
48
+
49
49
  # Shipment pickup note for receiver
50
50
  # pickup_note?: String;
51
51
  attr_accessor :pickup_note
@@ -193,14 +193,14 @@ module AftershipAPI::Model
193
193
  self.order_promised_delivery_date = attributes[:'order_promised_delivery_date']
194
194
  end
195
195
 
196
- if attributes.key?(:'delivery_type')
197
- self.delivery_type = attributes[:'delivery_type']
198
- end
199
-
200
196
  if attributes.key?(:'pickup_location')
201
197
  self.pickup_location = attributes[:'pickup_location']
202
198
  end
203
199
 
200
+ if attributes.key?(:'delivery_type')
201
+ self.delivery_type = attributes[:'delivery_type']
202
+ end
203
+
204
204
  if attributes.key?(:'pickup_note')
205
205
  self.pickup_note = attributes[:'pickup_note']
206
206
  end
@@ -313,9 +313,9 @@ module AftershipAPI::Model
313
313
  :'custom_fields' => :'Object',
314
314
  :'order_id_path' => :'String',
315
315
  :'language' => :'String',
316
- :'order_promised_delivery_date' => :'String',
317
- :'delivery_type' => :'CreateTrackingRequestDeliveryType',
316
+ :'order_promised_delivery_date' => :'CreateTrackingRequestOrderPromisedDeliveryDate',
318
317
  :'pickup_location' => :'String',
318
+ :'delivery_type' => :'CreateTrackingRequestDeliveryType',
319
319
  :'pickup_note' => :'String',
320
320
  :'tracking_account_number' => :'String',
321
321
  :'tracking_key' => :'String',
@@ -356,8 +356,8 @@ module AftershipAPI::Model
356
356
  :'order_id_path' => :'order_id_path',
357
357
  :'language' => :'language',
358
358
  :'order_promised_delivery_date' => :'order_promised_delivery_date',
359
- :'delivery_type' => :'delivery_type',
360
359
  :'pickup_location' => :'pickup_location',
360
+ :'delivery_type' => :'delivery_type',
361
361
  :'pickup_note' => :'pickup_note',
362
362
  :'tracking_account_number' => :'tracking_account_number',
363
363
  :'tracking_key' => :'tracking_key',
@@ -7,7 +7,7 @@ module AftershipAPI::Model
7
7
  attr_accessor :tracking_number
8
8
 
9
9
  # The unique code of the carrier responsible for the last-mile of the shipment. Find all the courier slugs .
10
- # slug?: String;
10
+ # slug: String;
11
11
  attr_accessor :slug
12
12
 
13
13
  # Initializes the object
@@ -0,0 +1,171 @@
1
+ # This code was auto generated by AfterShip SDK Generator.
2
+ # Do not edit the class manually.
3
+ module AftershipAPI::Model
4
+ class CreateTrackingRequestOrderPromisedDeliveryDate
5
+ # The promised delivery date of the order.It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
6
+ # promised_delivery_date?: String;
7
+ attr_accessor :promised_delivery_date
8
+
9
+ # Earliest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
10
+ # promised_delivery_date_min?: String;
11
+ attr_accessor :promised_delivery_date_min
12
+
13
+ # Latest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
14
+ # promised_delivery_date_max?: String;
15
+ attr_accessor :promised_delivery_date_max
16
+
17
+ # Initializes the object
18
+ # @param [Hash] attributes Model attributes in the form of hash
19
+ def initialize(attributes = {})
20
+ if (!attributes.is_a?(Hash))
21
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CreateTrackingRequestOrderPromisedDeliveryDate` initialize method"
22
+ end
23
+
24
+ attributes = attributes.each_with_object({}) { |(k, v), h|
25
+ h[k.to_sym] = v
26
+ }
27
+
28
+ if attributes.key?(:'promised_delivery_date')
29
+ self.promised_delivery_date = attributes[:'promised_delivery_date']
30
+ end
31
+
32
+ if attributes.key?(:'promised_delivery_date_min')
33
+ self.promised_delivery_date_min = attributes[:'promised_delivery_date_min']
34
+ end
35
+
36
+ if attributes.key?(:'promised_delivery_date_max')
37
+ self.promised_delivery_date_max = attributes[:'promised_delivery_date_max']
38
+ end
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'promised_delivery_date' => :'String',
45
+ :'promised_delivery_date_min' => :'String',
46
+ :'promised_delivery_date_max' => :'String',
47
+ }
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'promised_delivery_date' => :'promised_delivery_date',
54
+ :'promised_delivery_date_min' => :'promised_delivery_date_min',
55
+ :'promised_delivery_date_max' => :'promised_delivery_date_max',
56
+ }
57
+ end
58
+
59
+ # Builds the object from hash
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @return [Object] Returns the model itself
62
+ def self.build_from_hash(attributes)
63
+ return nil unless attributes.is_a?(Hash)
64
+ attributes = attributes.transform_keys(&:to_sym)
65
+ transformed_hash = {}
66
+ openapi_types.each_pair do |key, type|
67
+ if attributes.key?(key) && attributes[key].nil?
68
+ transformed_hash["#{key}"] = nil
69
+ elsif type =~ /\AArray<(.*)>/i
70
+ # check to ensure the input is an array given that the attribute
71
+ # is documented as an array but the input is not
72
+ if attributes[key].is_a?(Array)
73
+ transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
74
+ end
75
+ elsif !attributes[key].nil?
76
+ transformed_hash["#{key}"] = _deserialize(type, attributes[key])
77
+ end
78
+ end
79
+ new(transformed_hash)
80
+ end
81
+
82
+ # Deserializes the data based on type
83
+ # @param type [String] Data type
84
+ # @param value [String] Value to be deserialized
85
+ # @return [Object] Deserialized data
86
+ def self._deserialize(type, value)
87
+ case type.to_sym
88
+ when :Time
89
+ Time.parse(value)
90
+ when :Date
91
+ Date.parse(value)
92
+ when :String
93
+ value.to_s
94
+ when :Integer
95
+ value.to_i
96
+ when :Float
97
+ value.to_f
98
+ when :Boolean
99
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
100
+ true
101
+ else
102
+ false
103
+ end
104
+ when :Object
105
+ # generic object (usually a Hash), return directly
106
+ value
107
+ when /\AArray<(?<inner_type>.+)>\z/
108
+ inner_type = Regexp.last_match[:inner_type]
109
+ value.map { |v| _deserialize(inner_type, v) }
110
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
111
+ k_type = Regexp.last_match[:k_type]
112
+ v_type = Regexp.last_match[:v_type]
113
+ {}.tap do |hash|
114
+ value.each do |k, v|
115
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
116
+ end
117
+ end
118
+ else # model
119
+ klass = AftershipAPI::Model.const_get(type)
120
+ klass.build_from_hash(value)
121
+ end
122
+ end
123
+
124
+ # Returns the string representation of the object
125
+ # @return [String] String presentation of the object
126
+ def to_s
127
+ to_hash.to_s
128
+ end
129
+
130
+ # to_body is an alias to to_hash (backward compatibility)
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_body
133
+ to_hash
134
+ end
135
+
136
+ # Returns the object in the form of hash
137
+ # @return [Hash] Returns the object in the form of hash
138
+ def to_hash
139
+ hash = {}
140
+ self.class.attribute_map.each_pair do |attr, param|
141
+ value = self.send(attr)
142
+ next if value.nil?
143
+
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ hash
147
+ end
148
+
149
+ # Outputs non-array value in the form of hash
150
+ # For object, use to_hash. Otherwise, just return the value
151
+ # @param value [Object] Any valid value
152
+ # @return [Hash] Returns the value in the form of hash
153
+ def _to_hash(value)
154
+ if value.is_a?(Array)
155
+ value.compact.map { |v| _to_hash(v) }
156
+ elsif value.is_a?(Hash)
157
+ {}.tap do |hash|
158
+ value.each { |k, v| hash[k] = _to_hash(v) }
159
+ end
160
+ elsif value.respond_to? :to_hash
161
+ value.to_hash
162
+ else
163
+ value
164
+ end
165
+ end
166
+
167
+ def to_json(*a)
168
+ to_hash.to_json(*a)
169
+ end
170
+ end
171
+ end
@@ -26,11 +26,11 @@ module AftershipAPI::Model
26
26
  # package_count?: Integer;
27
27
  attr_accessor :package_count
28
28
 
29
- # The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required.
29
+ # The local pickup time in the origin address time zone of the package.</br><span style=color:#ff6b2b;padding:2px>**Either `pickup_time` or `estimated_pickup` is required.**</span>
30
30
  # pickup_time?: String;
31
31
  attr_accessor :pickup_time
32
32
 
33
- # The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required.
33
+ # The local pickup time of the package.</br><span style=color:#ff6b2b;padding:2px>**Either `pickup_time` or `estimated_pickup` is required.**</span>
34
34
  # estimated_pickup?: EstimatedDeliveryDateRequestEstimatedPickup;
35
35
  attr_accessor :estimated_pickup
36
36
 
@@ -150,10 +150,6 @@ module AftershipAPI::Model
150
150
  # tracked_count?: Float;
151
151
  attr_accessor :tracked_count
152
152
 
153
- # Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null
154
- # last_mile_tracking_supported?: Boolean;
155
- attr_accessor :last_mile_tracking_supported
156
-
157
153
  # The recipient’s language. If you set up AfterShip notifications in different languages, we use this to send the recipient tracking updates in their preferred language.
158
154
  # language?: String;
159
155
  attr_accessor :language
@@ -178,8 +174,8 @@ module AftershipAPI::Model
178
174
  # return_to_sender?: Boolean;
179
175
  attr_accessor :return_to_sender
180
176
 
181
- # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
182
- # order_promised_delivery_date?: String;
177
+ # The promised delivery date of the order in shipment recipient’s timezone.
178
+ # order_promised_delivery_date?: TrackingOrderPromisedDeliveryDate;
183
179
  attr_accessor :order_promised_delivery_date
184
180
 
185
181
  # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
@@ -461,10 +457,6 @@ module AftershipAPI::Model
461
457
  self.tracked_count = attributes[:'tracked_count']
462
458
  end
463
459
 
464
- if attributes.key?(:'last_mile_tracking_supported')
465
- self.last_mile_tracking_supported = attributes[:'last_mile_tracking_supported']
466
- end
467
-
468
460
  if attributes.key?(:'language')
469
461
  self.language = attributes[:'language']
470
462
  end
@@ -654,14 +646,13 @@ module AftershipAPI::Model
654
646
  :'subtag_message' => :'String',
655
647
  :'title' => :'String',
656
648
  :'tracked_count' => :'Float',
657
- :'last_mile_tracking_supported' => :'Boolean',
658
649
  :'language' => :'String',
659
650
  :'unique_token' => :'String',
660
651
  :'checkpoints' => :'Array<Checkpoint>',
661
652
  :'subscribed_smses' => :'Array<String>',
662
653
  :'subscribed_emails' => :'Array<String>',
663
654
  :'return_to_sender' => :'Boolean',
664
- :'order_promised_delivery_date' => :'String',
655
+ :'order_promised_delivery_date' => :'TrackingOrderPromisedDeliveryDate',
665
656
  :'delivery_type' => :'String',
666
657
  :'pickup_location' => :'String',
667
658
  :'pickup_note' => :'String',
@@ -735,7 +726,6 @@ module AftershipAPI::Model
735
726
  :'subtag_message' => :'subtag_message',
736
727
  :'title' => :'title',
737
728
  :'tracked_count' => :'tracked_count',
738
- :'last_mile_tracking_supported' => :'last_mile_tracking_supported',
739
729
  :'language' => :'language',
740
730
  :'unique_token' => :'unique_token',
741
731
  :'checkpoints' => :'checkpoints',
@@ -0,0 +1,171 @@
1
+ # This code was auto generated by AfterShip SDK Generator.
2
+ # Do not edit the class manually.
3
+ module AftershipAPI::Model
4
+ class TrackingOrderPromisedDeliveryDate
5
+ # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
6
+ # promised_delivery_date?: String;
7
+ attr_accessor :promised_delivery_date
8
+
9
+ # Earliest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
10
+ # promised_delivery_date_min?: String;
11
+ attr_accessor :promised_delivery_date_min
12
+
13
+ # Latest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
14
+ # promised_delivery_date_max?: String;
15
+ attr_accessor :promised_delivery_date_max
16
+
17
+ # Initializes the object
18
+ # @param [Hash] attributes Model attributes in the form of hash
19
+ def initialize(attributes = {})
20
+ if (!attributes.is_a?(Hash))
21
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::TrackingOrderPromisedDeliveryDate` initialize method"
22
+ end
23
+
24
+ attributes = attributes.each_with_object({}) { |(k, v), h|
25
+ h[k.to_sym] = v
26
+ }
27
+
28
+ if attributes.key?(:'promised_delivery_date')
29
+ self.promised_delivery_date = attributes[:'promised_delivery_date']
30
+ end
31
+
32
+ if attributes.key?(:'promised_delivery_date_min')
33
+ self.promised_delivery_date_min = attributes[:'promised_delivery_date_min']
34
+ end
35
+
36
+ if attributes.key?(:'promised_delivery_date_max')
37
+ self.promised_delivery_date_max = attributes[:'promised_delivery_date_max']
38
+ end
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'promised_delivery_date' => :'String',
45
+ :'promised_delivery_date_min' => :'String',
46
+ :'promised_delivery_date_max' => :'String',
47
+ }
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'promised_delivery_date' => :'promised_delivery_date',
54
+ :'promised_delivery_date_min' => :'promised_delivery_date_min',
55
+ :'promised_delivery_date_max' => :'promised_delivery_date_max',
56
+ }
57
+ end
58
+
59
+ # Builds the object from hash
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @return [Object] Returns the model itself
62
+ def self.build_from_hash(attributes)
63
+ return nil unless attributes.is_a?(Hash)
64
+ attributes = attributes.transform_keys(&:to_sym)
65
+ transformed_hash = {}
66
+ openapi_types.each_pair do |key, type|
67
+ if attributes.key?(key) && attributes[key].nil?
68
+ transformed_hash["#{key}"] = nil
69
+ elsif type =~ /\AArray<(.*)>/i
70
+ # check to ensure the input is an array given that the attribute
71
+ # is documented as an array but the input is not
72
+ if attributes[key].is_a?(Array)
73
+ transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
74
+ end
75
+ elsif !attributes[key].nil?
76
+ transformed_hash["#{key}"] = _deserialize(type, attributes[key])
77
+ end
78
+ end
79
+ new(transformed_hash)
80
+ end
81
+
82
+ # Deserializes the data based on type
83
+ # @param type [String] Data type
84
+ # @param value [String] Value to be deserialized
85
+ # @return [Object] Deserialized data
86
+ def self._deserialize(type, value)
87
+ case type.to_sym
88
+ when :Time
89
+ Time.parse(value)
90
+ when :Date
91
+ Date.parse(value)
92
+ when :String
93
+ value.to_s
94
+ when :Integer
95
+ value.to_i
96
+ when :Float
97
+ value.to_f
98
+ when :Boolean
99
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
100
+ true
101
+ else
102
+ false
103
+ end
104
+ when :Object
105
+ # generic object (usually a Hash), return directly
106
+ value
107
+ when /\AArray<(?<inner_type>.+)>\z/
108
+ inner_type = Regexp.last_match[:inner_type]
109
+ value.map { |v| _deserialize(inner_type, v) }
110
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
111
+ k_type = Regexp.last_match[:k_type]
112
+ v_type = Regexp.last_match[:v_type]
113
+ {}.tap do |hash|
114
+ value.each do |k, v|
115
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
116
+ end
117
+ end
118
+ else # model
119
+ klass = AftershipAPI::Model.const_get(type)
120
+ klass.build_from_hash(value)
121
+ end
122
+ end
123
+
124
+ # Returns the string representation of the object
125
+ # @return [String] String presentation of the object
126
+ def to_s
127
+ to_hash.to_s
128
+ end
129
+
130
+ # to_body is an alias to to_hash (backward compatibility)
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_body
133
+ to_hash
134
+ end
135
+
136
+ # Returns the object in the form of hash
137
+ # @return [Hash] Returns the object in the form of hash
138
+ def to_hash
139
+ hash = {}
140
+ self.class.attribute_map.each_pair do |attr, param|
141
+ value = self.send(attr)
142
+ next if value.nil?
143
+
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ hash
147
+ end
148
+
149
+ # Outputs non-array value in the form of hash
150
+ # For object, use to_hash. Otherwise, just return the value
151
+ # @param value [Object] Any valid value
152
+ # @return [Hash] Returns the value in the form of hash
153
+ def _to_hash(value)
154
+ if value.is_a?(Array)
155
+ value.compact.map { |v| _to_hash(v) }
156
+ elsif value.is_a?(Hash)
157
+ {}.tap do |hash|
158
+ value.each { |k, v| hash[k] = _to_hash(v) }
159
+ end
160
+ elsif value.respond_to? :to_hash
161
+ value.to_hash
162
+ else
163
+ value
164
+ end
165
+ end
166
+
167
+ def to_json(*a)
168
+ to_hash.to_json(*a)
169
+ end
170
+ end
171
+ end
@@ -26,8 +26,8 @@ module AftershipAPI::Model
26
26
  # language?: String;
27
27
  attr_accessor :language
28
28
 
29
- # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
30
- # order_promised_delivery_date?: String;
29
+ # The promised delivery date of the order in shipment recipient’s timezone.
30
+ # order_promised_delivery_date?: UpdateTrackingByIdRequestOrderPromisedDeliveryDate;
31
31
  attr_accessor :order_promised_delivery_date
32
32
 
33
33
  # Shipment delivery type- `pickup_at_store`- `pickup_at_courier`- `door_to_door`
@@ -263,7 +263,7 @@ module AftershipAPI::Model
263
263
  :'custom_fields' => :'Object',
264
264
  :'note' => :'String',
265
265
  :'language' => :'String',
266
- :'order_promised_delivery_date' => :'String',
266
+ :'order_promised_delivery_date' => :'UpdateTrackingByIdRequestOrderPromisedDeliveryDate',
267
267
  :'delivery_type' => :'UpdateTrackingByIdRequestDeliveryType',
268
268
  :'pickup_location' => :'String',
269
269
  :'pickup_note' => :'String',
@@ -0,0 +1,171 @@
1
+ # This code was auto generated by AfterShip SDK Generator.
2
+ # Do not edit the class manually.
3
+ module AftershipAPI::Model
4
+ class UpdateTrackingByIdRequestOrderPromisedDeliveryDate
5
+ # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
6
+ # promised_delivery_date?: String;
7
+ attr_accessor :promised_delivery_date
8
+
9
+ # Earliest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
10
+ # promised_delivery_date_min?: String;
11
+ attr_accessor :promised_delivery_date_min
12
+
13
+ # Latest promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
14
+ # promised_delivery_date_max?: String;
15
+ attr_accessor :promised_delivery_date_max
16
+
17
+ # Initializes the object
18
+ # @param [Hash] attributes Model attributes in the form of hash
19
+ def initialize(attributes = {})
20
+ if (!attributes.is_a?(Hash))
21
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::UpdateTrackingByIdRequestOrderPromisedDeliveryDate` initialize method"
22
+ end
23
+
24
+ attributes = attributes.each_with_object({}) { |(k, v), h|
25
+ h[k.to_sym] = v
26
+ }
27
+
28
+ if attributes.key?(:'promised_delivery_date')
29
+ self.promised_delivery_date = attributes[:'promised_delivery_date']
30
+ end
31
+
32
+ if attributes.key?(:'promised_delivery_date_min')
33
+ self.promised_delivery_date_min = attributes[:'promised_delivery_date_min']
34
+ end
35
+
36
+ if attributes.key?(:'promised_delivery_date_max')
37
+ self.promised_delivery_date_max = attributes[:'promised_delivery_date_max']
38
+ end
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'promised_delivery_date' => :'String',
45
+ :'promised_delivery_date_min' => :'String',
46
+ :'promised_delivery_date_max' => :'String',
47
+ }
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'promised_delivery_date' => :'promised_delivery_date',
54
+ :'promised_delivery_date_min' => :'promised_delivery_date_min',
55
+ :'promised_delivery_date_max' => :'promised_delivery_date_max',
56
+ }
57
+ end
58
+
59
+ # Builds the object from hash
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @return [Object] Returns the model itself
62
+ def self.build_from_hash(attributes)
63
+ return nil unless attributes.is_a?(Hash)
64
+ attributes = attributes.transform_keys(&:to_sym)
65
+ transformed_hash = {}
66
+ openapi_types.each_pair do |key, type|
67
+ if attributes.key?(key) && attributes[key].nil?
68
+ transformed_hash["#{key}"] = nil
69
+ elsif type =~ /\AArray<(.*)>/i
70
+ # check to ensure the input is an array given that the attribute
71
+ # is documented as an array but the input is not
72
+ if attributes[key].is_a?(Array)
73
+ transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
74
+ end
75
+ elsif !attributes[key].nil?
76
+ transformed_hash["#{key}"] = _deserialize(type, attributes[key])
77
+ end
78
+ end
79
+ new(transformed_hash)
80
+ end
81
+
82
+ # Deserializes the data based on type
83
+ # @param type [String] Data type
84
+ # @param value [String] Value to be deserialized
85
+ # @return [Object] Deserialized data
86
+ def self._deserialize(type, value)
87
+ case type.to_sym
88
+ when :Time
89
+ Time.parse(value)
90
+ when :Date
91
+ Date.parse(value)
92
+ when :String
93
+ value.to_s
94
+ when :Integer
95
+ value.to_i
96
+ when :Float
97
+ value.to_f
98
+ when :Boolean
99
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
100
+ true
101
+ else
102
+ false
103
+ end
104
+ when :Object
105
+ # generic object (usually a Hash), return directly
106
+ value
107
+ when /\AArray<(?<inner_type>.+)>\z/
108
+ inner_type = Regexp.last_match[:inner_type]
109
+ value.map { |v| _deserialize(inner_type, v) }
110
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
111
+ k_type = Regexp.last_match[:k_type]
112
+ v_type = Regexp.last_match[:v_type]
113
+ {}.tap do |hash|
114
+ value.each do |k, v|
115
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
116
+ end
117
+ end
118
+ else # model
119
+ klass = AftershipAPI::Model.const_get(type)
120
+ klass.build_from_hash(value)
121
+ end
122
+ end
123
+
124
+ # Returns the string representation of the object
125
+ # @return [String] String presentation of the object
126
+ def to_s
127
+ to_hash.to_s
128
+ end
129
+
130
+ # to_body is an alias to to_hash (backward compatibility)
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_body
133
+ to_hash
134
+ end
135
+
136
+ # Returns the object in the form of hash
137
+ # @return [Hash] Returns the object in the form of hash
138
+ def to_hash
139
+ hash = {}
140
+ self.class.attribute_map.each_pair do |attr, param|
141
+ value = self.send(attr)
142
+ next if value.nil?
143
+
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ hash
147
+ end
148
+
149
+ # Outputs non-array value in the form of hash
150
+ # For object, use to_hash. Otherwise, just return the value
151
+ # @param value [Object] Any valid value
152
+ # @return [Hash] Returns the value in the form of hash
153
+ def _to_hash(value)
154
+ if value.is_a?(Array)
155
+ value.compact.map { |v| _to_hash(v) }
156
+ elsif value.is_a?(Hash)
157
+ {}.tap do |hash|
158
+ value.each { |k, v| hash[k] = _to_hash(v) }
159
+ end
160
+ elsif value.respond_to? :to_hash
161
+ value.to_hash
162
+ else
163
+ value
164
+ end
165
+ end
166
+
167
+ def to_json(*a)
168
+ to_hash.to_json(*a)
169
+ end
170
+ end
171
+ end
@@ -1,5 +1,5 @@
1
1
  # This code was auto generated by AfterShip SDK Generator.
2
2
  # Do not edit the class manually.
3
3
  module AftershipAPI
4
- VERSION = '13.0.0'
4
+ VERSION = '14.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aftership-tracking-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.0
4
+ version: 14.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AfterShip Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-21 00:00:00.000000000 Z
11
+ date: 2026-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -87,6 +87,7 @@ files:
87
87
  - lib/aftership-tracking-sdk/models/create_tracking_request_customers.rb
88
88
  - lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb
89
89
  - lib/aftership-tracking-sdk/models/create_tracking_request_last_mile.rb
90
+ - lib/aftership-tracking-sdk/models/create_tracking_request_order_promised_delivery_date.rb
90
91
  - lib/aftership-tracking-sdk/models/create_tracking_response.rb
91
92
  - lib/aftership-tracking-sdk/models/credential_field.rb
92
93
  - lib/aftership-tracking-sdk/models/delete_courier_connections_by_id_response.rb
@@ -147,6 +148,7 @@ files:
147
148
  - lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery.rb
148
149
  - lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery_source.rb
149
150
  - lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery_type.rb
151
+ - lib/aftership-tracking-sdk/models/tracking_order_promised_delivery_date.rb
150
152
  - lib/aftership-tracking-sdk/models/tracking_response.rb
151
153
  - lib/aftership-tracking-sdk/models/tracking_response_for_get_trackings.rb
152
154
  - lib/aftership-tracking-sdk/models/tracking_response_for_get_trackings_data.rb
@@ -156,6 +158,7 @@ files:
156
158
  - lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb
157
159
  - lib/aftership-tracking-sdk/models/update_tracking_by_id_request_customers.rb
158
160
  - lib/aftership-tracking-sdk/models/update_tracking_by_id_request_delivery_type.rb
161
+ - lib/aftership-tracking-sdk/models/update_tracking_by_id_request_order_promised_delivery_date.rb
159
162
  - lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb
160
163
  - lib/aftership-tracking-sdk/sign_string.rb
161
164
  - lib/aftership-tracking-sdk/version.rb