aftership-tracking-sdk 10.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -12
- data/lib/aftership-tracking-sdk/api/courier.rb +16 -60
- data/lib/aftership-tracking-sdk/api/courier_connection.rb +283 -0
- data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +2 -2
- data/lib/aftership-tracking-sdk/api/tracking.rb +9 -9
- data/lib/aftership-tracking-sdk/models/{additional_fields_v1.rb → additional_fields.rb} +9 -9
- data/lib/aftership-tracking-sdk/models/checkpoint.rb +2 -2
- data/lib/aftership-tracking-sdk/models/courier.rb +10 -0
- data/lib/aftership-tracking-sdk/models/courier_connection.rb +193 -0
- data/lib/aftership-tracking-sdk/models/courier_connection_response_for_get_courier_connections.rb +163 -0
- data/lib/aftership-tracking-sdk/models/{courier_response_v1.rb → courier_response.rb} +6 -6
- data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +22 -52
- data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +4 -44
- data/lib/aftership-tracking-sdk/models/credential_field.rb +173 -0
- data/lib/aftership-tracking-sdk/models/{get_user_couriers_response.rb → credentials_courier.rb} +9 -19
- data/lib/aftership-tracking-sdk/models/data_courier_connection_response_for_get_courier_connections.rb +163 -0
- data/lib/aftership-tracking-sdk/models/{data_courier_response_v1.rb → data_courier_response.rb} +2 -2
- data/lib/aftership-tracking-sdk/models/{data_tracking_response_get_multiple_v1.rb → data_tracking_response_for_get_trackings.rb} +4 -4
- data/lib/aftership-tracking-sdk/models/delete_courier_connections_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +4 -44
- data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +14 -34
- data/lib/aftership-tracking-sdk/models/first_mile_create_tracking_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_delete_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_get_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_mark_tracking_completed_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_retrack_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_tracking.rb +2 -2
- data/lib/aftership-tracking-sdk/models/first_mile_update_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/get_courier_connections_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/get_courier_connections_response.rb +163 -0
- data/lib/aftership-tracking-sdk/models/{get_all_couriers_response.rb → get_couriers_response.rb} +2 -2
- data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +4 -44
- data/lib/aftership-tracking-sdk/models/last_mile_create_tracking_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_delete_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_get_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_mark_tracking_completed_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_retrack_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_tracking.rb +2 -2
- data/lib/aftership-tracking-sdk/models/last_mile_update_tracking_by_id_response.rb +2 -2
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_create_tracking_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_tracking.rb +10 -0
- data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_id_response.rb +10 -0
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request.rb +10 -0
- data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +4 -44
- data/lib/aftership-tracking-sdk/models/{meta_v1.rb → meta.rb} +2 -2
- data/lib/aftership-tracking-sdk/models/pagination_data_courier_connection_response_for_get_courier_connections.rb +173 -0
- data/lib/aftership-tracking-sdk/models/{pagination_data_tracking_response_get_multiple_v1.rb → pagination_data_tracking_response_for_get_trackings.rb} +2 -2
- data/lib/aftership-tracking-sdk/models/pagination_get_courier_connections_response.rb +173 -0
- data/lib/aftership-tracking-sdk/models/post_courier_connections_request.rb +163 -0
- data/lib/aftership-tracking-sdk/models/post_courier_connections_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_request.rb +153 -0
- data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_response.rb +193 -0
- data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +4 -44
- data/lib/aftership-tracking-sdk/models/{slug_group_v1.rb → slug_group.rb} +3 -3
- data/lib/aftership-tracking-sdk/models/{tag_v1.rb → tag.rb} +3 -3
- data/lib/aftership-tracking-sdk/models/tracking.rb +4 -44
- data/lib/aftership-tracking-sdk/models/{tracking_response_v1.rb → tracking_response.rb} +4 -4
- data/lib/aftership-tracking-sdk/models/{tracking_response_get_multiple_v1.rb → tracking_response_for_get_trackings.rb} +6 -6
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +0 -40
- data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +4 -44
- data/lib/aftership-tracking-sdk/version.rb +1 -1
- metadata +28 -14
@@ -0,0 +1,193 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class CourierConnection
|
5
|
+
|
6
|
+
# The courier connection ID is a special set of numbers generated by AfterShip to define each user-created connection.
|
7
|
+
# id?: String;
|
8
|
+
attr_accessor :id
|
9
|
+
|
10
|
+
# Unique courier code. Get courier codes .
|
11
|
+
# courier_slug?: String;
|
12
|
+
attr_accessor :courier_slug
|
13
|
+
|
14
|
+
# It refers to the authentication details required for each specific carrier details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to establish a carrier connection. The content varies by carrier.
|
15
|
+
# credentials?: Object;
|
16
|
+
attr_accessor :credentials
|
17
|
+
|
18
|
+
# The date and time the courier connection was created. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0.
|
19
|
+
# created_at?: String;
|
20
|
+
attr_accessor :created_at
|
21
|
+
|
22
|
+
# The date and time the courier connection was updated. It uses the format YYYY-MM-DDTHH:mm:ssZ for the timezone GMT +0.
|
23
|
+
# updated_at?: String;
|
24
|
+
attr_accessor :updated_at
|
25
|
+
|
26
|
+
# Initializes the object
|
27
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
28
|
+
def initialize(attributes = {})
|
29
|
+
if (!attributes.is_a?(Hash))
|
30
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierConnection` initialize method"
|
31
|
+
end
|
32
|
+
|
33
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
34
|
+
h[k.to_sym] = v
|
35
|
+
}
|
36
|
+
|
37
|
+
if attributes.key?(:'id')
|
38
|
+
self.id = attributes[:'id']
|
39
|
+
end
|
40
|
+
|
41
|
+
if attributes.key?(:'courier_slug')
|
42
|
+
self.courier_slug = attributes[:'courier_slug']
|
43
|
+
end
|
44
|
+
|
45
|
+
if attributes.key?(:'credentials')
|
46
|
+
self.credentials = attributes[:'credentials']
|
47
|
+
end
|
48
|
+
|
49
|
+
if attributes.key?(:'created_at')
|
50
|
+
self.created_at = attributes[:'created_at']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.key?(:'updated_at')
|
54
|
+
self.updated_at = attributes[:'updated_at']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.openapi_types
|
60
|
+
{
|
61
|
+
:'id' => :'String',
|
62
|
+
:'courier_slug' => :'String',
|
63
|
+
:'credentials' => :'Object',
|
64
|
+
:'created_at' => :'String',
|
65
|
+
:'updated_at' => :'String',
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
70
|
+
def self.attribute_map
|
71
|
+
{
|
72
|
+
:'id' => :'id',
|
73
|
+
:'courier_slug' => :'courier_slug',
|
74
|
+
:'credentials' => :'credentials',
|
75
|
+
:'created_at' => :'created_at',
|
76
|
+
:'updated_at' => :'updated_at',
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def self.build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
attributes = attributes.transform_keys(&:to_sym)
|
86
|
+
transformed_hash = {}
|
87
|
+
openapi_types.each_pair do |key, type|
|
88
|
+
if attributes.key?(key) && attributes[key].nil?
|
89
|
+
transformed_hash["#{key}"] = nil
|
90
|
+
elsif type =~ /\AArray<(.*)>/i
|
91
|
+
# check to ensure the input is an array given that the attribute
|
92
|
+
# is documented as an array but the input is not
|
93
|
+
if attributes[key].is_a?(Array)
|
94
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
95
|
+
end
|
96
|
+
elsif !attributes[key].nil?
|
97
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
98
|
+
end
|
99
|
+
end
|
100
|
+
new(transformed_hash)
|
101
|
+
end
|
102
|
+
|
103
|
+
# Deserializes the data based on type
|
104
|
+
# @param type [String] Data type
|
105
|
+
# @param value [String] Value to be deserialized
|
106
|
+
# @return [Object] Deserialized data
|
107
|
+
def self._deserialize(type, value)
|
108
|
+
case type.to_sym
|
109
|
+
when :Time
|
110
|
+
Time.parse(value)
|
111
|
+
when :Date
|
112
|
+
Date.parse(value)
|
113
|
+
when :String
|
114
|
+
value.to_s
|
115
|
+
when :Integer
|
116
|
+
value.to_i
|
117
|
+
when :Float
|
118
|
+
value.to_f
|
119
|
+
when :Boolean
|
120
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
121
|
+
true
|
122
|
+
else
|
123
|
+
false
|
124
|
+
end
|
125
|
+
when :Object
|
126
|
+
# generic object (usually a Hash), return directly
|
127
|
+
value
|
128
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
129
|
+
inner_type = Regexp.last_match[:inner_type]
|
130
|
+
value.map { |v| _deserialize(inner_type, v) }
|
131
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
132
|
+
k_type = Regexp.last_match[:k_type]
|
133
|
+
v_type = Regexp.last_match[:v_type]
|
134
|
+
{}.tap do |hash|
|
135
|
+
value.each do |k, v|
|
136
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
else # model
|
140
|
+
klass = AftershipAPI::Model.const_get(type)
|
141
|
+
klass.build_from_hash(value)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the string representation of the object
|
146
|
+
# @return [String] String presentation of the object
|
147
|
+
def to_s
|
148
|
+
to_hash.to_s
|
149
|
+
end
|
150
|
+
|
151
|
+
# to_body is an alias to to_hash (backward compatibility)
|
152
|
+
# @return [Hash] Returns the object in the form of hash
|
153
|
+
def to_body
|
154
|
+
to_hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Returns the object in the form of hash
|
158
|
+
# @return [Hash] Returns the object in the form of hash
|
159
|
+
def to_hash
|
160
|
+
hash = {}
|
161
|
+
self.class.attribute_map.each_pair do |attr, param|
|
162
|
+
value = self.send(attr)
|
163
|
+
next if value.nil?
|
164
|
+
|
165
|
+
hash[param] = _to_hash(value)
|
166
|
+
end
|
167
|
+
hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Outputs non-array value in the form of hash
|
171
|
+
# For object, use to_hash. Otherwise, just return the value
|
172
|
+
# @param value [Object] Any valid value
|
173
|
+
# @return [Hash] Returns the value in the form of hash
|
174
|
+
def _to_hash(value)
|
175
|
+
if value.is_a?(Array)
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
177
|
+
elsif value.is_a?(Hash)
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
180
|
+
end
|
181
|
+
elsif value.respond_to? :to_hash
|
182
|
+
value.to_hash
|
183
|
+
else
|
184
|
+
value
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
def to_json(*a)
|
189
|
+
to_hash.to_json(*a)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
data/lib/aftership-tracking-sdk/models/courier_connection_response_for_get_courier_connections.rb
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
# This code was auto generated by AfterShip SDK Generator.
|
2
|
+
# Do not edit the class manually.
|
3
|
+
module AftershipAPI::Model
|
4
|
+
class CourierConnectionResponseForGetCourierConnections
|
5
|
+
|
6
|
+
# Meta data
|
7
|
+
# meta: Meta;
|
8
|
+
attr_accessor :meta
|
9
|
+
|
10
|
+
#
|
11
|
+
# data?: DataCourierConnectionResponseForGetCourierConnections;
|
12
|
+
attr_accessor :data
|
13
|
+
|
14
|
+
# Initializes the object
|
15
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
16
|
+
def initialize(attributes = {})
|
17
|
+
if (!attributes.is_a?(Hash))
|
18
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierConnectionResponseForGetCourierConnections` initialize method"
|
19
|
+
end
|
20
|
+
|
21
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
22
|
+
h[k.to_sym] = v
|
23
|
+
}
|
24
|
+
|
25
|
+
if attributes.key?(:'meta')
|
26
|
+
self.meta = attributes[:'meta']
|
27
|
+
end
|
28
|
+
|
29
|
+
if attributes.key?(:'data')
|
30
|
+
self.data = attributes[:'data']
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'meta' => :'Meta',
|
38
|
+
:'data' => :'DataCourierConnectionResponseForGetCourierConnections',
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
:'meta' => :'meta',
|
46
|
+
:'data' => :'data',
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Builds the object from hash
|
51
|
+
# @param attributes [Hash] Model attributes in the form of hash
|
52
|
+
# @return [Object] Returns the model itself
|
53
|
+
def self.build_from_hash(attributes)
|
54
|
+
return nil unless attributes.is_a?(Hash)
|
55
|
+
attributes = attributes.transform_keys(&:to_sym)
|
56
|
+
transformed_hash = {}
|
57
|
+
openapi_types.each_pair do |key, type|
|
58
|
+
if attributes.key?(key) && attributes[key].nil?
|
59
|
+
transformed_hash["#{key}"] = nil
|
60
|
+
elsif type =~ /\AArray<(.*)>/i
|
61
|
+
# check to ensure the input is an array given that the attribute
|
62
|
+
# is documented as an array but the input is not
|
63
|
+
if attributes[key].is_a?(Array)
|
64
|
+
transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
|
65
|
+
end
|
66
|
+
elsif !attributes[key].nil?
|
67
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[key])
|
68
|
+
end
|
69
|
+
end
|
70
|
+
new(transformed_hash)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Deserializes the data based on type
|
74
|
+
# @param type [String] Data type
|
75
|
+
# @param value [String] Value to be deserialized
|
76
|
+
# @return [Object] Deserialized data
|
77
|
+
def self._deserialize(type, value)
|
78
|
+
case type.to_sym
|
79
|
+
when :Time
|
80
|
+
Time.parse(value)
|
81
|
+
when :Date
|
82
|
+
Date.parse(value)
|
83
|
+
when :String
|
84
|
+
value.to_s
|
85
|
+
when :Integer
|
86
|
+
value.to_i
|
87
|
+
when :Float
|
88
|
+
value.to_f
|
89
|
+
when :Boolean
|
90
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
91
|
+
true
|
92
|
+
else
|
93
|
+
false
|
94
|
+
end
|
95
|
+
when :Object
|
96
|
+
# generic object (usually a Hash), return directly
|
97
|
+
value
|
98
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
99
|
+
inner_type = Regexp.last_match[:inner_type]
|
100
|
+
value.map { |v| _deserialize(inner_type, v) }
|
101
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
102
|
+
k_type = Regexp.last_match[:k_type]
|
103
|
+
v_type = Regexp.last_match[:v_type]
|
104
|
+
{}.tap do |hash|
|
105
|
+
value.each do |k, v|
|
106
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
else # model
|
110
|
+
klass = AftershipAPI::Model.const_get(type)
|
111
|
+
klass.build_from_hash(value)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns the string representation of the object
|
116
|
+
# @return [String] String presentation of the object
|
117
|
+
def to_s
|
118
|
+
to_hash.to_s
|
119
|
+
end
|
120
|
+
|
121
|
+
# to_body is an alias to to_hash (backward compatibility)
|
122
|
+
# @return [Hash] Returns the object in the form of hash
|
123
|
+
def to_body
|
124
|
+
to_hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Returns the object in the form of hash
|
128
|
+
# @return [Hash] Returns the object in the form of hash
|
129
|
+
def to_hash
|
130
|
+
hash = {}
|
131
|
+
self.class.attribute_map.each_pair do |attr, param|
|
132
|
+
value = self.send(attr)
|
133
|
+
next if value.nil?
|
134
|
+
|
135
|
+
hash[param] = _to_hash(value)
|
136
|
+
end
|
137
|
+
hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Outputs non-array value in the form of hash
|
141
|
+
# For object, use to_hash. Otherwise, just return the value
|
142
|
+
# @param value [Object] Any valid value
|
143
|
+
# @return [Hash] Returns the value in the form of hash
|
144
|
+
def _to_hash(value)
|
145
|
+
if value.is_a?(Array)
|
146
|
+
value.compact.map { |v| _to_hash(v) }
|
147
|
+
elsif value.is_a?(Hash)
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
150
|
+
end
|
151
|
+
elsif value.respond_to? :to_hash
|
152
|
+
value.to_hash
|
153
|
+
else
|
154
|
+
value
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def to_json(*a)
|
159
|
+
to_hash.to_json(*a)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
@@ -1,21 +1,21 @@
|
|
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
|
4
|
+
class CourierResponse
|
5
5
|
|
6
6
|
# Meta data
|
7
|
-
# meta:
|
7
|
+
# meta: Meta;
|
8
8
|
attr_accessor :meta
|
9
9
|
|
10
10
|
#
|
11
|
-
# data:
|
11
|
+
# data: DataCourierResponse;
|
12
12
|
attr_accessor :data
|
13
13
|
|
14
14
|
# Initializes the object
|
15
15
|
# @param [Hash] attributes Model attributes in the form of hash
|
16
16
|
def initialize(attributes = {})
|
17
17
|
if (!attributes.is_a?(Hash))
|
18
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::
|
18
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::CourierResponse` initialize method"
|
19
19
|
end
|
20
20
|
|
21
21
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
@@ -34,8 +34,8 @@ module AftershipAPI::Model
|
|
34
34
|
# Attribute type mapping.
|
35
35
|
def self.openapi_types
|
36
36
|
{
|
37
|
-
:'meta' => :'
|
38
|
-
:'data' => :'
|
37
|
+
:'meta' => :'Meta',
|
38
|
+
:'data' => :'DataCourierResponse',
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module AftershipAPI::Model
|
4
4
|
class CreateTrackingRequest
|
5
5
|
|
6
|
+
# Tracking ID that is system-generated by default and can be customized by the user when creating a tracking.
|
7
|
+
# id?: String;
|
8
|
+
attr_accessor :id
|
9
|
+
|
6
10
|
# 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)
|
7
11
|
# tracking_number: String;
|
8
12
|
attr_accessor :tracking_number
|
@@ -19,14 +23,14 @@ module AftershipAPI::Model
|
|
19
23
|
# order_id?: String;
|
20
24
|
attr_accessor :order_id
|
21
25
|
|
22
|
-
# The URL for the order in your system or store.
|
23
|
-
# order_id_path?: String;
|
24
|
-
attr_accessor :order_id_path
|
25
|
-
|
26
26
|
# Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any
|
27
27
|
# custom_fields?: Object;
|
28
28
|
attr_accessor :custom_fields
|
29
29
|
|
30
|
+
# The URL for the order in your system or store.
|
31
|
+
# order_id_path?: String;
|
32
|
+
attr_accessor :order_id_path
|
33
|
+
|
30
34
|
# 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. Use an to specify the language.
|
31
35
|
# language?: String;
|
32
36
|
attr_accessor :language
|
@@ -104,7 +108,7 @@ module AftershipAPI::Model
|
|
104
108
|
attr_accessor :note
|
105
109
|
|
106
110
|
# Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. (
|
107
|
-
# slug_group?:
|
111
|
+
# slug_group?: SlugGroup;
|
108
112
|
attr_accessor :slug_group
|
109
113
|
|
110
114
|
# Order date in YYYY-MM-DDTHH:mm:ssZ format. e.g. 2021-07-26T11:23:51-05:00
|
@@ -127,22 +131,6 @@ module AftershipAPI::Model
|
|
127
131
|
# courier_connection_id?: String;
|
128
132
|
attr_accessor :courier_connection_id
|
129
133
|
|
130
|
-
# (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.
|
131
|
-
# tracking_origin_country_region?: String;
|
132
|
-
attr_accessor :tracking_origin_country_region
|
133
|
-
|
134
|
-
# (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.
|
135
|
-
# tracking_destination_country_region?: String;
|
136
|
-
attr_accessor :tracking_destination_country_region
|
137
|
-
|
138
|
-
# (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.
|
139
|
-
# tracking_postal_code?: String;
|
140
|
-
attr_accessor :tracking_postal_code
|
141
|
-
|
142
|
-
# (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details.
|
143
|
-
# tracking_state?: String;
|
144
|
-
attr_accessor :tracking_state
|
145
|
-
|
146
134
|
# The location_id refers to the place where you fulfilled the items. - If you provide a location_id, the system will automatically use it as the tracking's origin address. However, passing both location_id and any origin address information simultaneously is not allowed.- Please make sure you add your locations .
|
147
135
|
# location_id?: String;
|
148
136
|
attr_accessor :location_id
|
@@ -170,6 +158,10 @@ module AftershipAPI::Model
|
|
170
158
|
h[k.to_sym] = v
|
171
159
|
}
|
172
160
|
|
161
|
+
if attributes.key?(:'id')
|
162
|
+
self.id = attributes[:'id']
|
163
|
+
end
|
164
|
+
|
173
165
|
if attributes.key?(:'tracking_number')
|
174
166
|
self.tracking_number = attributes[:'tracking_number']
|
175
167
|
end
|
@@ -186,14 +178,14 @@ module AftershipAPI::Model
|
|
186
178
|
self.order_id = attributes[:'order_id']
|
187
179
|
end
|
188
180
|
|
189
|
-
if attributes.key?(:'order_id_path')
|
190
|
-
self.order_id_path = attributes[:'order_id_path']
|
191
|
-
end
|
192
|
-
|
193
181
|
if attributes.key?(:'custom_fields')
|
194
182
|
self.custom_fields = attributes[:'custom_fields']
|
195
183
|
end
|
196
184
|
|
185
|
+
if attributes.key?(:'order_id_path')
|
186
|
+
self.order_id_path = attributes[:'order_id_path']
|
187
|
+
end
|
188
|
+
|
197
189
|
if attributes.key?(:'language')
|
198
190
|
self.language = attributes[:'language']
|
199
191
|
end
|
@@ -294,22 +286,6 @@ module AftershipAPI::Model
|
|
294
286
|
self.courier_connection_id = attributes[:'courier_connection_id']
|
295
287
|
end
|
296
288
|
|
297
|
-
if attributes.key?(:'tracking_origin_country_region')
|
298
|
-
self.tracking_origin_country_region = attributes[:'tracking_origin_country_region']
|
299
|
-
end
|
300
|
-
|
301
|
-
if attributes.key?(:'tracking_destination_country_region')
|
302
|
-
self.tracking_destination_country_region = attributes[:'tracking_destination_country_region']
|
303
|
-
end
|
304
|
-
|
305
|
-
if attributes.key?(:'tracking_postal_code')
|
306
|
-
self.tracking_postal_code = attributes[:'tracking_postal_code']
|
307
|
-
end
|
308
|
-
|
309
|
-
if attributes.key?(:'tracking_state')
|
310
|
-
self.tracking_state = attributes[:'tracking_state']
|
311
|
-
end
|
312
|
-
|
313
289
|
if attributes.key?(:'location_id')
|
314
290
|
self.location_id = attributes[:'location_id']
|
315
291
|
end
|
@@ -330,12 +306,13 @@ module AftershipAPI::Model
|
|
330
306
|
# Attribute type mapping.
|
331
307
|
def self.openapi_types
|
332
308
|
{
|
309
|
+
:'id' => :'String',
|
333
310
|
:'tracking_number' => :'String',
|
334
311
|
:'slug' => :'String',
|
335
312
|
:'title' => :'String',
|
336
313
|
:'order_id' => :'String',
|
337
|
-
:'order_id_path' => :'String',
|
338
314
|
:'custom_fields' => :'Object',
|
315
|
+
:'order_id_path' => :'String',
|
339
316
|
:'language' => :'String',
|
340
317
|
:'order_promised_delivery_date' => :'String',
|
341
318
|
:'delivery_type' => :'String',
|
@@ -355,16 +332,12 @@ module AftershipAPI::Model
|
|
355
332
|
:'destination_postal_code' => :'String',
|
356
333
|
:'destination_raw_location' => :'String',
|
357
334
|
:'note' => :'String',
|
358
|
-
:'slug_group' => :'
|
335
|
+
:'slug_group' => :'SlugGroup',
|
359
336
|
:'order_date' => :'String',
|
360
337
|
:'order_number' => :'String',
|
361
338
|
:'shipment_type' => :'String',
|
362
339
|
:'shipment_tags' => :'Array<String>',
|
363
340
|
:'courier_connection_id' => :'String',
|
364
|
-
:'tracking_origin_country_region' => :'String',
|
365
|
-
:'tracking_destination_country_region' => :'String',
|
366
|
-
:'tracking_postal_code' => :'String',
|
367
|
-
:'tracking_state' => :'String',
|
368
341
|
:'location_id' => :'String',
|
369
342
|
:'shipping_method' => :'String',
|
370
343
|
:'last_mile' => :'LastMileCreateTrackingRequest',
|
@@ -375,12 +348,13 @@ module AftershipAPI::Model
|
|
375
348
|
# Attribute mapping from ruby-style variable name to JSON key.
|
376
349
|
def self.attribute_map
|
377
350
|
{
|
351
|
+
:'id' => :'id',
|
378
352
|
:'tracking_number' => :'tracking_number',
|
379
353
|
:'slug' => :'slug',
|
380
354
|
:'title' => :'title',
|
381
355
|
:'order_id' => :'order_id',
|
382
|
-
:'order_id_path' => :'order_id_path',
|
383
356
|
:'custom_fields' => :'custom_fields',
|
357
|
+
:'order_id_path' => :'order_id_path',
|
384
358
|
:'language' => :'language',
|
385
359
|
:'order_promised_delivery_date' => :'order_promised_delivery_date',
|
386
360
|
:'delivery_type' => :'delivery_type',
|
@@ -406,10 +380,6 @@ module AftershipAPI::Model
|
|
406
380
|
:'shipment_type' => :'shipment_type',
|
407
381
|
:'shipment_tags' => :'shipment_tags',
|
408
382
|
:'courier_connection_id' => :'courier_connection_id',
|
409
|
-
:'tracking_origin_country_region' => :'tracking_origin_country_region',
|
410
|
-
:'tracking_destination_country_region' => :'tracking_destination_country_region',
|
411
|
-
:'tracking_postal_code' => :'tracking_postal_code',
|
412
|
-
:'tracking_state' => :'tracking_state',
|
413
383
|
:'location_id' => :'location_id',
|
414
384
|
:'shipping_method' => :'shipping_method',
|
415
385
|
:'last_mile' => :'last_mile',
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module AftershipAPI::Model
|
4
4
|
class CreateTrackingResponse
|
5
5
|
|
6
|
-
#
|
6
|
+
# A system-generated tracking ID by default, which can be customized by the user when creating a tracking.
|
7
7
|
# id?: String;
|
8
8
|
attr_accessor :id
|
9
9
|
|
@@ -27,7 +27,7 @@ module AftershipAPI::Model
|
|
27
27
|
# slug?: String;
|
28
28
|
attr_accessor :slug
|
29
29
|
|
30
|
-
# Whether or not AfterShip will continue tracking the
|
30
|
+
# Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.
|
31
31
|
# active?: Boolean;
|
32
32
|
attr_accessor :active
|
33
33
|
|
@@ -132,7 +132,7 @@ module AftershipAPI::Model
|
|
132
132
|
attr_accessor :source
|
133
133
|
|
134
134
|
# Current status of tracking. (
|
135
|
-
# tag?:
|
135
|
+
# tag?: Tag;
|
136
136
|
attr_accessor :tag
|
137
137
|
|
138
138
|
# Current subtag of tracking. (
|
@@ -259,22 +259,6 @@ module AftershipAPI::Model
|
|
259
259
|
# courier_connection_id?: String;
|
260
260
|
attr_accessor :courier_connection_id
|
261
261
|
|
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
|
265
|
-
|
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
|
269
|
-
|
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.
|
271
|
-
# tracking_postal_code?: String;
|
272
|
-
attr_accessor :tracking_postal_code
|
273
|
-
|
274
|
-
# (Legacy) Replaced by `destination_state`. Additional field required by some carriers to retrieve the tracking info. The state/province of the recipient’s address. Refer to our article on for more details.
|
275
|
-
# tracking_state?: String;
|
276
|
-
attr_accessor :tracking_state
|
277
|
-
|
278
262
|
# The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more.
|
279
263
|
# carbon_emissions?: CarbonEmissionsCreateTrackingResponse;
|
280
264
|
attr_accessor :carbon_emissions
|
@@ -586,22 +570,6 @@ module AftershipAPI::Model
|
|
586
570
|
self.courier_connection_id = attributes[:'courier_connection_id']
|
587
571
|
end
|
588
572
|
|
589
|
-
if attributes.key?(:'tracking_origin_country_region')
|
590
|
-
self.tracking_origin_country_region = attributes[:'tracking_origin_country_region']
|
591
|
-
end
|
592
|
-
|
593
|
-
if attributes.key?(:'tracking_destination_country_region')
|
594
|
-
self.tracking_destination_country_region = attributes[:'tracking_destination_country_region']
|
595
|
-
end
|
596
|
-
|
597
|
-
if attributes.key?(:'tracking_postal_code')
|
598
|
-
self.tracking_postal_code = attributes[:'tracking_postal_code']
|
599
|
-
end
|
600
|
-
|
601
|
-
if attributes.key?(:'tracking_state')
|
602
|
-
self.tracking_state = attributes[:'tracking_state']
|
603
|
-
end
|
604
|
-
|
605
573
|
if attributes.key?(:'carbon_emissions')
|
606
574
|
self.carbon_emissions = attributes[:'carbon_emissions']
|
607
575
|
end
|
@@ -682,7 +650,7 @@ module AftershipAPI::Model
|
|
682
650
|
:'shipment_weight' => :'ShipmentWeightCreateTrackingResponse',
|
683
651
|
:'signed_by' => :'String',
|
684
652
|
:'source' => :'String',
|
685
|
-
:'tag' => :'
|
653
|
+
:'tag' => :'Tag',
|
686
654
|
:'subtag' => :'String',
|
687
655
|
:'subtag_message' => :'String',
|
688
656
|
:'title' => :'String',
|
@@ -714,10 +682,6 @@ module AftershipAPI::Model
|
|
714
682
|
:'latest_estimated_delivery' => :'LatestEstimatedDeliveryCreateTrackingResponse',
|
715
683
|
:'shipment_tags' => :'Array<String>',
|
716
684
|
:'courier_connection_id' => :'String',
|
717
|
-
:'tracking_origin_country_region' => :'String',
|
718
|
-
:'tracking_destination_country_region' => :'String',
|
719
|
-
:'tracking_postal_code' => :'String',
|
720
|
-
:'tracking_state' => :'String',
|
721
685
|
:'carbon_emissions' => :'CarbonEmissionsCreateTrackingResponse',
|
722
686
|
:'location_id' => :'String',
|
723
687
|
:'shipping_method' => :'String',
|
@@ -799,10 +763,6 @@ module AftershipAPI::Model
|
|
799
763
|
:'latest_estimated_delivery' => :'latest_estimated_delivery',
|
800
764
|
:'shipment_tags' => :'shipment_tags',
|
801
765
|
:'courier_connection_id' => :'courier_connection_id',
|
802
|
-
:'tracking_origin_country_region' => :'tracking_origin_country_region',
|
803
|
-
:'tracking_destination_country_region' => :'tracking_destination_country_region',
|
804
|
-
:'tracking_postal_code' => :'tracking_postal_code',
|
805
|
-
:'tracking_state' => :'tracking_state',
|
806
766
|
:'carbon_emissions' => :'carbon_emissions',
|
807
767
|
:'location_id' => :'location_id',
|
808
768
|
:'shipping_method' => :'shipping_method',
|