aftership-tracking-sdk 8.0.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +4 -3
- data/lib/aftership-tracking-sdk/api/courier.rb +6 -6
- data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +4 -4
- data/lib/aftership-tracking-sdk/api/tracking.rb +23 -389
- data/lib/aftership-tracking-sdk/api_client.rb +2 -2
- data/lib/aftership-tracking-sdk/configuration.rb +108 -108
- data/lib/aftership-tracking-sdk/models/additional_fields_v1.rb +1 -1
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/carbon_emissions_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/checkpoint.rb +2 -0
- data/lib/aftership-tracking-sdk/models/coordinate_checkpoint.rb +2 -0
- data/lib/aftership-tracking-sdk/models/courier.rb +2 -0
- data/lib/aftership-tracking-sdk/models/{aftership_estimated_delivery_date_get_tracking_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_create_tracking_response.rb} +7 -15
- data/lib/aftership-tracking-sdk/models/{aftership_estimated_delivery_date_retrack_tracking_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_delete_tracking_by_id_response.rb} +7 -15
- data/lib/aftership-tracking-sdk/models/{aftership_estimated_delivery_date_mark_tracking_completed_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_get_tracking_by_id_response.rb} +7 -15
- data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +173 -0
- data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.rb +173 -0
- data/lib/aftership-tracking-sdk/models/{aftership_estimated_delivery_date_delete_tracking_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_tracking.rb} +7 -15
- data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_update_tracking_by_id_response.rb +173 -0
- data/lib/aftership-tracking-sdk/models/courier_response_v1.rb +2 -0
- data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/data_courier_response_v1.rb +2 -0
- data/lib/aftership-tracking-sdk/models/data_tracking_response_get_multiple_v1.rb +8 -126
- data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/detect_courier_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/events_checkpoint.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/get_all_couriers_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/get_trackings_response.rb +5 -3
- data/lib/aftership-tracking-sdk/models/get_user_couriers_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/meta_v1.rb +2 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_create_tracking_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_create_tracking_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_delete_tracking_by_id_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_get_tracking_by_id_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_mark_tracking_completed_by_id_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_tracking.rb +22 -0
- data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_id_response.rb +22 -0
- data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/pagination.rb +14 -6
- data/lib/aftership-tracking-sdk/models/{next_couriers_get_tracking_by_slug_tracking_number_response.rb → pagination_data_tracking_response_get_multiple_v1.rb} +25 -23
- data/lib/aftership-tracking-sdk/models/{next_couriers_delete_tracking_by_slug_tracking_number_response.rb → pagination_get_trackings_response.rb} +25 -23
- data/lib/aftership-tracking-sdk/models/predict_batch_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/predict_batch_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/reason_events_checkpoint.rb +2 -0
- data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/shipment_weight_create_tracking_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_delete_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_get_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_tracking.rb +2 -0
- data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_id_response.rb +2 -0
- data/lib/aftership-tracking-sdk/models/slug_group_v1.rb +1 -1
- data/lib/aftership-tracking-sdk/models/tag_v1.rb +1 -1
- data/lib/aftership-tracking-sdk/models/tracking.rb +29 -7
- data/lib/aftership-tracking-sdk/models/tracking_response_get_multiple_v1.rb +2 -0
- data/lib/aftership-tracking-sdk/models/tracking_response_v1.rb +2 -0
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +29 -7
- data/lib/aftership-tracking-sdk/models/weight_estimated_delivery_date_request.rb +2 -0
- data/lib/aftership-tracking-sdk/models/weight_estimated_delivery_date_response.rb +2 -0
- data/lib/aftership-tracking-sdk/version.rb +1 -1
- metadata +11 -45
- data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_update_tracking_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/carbon_emissions_delete_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/carbon_emissions_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/carbon_emissions_update_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_update_tracking_by_slug_tracking_number_response.rb +0 -181
- data/lib/aftership-tracking-sdk/models/custom_fields_update_tracking_by_slug_tracking_number_request.rb +0 -139
- data/lib/aftership-tracking-sdk/models/delete_tracking_by_slug_tracking_number_response.rb +0 -931
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/first_estimated_delivery_update_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/get_tracking_by_slug_tracking_number_response.rb +0 -931
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_slug_tracking_number_response.rb +0 -191
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_slug_tracking_number_request.rb +0 -151
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_slug_tracking_number_response.rb +0 -931
- data/lib/aftership-tracking-sdk/models/next_couriers_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -171
- data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_slug_tracking_number_response.rb +0 -171
- data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_slug_tracking_number_response.rb +0 -171
- data/lib/aftership-tracking-sdk/models/retrack_tracking_by_slug_tracking_number_response.rb +0 -931
- data/lib/aftership-tracking-sdk/models/shipment_weight_delete_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/shipment_weight_get_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_slug_tracking_number_response.rb +0 -161
- data/lib/aftership-tracking-sdk/models/update_tracking_by_slug_tracking_number_request.rb +0 -391
- data/lib/aftership-tracking-sdk/models/update_tracking_by_slug_tracking_number_response.rb +0 -931
@@ -1,20 +1,17 @@
|
|
1
1
|
# This code was auto generated by AfterShip SDK Generator.
|
2
2
|
# Do not edit the class manually.
|
3
3
|
module AftershipAPI::Model
|
4
|
-
class
|
5
|
-
|
4
|
+
class CourierEstimatedDeliveryDateGetTrackingByIdResponse
|
5
|
+
|
6
|
+
# The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
6
7
|
# estimated_delivery_date?: String;
|
7
8
|
attr_accessor :estimated_delivery_date
|
8
9
|
|
9
|
-
#
|
10
|
-
# confidence_code?: Float;
|
11
|
-
attr_accessor :confidence_code
|
12
|
-
|
13
|
-
# Earliest estimated delivery date of the shipment.
|
10
|
+
# The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
14
11
|
# estimated_delivery_date_min?: String;
|
15
12
|
attr_accessor :estimated_delivery_date_min
|
16
13
|
|
17
|
-
# Latest estimated delivery date of the shipment.
|
14
|
+
# The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
18
15
|
# estimated_delivery_date_max?: String;
|
19
16
|
attr_accessor :estimated_delivery_date_max
|
20
17
|
|
@@ -22,7 +19,7 @@ module AftershipAPI::Model
|
|
22
19
|
# @param [Hash] attributes Model attributes in the form of hash
|
23
20
|
def initialize(attributes = {})
|
24
21
|
if (!attributes.is_a?(Hash))
|
25
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::
|
22
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierEstimatedDeliveryDateGetTrackingByIdResponse` initialize method"
|
26
23
|
end
|
27
24
|
|
28
25
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
@@ -33,10 +30,6 @@ module AftershipAPI::Model
|
|
33
30
|
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
34
31
|
end
|
35
32
|
|
36
|
-
if attributes.key?(:'confidence_code')
|
37
|
-
self.confidence_code = attributes[:'confidence_code']
|
38
|
-
end
|
39
|
-
|
40
33
|
if attributes.key?(:'estimated_delivery_date_min')
|
41
34
|
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
42
35
|
end
|
@@ -50,7 +43,6 @@ module AftershipAPI::Model
|
|
50
43
|
def self.openapi_types
|
51
44
|
{
|
52
45
|
:'estimated_delivery_date' => :'String',
|
53
|
-
:'confidence_code' => :'Float',
|
54
46
|
:'estimated_delivery_date_min' => :'String',
|
55
47
|
:'estimated_delivery_date_max' => :'String',
|
56
48
|
}
|
@@ -60,7 +52,6 @@ module AftershipAPI::Model
|
|
60
52
|
def self.attribute_map
|
61
53
|
{
|
62
54
|
:'estimated_delivery_date' => :'estimated_delivery_date',
|
63
|
-
:'confidence_code' => :'confidence_code',
|
64
55
|
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
65
56
|
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
66
57
|
}
|
@@ -179,3 +170,4 @@ module AftershipAPI::Model
|
|
179
170
|
end
|
180
171
|
end
|
181
172
|
end
|
173
|
+
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse
|
5
|
+
|
6
|
+
# The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
7
|
+
# estimated_delivery_date?: String;
|
8
|
+
attr_accessor :estimated_delivery_date
|
9
|
+
|
10
|
+
# The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
11
|
+
# estimated_delivery_date_min?: String;
|
12
|
+
attr_accessor :estimated_delivery_date_min
|
13
|
+
|
14
|
+
# The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
15
|
+
# estimated_delivery_date_max?: String;
|
16
|
+
attr_accessor :estimated_delivery_date_max
|
17
|
+
|
18
|
+
# Initializes the object
|
19
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
20
|
+
def initialize(attributes = {})
|
21
|
+
if (!attributes.is_a?(Hash))
|
22
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse` initialize method"
|
23
|
+
end
|
24
|
+
|
25
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
26
|
+
h[k.to_sym] = v
|
27
|
+
}
|
28
|
+
|
29
|
+
if attributes.key?(:'estimated_delivery_date')
|
30
|
+
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
31
|
+
end
|
32
|
+
|
33
|
+
if attributes.key?(:'estimated_delivery_date_min')
|
34
|
+
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
35
|
+
end
|
36
|
+
|
37
|
+
if attributes.key?(:'estimated_delivery_date_max')
|
38
|
+
self.estimated_delivery_date_max = attributes[:'estimated_delivery_date_max']
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'estimated_delivery_date' => :'String',
|
46
|
+
:'estimated_delivery_date_min' => :'String',
|
47
|
+
:'estimated_delivery_date_max' => :'String',
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'estimated_delivery_date' => :'estimated_delivery_date',
|
55
|
+
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
56
|
+
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Builds the object from hash
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
62
|
+
# @return [Object] Returns the model itself
|
63
|
+
def self.build_from_hash(attributes)
|
64
|
+
return nil unless attributes.is_a?(Hash)
|
65
|
+
attributes = attributes.transform_keys(&:to_sym)
|
66
|
+
transformed_hash = {}
|
67
|
+
openapi_types.each_pair do |key, type|
|
68
|
+
if attributes.key?(key) && attributes[key].nil?
|
69
|
+
transformed_hash["#{key}"] = nil
|
70
|
+
elsif type =~ /\AArray<(.*)>/i
|
71
|
+
# check to ensure the input is an array given that the attribute
|
72
|
+
# is documented as an array but the input is not
|
73
|
+
if attributes[key].is_a?(Array)
|
74
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
75
|
+
end
|
76
|
+
elsif !attributes[key].nil?
|
77
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
new(transformed_hash)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Deserializes the data based on type
|
84
|
+
# @param type [String] Data type
|
85
|
+
# @param value [String] Value to be deserialized
|
86
|
+
# @return [Object] Deserialized data
|
87
|
+
def self._deserialize(type, value)
|
88
|
+
case type.to_sym
|
89
|
+
when :Time
|
90
|
+
Time.parse(value)
|
91
|
+
when :Date
|
92
|
+
Date.parse(value)
|
93
|
+
when :String
|
94
|
+
value.to_s
|
95
|
+
when :Integer
|
96
|
+
value.to_i
|
97
|
+
when :Float
|
98
|
+
value.to_f
|
99
|
+
when :Boolean
|
100
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
101
|
+
true
|
102
|
+
else
|
103
|
+
false
|
104
|
+
end
|
105
|
+
when :Object
|
106
|
+
# generic object (usually a Hash), return directly
|
107
|
+
value
|
108
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
109
|
+
inner_type = Regexp.last_match[:inner_type]
|
110
|
+
value.map { |v| _deserialize(inner_type, v) }
|
111
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
112
|
+
k_type = Regexp.last_match[:k_type]
|
113
|
+
v_type = Regexp.last_match[:v_type]
|
114
|
+
{}.tap do |hash|
|
115
|
+
value.each do |k, v|
|
116
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
else # model
|
120
|
+
klass = AftershipAPI::Model.const_get(type)
|
121
|
+
klass.build_from_hash(value)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Returns the string representation of the object
|
126
|
+
# @return [String] String presentation of the object
|
127
|
+
def to_s
|
128
|
+
to_hash.to_s
|
129
|
+
end
|
130
|
+
|
131
|
+
# to_body is an alias to to_hash (backward compatibility)
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
133
|
+
def to_body
|
134
|
+
to_hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Returns the object in the form of hash
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
139
|
+
def to_hash
|
140
|
+
hash = {}
|
141
|
+
self.class.attribute_map.each_pair do |attr, param|
|
142
|
+
value = self.send(attr)
|
143
|
+
next if value.nil?
|
144
|
+
|
145
|
+
hash[param] = _to_hash(value)
|
146
|
+
end
|
147
|
+
hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Outputs non-array value in the form of hash
|
151
|
+
# For object, use to_hash. Otherwise, just return the value
|
152
|
+
# @param value [Object] Any valid value
|
153
|
+
# @return [Hash] Returns the value in the form of hash
|
154
|
+
def _to_hash(value)
|
155
|
+
if value.is_a?(Array)
|
156
|
+
value.compact.map { |v| _to_hash(v) }
|
157
|
+
elsif value.is_a?(Hash)
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
160
|
+
end
|
161
|
+
elsif value.respond_to? :to_hash
|
162
|
+
value.to_hash
|
163
|
+
else
|
164
|
+
value
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def to_json(*a)
|
169
|
+
to_hash.to_json(*a)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class CourierEstimatedDeliveryDateRetrackTrackingByIdResponse
|
5
|
+
|
6
|
+
# The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
7
|
+
# estimated_delivery_date?: String;
|
8
|
+
attr_accessor :estimated_delivery_date
|
9
|
+
|
10
|
+
# The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
11
|
+
# estimated_delivery_date_min?: String;
|
12
|
+
attr_accessor :estimated_delivery_date_min
|
13
|
+
|
14
|
+
# The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
15
|
+
# estimated_delivery_date_max?: String;
|
16
|
+
attr_accessor :estimated_delivery_date_max
|
17
|
+
|
18
|
+
# Initializes the object
|
19
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
20
|
+
def initialize(attributes = {})
|
21
|
+
if (!attributes.is_a?(Hash))
|
22
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierEstimatedDeliveryDateRetrackTrackingByIdResponse` initialize method"
|
23
|
+
end
|
24
|
+
|
25
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
26
|
+
h[k.to_sym] = v
|
27
|
+
}
|
28
|
+
|
29
|
+
if attributes.key?(:'estimated_delivery_date')
|
30
|
+
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
31
|
+
end
|
32
|
+
|
33
|
+
if attributes.key?(:'estimated_delivery_date_min')
|
34
|
+
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
35
|
+
end
|
36
|
+
|
37
|
+
if attributes.key?(:'estimated_delivery_date_max')
|
38
|
+
self.estimated_delivery_date_max = attributes[:'estimated_delivery_date_max']
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'estimated_delivery_date' => :'String',
|
46
|
+
:'estimated_delivery_date_min' => :'String',
|
47
|
+
:'estimated_delivery_date_max' => :'String',
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'estimated_delivery_date' => :'estimated_delivery_date',
|
55
|
+
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
56
|
+
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Builds the object from hash
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
62
|
+
# @return [Object] Returns the model itself
|
63
|
+
def self.build_from_hash(attributes)
|
64
|
+
return nil unless attributes.is_a?(Hash)
|
65
|
+
attributes = attributes.transform_keys(&:to_sym)
|
66
|
+
transformed_hash = {}
|
67
|
+
openapi_types.each_pair do |key, type|
|
68
|
+
if attributes.key?(key) && attributes[key].nil?
|
69
|
+
transformed_hash["#{key}"] = nil
|
70
|
+
elsif type =~ /\AArray<(.*)>/i
|
71
|
+
# check to ensure the input is an array given that the attribute
|
72
|
+
# is documented as an array but the input is not
|
73
|
+
if attributes[key].is_a?(Array)
|
74
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
75
|
+
end
|
76
|
+
elsif !attributes[key].nil?
|
77
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
new(transformed_hash)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Deserializes the data based on type
|
84
|
+
# @param type [String] Data type
|
85
|
+
# @param value [String] Value to be deserialized
|
86
|
+
# @return [Object] Deserialized data
|
87
|
+
def self._deserialize(type, value)
|
88
|
+
case type.to_sym
|
89
|
+
when :Time
|
90
|
+
Time.parse(value)
|
91
|
+
when :Date
|
92
|
+
Date.parse(value)
|
93
|
+
when :String
|
94
|
+
value.to_s
|
95
|
+
when :Integer
|
96
|
+
value.to_i
|
97
|
+
when :Float
|
98
|
+
value.to_f
|
99
|
+
when :Boolean
|
100
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
101
|
+
true
|
102
|
+
else
|
103
|
+
false
|
104
|
+
end
|
105
|
+
when :Object
|
106
|
+
# generic object (usually a Hash), return directly
|
107
|
+
value
|
108
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
109
|
+
inner_type = Regexp.last_match[:inner_type]
|
110
|
+
value.map { |v| _deserialize(inner_type, v) }
|
111
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
112
|
+
k_type = Regexp.last_match[:k_type]
|
113
|
+
v_type = Regexp.last_match[:v_type]
|
114
|
+
{}.tap do |hash|
|
115
|
+
value.each do |k, v|
|
116
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
else # model
|
120
|
+
klass = AftershipAPI::Model.const_get(type)
|
121
|
+
klass.build_from_hash(value)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Returns the string representation of the object
|
126
|
+
# @return [String] String presentation of the object
|
127
|
+
def to_s
|
128
|
+
to_hash.to_s
|
129
|
+
end
|
130
|
+
|
131
|
+
# to_body is an alias to to_hash (backward compatibility)
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
133
|
+
def to_body
|
134
|
+
to_hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Returns the object in the form of hash
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
139
|
+
def to_hash
|
140
|
+
hash = {}
|
141
|
+
self.class.attribute_map.each_pair do |attr, param|
|
142
|
+
value = self.send(attr)
|
143
|
+
next if value.nil?
|
144
|
+
|
145
|
+
hash[param] = _to_hash(value)
|
146
|
+
end
|
147
|
+
hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Outputs non-array value in the form of hash
|
151
|
+
# For object, use to_hash. Otherwise, just return the value
|
152
|
+
# @param value [Object] Any valid value
|
153
|
+
# @return [Hash] Returns the value in the form of hash
|
154
|
+
def _to_hash(value)
|
155
|
+
if value.is_a?(Array)
|
156
|
+
value.compact.map { |v| _to_hash(v) }
|
157
|
+
elsif value.is_a?(Hash)
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
160
|
+
end
|
161
|
+
elsif value.respond_to? :to_hash
|
162
|
+
value.to_hash
|
163
|
+
else
|
164
|
+
value
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def to_json(*a)
|
169
|
+
to_hash.to_json(*a)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
@@ -1,20 +1,17 @@
|
|
1
1
|
# This code was auto generated by AfterShip SDK Generator.
|
2
2
|
# Do not edit the class manually.
|
3
3
|
module AftershipAPI::Model
|
4
|
-
class
|
5
|
-
|
4
|
+
class CourierEstimatedDeliveryDateTracking
|
5
|
+
|
6
|
+
# The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
6
7
|
# estimated_delivery_date?: String;
|
7
8
|
attr_accessor :estimated_delivery_date
|
8
9
|
|
9
|
-
#
|
10
|
-
# confidence_code?: Float;
|
11
|
-
attr_accessor :confidence_code
|
12
|
-
|
13
|
-
# Earliest estimated delivery date of the shipment.
|
10
|
+
# The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
14
11
|
# estimated_delivery_date_min?: String;
|
15
12
|
attr_accessor :estimated_delivery_date_min
|
16
13
|
|
17
|
-
# Latest estimated delivery date of the shipment.
|
14
|
+
# The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
18
15
|
# estimated_delivery_date_max?: String;
|
19
16
|
attr_accessor :estimated_delivery_date_max
|
20
17
|
|
@@ -22,7 +19,7 @@ module AftershipAPI::Model
|
|
22
19
|
# @param [Hash] attributes Model attributes in the form of hash
|
23
20
|
def initialize(attributes = {})
|
24
21
|
if (!attributes.is_a?(Hash))
|
25
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::
|
22
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierEstimatedDeliveryDateTracking` initialize method"
|
26
23
|
end
|
27
24
|
|
28
25
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
@@ -33,10 +30,6 @@ module AftershipAPI::Model
|
|
33
30
|
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
34
31
|
end
|
35
32
|
|
36
|
-
if attributes.key?(:'confidence_code')
|
37
|
-
self.confidence_code = attributes[:'confidence_code']
|
38
|
-
end
|
39
|
-
|
40
33
|
if attributes.key?(:'estimated_delivery_date_min')
|
41
34
|
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
42
35
|
end
|
@@ -50,7 +43,6 @@ module AftershipAPI::Model
|
|
50
43
|
def self.openapi_types
|
51
44
|
{
|
52
45
|
:'estimated_delivery_date' => :'String',
|
53
|
-
:'confidence_code' => :'Float',
|
54
46
|
:'estimated_delivery_date_min' => :'String',
|
55
47
|
:'estimated_delivery_date_max' => :'String',
|
56
48
|
}
|
@@ -60,7 +52,6 @@ module AftershipAPI::Model
|
|
60
52
|
def self.attribute_map
|
61
53
|
{
|
62
54
|
:'estimated_delivery_date' => :'estimated_delivery_date',
|
63
|
-
:'confidence_code' => :'confidence_code',
|
64
55
|
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
65
56
|
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
66
57
|
}
|
@@ -179,3 +170,4 @@ module AftershipAPI::Model
|
|
179
170
|
end
|
180
171
|
end
|
181
172
|
end
|
173
|
+
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class CourierEstimatedDeliveryDateUpdateTrackingByIdResponse
|
5
|
+
|
6
|
+
# The estimated arrival date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
7
|
+
# estimated_delivery_date?: String;
|
8
|
+
attr_accessor :estimated_delivery_date
|
9
|
+
|
10
|
+
# The earliest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
11
|
+
# estimated_delivery_date_min?: String;
|
12
|
+
attr_accessor :estimated_delivery_date_min
|
13
|
+
|
14
|
+
# The Latest estimated delivery date of the shipment. It reflects the shipment recipient’s timezone and the format may vary based on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
|
15
|
+
# estimated_delivery_date_max?: String;
|
16
|
+
attr_accessor :estimated_delivery_date_max
|
17
|
+
|
18
|
+
# Initializes the object
|
19
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
20
|
+
def initialize(attributes = {})
|
21
|
+
if (!attributes.is_a?(Hash))
|
22
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierEstimatedDeliveryDateUpdateTrackingByIdResponse` initialize method"
|
23
|
+
end
|
24
|
+
|
25
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
26
|
+
h[k.to_sym] = v
|
27
|
+
}
|
28
|
+
|
29
|
+
if attributes.key?(:'estimated_delivery_date')
|
30
|
+
self.estimated_delivery_date = attributes[:'estimated_delivery_date']
|
31
|
+
end
|
32
|
+
|
33
|
+
if attributes.key?(:'estimated_delivery_date_min')
|
34
|
+
self.estimated_delivery_date_min = attributes[:'estimated_delivery_date_min']
|
35
|
+
end
|
36
|
+
|
37
|
+
if attributes.key?(:'estimated_delivery_date_max')
|
38
|
+
self.estimated_delivery_date_max = attributes[:'estimated_delivery_date_max']
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'estimated_delivery_date' => :'String',
|
46
|
+
:'estimated_delivery_date_min' => :'String',
|
47
|
+
:'estimated_delivery_date_max' => :'String',
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'estimated_delivery_date' => :'estimated_delivery_date',
|
55
|
+
:'estimated_delivery_date_min' => :'estimated_delivery_date_min',
|
56
|
+
:'estimated_delivery_date_max' => :'estimated_delivery_date_max',
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Builds the object from hash
|
61
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
62
|
+
# @return [Object] Returns the model itself
|
63
|
+
def self.build_from_hash(attributes)
|
64
|
+
return nil unless attributes.is_a?(Hash)
|
65
|
+
attributes = attributes.transform_keys(&:to_sym)
|
66
|
+
transformed_hash = {}
|
67
|
+
openapi_types.each_pair do |key, type|
|
68
|
+
if attributes.key?(key) && attributes[key].nil?
|
69
|
+
transformed_hash["#{key}"] = nil
|
70
|
+
elsif type =~ /\AArray<(.*)>/i
|
71
|
+
# check to ensure the input is an array given that the attribute
|
72
|
+
# is documented as an array but the input is not
|
73
|
+
if attributes[key].is_a?(Array)
|
74
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
75
|
+
end
|
76
|
+
elsif !attributes[key].nil?
|
77
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
new(transformed_hash)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Deserializes the data based on type
|
84
|
+
# @param type [String] Data type
|
85
|
+
# @param value [String] Value to be deserialized
|
86
|
+
# @return [Object] Deserialized data
|
87
|
+
def self._deserialize(type, value)
|
88
|
+
case type.to_sym
|
89
|
+
when :Time
|
90
|
+
Time.parse(value)
|
91
|
+
when :Date
|
92
|
+
Date.parse(value)
|
93
|
+
when :String
|
94
|
+
value.to_s
|
95
|
+
when :Integer
|
96
|
+
value.to_i
|
97
|
+
when :Float
|
98
|
+
value.to_f
|
99
|
+
when :Boolean
|
100
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
101
|
+
true
|
102
|
+
else
|
103
|
+
false
|
104
|
+
end
|
105
|
+
when :Object
|
106
|
+
# generic object (usually a Hash), return directly
|
107
|
+
value
|
108
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
109
|
+
inner_type = Regexp.last_match[:inner_type]
|
110
|
+
value.map { |v| _deserialize(inner_type, v) }
|
111
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
112
|
+
k_type = Regexp.last_match[:k_type]
|
113
|
+
v_type = Regexp.last_match[:v_type]
|
114
|
+
{}.tap do |hash|
|
115
|
+
value.each do |k, v|
|
116
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
else # model
|
120
|
+
klass = AftershipAPI::Model.const_get(type)
|
121
|
+
klass.build_from_hash(value)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Returns the string representation of the object
|
126
|
+
# @return [String] String presentation of the object
|
127
|
+
def to_s
|
128
|
+
to_hash.to_s
|
129
|
+
end
|
130
|
+
|
131
|
+
# to_body is an alias to to_hash (backward compatibility)
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
133
|
+
def to_body
|
134
|
+
to_hash
|
135
|
+
end
|
136
|
+
|
137
|
+
# Returns the object in the form of hash
|
138
|
+
# @return [Hash] Returns the object in the form of hash
|
139
|
+
def to_hash
|
140
|
+
hash = {}
|
141
|
+
self.class.attribute_map.each_pair do |attr, param|
|
142
|
+
value = self.send(attr)
|
143
|
+
next if value.nil?
|
144
|
+
|
145
|
+
hash[param] = _to_hash(value)
|
146
|
+
end
|
147
|
+
hash
|
148
|
+
end
|
149
|
+
|
150
|
+
# Outputs non-array value in the form of hash
|
151
|
+
# For object, use to_hash. Otherwise, just return the value
|
152
|
+
# @param value [Object] Any valid value
|
153
|
+
# @return [Hash] Returns the value in the form of hash
|
154
|
+
def _to_hash(value)
|
155
|
+
if value.is_a?(Array)
|
156
|
+
value.compact.map { |v| _to_hash(v) }
|
157
|
+
elsif value.is_a?(Hash)
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
160
|
+
end
|
161
|
+
elsif value.respond_to? :to_hash
|
162
|
+
value.to_hash
|
163
|
+
else
|
164
|
+
value
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
def to_json(*a)
|
169
|
+
to_hash.to_json(*a)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# Do not edit the class manually.
|
3
3
|
module AftershipAPI::Model
|
4
4
|
class CreateTrackingRequest
|
5
|
+
|
5
6
|
# Tracking number of a shipment.Duplicated tracking numbers, tracking numbers with invalid tracking number format will not be accepted.We only accept tracking numbers with length from 4 to 100We currently support the following characters in a tracking number:- A - Z- 0 - 9- `-` (Hyphen)- . (Period)- _ (Underscore)- / (Slash)
|
6
7
|
# tracking_number: String;
|
7
8
|
attr_accessor :tracking_number
|
@@ -549,3 +550,4 @@ module AftershipAPI::Model
|
|
549
550
|
end
|
550
551
|
end
|
551
552
|
end
|
553
|
+
|