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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +4 -3
  4. data/lib/aftership-tracking-sdk/api/courier.rb +6 -6
  5. data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +4 -4
  6. data/lib/aftership-tracking-sdk/api/tracking.rb +23 -389
  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 +2 -0
  11. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.rb +2 -0
  12. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_get_tracking_by_id_response.rb +2 -0
  13. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +2 -0
  14. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.rb +2 -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 +2 -0
  17. data/lib/aftership-tracking-sdk/models/carbon_emissions_create_tracking_response.rb +2 -0
  18. data/lib/aftership-tracking-sdk/models/carbon_emissions_delete_tracking_by_id_response.rb +2 -0
  19. data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_id_response.rb +2 -0
  20. data/lib/aftership-tracking-sdk/models/carbon_emissions_mark_tracking_completed_by_id_response.rb +2 -0
  21. data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_id_response.rb +2 -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 +2 -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/{aftership_estimated_delivery_date_get_tracking_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_create_tracking_response.rb} +7 -15
  28. 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
  29. 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
  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/{aftership_estimated_delivery_date_delete_tracking_by_slug_tracking_number_response.rb → courier_estimated_delivery_date_tracking.rb} +7 -15
  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/create_tracking_request.rb +2 -0
  36. data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +29 -7
  37. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_create_tracking_response.rb +2 -0
  38. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_id_response.rb +2 -0
  39. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_id_response.rb +2 -0
  40. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +2 -0
  41. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.rb +2 -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 +2 -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 +29 -7
  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/detect_courier_request.rb +2 -0
  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 +2 -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 +2 -0
  57. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_id_response.rb +2 -0
  58. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_id_response.rb +2 -0
  59. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_id_response.rb +2 -0
  60. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_id_response.rb +2 -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 +2 -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 +29 -7
  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 +2 -0
  68. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +2 -0
  69. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +2 -0
  70. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +2 -0
  71. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +2 -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 +2 -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 +29 -7
  76. data/lib/aftership-tracking-sdk/models/meta_v1.rb +2 -0
  77. data/lib/aftership-tracking-sdk/models/next_couriers_create_tracking_request.rb +2 -0
  78. data/lib/aftership-tracking-sdk/models/next_couriers_create_tracking_response.rb +22 -0
  79. data/lib/aftership-tracking-sdk/models/next_couriers_delete_tracking_by_id_response.rb +22 -0
  80. data/lib/aftership-tracking-sdk/models/next_couriers_get_tracking_by_id_response.rb +22 -0
  81. data/lib/aftership-tracking-sdk/models/next_couriers_mark_tracking_completed_by_id_response.rb +22 -0
  82. data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_id_response.rb +22 -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 +22 -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/{next_couriers_get_tracking_by_slug_tracking_number_response.rb → pagination_data_tracking_response_get_multiple_v1.rb} +25 -23
  91. data/lib/aftership-tracking-sdk/models/{next_couriers_delete_tracking_by_slug_tracking_number_response.rb → pagination_get_trackings_response.rb} +25 -23
  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 +29 -7
  96. data/lib/aftership-tracking-sdk/models/shipment_weight_create_tracking_response.rb +2 -0
  97. data/lib/aftership-tracking-sdk/models/shipment_weight_delete_tracking_by_id_response.rb +2 -0
  98. data/lib/aftership-tracking-sdk/models/shipment_weight_get_tracking_by_id_response.rb +2 -0
  99. data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_id_response.rb +2 -0
  100. data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_id_response.rb +2 -0
  101. data/lib/aftership-tracking-sdk/models/shipment_weight_tracking.rb +2 -0
  102. data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_id_response.rb +2 -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 +29 -7
  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 +2 -0
  108. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +2 -0
  109. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +29 -7
  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 +11 -45
  114. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_update_tracking_by_slug_tracking_number_response.rb +0 -181
  115. data/lib/aftership-tracking-sdk/models/carbon_emissions_delete_tracking_by_slug_tracking_number_response.rb +0 -161
  116. data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_slug_tracking_number_response.rb +0 -161
  117. data/lib/aftership-tracking-sdk/models/carbon_emissions_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -161
  118. data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_slug_tracking_number_response.rb +0 -161
  119. data/lib/aftership-tracking-sdk/models/carbon_emissions_update_tracking_by_slug_tracking_number_response.rb +0 -161
  120. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_slug_tracking_number_response.rb +0 -181
  121. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_slug_tracking_number_response.rb +0 -181
  122. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -181
  123. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_slug_tracking_number_response.rb +0 -181
  124. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_update_tracking_by_slug_tracking_number_response.rb +0 -181
  125. data/lib/aftership-tracking-sdk/models/custom_fields_update_tracking_by_slug_tracking_number_request.rb +0 -139
  126. data/lib/aftership-tracking-sdk/models/delete_tracking_by_slug_tracking_number_response.rb +0 -931
  127. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_slug_tracking_number_response.rb +0 -191
  128. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_slug_tracking_number_response.rb +0 -191
  129. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -191
  130. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_slug_tracking_number_response.rb +0 -191
  131. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_update_tracking_by_slug_tracking_number_response.rb +0 -191
  132. data/lib/aftership-tracking-sdk/models/get_tracking_by_slug_tracking_number_response.rb +0 -931
  133. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_slug_tracking_number_response.rb +0 -191
  134. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_slug_tracking_number_response.rb +0 -191
  135. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -191
  136. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_slug_tracking_number_response.rb +0 -191
  137. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_slug_tracking_number_response.rb +0 -191
  138. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_slug_tracking_number_request.rb +0 -151
  139. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_slug_tracking_number_response.rb +0 -931
  140. data/lib/aftership-tracking-sdk/models/next_couriers_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -171
  141. data/lib/aftership-tracking-sdk/models/next_couriers_retrack_tracking_by_slug_tracking_number_response.rb +0 -171
  142. data/lib/aftership-tracking-sdk/models/next_couriers_update_tracking_by_slug_tracking_number_response.rb +0 -171
  143. data/lib/aftership-tracking-sdk/models/retrack_tracking_by_slug_tracking_number_response.rb +0 -931
  144. data/lib/aftership-tracking-sdk/models/shipment_weight_delete_tracking_by_slug_tracking_number_response.rb +0 -161
  145. data/lib/aftership-tracking-sdk/models/shipment_weight_get_tracking_by_slug_tracking_number_response.rb +0 -161
  146. data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_slug_tracking_number_response.rb +0 -161
  147. data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_slug_tracking_number_response.rb +0 -161
  148. data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_slug_tracking_number_response.rb +0 -161
  149. data/lib/aftership-tracking-sdk/models/update_tracking_by_slug_tracking_number_request.rb +0 -391
  150. data/lib/aftership-tracking-sdk/models/update_tracking_by_slug_tracking_number_response.rb +0 -931
