aftership-tracking-sdk 7.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +68 -83
  4. data/lib/aftership-tracking-sdk/api/courier.rb +8 -8
  5. data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +4 -4
  6. data/lib/aftership-tracking-sdk/api/tracking.rb +50 -416
  7. data/lib/aftership-tracking-sdk/api_client.rb +2 -2
  8. data/lib/aftership-tracking-sdk/configuration.rb +108 -108
  9. data/lib/aftership-tracking-sdk/models/additional_fields_v1.rb +1 -1
  10. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_create_tracking_response.rb +183 -0
  11. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.rb +183 -0
  12. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_get_tracking_by_id_response.rb +183 -0
  13. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +183 -0
  14. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.rb +183 -0
  15. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_tracking.rb +2 -0
  16. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_update_tracking_by_id_response.rb +183 -0
  17. data/lib/aftership-tracking-sdk/models/carbon_emissions_create_tracking_response.rb +163 -0
  18. data/lib/aftership-tracking-sdk/models/carbon_emissions_delete_tracking_by_id_response.rb +163 -0
  19. data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_id_response.rb +163 -0
  20. data/lib/aftership-tracking-sdk/models/carbon_emissions_mark_tracking_completed_by_id_response.rb +163 -0
  21. data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_id_response.rb +163 -0
  22. data/lib/aftership-tracking-sdk/models/carbon_emissions_tracking.rb +2 -0
  23. data/lib/aftership-tracking-sdk/models/carbon_emissions_update_tracking_by_id_response.rb +163 -0
  24. data/lib/aftership-tracking-sdk/models/checkpoint.rb +2 -0
  25. data/lib/aftership-tracking-sdk/models/coordinate_checkpoint.rb +2 -0
  26. data/lib/aftership-tracking-sdk/models/courier.rb +2 -0
  27. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_create_tracking_response.rb +173 -0
  28. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_delete_tracking_by_id_response.rb +173 -0
  29. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_get_tracking_by_id_response.rb +173 -0
  30. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +173 -0
  31. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.rb +173 -0
  32. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_tracking.rb +173 -0
  33. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_update_tracking_by_id_response.rb +173 -0
  34. data/lib/aftership-tracking-sdk/models/courier_response_v1.rb +2 -0
  35. data/lib/aftership-tracking-sdk/models/{tracking_create_tracking_request.rb → create_tracking_request.rb} +9 -7
  36. data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +953 -0
  37. data/lib/aftership-tracking-sdk/models/{mark_tracking_completed_by_slug_tracking_number_request.rb → custom_estimated_delivery_date_create_tracking_response.rb} +41 -9
  38. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_id_response.rb +183 -0
  39. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_id_response.rb +183 -0
  40. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +183 -0
  41. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.rb +183 -0
  42. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_tracking.rb +2 -0
  43. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_update_tracking_by_id_response.rb +183 -0
  44. data/lib/aftership-tracking-sdk/models/data_courier_response_v1.rb +2 -0
  45. data/lib/aftership-tracking-sdk/models/data_tracking_response_get_multiple_v1.rb +8 -126
  46. data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +953 -0
  47. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +2 -0
  48. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +2 -0
  49. data/lib/aftership-tracking-sdk/models/{tracking_detect_courier_request.rb → detect_courier_request.rb} +5 -3
  50. data/lib/aftership-tracking-sdk/models/detect_courier_response.rb +2 -0
  51. data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request.rb +2 -0
  52. data/lib/aftership-tracking-sdk/models/estimated_delivery_date_response.rb +12 -0
  53. data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_request.rb +2 -0
  54. data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_response.rb +2 -0
  55. data/lib/aftership-tracking-sdk/models/events_checkpoint.rb +2 -0
  56. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_create_tracking_response.rb +193 -0
  57. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_id_response.rb +193 -0
  58. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_id_response.rb +193 -0
  59. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_id_response.rb +193 -0
  60. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_id_response.rb +193 -0
  61. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_tracking.rb +2 -0
  62. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_update_tracking_by_id_response.rb +193 -0
  63. data/lib/aftership-tracking-sdk/models/get_all_couriers_response.rb +2 -0
  64. data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +953 -0
  65. data/lib/aftership-tracking-sdk/models/get_trackings_response.rb +5 -3
  66. data/lib/aftership-tracking-sdk/models/get_user_couriers_response.rb +2 -0
  67. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_create_tracking_response.rb +193 -0
  68. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +193 -0
  69. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +193 -0
  70. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +193 -0
  71. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +193 -0
  72. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_tracking.rb +2 -0
  73. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_id_response.rb +193 -0
  74. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request.rb +2 -0
  75. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +953 -0
  76. data/lib/aftership-tracking-sdk/models/meta_v1.rb +2 -0
  77. data/lib/aftership-tracking-sdk/models/{next_couriers_tracking_create_tracking_request.rb → next_couriers_create_tracking_request.rb} +4 -2
  78. data/lib/aftership-tracking-sdk/models/{get_checkpoint_by_tracking_id_response.rb → next_couriers_create_tracking_response.rb} +33 -51
  79. data/lib/aftership-tracking-sdk/models/next_couriers_delete_tracking_by_id_response.rb +193 -0
  80. data/lib/aftership-tracking-sdk/models/{get_checkpoint_by_slug_tracking_number_response.rb → next_couriers_get_tracking_by_id_response.rb} +33 -51
  81. data/lib/aftership-tracking-sdk/models/next_couriers_mark_tracking_completed_by_id_response.rb +193 -0
  82. data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +193 -0
  83. data/lib/aftership-tracking-sdk/models/next_couriers_tracking.rb +22 -0
  84. data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_id_response.rb +193 -0
  85. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.rb +2 -0
  86. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.rb +2 -0
  87. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +2 -0
  88. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +2 -0
  89. data/lib/aftership-tracking-sdk/models/pagination.rb +14 -6
  90. data/lib/aftership-tracking-sdk/models/pagination_data_tracking_response_get_multiple_v1.rb +173 -0
  91. data/lib/aftership-tracking-sdk/models/{notification_request_v1.rb → pagination_get_trackings_response.rb} +28 -16
  92. data/lib/aftership-tracking-sdk/models/predict_batch_request.rb +2 -0
  93. data/lib/aftership-tracking-sdk/models/predict_batch_response.rb +2 -0
  94. data/lib/aftership-tracking-sdk/models/reason_events_checkpoint.rb +2 -0
  95. data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +953 -0
  96. data/lib/aftership-tracking-sdk/models/{tracking_delete_response_v1.rb → shipment_weight_create_tracking_response.rb} +18 -16
  97. data/lib/aftership-tracking-sdk/models/{data_notification_response_v1.rb → shipment_weight_delete_tracking_by_id_response.rb} +21 -9
  98. data/lib/aftership-tracking-sdk/models/{notification.rb → shipment_weight_get_tracking_by_id_response.rb} +18 -16
  99. data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_id_response.rb +163 -0
  100. data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_id_response.rb +163 -0
  101. data/lib/aftership-tracking-sdk/models/{notification_response_v1.rb → shipment_weight_tracking.rb} +18 -16
  102. data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_id_response.rb +163 -0
  103. data/lib/aftership-tracking-sdk/models/slug_group_v1.rb +1 -1
  104. data/lib/aftership-tracking-sdk/models/tag_v1.rb +1 -1
  105. data/lib/aftership-tracking-sdk/models/tracking.rb +56 -24
  106. data/lib/aftership-tracking-sdk/models/tracking_response_get_multiple_v1.rb +2 -0
  107. data/lib/aftership-tracking-sdk/models/tracking_response_v1.rb +5 -3
  108. data/lib/aftership-tracking-sdk/models/{tracking_update_tracking_by_id_request.rb → update_tracking_by_id_request.rb} +5 -3
  109. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +953 -0
  110. data/lib/aftership-tracking-sdk/models/weight_estimated_delivery_date_request.rb +2 -0
  111. data/lib/aftership-tracking-sdk/models/weight_estimated_delivery_date_response.rb +2 -0
  112. data/lib/aftership-tracking-sdk/version.rb +1 -1
  113. metadata +64 -22
  114. data/lib/aftership-tracking-sdk/api/last_checkpoint.rb +0 -143
  115. data/lib/aftership-tracking-sdk/api/notification.rb +0 -403
  116. data/lib/aftership-tracking-sdk/models/custom_fields_tracking_update_tracking_by_slug_tracking_number_request.rb +0 -139
  117. data/lib/aftership-tracking-sdk/models/data_tracking_delete_response_v1.rb +0 -151
  118. data/lib/aftership-tracking-sdk/models/data_tracking_response_v1.rb +0 -151
  119. data/lib/aftership-tracking-sdk/models/partial_delete_tracking.rb +0 -241
  120. data/lib/aftership-tracking-sdk/models/partial_update_tracking.rb +0 -251
  121. data/lib/aftership-tracking-sdk/models/tracking_update_tracking_by_slug_tracking_number_request.rb +0 -391
