aftership-tracking-sdk 9.0.0 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +14 -13
- data/lib/aftership-tracking-sdk/api/courier.rb +3 -3
- data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +55 -1
- data/lib/aftership-tracking-sdk/api/tracking.rb +16 -16
- data/lib/aftership-tracking-sdk/models/additional_fields_v1.rb +3 -3
- data/lib/aftership-tracking-sdk/models/checkpoint.rb +22 -12
- data/lib/aftership-tracking-sdk/models/courier.rb +7 -7
- data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +47 -67
- data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/{next_couriers_tracking.rb → customers_create_tracking_request.rb} +37 -37
- data/lib/aftership-tracking-sdk/models/customers_create_tracking_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_delete_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_get_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_mark_tracking_completed_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_retrack_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_tracking.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_request.rb +193 -0
- data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +6 -6
- data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +6 -6
- data/lib/aftership-tracking-sdk/models/destination_address_predict_request.rb +193 -0
- data/lib/aftership-tracking-sdk/models/destination_address_predict_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +24 -24
- data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_request.rb +183 -0
- data/lib/aftership-tracking-sdk/models/estimated_pickup_predict_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/{next_couriers_delete_tracking_by_id_response.rb → first_mile_create_tracking_response.rb} +29 -29
- data/lib/aftership-tracking-sdk/models/{next_couriers_get_tracking_by_id_response.rb → first_mile_delete_tracking_by_id_response.rb} +29 -29
- data/lib/aftership-tracking-sdk/models/first_mile_get_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/first_mile_mark_tracking_completed_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/first_mile_retrack_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/{next_couriers_mark_tracking_completed_by_id_response.rb → first_mile_tracking.rb} +29 -29
- data/lib/aftership-tracking-sdk/models/first_mile_update_tracking_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_request.rb → last_mile_create_tracking_request.rb} +13 -13
- data/lib/aftership-tracking-sdk/models/last_mile_create_tracking_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/last_mile_delete_tracking_by_id_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/last_mile_get_tracking_by_id_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/last_mile_mark_tracking_completed_by_id_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/last_mile_retrack_tracking_by_id_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/{next_couriers_create_tracking_response.rb → last_mile_tracking.rb} +33 -23
- data/lib/aftership-tracking-sdk/models/last_mile_update_tracking_by_id_response.rb +203 -0
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_request.rb +163 -0
- data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_predict_response.rb +163 -0
- data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +6 -6
- data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +6 -6
- data/lib/aftership-tracking-sdk/models/origin_address_predict_request.rb +193 -0
- data/lib/aftership-tracking-sdk/models/origin_address_predict_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/predict_request.rb +223 -0
- data/lib/aftership-tracking-sdk/models/predict_response.rb +273 -0
- data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/tracking.rb +63 -83
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +37 -57
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +63 -83
- data/lib/aftership-tracking-sdk/models/weight_predict_request.rb +163 -0
- data/lib/aftership-tracking-sdk/models/weight_predict_response.rb +163 -0
- data/lib/aftership-tracking-sdk/version.rb +1 -1
- metadata +41 -13
- data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +0 -193
- data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_id_response.rb +0 -193
@@ -0,0 +1,273 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class PredictResponse
|
5
|
+
|
6
|
+
# A string that acts as a unique identifier for the estimated delivery date value generated by AfterShip Predict API
|
7
|
+
# id: String;
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
# AfterShip's unique code of courier. Please refer to https://track.aftership.com/couriers/download.
|
11
|
+
# slug: String;
|
12
|
+
attr_accessor :slug
|
13
|
+
|
14
|
+
# AfterShip’s unique code represents carrier’s shipping and delivery options. Refer to .
|
15
|
+
# service_type_name?: String;
|
16
|
+
attr_accessor :service_type_name
|
17
|
+
|
18
|
+
# The location from where the package is picked up by the carrier to be delivered to the final destination.
|
19
|
+
# origin_address: OriginAddressPredictResponse;
|
20
|
+
attr_accessor :origin_address
|
21
|
+
|
22
|
+
# The final destination of the customer where the delivery will be made.
|
23
|
+
# destination_address: DestinationAddressPredictResponse;
|
24
|
+
attr_accessor :destination_address
|
25
|
+
|
26
|
+
# AfterShip uses this object to calculate the total weight of the order.
|
27
|
+
# weight?: WeightPredictResponse;
|
28
|
+
attr_accessor :weight
|
29
|
+
|
30
|
+
# The number of packages.
|
31
|
+
# package_count?: Integer;
|
32
|
+
attr_accessor :package_count
|
33
|
+
|
34
|
+
# The local pickup time in the origin address time zone of the package.Either `pickup_time` or `estimated_pickup` is required.
|
35
|
+
# pickup_time?: String;
|
36
|
+
attr_accessor :pickup_time
|
37
|
+
|
38
|
+
# The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required.
|
39
|
+
# estimated_pickup?: EstimatedPickupPredictResponse;
|
40
|
+
attr_accessor :estimated_pickup
|
41
|
+
|
42
|
+
# The estimated arrival date of the shipment, provided by AfterShip.
|
43
|
+
# estimated_delivery_date?: String;
|
44
|
+
attr_accessor :estimated_delivery_date
|
45
|
+
|
46
|
+
# Indicates the confidence level and associated reason for an AI EDD prediction request. For a comprehensive list of confidence codes, refer to .
|
47
|
+
# confidence_code?: Float;
|
48
|
+
attr_accessor :confidence_code
|
49
|
+
|
50
|
+
# The earliest estimated delivery date of the shipment, provided by AfterShip.
|
51
|
+
# estimated_delivery_date_min?: String;
|
52
|
+
attr_accessor :estimated_delivery_date_min
|
53
|
+
|
54
|
+
# The latest estimated delivery date of the shipment, provided by AfterShip.
|
55
|
+
# estimated_delivery_date_max?: String;
|
56
|
+
attr_accessor :estimated_delivery_date_max
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::PredictResponse` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
h[k.to_sym] = v
|
67
|
+
}
|
68
|
+
|
69
|
+
if attributes.key?(:'id')
|
70
|
+
self.id = attributes[:'id']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'slug')
|
74
|
+
self.slug = attributes[:'slug']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'service_type_name')
|
78
|
+
self.service_type_name = attributes[:'service_type_name']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'origin_address')
|
82
|
+
self.origin_address = attributes[:'origin_address']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'destination_address')
|
86
|
+
self.destination_address = attributes[:'destination_address']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'weight')
|
90
|
+
self.weight = attributes[:'weight']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'package_count')
|
94
|
+
self.package_count = attributes[:'package_count']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'pickup_time')
|
98
|
+
self.pickup_time = attributes[:'pickup_time']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'estimated_pickup')
|
102
|
+
self.estimated_pickup = attributes[:'estimated_pickup']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.key?(:'estimated_delivery_date')
|
106
|
+
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.key?(:'confidence_code')
|
110
|
+
self.confidence_code = attributes[:'confidence_code']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'estimated_delivery_date_min')
|
114
|
+
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'estimated_delivery_date_max')
|
118
|
+
self.estimated_delivery_date_max = attributes[:'estimated_delivery_date_max']
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Attribute type mapping.
|
123
|
+
def self.openapi_types
|
124
|
+
{
|
125
|
+
:'id' => :'String',
|
126
|
+
:'slug' => :'String',
|
127
|
+
:'service_type_name' => :'String',
|
128
|
+
:'origin_address' => :'OriginAddressPredictResponse',
|
129
|
+
:'destination_address' => :'DestinationAddressPredictResponse',
|
130
|
+
:'weight' => :'WeightPredictResponse',
|
131
|
+
:'package_count' => :'Integer',
|
132
|
+
:'pickup_time' => :'String',
|
133
|
+
:'estimated_pickup' => :'EstimatedPickupPredictResponse',
|
134
|
+
:'estimated_delivery_date' => :'String',
|
135
|
+
:'confidence_code' => :'Float',
|
136
|
+
:'estimated_delivery_date_min' => :'String',
|
137
|
+
:'estimated_delivery_date_max' => :'String',
|
138
|
+
}
|
139
|
+
end
|
140
|
+
|
141
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
142
|
+
def self.attribute_map
|
143
|
+
{
|
144
|
+
:'id' => :'id',
|
145
|
+
:'slug' => :'slug',
|
146
|
+
:'service_type_name' => :'service_type_name',
|
147
|
+
:'origin_address' => :'origin_address',
|
148
|
+
:'destination_address' => :'destination_address',
|
149
|
+
:'weight' => :'weight',
|
150
|
+
:'package_count' => :'package_count',
|
151
|
+
:'pickup_time' => :'pickup_time',
|
152
|
+
:'estimated_pickup' => :'estimated_pickup',
|
153
|
+
:'estimated_delivery_date' => :'estimated_delivery_date',
|
154
|
+
:'confidence_code' => :'confidence_code',
|
155
|
+
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
156
|
+
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
157
|
+
}
|
158
|
+
end
|
159
|
+
|
160
|
+
# Builds the object from hash
|
161
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
162
|
+
# @return [Object] Returns the model itself
|
163
|
+
def self.build_from_hash(attributes)
|
164
|
+
return nil unless attributes.is_a?(Hash)
|
165
|
+
attributes = attributes.transform_keys(&:to_sym)
|
166
|
+
transformed_hash = {}
|
167
|
+
openapi_types.each_pair do |key, type|
|
168
|
+
if attributes.key?(key) && attributes[key].nil?
|
169
|
+
transformed_hash["#{key}"] = nil
|
170
|
+
elsif type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[key].is_a?(Array)
|
174
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
175
|
+
end
|
176
|
+
elsif !attributes[key].nil?
|
177
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
178
|
+
end
|
179
|
+
end
|
180
|
+
new(transformed_hash)
|
181
|
+
end
|
182
|
+
|
183
|
+
# Deserializes the data based on type
|
184
|
+
# @param type [String] Data type
|
185
|
+
# @param value [String] Value to be deserialized
|
186
|
+
# @return [Object] Deserialized data
|
187
|
+
def self._deserialize(type, value)
|
188
|
+
case type.to_sym
|
189
|
+
when :Time
|
190
|
+
Time.parse(value)
|
191
|
+
when :Date
|
192
|
+
Date.parse(value)
|
193
|
+
when :String
|
194
|
+
value.to_s
|
195
|
+
when :Integer
|
196
|
+
value.to_i
|
197
|
+
when :Float
|
198
|
+
value.to_f
|
199
|
+
when :Boolean
|
200
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
201
|
+
true
|
202
|
+
else
|
203
|
+
false
|
204
|
+
end
|
205
|
+
when :Object
|
206
|
+
# generic object (usually a Hash), return directly
|
207
|
+
value
|
208
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
209
|
+
inner_type = Regexp.last_match[:inner_type]
|
210
|
+
value.map { |v| _deserialize(inner_type, v) }
|
211
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
212
|
+
k_type = Regexp.last_match[:k_type]
|
213
|
+
v_type = Regexp.last_match[:v_type]
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each do |k, v|
|
216
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
else # model
|
220
|
+
klass = AftershipAPI::Model.const_get(type)
|
221
|
+
klass.build_from_hash(value)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the string representation of the object
|
226
|
+
# @return [String] String presentation of the object
|
227
|
+
def to_s
|
228
|
+
to_hash.to_s
|
229
|
+
end
|
230
|
+
|
231
|
+
# to_body is an alias to to_hash (backward compatibility)
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
233
|
+
def to_body
|
234
|
+
to_hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Returns the object in the form of hash
|
238
|
+
# @return [Hash] Returns the object in the form of hash
|
239
|
+
def to_hash
|
240
|
+
hash = {}
|
241
|
+
self.class.attribute_map.each_pair do |attr, param|
|
242
|
+
value = self.send(attr)
|
243
|
+
next if value.nil?
|
244
|
+
|
245
|
+
hash[param] = _to_hash(value)
|
246
|
+
end
|
247
|
+
hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Outputs non-array value in the form of hash
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
252
|
+
# @param value [Object] Any valid value
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
254
|
+
def _to_hash(value)
|
255
|
+
if value.is_a?(Array)
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
257
|
+
elsif value.is_a?(Hash)
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
260
|
+
end
|
261
|
+
elsif value.respond_to? :to_hash
|
262
|
+
value.to_hash
|
263
|
+
else
|
264
|
+
value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
def to_json(*a)
|
269
|
+
to_hash.to_json(*a)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
@@ -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
|
@@ -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
|
-
#
|
52
|
-
attr_accessor :
|
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
|
-
#
|
72
|
-
attr_accessor :
|
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
|
-
#
|
92
|
-
attr_accessor :
|
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?: CourierEstimatedDeliveryDateRetrackTrackingByIdResponse;
|
@@ -139,10 +127,6 @@ 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
|
@@ -231,7 +215,7 @@ module AftershipAPI::Model
|
|
231
215
|
# tracking_key?: String;
|
232
216
|
attr_accessor :tracking_key
|
233
217
|
|
234
|
-
#
|
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,17 +259,13 @@ module AftershipAPI::Model
|
|
275
259
|
# courier_connection_id?: String;
|
276
260
|
attr_accessor :courier_connection_id
|
277
261
|
|
278
|
-
# The
|
279
|
-
#
|
280
|
-
attr_accessor :
|
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
|
262
|
+
# (Legacy) Replaced by `origin_country_region`. 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.
|
263
|
+
# tracking_origin_country_region?: String;
|
264
|
+
attr_accessor :tracking_origin_country_region
|
285
265
|
|
286
|
-
# (Legacy) Replaced by `
|
287
|
-
#
|
288
|
-
attr_accessor :
|
266
|
+
# (Legacy) Replaced by `destination_country_region`. 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.
|
267
|
+
# tracking_destination_country_region?: String;
|
268
|
+
attr_accessor :tracking_destination_country_region
|
289
269
|
|
290
270
|
# (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
271
|
# tracking_postal_code?: String;
|
@@ -327,6 +307,18 @@ module AftershipAPI::Model
|
|
327
307
|
# aftership_tracking_order_url?: String;
|
328
308
|
attr_accessor :aftership_tracking_order_url
|
329
309
|
|
310
|
+
# 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.
|
311
|
+
# first_mile?: FirstMileRetrackTrackingByIdResponse;
|
312
|
+
attr_accessor :first_mile
|
313
|
+
|
314
|
+
# 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.
|
315
|
+
# last_mile?: LastMileRetrackTrackingByIdResponse;
|
316
|
+
attr_accessor :last_mile
|
317
|
+
|
318
|
+
# The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.
|
319
|
+
# customers?: CustomersRetrackTrackingByIdResponse[];
|
320
|
+
attr_accessor :customers
|
321
|
+
|
330
322
|
# Initializes the object
|
331
323
|
# @param [Hash] attributes Model attributes in the form of hash
|
332
324
|
def initialize(attributes = {})
|
@@ -354,10 +346,6 @@ module AftershipAPI::Model
|
|
354
346
|
self.updated_at = attributes[:'updated_at']
|
355
347
|
end
|
356
348
|
|
357
|
-
if attributes.key?(:'last_updated_at')
|
358
|
-
self.last_updated_at = attributes[:'last_updated_at']
|
359
|
-
end
|
360
|
-
|
361
349
|
if attributes.key?(:'tracking_number')
|
362
350
|
self.tracking_number = attributes[:'tracking_number']
|
363
351
|
end
|
@@ -374,16 +362,12 @@ module AftershipAPI::Model
|
|
374
362
|
self.custom_fields = attributes[:'custom_fields']
|
375
363
|
end
|
376
364
|
|
377
|
-
if attributes.key?(:'customer_name')
|
378
|
-
self.customer_name = attributes[:'customer_name']
|
379
|
-
end
|
380
|
-
|
381
365
|
if attributes.key?(:'transit_time')
|
382
366
|
self.transit_time = attributes[:'transit_time']
|
383
367
|
end
|
384
368
|
|
385
|
-
if attributes.key?(:'
|
386
|
-
self.
|
369
|
+
if attributes.key?(:'origin_country_region')
|
370
|
+
self.origin_country_region = attributes[:'origin_country_region']
|
387
371
|
end
|
388
372
|
|
389
373
|
if attributes.key?(:'origin_state')
|
@@ -402,8 +386,8 @@ module AftershipAPI::Model
|
|
402
386
|
self.origin_raw_location = attributes[:'origin_raw_location']
|
403
387
|
end
|
404
388
|
|
405
|
-
if attributes.key?(:'
|
406
|
-
self.
|
389
|
+
if attributes.key?(:'destination_country_region')
|
390
|
+
self.destination_country_region = attributes[:'destination_country_region']
|
407
391
|
end
|
408
392
|
|
409
393
|
if attributes.key?(:'destination_state')
|
@@ -422,12 +406,8 @@ module AftershipAPI::Model
|
|
422
406
|
self.destination_raw_location = attributes[:'destination_raw_location']
|
423
407
|
end
|
424
408
|
|
425
|
-
if attributes.key?(:'
|
426
|
-
self.
|
427
|
-
end
|
428
|
-
|
429
|
-
if attributes.key?(:'emails')
|
430
|
-
self.emails = attributes[:'emails']
|
409
|
+
if attributes.key?(:'courier_destination_country_region')
|
410
|
+
self.courier_destination_country_region = attributes[:'courier_destination_country_region']
|
431
411
|
end
|
432
412
|
|
433
413
|
if attributes.key?(:'courier_estimated_delivery_date')
|
@@ -474,10 +454,6 @@ module AftershipAPI::Model
|
|
474
454
|
self.signed_by = attributes[:'signed_by']
|
475
455
|
end
|
476
456
|
|
477
|
-
if attributes.key?(:'smses')
|
478
|
-
self.smses = attributes[:'smses']
|
479
|
-
end
|
480
|
-
|
481
457
|
if attributes.key?(:'source')
|
482
458
|
self.source = attributes[:'source']
|
483
459
|
end
|
@@ -610,16 +586,12 @@ module AftershipAPI::Model
|
|
610
586
|
self.courier_connection_id = attributes[:'courier_connection_id']
|
611
587
|
end
|
612
588
|
|
613
|
-
if attributes.key?(:'
|
614
|
-
self.
|
615
|
-
end
|
616
|
-
|
617
|
-
if attributes.key?(:'tracking_origin_country')
|
618
|
-
self.tracking_origin_country = attributes[:'tracking_origin_country']
|
589
|
+
if attributes.key?(:'tracking_origin_country_region')
|
590
|
+
self.tracking_origin_country_region = attributes[:'tracking_origin_country_region']
|
619
591
|
end
|
620
592
|
|
621
|
-
if attributes.key?(:'
|
622
|
-
self.
|
593
|
+
if attributes.key?(:'tracking_destination_country_region')
|
594
|
+
self.tracking_destination_country_region = attributes[:'tracking_destination_country_region']
|
623
595
|
end
|
624
596
|
|
625
597
|
if attributes.key?(:'tracking_postal_code')
|
@@ -661,6 +633,18 @@ module AftershipAPI::Model
|
|
661
633
|
if attributes.key?(:'aftership_tracking_order_url')
|
662
634
|
self.aftership_tracking_order_url = attributes[:'aftership_tracking_order_url']
|
663
635
|
end
|
636
|
+
|
637
|
+
if attributes.key?(:'first_mile')
|
638
|
+
self.first_mile = attributes[:'first_mile']
|
639
|
+
end
|
640
|
+
|
641
|
+
if attributes.key?(:'last_mile')
|
642
|
+
self.last_mile = attributes[:'last_mile']
|
643
|
+
end
|
644
|
+
|
645
|
+
if attributes.key?(:'customers')
|
646
|
+
self.customers = attributes[:'customers']
|
647
|
+
end
|
664
648
|
end
|
665
649
|
|
666
650
|
# Attribute type mapping.
|
@@ -670,25 +654,22 @@ module AftershipAPI::Model
|
|
670
654
|
:'legacy_id' => :'String',
|
671
655
|
:'created_at' => :'String',
|
672
656
|
:'updated_at' => :'String',
|
673
|
-
:'last_updated_at' => :'String',
|
674
657
|
:'tracking_number' => :'String',
|
675
658
|
:'slug' => :'String',
|
676
659
|
:'active' => :'Boolean',
|
677
660
|
:'custom_fields' => :'Object',
|
678
|
-
:'customer_name' => :'String',
|
679
661
|
:'transit_time' => :'Integer',
|
680
|
-
:'
|
662
|
+
:'origin_country_region' => :'String',
|
681
663
|
:'origin_state' => :'String',
|
682
664
|
:'origin_city' => :'String',
|
683
665
|
:'origin_postal_code' => :'String',
|
684
666
|
:'origin_raw_location' => :'String',
|
685
|
-
:'
|
667
|
+
:'destination_country_region' => :'String',
|
686
668
|
:'destination_state' => :'String',
|
687
669
|
:'destination_city' => :'String',
|
688
670
|
:'destination_postal_code' => :'String',
|
689
671
|
:'destination_raw_location' => :'String',
|
690
|
-
:'
|
691
|
-
:'emails' => :'Array<String>',
|
672
|
+
:'courier_destination_country_region' => :'String',
|
692
673
|
:'courier_estimated_delivery_date' => :'CourierEstimatedDeliveryDateRetrackTrackingByIdResponse',
|
693
674
|
:'note' => :'String',
|
694
675
|
:'order_id' => :'String',
|
@@ -700,7 +681,6 @@ module AftershipAPI::Model
|
|
700
681
|
:'shipment_type' => :'String',
|
701
682
|
:'shipment_weight' => :'ShipmentWeightRetrackTrackingByIdResponse',
|
702
683
|
:'signed_by' => :'String',
|
703
|
-
:'smses' => :'Array<String>',
|
704
684
|
:'source' => :'String',
|
705
685
|
:'tag' => :'TagV1',
|
706
686
|
:'subtag' => :'String',
|
@@ -734,9 +714,8 @@ module AftershipAPI::Model
|
|
734
714
|
:'latest_estimated_delivery' => :'LatestEstimatedDeliveryRetrackTrackingByIdResponse',
|
735
715
|
:'shipment_tags' => :'Array<String>',
|
736
716
|
:'courier_connection_id' => :'String',
|
737
|
-
:'
|
738
|
-
:'
|
739
|
-
:'tracking_destination_country' => :'String',
|
717
|
+
:'tracking_origin_country_region' => :'String',
|
718
|
+
:'tracking_destination_country_region' => :'String',
|
740
719
|
:'tracking_postal_code' => :'String',
|
741
720
|
:'tracking_state' => :'String',
|
742
721
|
:'carbon_emissions' => :'CarbonEmissionsRetrackTrackingByIdResponse',
|
@@ -747,6 +726,9 @@ module AftershipAPI::Model
|
|
747
726
|
:'delivery_location_type' => :'String',
|
748
727
|
:'aftership_tracking_url' => :'String',
|
749
728
|
:'aftership_tracking_order_url' => :'String',
|
729
|
+
:'first_mile' => :'FirstMileRetrackTrackingByIdResponse',
|
730
|
+
:'last_mile' => :'LastMileRetrackTrackingByIdResponse',
|
731
|
+
:'customers' => :'Array<CustomersRetrackTrackingByIdResponse>',
|
750
732
|
}
|
751
733
|
end
|
752
734
|
|
@@ -757,25 +739,22 @@ module AftershipAPI::Model
|
|
757
739
|
:'legacy_id' => :'legacy_id',
|
758
740
|
:'created_at' => :'created_at',
|
759
741
|
:'updated_at' => :'updated_at',
|
760
|
-
:'last_updated_at' => :'last_updated_at',
|
761
742
|
:'tracking_number' => :'tracking_number',
|
762
743
|
:'slug' => :'slug',
|
763
744
|
:'active' => :'active',
|
764
745
|
:'custom_fields' => :'custom_fields',
|
765
|
-
:'customer_name' => :'customer_name',
|
766
746
|
:'transit_time' => :'transit_time',
|
767
|
-
:'
|
747
|
+
:'origin_country_region' => :'origin_country_region',
|
768
748
|
:'origin_state' => :'origin_state',
|
769
749
|
:'origin_city' => :'origin_city',
|
770
750
|
:'origin_postal_code' => :'origin_postal_code',
|
771
751
|
:'origin_raw_location' => :'origin_raw_location',
|
772
|
-
:'
|
752
|
+
:'destination_country_region' => :'destination_country_region',
|
773
753
|
:'destination_state' => :'destination_state',
|
774
754
|
:'destination_city' => :'destination_city',
|
775
755
|
:'destination_postal_code' => :'destination_postal_code',
|
776
756
|
:'destination_raw_location' => :'destination_raw_location',
|
777
|
-
:'
|
778
|
-
:'emails' => :'emails',
|
757
|
+
:'courier_destination_country_region' => :'courier_destination_country_region',
|
779
758
|
:'courier_estimated_delivery_date' => :'courier_estimated_delivery_date',
|
780
759
|
:'note' => :'note',
|
781
760
|
:'order_id' => :'order_id',
|
@@ -787,7 +766,6 @@ module AftershipAPI::Model
|
|
787
766
|
:'shipment_type' => :'shipment_type',
|
788
767
|
:'shipment_weight' => :'shipment_weight',
|
789
768
|
:'signed_by' => :'signed_by',
|
790
|
-
:'smses' => :'smses',
|
791
769
|
:'source' => :'source',
|
792
770
|
:'tag' => :'tag',
|
793
771
|
:'subtag' => :'subtag',
|
@@ -821,9 +799,8 @@ module AftershipAPI::Model
|
|
821
799
|
:'latest_estimated_delivery' => :'latest_estimated_delivery',
|
822
800
|
:'shipment_tags' => :'shipment_tags',
|
823
801
|
:'courier_connection_id' => :'courier_connection_id',
|
824
|
-
:'
|
825
|
-
:'
|
826
|
-
:'tracking_destination_country' => :'tracking_destination_country',
|
802
|
+
:'tracking_origin_country_region' => :'tracking_origin_country_region',
|
803
|
+
:'tracking_destination_country_region' => :'tracking_destination_country_region',
|
827
804
|
:'tracking_postal_code' => :'tracking_postal_code',
|
828
805
|
:'tracking_state' => :'tracking_state',
|
829
806
|
:'carbon_emissions' => :'carbon_emissions',
|
@@ -834,6 +811,9 @@ module AftershipAPI::Model
|
|
834
811
|
:'delivery_location_type' => :'delivery_location_type',
|
835
812
|
:'aftership_tracking_url' => :'aftership_tracking_url',
|
836
813
|
:'aftership_tracking_order_url' => :'aftership_tracking_order_url',
|
814
|
+
:'first_mile' => :'first_mile',
|
815
|
+
:'last_mile' => :'last_mile',
|
816
|
+
:'customers' => :'customers',
|
837
817
|
}
|
838
818
|
end
|
839
819
|
|