@@ -1,931 +0,0 @@
1
- # This code was auto generated by AfterShip SDK Generator.
2
- # Do not edit the class manually.
3
- module AftershipAPI::Model
4
- class UpdateTrackingBySlugTrackingNumberResponse
5
- # Tracking ID.
6
- # id?: String;
7
- attr_accessor :id
8
-
9
- # 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.
10
- # legacy_id?: String;
11
- attr_accessor :legacy_id
12
-
13
- # 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.
14
- # created_at?: String;
15
- attr_accessor :created_at
16
-
17
- # The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.
18
- # updated_at?: String;
19
- attr_accessor :updated_at
20
-
21
- # (Legacy) The date and time the shipment was updated. It uses the format `YYYY-MM-DDTHH:mm:ssZ` for the timezone GMT +0.
22
- # last_updated_at?: String;
23
- attr_accessor :last_updated_at
24
-
25
- # Tracking number.
26
- # tracking_number?: String;
27
- attr_accessor :tracking_number
28
-
29
- # 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 .
30
- # slug?: String;
31
- attr_accessor :slug
32
-
33
- # 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.
34
- # active?: Boolean;
35
- attr_accessor :active
36
-
37
- # 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.
38
- # custom_fields?: Object;
39
- attr_accessor :custom_fields
40
-
41
- # Customer name of the tracking.
42
- # customer_name?: String;
43
- attr_accessor :customer_name
44
-
45
- # 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.
46
- # transit_time?: Integer;
47
- attr_accessor :transit_time
48
-
49
- # The for the origin country/region. E.g. USA for the United States.
50
- # origin_country_iso3?: String;
51
- attr_accessor :origin_country_iso3
52
-
53
- # The state of the sender’s address.
54
- # origin_state?: String;
55
- attr_accessor :origin_state
56
-
57
- # The city of the sender’s address.
58
- # origin_city?: String;
59
- attr_accessor :origin_city
60
-
61
- # The postal code of the sender’s address.
62
- # origin_postal_code?: String;
63
- attr_accessor :origin_postal_code
64
-
65
- # The sender address that the shipment is shipping from.
66
- # origin_raw_location?: String;
67
- attr_accessor :origin_raw_location
68
-
69
- # The for the destination country/region. E.g. USA for the United States.
70
- # destination_country_iso3?: String;
71
- attr_accessor :destination_country_iso3
72
-
73
- # The state of the recipient’s address.
74
- # destination_state?: String;
75
- attr_accessor :destination_state
76
-
77
- # The city of the recipient’s address.
78
- # destination_city?: String;
79
- attr_accessor :destination_city
80
-
81
- # The postal code of the recipient’s address.
82
- # destination_postal_code?: String;
83
- attr_accessor :destination_postal_code
84
-
85
- # The shipping address that the shipment is shipping to.
86
- # destination_raw_location?: String;
87
- attr_accessor :destination_raw_location
88
-
89
- # 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.
90
- # courier_destination_country_iso3?: String;
91
- attr_accessor :courier_destination_country_iso3
92
-
93
- # Email address(es) to receive email notifications.
94
- # emails?: String[];
95
- attr_accessor :emails
96
-
97
- # The estimated delivery date provided by the carrier. It uses the shipment recipient’s timezone and the format may differ depending on how the carrier provides it:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
98
- # expected_delivery?: String;
99
- attr_accessor :expected_delivery
100
-
101
- # Text field for the note.
102
- # note?: String;
103
- attr_accessor :note
104
-
105
- # A globally-unique identifier for the order.
106
- # order_id?: String;
107
- attr_accessor :order_id
108
-
109
- # The URL for the order in your system or store.
110
- # order_id_path?: String;
111
- attr_accessor :order_id_path
112
-
113
- # 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.
114
- # order_date?: String;
115
- attr_accessor :order_date
116
-
117
- # Number of packages under the tracking.
118
- # shipment_package_count?: Float;
119
- attr_accessor :shipment_package_count
120
-
121
- # 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
122
- # shipment_pickup_date?: String;
123
- attr_accessor :shipment_pickup_date
124
-
125
- # 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
126
- # shipment_delivery_date?: String;
127
- attr_accessor :shipment_delivery_date
128
-
129
- # The carrier service type for the shipment.
130
- # shipment_type?: String;
131
- attr_accessor :shipment_type
132
-
133
- # 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
134
- # shipment_weight?: ShipmentWeightUpdateTrackingBySlugTrackingNumberResponse;
135
- attr_accessor :shipment_weight
136
-
137
- # Signed by information for delivered shipment.
138
- # signed_by?: String;
139
- attr_accessor :signed_by
140
-
141
- # The phone number(s) to receive sms notifications. Phone number should begin with `+` and `Area Code` before phone number.
142
- # smses?: String[];
143
- attr_accessor :smses
144
-
145
- # Source of how this tracking is added.
146
- # source?: String;
147
- attr_accessor :source
148
-
149
- # Current status of tracking. (
150
- # tag?: TagV1;
151
- attr_accessor :tag
152
-
153
- # Current subtag of tracking. (
154
- # subtag?: String;
155
- attr_accessor :subtag
156
-
157
- # Normalized tracking message. (
158
- # subtag_message?: String;
159
- attr_accessor :subtag_message
160
-
161
- # By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number).
162
- # title?: String;
163
- attr_accessor :title
164
-
165
- # Number of attempts AfterShip tracks at courier's system.
166
- # tracked_count?: Float;
167
- attr_accessor :tracked_count
168
-
169
- # Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null
170
- # last_mile_tracking_supported?: Boolean;
171
- attr_accessor :last_mile_tracking_supported
172
-
173
- # 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.
174
- # language?: String;
175
- attr_accessor :language
176
-
177
- # Deprecated
178
- # unique_token?: String;
179
- attr_accessor :unique_token
180
-
181
- # Array of checkpoint object describes the checkpoint information.
182
- # checkpoints?: Checkpoint[];
183
- attr_accessor :checkpoints
184
-
185
- # Phone number(s) subscribed to receive sms notifications.
186
- # subscribed_smses?: String[];
187
- attr_accessor :subscribed_smses
188
-
189
- # Email address(es) subscribed to receive email notifications.
190
- # subscribed_emails?: String[];
191
- attr_accessor :subscribed_emails
192
-
193
- # 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`.
194
- # return_to_sender?: Boolean;
195
- attr_accessor :return_to_sender
196
-
197
- # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
198
- # order_promised_delivery_date?: String;
199
- attr_accessor :order_promised_delivery_date
200
-
201
- # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
202
- # delivery_type?: String;
203
- attr_accessor :delivery_type
204
-
205
- # Shipment pickup location for receiver
206
- # pickup_location?: String;
207
- attr_accessor :pickup_location
208
-
209
- # Shipment pickup note for receiver
210
- # pickup_note?: String;
211
- attr_accessor :pickup_note
212
-
213
- # 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.
214
- # courier_tracking_link?: String;
215
- attr_accessor :courier_tracking_link
216
-
217
- # 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
218
- # first_attempted_at?: String;
219
- attr_accessor :first_attempted_at
220
-
221
- # 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.
222
- # courier_redirect_link?: String;
223
- attr_accessor :courier_redirect_link
224
-
225
- # 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.
226
- # tracking_account_number?: String;
227
- attr_accessor :tracking_account_number
228
-
229
- # 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.
230
- # tracking_key?: String;
231
- attr_accessor :tracking_key
232
-
233
- # 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.
234
- # tracking_ship_date?: String;
235
- attr_accessor :tracking_ship_date
236
-
237
- # Whether the tracking is delivered on time or not.
238
- # on_time_status?: String;
239
- attr_accessor :on_time_status
240
-
241
- # The difference days of the on time.
242
- # on_time_difference?: Float;
243
- attr_accessor :on_time_difference
244
-
245
- # The tags of the order.
246
- # order_tags?: String[];
247
- attr_accessor :order_tags
248
-
249
- # 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.
250
- # aftership_estimated_delivery_date?: AftershipEstimatedDeliveryDateUpdateTrackingBySlugTrackingNumberResponse;
251
- attr_accessor :aftership_estimated_delivery_date
252
-
253
- # Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone.
254
- # custom_estimated_delivery_date?: CustomEstimatedDeliveryDateUpdateTrackingBySlugTrackingNumberResponse;
255
- attr_accessor :custom_estimated_delivery_date
256
-
257
- # A unique, human-readable identifier for the order.
258
- # order_number?: String;
259
- attr_accessor :order_number
260
-
261
- # 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.
262
- # first_estimated_delivery?: FirstEstimatedDeliveryUpdateTrackingBySlugTrackingNumberResponse;
263
- attr_accessor :first_estimated_delivery
264
-
265
- # 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.
266
- # latest_estimated_delivery?: LatestEstimatedDeliveryUpdateTrackingBySlugTrackingNumberResponse;
267
- attr_accessor :latest_estimated_delivery
268
-
269
- # Used to add tags to your shipments to help categorize and filter them easily.
270
- # shipment_tags?: String[];
271
- attr_accessor :shipment_tags
272
-
273
- # 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.
274
- # courier_connection_id?: String;
275
- attr_accessor :courier_connection_id
276
-
277
- # The next couriers get the second carrier information from user or AfterShip.
278
- # next_couriers?: NextCouriersUpdateTrackingBySlugTrackingNumberResponse[];
279
- attr_accessor :next_couriers
280
-
281
- # (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.
282
- # tracking_origin_country?: String;
283
- attr_accessor :tracking_origin_country
284
-
285
- # (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.
286
- # tracking_destination_country?: String;
287
- attr_accessor :tracking_destination_country
288
-
289
- # (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.
290
- # tracking_postal_code?: String;
291
- attr_accessor :tracking_postal_code
292
-
293
- # (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.
294
- # tracking_state?: String;
295
- attr_accessor :tracking_state
296
-
297
- # 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.
298
- # carbon_emissions?: CarbonEmissionsUpdateTrackingBySlugTrackingNumberResponse;
299
- attr_accessor :carbon_emissions
300
-
301
- # 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 .
302
- # location_id?: String;
303
- attr_accessor :location_id
304
-
305
- # 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.
306
- # shipping_method?: String;
307
- attr_accessor :shipping_method
308
-
309
- # 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.
310
- # failed_delivery_attempts?: Integer;
311
- attr_accessor :failed_delivery_attempts
312
-
313
- # 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>
314
- # signature_requirement?: String;
315
- attr_accessor :signature_requirement
316
-
317
- # 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.
318
- # delivery_location_type?: String;
319
- attr_accessor :delivery_location_type
320
-
321
- # Initializes the object
322
- # @param [Hash] attributes Model attributes in the form of hash
323
- def initialize(attributes = {})
324
- if (!attributes.is_a?(Hash))
325
- fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::UpdateTrackingBySlugTrackingNumberResponse` initialize method"
326
- end
327
-
328
- attributes = attributes.each_with_object({}) { |(k, v), h|
329
- h[k.to_sym] = v
330
- }
331
-
332
- if attributes.key?(:'id')
333
- self.id = attributes[:'id']
334
- end
335
-
336
- if attributes.key?(:'legacy_id')
337
- self.legacy_id = attributes[:'legacy_id']
338
- end
339
-
340
- if attributes.key?(:'created_at')
341
- self.created_at = attributes[:'created_at']
342
- end
343
-
344
- if attributes.key?(:'updated_at')
345
- self.updated_at = attributes[:'updated_at']
346
- end
347
-
348
- if attributes.key?(:'last_updated_at')
349
- self.last_updated_at = attributes[:'last_updated_at']
350
- end
351
-
352
- if attributes.key?(:'tracking_number')
353
- self.tracking_number = attributes[:'tracking_number']
354
- end
355
-
356
- if attributes.key?(:'slug')
357
- self.slug = attributes[:'slug']
358
- end
359
-
360
- if attributes.key?(:'active')
361
- self.active = attributes[:'active']
362
- end
363
-
364
- if attributes.key?(:'custom_fields')
365
- self.custom_fields = attributes[:'custom_fields']
366
- end
367
-
368
- if attributes.key?(:'customer_name')
369
- self.customer_name = attributes[:'customer_name']
370
- end
371
-
372
- if attributes.key?(:'transit_time')
373
- self.transit_time = attributes[:'transit_time']
374
- end
375
-
376
- if attributes.key?(:'origin_country_iso3')
377
- self.origin_country_iso3 = attributes[:'origin_country_iso3']
378
- end
379
-
380
- if attributes.key?(:'origin_state')
381
- self.origin_state = attributes[:'origin_state']
382
- end
383
-
384
- if attributes.key?(:'origin_city')
385
- self.origin_city = attributes[:'origin_city']
386
- end
387
-
388
- if attributes.key?(:'origin_postal_code')
389
- self.origin_postal_code = attributes[:'origin_postal_code']
390
- end
391
-
392
- if attributes.key?(:'origin_raw_location')
393
- self.origin_raw_location = attributes[:'origin_raw_location']
394
- end
395
-
396
- if attributes.key?(:'destination_country_iso3')
397
- self.destination_country_iso3 = attributes[:'destination_country_iso3']
398
- end
399
-
400
- if attributes.key?(:'destination_state')
401
- self.destination_state = attributes[:'destination_state']
402
- end
403
-
404
- if attributes.key?(:'destination_city')
405
- self.destination_city = attributes[:'destination_city']
406
- end
407
-
408
- if attributes.key?(:'destination_postal_code')
409
- self.destination_postal_code = attributes[:'destination_postal_code']
410
- end
411
-
412
- if attributes.key?(:'destination_raw_location')
413
- self.destination_raw_location = attributes[:'destination_raw_location']
414
- end
415
-
416
- if attributes.key?(:'courier_destination_country_iso3')
417
- self.courier_destination_country_iso3 = attributes[:'courier_destination_country_iso3']
418
- end
419
-
420
- if attributes.key?(:'emails')
421
- self.emails = attributes[:'emails']
422
- end
423
-
424
- if attributes.key?(:'expected_delivery')
425
- self.expected_delivery = attributes[:'expected_delivery']
426
- end
427
-
428
- if attributes.key?(:'note')
429
- self.note = attributes[:'note']
430
- end
431
-
432
- if attributes.key?(:'order_id')
433
- self.order_id = attributes[:'order_id']
434
- end
435
-
436
- if attributes.key?(:'order_id_path')
437
- self.order_id_path = attributes[:'order_id_path']
438
- end
439
-
440
- if attributes.key?(:'order_date')
441
- self.order_date = attributes[:'order_date']
442
- end
443
-
444
- if attributes.key?(:'shipment_package_count')
445
- self.shipment_package_count = attributes[:'shipment_package_count']
446
- end
447
-
448
- if attributes.key?(:'shipment_pickup_date')
449
- self.shipment_pickup_date = attributes[:'shipment_pickup_date']
450
- end
451
-
452
- if attributes.key?(:'shipment_delivery_date')
453
- self.shipment_delivery_date = attributes[:'shipment_delivery_date']
454
- end
455
-
456
- if attributes.key?(:'shipment_type')
457
- self.shipment_type = attributes[:'shipment_type']
458
- end
459
-
460
- if attributes.key?(:'shipment_weight')
461
- self.shipment_weight = attributes[:'shipment_weight']
462
- end
463
-
464
- if attributes.key?(:'signed_by')
465
- self.signed_by = attributes[:'signed_by']
466
- end
467
-
468
- if attributes.key?(:'smses')
469
- self.smses = attributes[:'smses']
470
- end
471
-
472
- if attributes.key?(:'source')
473
- self.source = attributes[:'source']
474
- end
475
-
476
- if attributes.key?(:'tag')
477
- self.tag = attributes[:'tag']
478
- end
479
-
480
- if attributes.key?(:'subtag')
481
- self.subtag = attributes[:'subtag']
482
- end
483
-
484
- if attributes.key?(:'subtag_message')
485
- self.subtag_message = attributes[:'subtag_message']
486
- end
487
-
488
- if attributes.key?(:'title')
489
- self.title = attributes[:'title']
490
- end
491
-
492
- if attributes.key?(:'tracked_count')
493
- self.tracked_count = attributes[:'tracked_count']
494
- end
495
-
496
- if attributes.key?(:'last_mile_tracking_supported')
497
- self.last_mile_tracking_supported = attributes[:'last_mile_tracking_supported']
498
- end
499
-
500
- if attributes.key?(:'language')
501
- self.language = attributes[:'language']
502
- end
503
-
504
- if attributes.key?(:'unique_token')
505
- self.unique_token = attributes[:'unique_token']
506
- end
507
-
508
- if attributes.key?(:'checkpoints')
509
- self.checkpoints = attributes[:'checkpoints']
510
- end
511
-
512
- if attributes.key?(:'subscribed_smses')
513
- self.subscribed_smses = attributes[:'subscribed_smses']
514
- end
515
-
516
- if attributes.key?(:'subscribed_emails')
517
- self.subscribed_emails = attributes[:'subscribed_emails']
518
- end
519
-
520
- if attributes.key?(:'return_to_sender')
521
- self.return_to_sender = attributes[:'return_to_sender']
522
- end
523
-
524
- if attributes.key?(:'order_promised_delivery_date')
525
- self.order_promised_delivery_date = attributes[:'order_promised_delivery_date']
526
- end
527
-
528
- if attributes.key?(:'delivery_type')
529
- self.delivery_type = attributes[:'delivery_type']
530
- end
531
-
532
- if attributes.key?(:'pickup_location')
533
- self.pickup_location = attributes[:'pickup_location']
534
- end
535
-
536
- if attributes.key?(:'pickup_note')
537
- self.pickup_note = attributes[:'pickup_note']
538
- end
539
-
540
- if attributes.key?(:'courier_tracking_link')
541
- self.courier_tracking_link = attributes[:'courier_tracking_link']
542
- end
543
-
544
- if attributes.key?(:'first_attempted_at')
545
- self.first_attempted_at = attributes[:'first_attempted_at']
546
- end
547
-
548
- if attributes.key?(:'courier_redirect_link')
549
- self.courier_redirect_link = attributes[:'courier_redirect_link']
550
- end
551
-
552
- if attributes.key?(:'tracking_account_number')
553
- self.tracking_account_number = attributes[:'tracking_account_number']
554
- end
555
-
556
- if attributes.key?(:'tracking_key')
557
- self.tracking_key = attributes[:'tracking_key']
558
- end
559
-
560
- if attributes.key?(:'tracking_ship_date')
561
- self.tracking_ship_date = attributes[:'tracking_ship_date']
562
- end
563
-
564
- if attributes.key?(:'on_time_status')
565
- self.on_time_status = attributes[:'on_time_status']
566
- end
567
-
568
- if attributes.key?(:'on_time_difference')
569
- self.on_time_difference = attributes[:'on_time_difference']
570
- end
571
-
572
- if attributes.key?(:'order_tags')
573
- self.order_tags = attributes[:'order_tags']
574
- end
575
-
576
- if attributes.key?(:'aftership_estimated_delivery_date')
577
- self.aftership_estimated_delivery_date = attributes[:'aftership_estimated_delivery_date']
578
- end
579
-
580
- if attributes.key?(:'custom_estimated_delivery_date')
581
- self.custom_estimated_delivery_date = attributes[:'custom_estimated_delivery_date']
582
- end
583
-
584
- if attributes.key?(:'order_number')
585
- self.order_number = attributes[:'order_number']
586
- end
587
-
588
- if attributes.key?(:'first_estimated_delivery')
589
- self.first_estimated_delivery = attributes[:'first_estimated_delivery']
590
- end
591
-
592
- if attributes.key?(:'latest_estimated_delivery')
593
- self.latest_estimated_delivery = attributes[:'latest_estimated_delivery']
594
- end
595
-
596
- if attributes.key?(:'shipment_tags')
597
- self.shipment_tags = attributes[:'shipment_tags']
598
- end
599
-
600
- if attributes.key?(:'courier_connection_id')
601
- self.courier_connection_id = attributes[:'courier_connection_id']
602
- end
603
-
604
- if attributes.key?(:'next_couriers')
605
- self.next_couriers = attributes[:'next_couriers']
606
- end
607
-
608
- if attributes.key?(:'tracking_origin_country')
609
- self.tracking_origin_country = attributes[:'tracking_origin_country']
610
- end
611
-
612
- if attributes.key?(:'tracking_destination_country')
613
- self.tracking_destination_country = attributes[:'tracking_destination_country']
614
- end
615
-
616
- if attributes.key?(:'tracking_postal_code')
617
- self.tracking_postal_code = attributes[:'tracking_postal_code']
618
- end
619
-
620
- if attributes.key?(:'tracking_state')
621
- self.tracking_state = attributes[:'tracking_state']
622
- end
623
-
624
- if attributes.key?(:'carbon_emissions')
625
- self.carbon_emissions = attributes[:'carbon_emissions']
626
- end
627
-
628
- if attributes.key?(:'location_id')
629
- self.location_id = attributes[:'location_id']
630
- end
631
-
632
- if attributes.key?(:'shipping_method')
633
- self.shipping_method = attributes[:'shipping_method']
634
- end
635
-
636
- if attributes.key?(:'failed_delivery_attempts')
637
- self.failed_delivery_attempts = attributes[:'failed_delivery_attempts']
638
- end
639
-
640
- if attributes.key?(:'signature_requirement')
641
- self.signature_requirement = attributes[:'signature_requirement']
642
- end
643
-
644
- if attributes.key?(:'delivery_location_type')
645
- self.delivery_location_type = attributes[:'delivery_location_type']
646
- end
647
- end
648
-
649
- # Attribute type mapping.
650
- def self.openapi_types
651
- {
652
- :'id' => :'String',
653
- :'legacy_id' => :'String',
654
- :'created_at' => :'String',
655
- :'updated_at' => :'String',
656
- :'last_updated_at' => :'String',
657
- :'tracking_number' => :'String',
658
- :'slug' => :'String',
659
- :'active' => :'Boolean',
660
- :'custom_fields' => :'Object',
661
- :'customer_name' => :'String',
662
- :'transit_time' => :'Integer',
663
- :'origin_country_iso3' => :'String',
664
- :'origin_state' => :'String',
665
- :'origin_city' => :'String',
666
- :'origin_postal_code' => :'String',
667
- :'origin_raw_location' => :'String',
668
- :'destination_country_iso3' => :'String',
669
- :'destination_state' => :'String',
670
- :'destination_city' => :'String',
671
- :'destination_postal_code' => :'String',
672
- :'destination_raw_location' => :'String',
673
- :'courier_destination_country_iso3' => :'String',
674
- :'emails' => :'Array<String>',
675
- :'expected_delivery' => :'String',
676
- :'note' => :'String',
677
- :'order_id' => :'String',
678
- :'order_id_path' => :'String',
679
- :'order_date' => :'String',
680
- :'shipment_package_count' => :'Float',
681
- :'shipment_pickup_date' => :'String',
682
- :'shipment_delivery_date' => :'String',
683
- :'shipment_type' => :'String',
684
- :'shipment_weight' => :'ShipmentWeightUpdateTrackingBySlugTrackingNumberResponse',
685
- :'signed_by' => :'String',
686
- :'smses' => :'Array<String>',
687
- :'source' => :'String',
688
- :'tag' => :'TagV1',
689
- :'subtag' => :'String',
690
- :'subtag_message' => :'String',
691
- :'title' => :'String',
692
- :'tracked_count' => :'Float',
693
- :'last_mile_tracking_supported' => :'Boolean',
694
- :'language' => :'String',
695
- :'unique_token' => :'String',
696
- :'checkpoints' => :'Array<Checkpoint>',
697
- :'subscribed_smses' => :'Array<String>',
698
- :'subscribed_emails' => :'Array<String>',
699
- :'return_to_sender' => :'Boolean',
700
- :'order_promised_delivery_date' => :'String',
701
- :'delivery_type' => :'String',
702
- :'pickup_location' => :'String',
703
- :'pickup_note' => :'String',
704
- :'courier_tracking_link' => :'String',
705
- :'first_attempted_at' => :'String',
706
- :'courier_redirect_link' => :'String',
707
- :'tracking_account_number' => :'String',
708
- :'tracking_key' => :'String',
709
- :'tracking_ship_date' => :'String',
710
- :'on_time_status' => :'String',
711
- :'on_time_difference' => :'Float',
712
- :'order_tags' => :'Array<String>',
713
- :'aftership_estimated_delivery_date' => :'AftershipEstimatedDeliveryDateUpdateTrackingBySlugTrackingNumberResponse',
714
- :'custom_estimated_delivery_date' => :'CustomEstimatedDeliveryDateUpdateTrackingBySlugTrackingNumberResponse',
715
- :'order_number' => :'String',
716
- :'first_estimated_delivery' => :'FirstEstimatedDeliveryUpdateTrackingBySlugTrackingNumberResponse',
717
- :'latest_estimated_delivery' => :'LatestEstimatedDeliveryUpdateTrackingBySlugTrackingNumberResponse',
718
- :'shipment_tags' => :'Array<String>',
719
- :'courier_connection_id' => :'String',
720
- :'next_couriers' => :'Array<NextCouriersUpdateTrackingBySlugTrackingNumberResponse>',
721
- :'tracking_origin_country' => :'String',
722
- :'tracking_destination_country' => :'String',
723
- :'tracking_postal_code' => :'String',
724
- :'tracking_state' => :'String',
725
- :'carbon_emissions' => :'CarbonEmissionsUpdateTrackingBySlugTrackingNumberResponse',
726
- :'location_id' => :'String',
727
- :'shipping_method' => :'String',
728
- :'failed_delivery_attempts' => :'Integer',
729
- :'signature_requirement' => :'String',
730
- :'delivery_location_type' => :'String',
731
- }
732
- end
733
-
734
- # Attribute mapping from ruby-style variable name to JSON key.
735
- def self.attribute_map
736
- {
737
- :'id' => :'id',
738
- :'legacy_id' => :'legacy_id',
739
- :'created_at' => :'created_at',
740
- :'updated_at' => :'updated_at',
741
- :'last_updated_at' => :'last_updated_at',
742
- :'tracking_number' => :'tracking_number',
743
- :'slug' => :'slug',
744
- :'active' => :'active',
745
- :'custom_fields' => :'custom_fields',
746
- :'customer_name' => :'customer_name',
747
- :'transit_time' => :'transit_time',
748
- :'origin_country_iso3' => :'origin_country_iso3',
749
- :'origin_state' => :'origin_state',
750
- :'origin_city' => :'origin_city',
751
- :'origin_postal_code' => :'origin_postal_code',
752
- :'origin_raw_location' => :'origin_raw_location',
753
- :'destination_country_iso3' => :'destination_country_iso3',
754
- :'destination_state' => :'destination_state',
755
- :'destination_city' => :'destination_city',
756
- :'destination_postal_code' => :'destination_postal_code',
757
- :'destination_raw_location' => :'destination_raw_location',
758
- :'courier_destination_country_iso3' => :'courier_destination_country_iso3',
759
- :'emails' => :'emails',
760
- :'expected_delivery' => :'expected_delivery',
761
- :'note' => :'note',
762
- :'order_id' => :'order_id',
763
- :'order_id_path' => :'order_id_path',
764
- :'order_date' => :'order_date',
765
- :'shipment_package_count' => :'shipment_package_count',
766
- :'shipment_pickup_date' => :'shipment_pickup_date',
767
- :'shipment_delivery_date' => :'shipment_delivery_date',
768
- :'shipment_type' => :'shipment_type',
769
- :'shipment_weight' => :'shipment_weight',
770
- :'signed_by' => :'signed_by',
771
- :'smses' => :'smses',
772
- :'source' => :'source',
773
- :'tag' => :'tag',
774
- :'subtag' => :'subtag',
775
- :'subtag_message' => :'subtag_message',
776
- :'title' => :'title',
777
- :'tracked_count' => :'tracked_count',
778
- :'last_mile_tracking_supported' => :'last_mile_tracking_supported',
779
- :'language' => :'language',
780
- :'unique_token' => :'unique_token',
781
- :'checkpoints' => :'checkpoints',
782
- :'subscribed_smses' => :'subscribed_smses',
783
- :'subscribed_emails' => :'subscribed_emails',
784
- :'return_to_sender' => :'return_to_sender',
785
- :'order_promised_delivery_date' => :'order_promised_delivery_date',
786
- :'delivery_type' => :'delivery_type',
787
- :'pickup_location' => :'pickup_location',
788
- :'pickup_note' => :'pickup_note',
789
- :'courier_tracking_link' => :'courier_tracking_link',
790
- :'first_attempted_at' => :'first_attempted_at',
791
- :'courier_redirect_link' => :'courier_redirect_link',
792
- :'tracking_account_number' => :'tracking_account_number',
793
- :'tracking_key' => :'tracking_key',
794
- :'tracking_ship_date' => :'tracking_ship_date',
795
- :'on_time_status' => :'on_time_status',
796
- :'on_time_difference' => :'on_time_difference',
797
- :'order_tags' => :'order_tags',
798
- :'aftership_estimated_delivery_date' => :'aftership_estimated_delivery_date',
799
- :'custom_estimated_delivery_date' => :'custom_estimated_delivery_date',
800
- :'order_number' => :'order_number',
801
- :'first_estimated_delivery' => :'first_estimated_delivery',
802
- :'latest_estimated_delivery' => :'latest_estimated_delivery',
803
- :'shipment_tags' => :'shipment_tags',
804
- :'courier_connection_id' => :'courier_connection_id',
805
- :'next_couriers' => :'next_couriers',
806
- :'tracking_origin_country' => :'tracking_origin_country',
807
- :'tracking_destination_country' => :'tracking_destination_country',
808
- :'tracking_postal_code' => :'tracking_postal_code',
809
- :'tracking_state' => :'tracking_state',
810
- :'carbon_emissions' => :'carbon_emissions',
811
- :'location_id' => :'location_id',
812
- :'shipping_method' => :'shipping_method',
813
- :'failed_delivery_attempts' => :'failed_delivery_attempts',
814
- :'signature_requirement' => :'signature_requirement',
815
- :'delivery_location_type' => :'delivery_location_type',
816
- }
817
- end
818
-
819
- # Builds the object from hash
820
- # @param attributes [Hash] Model attributes in the form of hash
821
- # @return [Object] Returns the model itself
822
- def self.build_from_hash(attributes)
823
- return nil unless attributes.is_a?(Hash)
824
- attributes = attributes.transform_keys(&:to_sym)
825
- transformed_hash = {}
826
- openapi_types.each_pair do |key, type|
827
- if attributes.key?(key) && attributes[key].nil?
828
- transformed_hash["#{key}"] = nil
829
- elsif type =~ /\AArray<(.*)>/i
830
- # check to ensure the input is an array given that the attribute
831
- # is documented as an array but the input is not
832
- if attributes[key].is_a?(Array)
833
- transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
834
- end
835
- elsif !attributes[key].nil?
836
- transformed_hash["#{key}"] = _deserialize(type, attributes[key])
837
- end
838
- end
839
- new(transformed_hash)
840
- end
841
-
842
- # Deserializes the data based on type
843
- # @param type [String] Data type
844
- # @param value [String] Value to be deserialized
845
- # @return [Object] Deserialized data
846
- def self._deserialize(type, value)
847
- case type.to_sym
848
- when :Time
849
- Time.parse(value)
850
- when :Date
851
- Date.parse(value)
852
- when :String
853
- value.to_s
854
- when :Integer
855
- value.to_i
856
- when :Float
857
- value.to_f
858
- when :Boolean
859
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
860
- true
861
- else
862
- false
863
- end
864
- when :Object
865
- # generic object (usually a Hash), return directly
866
- value
867
- when /\AArray<(?<inner_type>.+)>\z/
868
- inner_type = Regexp.last_match[:inner_type]
869
- value.map { |v| _deserialize(inner_type, v) }
870
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
871
- k_type = Regexp.last_match[:k_type]
872
- v_type = Regexp.last_match[:v_type]
873
- {}.tap do |hash|
874
- value.each do |k, v|
875
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
876
- end
877
- end
878
- else # model
879
- klass = AftershipAPI::Model.const_get(type)
880
- klass.build_from_hash(value)
881
- end
882
- end
883
-
884
- # Returns the string representation of the object
885
- # @return [String] String presentation of the object
886
- def to_s
887
- to_hash.to_s
888
- end
889
-
890
- # to_body is an alias to to_hash (backward compatibility)
891
- # @return [Hash] Returns the object in the form of hash
892
- def to_body
893
- to_hash
894
- end
895
-
896
- # Returns the object in the form of hash
897
- # @return [Hash] Returns the object in the form of hash
898
- def to_hash
899
- hash = {}
900
- self.class.attribute_map.each_pair do |attr, param|
901
- value = self.send(attr)
902
- next if value.nil?
903
-
904
- hash[param] = _to_hash(value)
905
- end
906
- hash
907
- end
908
-
909
- # Outputs non-array value in the form of hash
910
- # For object, use to_hash. Otherwise, just return the value
911
- # @param value [Object] Any valid value
912
- # @return [Hash] Returns the value in the form of hash
913
- def _to_hash(value)
914
- if value.is_a?(Array)
915
- value.compact.map { |v| _to_hash(v) }
916
- elsif value.is_a?(Hash)
917
- {}.tap do |hash|
918
- value.each { |k, v| hash[k] = _to_hash(v) }
919
- end
920
- elsif value.respond_to? :to_hash
921
- value.to_hash
922
- else
923
- value
924
- end
925
- end
926
-
927
- def to_json(*a)
928
- to_hash.to_json(*a)
929
- end
930
- end
931
- end