@@ -0,0 +1,953 @@
1
+ # This code was auto generated by AfterShip SDK Generator.
2
+ # Do not edit the class manually.
3
+ module AftershipAPI::Model
4
+ class DeleteTrackingByIdResponse
5
+
6
+ # Tracking ID.
7
+ # id?: String;
8
+ attr_accessor :id
9
+
10
+ # The length of the tracking ID has been increased from 24 characters to 32 characters. We will use the legacy_id field to store the original 24-character tracking ID to maintain compatibility with existing data. Therefore, all tracking endpoints will continue to work with the legacy_id field as before.
11
+ # legacy_id?: String;
12
+ attr_accessor :legacy_id
13
+
14
+ # The date and time the shipment was imported or added to AfterShip. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.
15
+ # created_at?: String;
16
+ attr_accessor :created_at
17
+
18
+ # The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.
19
+ # updated_at?: String;
20
+ attr_accessor :updated_at
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
+ # Tracking number.
27
+ # tracking_number?: String;
28
+ attr_accessor :tracking_number
29
+
30
+ # Unique courier code. When importing a shipment with no courier slug and the tracking number can’t be recognized, the courier will be marked as `unrecognized`. Get courier codes .
31
+ # slug?: String;
32
+ attr_accessor :slug
33
+
34
+ # Whether or not AfterShip will continue tracking the shipments. Value is `false` when tag (status) is `Delivered`, `Expired`, or further updates for 30 days since last update.
35
+ # active?: Boolean;
36
+ attr_accessor :active
37
+
38
+ # Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any in custom fields.
39
+ # custom_fields?: Object;
40
+ attr_accessor :custom_fields
41
+
42
+ # Customer name of the tracking.
43
+ # customer_name?: String;
44
+ attr_accessor :customer_name
45
+
46
+ # 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
+ # transit_time?: Integer;
48
+ attr_accessor :transit_time
49
+
50
+ # The for the origin country/region. E.g. USA for the United States.
51
+ # origin_country_iso3?: String;
52
+ attr_accessor :origin_country_iso3
53
+
54
+ # The state of the sender’s address.
55
+ # origin_state?: String;
56
+ attr_accessor :origin_state
57
+
58
+ # The city of the sender’s address.
59
+ # origin_city?: String;
60
+ attr_accessor :origin_city
61
+
62
+ # The postal code of the sender’s address.
63
+ # origin_postal_code?: String;
64
+ attr_accessor :origin_postal_code
65
+
66
+ # The sender address that the shipment is shipping from.
67
+ # origin_raw_location?: String;
68
+ attr_accessor :origin_raw_location
69
+
70
+ # The for the destination country/region. E.g. USA for the United States.
71
+ # destination_country_iso3?: String;
72
+ attr_accessor :destination_country_iso3
73
+
74
+ # The state of the recipient’s address.
75
+ # destination_state?: String;
76
+ attr_accessor :destination_state
77
+
78
+ # The city of the recipient’s address.
79
+ # destination_city?: String;
80
+ attr_accessor :destination_city
81
+
82
+ # The postal code of the recipient’s address.
83
+ # destination_postal_code?: String;
84
+ attr_accessor :destination_postal_code
85
+
86
+ # The shipping address that the shipment is shipping to.
87
+ # destination_raw_location?: String;
88
+ attr_accessor :destination_raw_location
89
+
90
+ # 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
+ # courier_destination_country_iso3?: String;
92
+ attr_accessor :courier_destination_country_iso3
93
+
94
+ # Email address(es) to receive email notifications.
95
+ # emails?: String[];
96
+ attr_accessor :emails
97
+
98
+ # The field contains the estimated delivery date provided by the carrier.
99
+ # courier_estimated_delivery_date?: CourierEstimatedDeliveryDateDeleteTrackingByIdResponse;
100
+ attr_accessor :courier_estimated_delivery_date
101
+
102
+ # Text field for the note.
103
+ # note?: String;
104
+ attr_accessor :note
105
+
106
+ # A globally-unique identifier for the order.
107
+ # order_id?: String;
108
+ attr_accessor :order_id
109
+
110
+ # The URL for the order in your system or store.
111
+ # order_id_path?: String;
112
+ attr_accessor :order_id_path
113
+
114
+ # The date and time the order was created in your system or store. It uses the format: `YYYY-MM-DDTHH:mm:ssZ` based on whichever timezone you provide.
115
+ # order_date?: String;
116
+ attr_accessor :order_date
117
+
118
+ # Number of packages under the tracking.
119
+ # shipment_package_count?: Float;
120
+ attr_accessor :shipment_package_count
121
+
122
+ # The date and time the shipment was picked up by the carrier. It uses the timezone where the pickup occured. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
123
+ # shipment_pickup_date?: String;
124
+ attr_accessor :shipment_pickup_date
125
+
126
+ # The date and time the shipment was delivered. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
127
+ # shipment_delivery_date?: String;
128
+ attr_accessor :shipment_delivery_date
129
+
130
+ # The carrier service type for the shipment.
131
+ # shipment_type?: String;
132
+ attr_accessor :shipment_type
133
+
134
+ # The shipment_weight field represents the total weight of the shipment. In scenarios where the carrier does not provide this information, you can provide the weight to AfterShip. We will prioritize the data provided by the carrier, if available. The shipment weight will be included in the Response and accessed through the GET API, Webhook, and CSV export. It will also be displayed on the AfterShip Tracking admin. Additionally, it plays a significant role in error-free shipment handling and carbon emission calculations, ensuring accurate and informed decision-making
135
+ # shipment_weight?: ShipmentWeightDeleteTrackingByIdResponse;
136
+ attr_accessor :shipment_weight
137
+
138
+ # Signed by information for delivered shipment.
139
+ # signed_by?: String;
140
+ attr_accessor :signed_by
141
+
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
+ # Source of how this tracking is added.
147
+ # source?: String;
148
+ attr_accessor :source
149
+
150
+ # Current status of tracking. (
151
+ # tag?: TagV1;
152
+ attr_accessor :tag
153
+
154
+ # Current subtag of tracking. (
155
+ # subtag?: String;
156
+ attr_accessor :subtag
157
+
158
+ # Normalized tracking message. (
159
+ # subtag_message?: String;
160
+ attr_accessor :subtag_message
161
+
162
+ # By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number).
163
+ # title?: String;
164
+ attr_accessor :title
165
+
166
+ # Number of attempts AfterShip tracks at courier's system.
167
+ # tracked_count?: Float;
168
+ attr_accessor :tracked_count
169
+
170
+ # Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null
171
+ # last_mile_tracking_supported?: Boolean;
172
+ attr_accessor :last_mile_tracking_supported
173
+
174
+ # 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.
175
+ # language?: String;
176
+ attr_accessor :language
177
+
178
+ # Deprecated
179
+ # unique_token?: String;
180
+ attr_accessor :unique_token
181
+
182
+ # Array of checkpoint object describes the checkpoint information.
183
+ # checkpoints?: Checkpoint[];
184
+ attr_accessor :checkpoints
185
+
186
+ # Phone number(s) subscribed to receive sms notifications.
187
+ # subscribed_smses?: String[];
188
+ attr_accessor :subscribed_smses
189
+
190
+ # Email address(es) subscribed to receive email notifications.
191
+ # subscribed_emails?: String[];
192
+ attr_accessor :subscribed_emails
193
+
194
+ # Whether or not the shipment is returned to sender. Value is `true` when any of its checkpoints has subtag `Exception_010` (returning to sender) or `Exception_011` (returned to sender). Otherwise value is `false`.
195
+ # return_to_sender?: Boolean;
196
+ attr_accessor :return_to_sender
197
+
198
+ # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
199
+ # order_promised_delivery_date?: String;
200
+ attr_accessor :order_promised_delivery_date
201
+
202
+ # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
203
+ # delivery_type?: String;
204
+ attr_accessor :delivery_type
205
+
206
+ # Shipment pickup location for receiver
207
+ # pickup_location?: String;
208
+ attr_accessor :pickup_location
209
+
210
+ # Shipment pickup note for receiver
211
+ # pickup_note?: String;
212
+ attr_accessor :pickup_note
213
+
214
+ # Official tracking URL of the courier (if any). The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default.
215
+ # courier_tracking_link?: String;
216
+ attr_accessor :courier_tracking_link
217
+
218
+ # The date and time of the carrier’s first attempt to deliver the package to the recipient. It uses the shipment recipient’s timezone. The format may differ depending on how the carrier provides it:- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
219
+ # first_attempted_at?: String;
220
+ attr_accessor :first_attempted_at
221
+
222
+ # Delivery instructions (delivery date or address) can be modified by visiting the link if supported by a carrier. The language parameter of this link relies on the destination country/region and the language associated with the shipment, if the data regarding the destination country/region and language of the shipment is not available, AfterShip will set the language parameter of the link to "US" by default.
223
+ # courier_redirect_link?: String;
224
+ attr_accessor :courier_redirect_link
225
+
226
+ # Additional field required by some carriers to retrieve the tracking info. The shipper’s carrier account number. Refer to our article on for more details.
227
+ # tracking_account_number?: String;
228
+ attr_accessor :tracking_account_number
229
+
230
+ # Additional field required by some carriers to retrieve the tracking info. A type of tracking credential required by some carriers. Refer to our article on for more details.
231
+ # tracking_key?: String;
232
+ attr_accessor :tracking_key
233
+
234
+ # Additional field required by some carriers to retrieve the tracking info. The date the shipment was sent, using the format YYYYMMDD. Refer to our article on for more details.
235
+ # tracking_ship_date?: String;
236
+ attr_accessor :tracking_ship_date
237
+
238
+ # Whether the tracking is delivered on time or not.
239
+ # on_time_status?: String;
240
+ attr_accessor :on_time_status
241
+
242
+ # The difference days of the on time.
243
+ # on_time_difference?: Float;
244
+ attr_accessor :on_time_difference
245
+
246
+ # The tags of the order.
247
+ # order_tags?: String[];
248
+ attr_accessor :order_tags
249
+
250
+ # The estimated delivery date of the shipment provided by AfterShip’s AI and shown to the recipients. It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone.
251
+ # aftership_estimated_delivery_date?: AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse;
252
+ attr_accessor :aftership_estimated_delivery_date
253
+
254
+ # Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone.
255
+ # custom_estimated_delivery_date?: CustomEstimatedDeliveryDateDeleteTrackingByIdResponse;
256
+ attr_accessor :custom_estimated_delivery_date
257
+
258
+ # A unique, human-readable identifier for the order.
259
+ # order_number?: String;
260
+ attr_accessor :order_number
261
+
262
+ # The shipment’s original estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone.
263
+ # first_estimated_delivery?: FirstEstimatedDeliveryDeleteTrackingByIdResponse;
264
+ attr_accessor :first_estimated_delivery
265
+
266
+ # The most recently calculated estimated delivery date. It could be provided by the carrier, AfterShip AI, or based on your custom settings. The format of carrier EDDs may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ AfterShip AI and custom EDDs always use the format `YYYY-MM-DD`. All EDDs use the shipment recipient’s timezone.
267
+ # latest_estimated_delivery?: LatestEstimatedDeliveryDeleteTrackingByIdResponse;
268
+ attr_accessor :latest_estimated_delivery
269
+
270
+ # Used to add tags to your shipments to help categorize and filter them easily.
271
+ # shipment_tags?: String[];
272
+ attr_accessor :shipment_tags
273
+
274
+ # If you have multiple accounts connected for a single carrier on AfterShip, we have introduced the courier_connection_id field to allow you to specify the carrier account associated with each shipment. By providing this information, you enable us to accurately track and monitor your shipments based on the correct carrier account.(</br>In the event that you do not specify the courier_connection_id, we will handle your shipment using the connection that was created earliest among your connected accounts.
275
+ # courier_connection_id?: String;
276
+ attr_accessor :courier_connection_id
277
+
278
+ # The next couriers get the second carrier information from user or AfterShip.
279
+ # next_couriers?: NextCouriersDeleteTrackingByIdResponse[];
280
+ attr_accessor :next_couriers
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
285
+
286
+ # (Legacy) Replaced by `destination_country_iso3`. 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.
287
+ # tracking_destination_country?: String;
288
+ attr_accessor :tracking_destination_country
289
+
290
+ # (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
+ # tracking_postal_code?: String;
292
+ attr_accessor :tracking_postal_code
293
+
294
+ # (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.
295
+ # tracking_state?: String;
296
+ attr_accessor :tracking_state
297
+
298
+ # 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.
299
+ # carbon_emissions?: CarbonEmissionsDeleteTrackingByIdResponse;
300
+ attr_accessor :carbon_emissions
301
+
302
+ # 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 .
303
+ # location_id?: String;
304
+ attr_accessor :location_id
305
+
306
+ # The shipping_method string refers to the chosen method for delivering the package. Merchants typically offer various shipping methods to consumers during the checkout process, such as, Local Delivery, Free Express Worldwide Shipping, etc.
307
+ # shipping_method?: String;
308
+ attr_accessor :shipping_method
309
+
310
+ # By dynamically tracking failed delivery attempts during shipment, this field allows you to pinpoint carriers accountable for the most failures. Analyzing the root cause of these failures enables you to improve carriers' delivery standard operating procedures (SOP), leading to an overall enhancement in delivery service quality.
311
+ # failed_delivery_attempts?: Integer;
312
+ attr_accessor :failed_delivery_attempts
313
+
314
+ # The signature_requirement field serves the purpose of validating the service option type, specifically proof of delivery. By collecting the recipient's signature upon delivery, it ensures the package reaches the intended recipient and prevents disputes related to non-delivery or lost packages.</br>
315
+ # signature_requirement?: String;
316
+ attr_accessor :signature_requirement
317
+
318
+ # The delivery location type represents the secure area where the carrier leaves the package, such as a safe place, locker, mailbox, front porch, etc. This information helps ensure the shipment reaches the intended recipient efficiently, minimizing the risk of theft or damage.
319
+ # delivery_location_type?: String;
320
+ attr_accessor :delivery_location_type
321
+
322
+ # The tracking URL directs your customers to the shipment tracking page which can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it.
323
+ # aftership_tracking_url?: String;
324
+ attr_accessor :aftership_tracking_url
325
+
326
+ # The order URL directs your customers to the order tracking page, which includes all shipments. It can display either the default or a customized page based on segmentation rules.- The universal URL is used by default, but you can opt for a custom domain if you have one. Learn how to set up a custom domain .The field is not automatically enabled in API & Webhook. Please contact support if you’d like to enable it.
327
+ # aftership_tracking_order_url?: String;
328
+ attr_accessor :aftership_tracking_order_url
329
+
330
+ # Initializes the object
331
+ # @param [Hash] attributes Model attributes in the form of hash
332
+ def initialize(attributes = {})
333
+ if (!attributes.is_a?(Hash))
334
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::DeleteTrackingByIdResponse` initialize method"
335
+ end
336
+
337
+ attributes = attributes.each_with_object({}) { |(k, v), h|
338
+ h[k.to_sym] = v
339
+ }
340
+
341
+ if attributes.key?(:'id')
342
+ self.id = attributes[:'id']
343
+ end
344
+
345
+ if attributes.key?(:'legacy_id')
346
+ self.legacy_id = attributes[:'legacy_id']
347
+ end
348
+
349
+ if attributes.key?(:'created_at')
350
+ self.created_at = attributes[:'created_at']
351
+ end
352
+
353
+ if attributes.key?(:'updated_at')
354
+ self.updated_at = attributes[:'updated_at']
355
+ end
356
+
357
+ if attributes.key?(:'last_updated_at')
358
+ self.last_updated_at = attributes[:'last_updated_at']
359
+ end
360
+
361
+ if attributes.key?(:'tracking_number')
362
+ self.tracking_number = attributes[:'tracking_number']
363
+ end
364
+
365
+ if attributes.key?(:'slug')
366
+ self.slug = attributes[:'slug']
367
+ end
368
+
369
+ if attributes.key?(:'active')
370
+ self.active = attributes[:'active']
371
+ end
372
+
373
+ if attributes.key?(:'custom_fields')
374
+ self.custom_fields = attributes[:'custom_fields']
375
+ end
376
+
377
+ if attributes.key?(:'customer_name')
378
+ self.customer_name = attributes[:'customer_name']
379
+ end
380
+
381
+ if attributes.key?(:'transit_time')
382
+ self.transit_time = attributes[:'transit_time']
383
+ end
384
+
385
+ if attributes.key?(:'origin_country_iso3')
386
+ self.origin_country_iso3 = attributes[:'origin_country_iso3']
387
+ end
388
+
389
+ if attributes.key?(:'origin_state')
390
+ self.origin_state = attributes[:'origin_state']
391
+ end
392
+
393
+ if attributes.key?(:'origin_city')
394
+ self.origin_city = attributes[:'origin_city']
395
+ end
396
+
397
+ if attributes.key?(:'origin_postal_code')
398
+ self.origin_postal_code = attributes[:'origin_postal_code']
399
+ end
400
+
401
+ if attributes.key?(:'origin_raw_location')
402
+ self.origin_raw_location = attributes[:'origin_raw_location']
403
+ end
404
+
405
+ if attributes.key?(:'destination_country_iso3')
406
+ self.destination_country_iso3 = attributes[:'destination_country_iso3']
407
+ end
408
+
409
+ if attributes.key?(:'destination_state')
410
+ self.destination_state = attributes[:'destination_state']
411
+ end
412
+
413
+ if attributes.key?(:'destination_city')
414
+ self.destination_city = attributes[:'destination_city']
415
+ end
416
+
417
+ if attributes.key?(:'destination_postal_code')
418
+ self.destination_postal_code = attributes[:'destination_postal_code']
419
+ end
420
+
421
+ if attributes.key?(:'destination_raw_location')
422
+ self.destination_raw_location = attributes[:'destination_raw_location']
423
+ end
424
+
425
+ if attributes.key?(:'courier_destination_country_iso3')
426
+ self.courier_destination_country_iso3 = attributes[:'courier_destination_country_iso3']
427
+ end
428
+
429
+ if attributes.key?(:'emails')
430
+ self.emails = attributes[:'emails']
431
+ end
432
+
433
+ if attributes.key?(:'courier_estimated_delivery_date')
434
+ self.courier_estimated_delivery_date = attributes[:'courier_estimated_delivery_date']
435
+ end
436
+
437
+ if attributes.key?(:'note')
438
+ self.note = attributes[:'note']
439
+ end
440
+
441
+ if attributes.key?(:'order_id')
442
+ self.order_id = attributes[:'order_id']
443
+ end
444
+
445
+ if attributes.key?(:'order_id_path')
446
+ self.order_id_path = attributes[:'order_id_path']
447
+ end
448
+
449
+ if attributes.key?(:'order_date')
450
+ self.order_date = attributes[:'order_date']
451
+ end
452
+
453
+ if attributes.key?(:'shipment_package_count')
454
+ self.shipment_package_count = attributes[:'shipment_package_count']
455
+ end
456
+
457
+ if attributes.key?(:'shipment_pickup_date')
458
+ self.shipment_pickup_date = attributes[:'shipment_pickup_date']
459
+ end
460
+
461
+ if attributes.key?(:'shipment_delivery_date')
462
+ self.shipment_delivery_date = attributes[:'shipment_delivery_date']
463
+ end
464
+
465
+ if attributes.key?(:'shipment_type')
466
+ self.shipment_type = attributes[:'shipment_type']
467
+ end
468
+
469
+ if attributes.key?(:'shipment_weight')
470
+ self.shipment_weight = attributes[:'shipment_weight']
471
+ end
472
+
473
+ if attributes.key?(:'signed_by')
474
+ self.signed_by = attributes[:'signed_by']
475
+ end
476
+
477
+ if attributes.key?(:'smses')
478
+ self.smses = attributes[:'smses']
479
+ end
480
+
481
+ if attributes.key?(:'source')
482
+ self.source = attributes[:'source']
483
+ end
484
+
485
+ if attributes.key?(:'tag')
486
+ self.tag = attributes[:'tag']
487
+ end
488
+
489
+ if attributes.key?(:'subtag')
490
+ self.subtag = attributes[:'subtag']
491
+ end
492
+
493
+ if attributes.key?(:'subtag_message')
494
+ self.subtag_message = attributes[:'subtag_message']
495
+ end
496
+
497
+ if attributes.key?(:'title')
498
+ self.title = attributes[:'title']
499
+ end
500
+
501
+ if attributes.key?(:'tracked_count')
502
+ self.tracked_count = attributes[:'tracked_count']
503
+ end
504
+
505
+ if attributes.key?(:'last_mile_tracking_supported')
506
+ self.last_mile_tracking_supported = attributes[:'last_mile_tracking_supported']
507
+ end
508
+
509
+ if attributes.key?(:'language')
510
+ self.language = attributes[:'language']
511
+ end
512
+
513
+ if attributes.key?(:'unique_token')
514
+ self.unique_token = attributes[:'unique_token']
515
+ end
516
+
517
+ if attributes.key?(:'checkpoints')
518
+ self.checkpoints = attributes[:'checkpoints']
519
+ end
520
+
521
+ if attributes.key?(:'subscribed_smses')
522
+ self.subscribed_smses = attributes[:'subscribed_smses']
523
+ end
524
+
525
+ if attributes.key?(:'subscribed_emails')
526
+ self.subscribed_emails = attributes[:'subscribed_emails']
527
+ end
528
+
529
+ if attributes.key?(:'return_to_sender')
530
+ self.return_to_sender = attributes[:'return_to_sender']
531
+ end
532
+
533
+ if attributes.key?(:'order_promised_delivery_date')
534
+ self.order_promised_delivery_date = attributes[:'order_promised_delivery_date']
535
+ end
536
+
537
+ if attributes.key?(:'delivery_type')
538
+ self.delivery_type = attributes[:'delivery_type']
539
+ end
540
+
541
+ if attributes.key?(:'pickup_location')
542
+ self.pickup_location = attributes[:'pickup_location']
543
+ end
544
+
545
+ if attributes.key?(:'pickup_note')
546
+ self.pickup_note = attributes[:'pickup_note']
547
+ end
548
+
549
+ if attributes.key?(:'courier_tracking_link')
550
+ self.courier_tracking_link = attributes[:'courier_tracking_link']
551
+ end
552
+
553
+ if attributes.key?(:'first_attempted_at')
554
+ self.first_attempted_at = attributes[:'first_attempted_at']
555
+ end
556
+
557
+ if attributes.key?(:'courier_redirect_link')
558
+ self.courier_redirect_link = attributes[:'courier_redirect_link']
559
+ end
560
+
561
+ if attributes.key?(:'tracking_account_number')
562
+ self.tracking_account_number = attributes[:'tracking_account_number']
563
+ end
564
+
565
+ if attributes.key?(:'tracking_key')
566
+ self.tracking_key = attributes[:'tracking_key']
567
+ end
568
+
569
+ if attributes.key?(:'tracking_ship_date')
570
+ self.tracking_ship_date = attributes[:'tracking_ship_date']
571
+ end
572
+
573
+ if attributes.key?(:'on_time_status')
574
+ self.on_time_status = attributes[:'on_time_status']
575
+ end
576
+
577
+ if attributes.key?(:'on_time_difference')
578
+ self.on_time_difference = attributes[:'on_time_difference']
579
+ end
580
+
581
+ if attributes.key?(:'order_tags')
582
+ self.order_tags = attributes[:'order_tags']
583
+ end
584
+
585
+ if attributes.key?(:'aftership_estimated_delivery_date')
586
+ self.aftership_estimated_delivery_date = attributes[:'aftership_estimated_delivery_date']
587
+ end
588
+
589
+ if attributes.key?(:'custom_estimated_delivery_date')
590
+ self.custom_estimated_delivery_date = attributes[:'custom_estimated_delivery_date']
591
+ end
592
+
593
+ if attributes.key?(:'order_number')
594
+ self.order_number = attributes[:'order_number']
595
+ end
596
+
597
+ if attributes.key?(:'first_estimated_delivery')
598
+ self.first_estimated_delivery = attributes[:'first_estimated_delivery']
599
+ end
600
+
601
+ if attributes.key?(:'latest_estimated_delivery')
602
+ self.latest_estimated_delivery = attributes[:'latest_estimated_delivery']
603
+ end
604
+
605
+ if attributes.key?(:'shipment_tags')
606
+ self.shipment_tags = attributes[:'shipment_tags']
607
+ end
608
+
609
+ if attributes.key?(:'courier_connection_id')
610
+ self.courier_connection_id = attributes[:'courier_connection_id']
611
+ end
612
+
613
+ if attributes.key?(:'next_couriers')
614
+ self.next_couriers = attributes[:'next_couriers']
615
+ end
616
+
617
+ if attributes.key?(:'tracking_origin_country')
618
+ self.tracking_origin_country = attributes[:'tracking_origin_country']
619
+ end
620
+
621
+ if attributes.key?(:'tracking_destination_country')
622
+ self.tracking_destination_country = attributes[:'tracking_destination_country']
623
+ end
624
+
625
+ if attributes.key?(:'tracking_postal_code')
626
+ self.tracking_postal_code = attributes[:'tracking_postal_code']
627
+ end
628
+
629
+ if attributes.key?(:'tracking_state')
630
+ self.tracking_state = attributes[:'tracking_state']
631
+ end
632
+
633
+ if attributes.key?(:'carbon_emissions')
634
+ self.carbon_emissions = attributes[:'carbon_emissions']
635
+ end
636
+
637
+ if attributes.key?(:'location_id')
638
+ self.location_id = attributes[:'location_id']
639
+ end
640
+
641
+ if attributes.key?(:'shipping_method')
642
+ self.shipping_method = attributes[:'shipping_method']
643
+ end
644
+
645
+ if attributes.key?(:'failed_delivery_attempts')
646
+ self.failed_delivery_attempts = attributes[:'failed_delivery_attempts']
647
+ end
648
+
649
+ if attributes.key?(:'signature_requirement')
650
+ self.signature_requirement = attributes[:'signature_requirement']
651
+ end
652
+
653
+ if attributes.key?(:'delivery_location_type')
654
+ self.delivery_location_type = attributes[:'delivery_location_type']
655
+ end
656
+
657
+ if attributes.key?(:'aftership_tracking_url')
658
+ self.aftership_tracking_url = attributes[:'aftership_tracking_url']
659
+ end
660
+
661
+ if attributes.key?(:'aftership_tracking_order_url')
662
+ self.aftership_tracking_order_url = attributes[:'aftership_tracking_order_url']
663
+ end
664
+ end
665
+
666
+ # Attribute type mapping.
667
+ def self.openapi_types
668
+ {
669
+ :'id' => :'String',
670
+ :'legacy_id' => :'String',
671
+ :'created_at' => :'String',
672
+ :'updated_at' => :'String',
673
+ :'last_updated_at' => :'String',
674
+ :'tracking_number' => :'String',
675
+ :'slug' => :'String',
676
+ :'active' => :'Boolean',
677
+ :'custom_fields' => :'Object',
678
+ :'customer_name' => :'String',
679
+ :'transit_time' => :'Integer',
680
+ :'origin_country_iso3' => :'String',
681
+ :'origin_state' => :'String',
682
+ :'origin_city' => :'String',
683
+ :'origin_postal_code' => :'String',
684
+ :'origin_raw_location' => :'String',
685
+ :'destination_country_iso3' => :'String',
686
+ :'destination_state' => :'String',
687
+ :'destination_city' => :'String',
688
+ :'destination_postal_code' => :'String',
689
+ :'destination_raw_location' => :'String',
690
+ :'courier_destination_country_iso3' => :'String',
691
+ :'emails' => :'Array<String>',
692
+ :'courier_estimated_delivery_date' => :'CourierEstimatedDeliveryDateDeleteTrackingByIdResponse',
693
+ :'note' => :'String',
694
+ :'order_id' => :'String',
695
+ :'order_id_path' => :'String',
696
+ :'order_date' => :'String',
697
+ :'shipment_package_count' => :'Float',
698
+ :'shipment_pickup_date' => :'String',
699
+ :'shipment_delivery_date' => :'String',
700
+ :'shipment_type' => :'String',
701
+ :'shipment_weight' => :'ShipmentWeightDeleteTrackingByIdResponse',
702
+ :'signed_by' => :'String',
703
+ :'smses' => :'Array<String>',
704
+ :'source' => :'String',
705
+ :'tag' => :'TagV1',
706
+ :'subtag' => :'String',
707
+ :'subtag_message' => :'String',
708
+ :'title' => :'String',
709
+ :'tracked_count' => :'Float',
710
+ :'last_mile_tracking_supported' => :'Boolean',
711
+ :'language' => :'String',
712
+ :'unique_token' => :'String',
713
+ :'checkpoints' => :'Array<Checkpoint>',
714
+ :'subscribed_smses' => :'Array<String>',
715
+ :'subscribed_emails' => :'Array<String>',
716
+ :'return_to_sender' => :'Boolean',
717
+ :'order_promised_delivery_date' => :'String',
718
+ :'delivery_type' => :'String',
719
+ :'pickup_location' => :'String',
720
+ :'pickup_note' => :'String',
721
+ :'courier_tracking_link' => :'String',
722
+ :'first_attempted_at' => :'String',
723
+ :'courier_redirect_link' => :'String',
724
+ :'tracking_account_number' => :'String',
725
+ :'tracking_key' => :'String',
726
+ :'tracking_ship_date' => :'String',
727
+ :'on_time_status' => :'String',
728
+ :'on_time_difference' => :'Float',
729
+ :'order_tags' => :'Array<String>',
730
+ :'aftership_estimated_delivery_date' => :'AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse',
731
+ :'custom_estimated_delivery_date' => :'CustomEstimatedDeliveryDateDeleteTrackingByIdResponse',
732
+ :'order_number' => :'String',
733
+ :'first_estimated_delivery' => :'FirstEstimatedDeliveryDeleteTrackingByIdResponse',
734
+ :'latest_estimated_delivery' => :'LatestEstimatedDeliveryDeleteTrackingByIdResponse',
735
+ :'shipment_tags' => :'Array<String>',
736
+ :'courier_connection_id' => :'String',
737
+ :'next_couriers' => :'Array<NextCouriersDeleteTrackingByIdResponse>',
738
+ :'tracking_origin_country' => :'String',
739
+ :'tracking_destination_country' => :'String',
740
+ :'tracking_postal_code' => :'String',
741
+ :'tracking_state' => :'String',
742
+ :'carbon_emissions' => :'CarbonEmissionsDeleteTrackingByIdResponse',
743
+ :'location_id' => :'String',
744
+ :'shipping_method' => :'String',
745
+ :'failed_delivery_attempts' => :'Integer',
746
+ :'signature_requirement' => :'String',
747
+ :'delivery_location_type' => :'String',
748
+ :'aftership_tracking_url' => :'String',
749
+ :'aftership_tracking_order_url' => :'String',
750
+ }
751
+ end
752
+
753
+ # Attribute mapping from ruby-style variable name to JSON key.
754
+ def self.attribute_map
755
+ {
756
+ :'id' => :'id',
757
+ :'legacy_id' => :'legacy_id',
758
+ :'created_at' => :'created_at',
759
+ :'updated_at' => :'updated_at',
760
+ :'last_updated_at' => :'last_updated_at',
761
+ :'tracking_number' => :'tracking_number',
762
+ :'slug' => :'slug',
763
+ :'active' => :'active',
764
+ :'custom_fields' => :'custom_fields',
765
+ :'customer_name' => :'customer_name',
766
+ :'transit_time' => :'transit_time',
767
+ :'origin_country_iso3' => :'origin_country_iso3',
768
+ :'origin_state' => :'origin_state',
769
+ :'origin_city' => :'origin_city',
770
+ :'origin_postal_code' => :'origin_postal_code',
771
+ :'origin_raw_location' => :'origin_raw_location',
772
+ :'destination_country_iso3' => :'destination_country_iso3',
773
+ :'destination_state' => :'destination_state',
774
+ :'destination_city' => :'destination_city',
775
+ :'destination_postal_code' => :'destination_postal_code',
776
+ :'destination_raw_location' => :'destination_raw_location',
777
+ :'courier_destination_country_iso3' => :'courier_destination_country_iso3',
778
+ :'emails' => :'emails',
779
+ :'courier_estimated_delivery_date' => :'courier_estimated_delivery_date',
780
+ :'note' => :'note',
781
+ :'order_id' => :'order_id',
782
+ :'order_id_path' => :'order_id_path',
783
+ :'order_date' => :'order_date',
784
+ :'shipment_package_count' => :'shipment_package_count',
785
+ :'shipment_pickup_date' => :'shipment_pickup_date',
786
+ :'shipment_delivery_date' => :'shipment_delivery_date',
787
+ :'shipment_type' => :'shipment_type',
788
+ :'shipment_weight' => :'shipment_weight',
789
+ :'signed_by' => :'signed_by',
790
+ :'smses' => :'smses',
791
+ :'source' => :'source',
792
+ :'tag' => :'tag',
793
+ :'subtag' => :'subtag',
794
+ :'subtag_message' => :'subtag_message',
795
+ :'title' => :'title',
796
+ :'tracked_count' => :'tracked_count',
797
+ :'last_mile_tracking_supported' => :'last_mile_tracking_supported',
798
+ :'language' => :'language',
799
+ :'unique_token' => :'unique_token',
800
+ :'checkpoints' => :'checkpoints',
801
+ :'subscribed_smses' => :'subscribed_smses',
802
+ :'subscribed_emails' => :'subscribed_emails',
803
+ :'return_to_sender' => :'return_to_sender',
804
+ :'order_promised_delivery_date' => :'order_promised_delivery_date',
805
+ :'delivery_type' => :'delivery_type',
806
+ :'pickup_location' => :'pickup_location',
807
+ :'pickup_note' => :'pickup_note',
808
+ :'courier_tracking_link' => :'courier_tracking_link',
809
+ :'first_attempted_at' => :'first_attempted_at',
810
+ :'courier_redirect_link' => :'courier_redirect_link',
811
+ :'tracking_account_number' => :'tracking_account_number',
812
+ :'tracking_key' => :'tracking_key',
813
+ :'tracking_ship_date' => :'tracking_ship_date',
814
+ :'on_time_status' => :'on_time_status',
815
+ :'on_time_difference' => :'on_time_difference',
816
+ :'order_tags' => :'order_tags',
817
+ :'aftership_estimated_delivery_date' => :'aftership_estimated_delivery_date',
818
+ :'custom_estimated_delivery_date' => :'custom_estimated_delivery_date',
819
+ :'order_number' => :'order_number',
820
+ :'first_estimated_delivery' => :'first_estimated_delivery',
821
+ :'latest_estimated_delivery' => :'latest_estimated_delivery',
822
+ :'shipment_tags' => :'shipment_tags',
823
+ :'courier_connection_id' => :'courier_connection_id',
824
+ :'next_couriers' => :'next_couriers',
825
+ :'tracking_origin_country' => :'tracking_origin_country',
826
+ :'tracking_destination_country' => :'tracking_destination_country',
827
+ :'tracking_postal_code' => :'tracking_postal_code',
828
+ :'tracking_state' => :'tracking_state',
829
+ :'carbon_emissions' => :'carbon_emissions',
830
+ :'location_id' => :'location_id',
831
+ :'shipping_method' => :'shipping_method',
832
+ :'failed_delivery_attempts' => :'failed_delivery_attempts',
833
+ :'signature_requirement' => :'signature_requirement',
834
+ :'delivery_location_type' => :'delivery_location_type',
835
+ :'aftership_tracking_url' => :'aftership_tracking_url',
836
+ :'aftership_tracking_order_url' => :'aftership_tracking_order_url',
837
+ }
838
+ end
839
+
840
+ # Builds the object from hash
841
+ # @param attributes [Hash] Model attributes in the form of hash
842
+ # @return [Object] Returns the model itself
843
+ def self.build_from_hash(attributes)
844
+ return nil unless attributes.is_a?(Hash)
845
+ attributes = attributes.transform_keys(&:to_sym)
846
+ transformed_hash = {}
847
+ openapi_types.each_pair do |key, type|
848
+ if attributes.key?(key) && attributes[key].nil?
849
+ transformed_hash["#{key}"] = nil
850
+ elsif type =~ /\AArray<(.*)>/i
851
+ # check to ensure the input is an array given that the attribute
852
+ # is documented as an array but the input is not
853
+ if attributes[key].is_a?(Array)
854
+ transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
855
+ end
856
+ elsif !attributes[key].nil?
857
+ transformed_hash["#{key}"] = _deserialize(type, attributes[key])
858
+ end
859
+ end
860
+ new(transformed_hash)
861
+ end
862
+
863
+ # Deserializes the data based on type
864
+ # @param type [String] Data type
865
+ # @param value [String] Value to be deserialized
866
+ # @return [Object] Deserialized data
867
+ def self._deserialize(type, value)
868
+ case type.to_sym
869
+ when :Time
870
+ Time.parse(value)
871
+ when :Date
872
+ Date.parse(value)
873
+ when :String
874
+ value.to_s
875
+ when :Integer
876
+ value.to_i
877
+ when :Float
878
+ value.to_f
879
+ when :Boolean
880
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
881
+ true
882
+ else
883
+ false
884
+ end
885
+ when :Object
886
+ # generic object (usually a Hash), return directly
887
+ value
888
+ when /\AArray<(?<inner_type>.+)>\z/
889
+ inner_type = Regexp.last_match[:inner_type]
890
+ value.map { |v| _deserialize(inner_type, v) }
891
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
892
+ k_type = Regexp.last_match[:k_type]
893
+ v_type = Regexp.last_match[:v_type]
894
+ {}.tap do |hash|
895
+ value.each do |k, v|
896
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
897
+ end
898
+ end
899
+ else # model
900
+ klass = AftershipAPI::Model.const_get(type)
901
+ klass.build_from_hash(value)
902
+ end
903
+ end
904
+
905
+ # Returns the string representation of the object
906
+ # @return [String] String presentation of the object
907
+ def to_s
908
+ to_hash.to_s
909
+ end
910
+
911
+ # to_body is an alias to to_hash (backward compatibility)
912
+ # @return [Hash] Returns the object in the form of hash
913
+ def to_body
914
+ to_hash
915
+ end
916
+
917
+ # Returns the object in the form of hash
918
+ # @return [Hash] Returns the object in the form of hash
919
+ def to_hash
920
+ hash = {}
921
+ self.class.attribute_map.each_pair do |attr, param|
922
+ value = self.send(attr)
923
+ next if value.nil?
924
+
925
+ hash[param] = _to_hash(value)
926
+ end
927
+ hash
928
+ end
929
+
930
+ # Outputs non-array value in the form of hash
931
+ # For object, use to_hash. Otherwise, just return the value
932
+ # @param value [Object] Any valid value
933
+ # @return [Hash] Returns the value in the form of hash
934
+ def _to_hash(value)
935
+ if value.is_a?(Array)
936
+ value.compact.map { |v| _to_hash(v) }
937
+ elsif value.is_a?(Hash)
938
+ {}.tap do |hash|
939
+ value.each { |k, v| hash[k] = _to_hash(v) }
940
+ end
941
+ elsif value.respond_to? :to_hash
942
+ value.to_hash
943
+ else
944
+ value
945
+ end
946
+ end
947
+
948
+ def to_json(*a)
949
+ to_hash.to_json(*a)
950
+ end
951
+ end
952
+ end
953
+