aftership-tracking-sdk 11.0.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/README.md +146 -106
  4. data/aftership-tracking-sdk.gemspec +0 -1
  5. data/lib/aftership-tracking-sdk/api/courier.rb +46 -57
  6. data/lib/aftership-tracking-sdk/api/courier_connection.rb +105 -131
  7. data/lib/aftership-tracking-sdk/api/estimated_delivery_date.rb +30 -44
  8. data/lib/aftership-tracking-sdk/api/tracking.rb +171 -208
  9. data/lib/aftership-tracking-sdk/api_client.rb +9 -34
  10. data/lib/aftership-tracking-sdk/configuration.rb +106 -108
  11. data/lib/aftership-tracking-sdk/error.rb +10 -18
  12. data/lib/aftership-tracking-sdk/models/additional_fields.rb +1 -2
  13. data/lib/aftership-tracking-sdk/models/checkpoint.rb +23 -25
  14. data/lib/aftership-tracking-sdk/models/{coordinate_checkpoint.rb → checkpoint_coordinate.rb} +4 -6
  15. data/lib/aftership-tracking-sdk/models/{events_checkpoint.rb → checkpoint_events.rb} +6 -8
  16. data/lib/aftership-tracking-sdk/models/{reason_events_checkpoint.rb → checkpoint_events_reason.rb} +3 -5
  17. data/lib/aftership-tracking-sdk/models/checkpoint_source.rb +26 -0
  18. data/lib/aftership-tracking-sdk/models/courier.rb +17 -19
  19. data/lib/aftership-tracking-sdk/models/courier_connection.rb +5 -7
  20. data/lib/aftership-tracking-sdk/models/courier_connection_response_for_get_courier_connections.rb +4 -6
  21. data/lib/aftership-tracking-sdk/models/{data_courier_connection_response_for_get_courier_connections.rb → courier_connection_response_for_get_courier_connections_data.rb} +6 -8
  22. data/lib/aftership-tracking-sdk/models/{pagination_data_courier_connection_response_for_get_courier_connections.rb → courier_connection_response_for_get_courier_connections_data_pagination.rb} +5 -7
  23. data/lib/aftership-tracking-sdk/models/{credentials_courier.rb → courier_credentials.rb} +3 -5
  24. data/lib/aftership-tracking-sdk/models/courier_response.rb +4 -6
  25. data/lib/aftership-tracking-sdk/models/{data_courier_response.rb → courier_response_data.rb} +4 -6
  26. data/lib/aftership-tracking-sdk/models/create_tracking_request.rb +44 -46
  27. data/lib/aftership-tracking-sdk/models/{customers_create_tracking_request.rb → create_tracking_request_customers.rb} +7 -9
  28. data/lib/aftership-tracking-sdk/models/create_tracking_request_delivery_type.rb +27 -0
  29. data/lib/aftership-tracking-sdk/models/{last_mile_create_tracking_request.rb → create_tracking_request_last_mile.rb} +4 -6
  30. data/lib/aftership-tracking-sdk/models/create_tracking_response.rb +3 -887
  31. data/lib/aftership-tracking-sdk/models/credential_field.rb +3 -5
  32. data/lib/aftership-tracking-sdk/models/delete_courier_connections_by_id_response.rb +3 -187
  33. data/lib/aftership-tracking-sdk/models/delete_tracking_by_id_response.rb +3 -887
  34. data/lib/aftership-tracking-sdk/models/detect_courier_request.rb +12 -14
  35. data/lib/aftership-tracking-sdk/models/detect_courier_response.rb +3 -157
  36. data/lib/aftership-tracking-sdk/models/detect_courier_response_data.rb +161 -0
  37. data/lib/aftership-tracking-sdk/models/estimated_delivery_date_request.rb +16 -18
  38. data/lib/aftership-tracking-sdk/models/{destination_address_predict_request.rb → estimated_delivery_date_request_destination_address.rb} +7 -9
  39. data/lib/aftership-tracking-sdk/models/{estimated_pickup_predict_request.rb → estimated_delivery_date_request_estimated_pickup.rb} +8 -10
  40. data/lib/aftership-tracking-sdk/models/{order_processing_time_estimated_pickup_predict_request.rb → estimated_delivery_date_request_estimated_pickup_order_processing_time.rb} +4 -6
  41. data/lib/aftership-tracking-sdk/models/{origin_address_predict_request.rb → estimated_delivery_date_request_origin_address.rb} +7 -9
  42. data/lib/aftership-tracking-sdk/models/{weight_estimated_delivery_date_request.rb → estimated_delivery_date_request_weight.rb} +4 -6
  43. data/lib/aftership-tracking-sdk/models/estimated_delivery_date_response.rb +21 -23
  44. data/lib/aftership-tracking-sdk/models/{destination_address_predict_response.rb → estimated_delivery_date_response_destination_address.rb} +7 -9
  45. data/lib/aftership-tracking-sdk/models/{estimated_pickup_predict_response.rb → estimated_delivery_date_response_estimated_pickup.rb} +9 -11
  46. data/lib/aftership-tracking-sdk/models/{order_processing_time_estimated_pickup_predict_response.rb → estimated_delivery_date_response_estimated_pickup_order_processing_time.rb} +4 -6
  47. data/lib/aftership-tracking-sdk/models/{origin_address_predict_response.rb → estimated_delivery_date_response_origin_address.rb} +7 -9
  48. data/lib/aftership-tracking-sdk/models/{weight_predict_response.rb → estimated_delivery_date_response_weight.rb} +4 -6
  49. data/lib/aftership-tracking-sdk/models/get_courier_connections_by_id_response.rb +3 -187
  50. data/lib/aftership-tracking-sdk/models/get_courier_connections_response.rb +3 -157
  51. data/lib/aftership-tracking-sdk/models/{carbon_emissions_mark_tracking_completed_by_id_response.rb → get_courier_connections_response_data.rb} +18 -20
  52. data/lib/aftership-tracking-sdk/models/{pagination_get_courier_connections_response.rb → get_courier_connections_response_data_pagination.rb} +5 -7
  53. data/lib/aftership-tracking-sdk/models/get_couriers_response.rb +3 -157
  54. data/lib/aftership-tracking-sdk/models/get_couriers_response_data.rb +161 -0
  55. data/lib/aftership-tracking-sdk/models/get_tracking_by_id_response.rb +3 -887
  56. data/lib/aftership-tracking-sdk/models/get_trackings_response.rb +3 -157
  57. data/lib/aftership-tracking-sdk/models/{carbon_emissions_delete_tracking_by_id_response.rb → get_trackings_response_data.rb} +18 -20
  58. data/lib/aftership-tracking-sdk/models/{pagination_get_trackings_response.rb → get_trackings_response_data_pagination.rb} +5 -7
  59. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request.rb +4 -6
  60. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_request_reason.rb +27 -0
  61. data/lib/aftership-tracking-sdk/models/mark_tracking_completed_by_id_response.rb +3 -887
  62. data/lib/aftership-tracking-sdk/models/meta.rb +5 -7
  63. data/lib/aftership-tracking-sdk/models/meta_type.rb +30 -0
  64. data/lib/aftership-tracking-sdk/models/post_courier_connections_request.rb +2 -4
  65. data/lib/aftership-tracking-sdk/models/post_courier_connections_response.rb +3 -187
  66. data/lib/aftership-tracking-sdk/models/predict_batch_request.rb +1 -3
  67. data/lib/aftership-tracking-sdk/models/predict_batch_response.rb +3 -147
  68. data/lib/aftership-tracking-sdk/models/{weight_predict_request.rb → predict_batch_response_data.rb} +10 -22
  69. data/lib/aftership-tracking-sdk/models/predict_response.rb +3 -267
  70. data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_request.rb +1 -3
  71. data/lib/aftership-tracking-sdk/models/put_courier_connections_by_id_response.rb +3 -187
  72. data/lib/aftership-tracking-sdk/models/retrack_tracking_by_id_response.rb +3 -887
  73. data/lib/aftership-tracking-sdk/models/tag.rb +6 -7
  74. data/lib/aftership-tracking-sdk/models/tracking.rb +97 -99
  75. data/lib/aftership-tracking-sdk/models/{aftership_estimated_delivery_date_tracking.rb → tracking_aftership_estimated_delivery_date.rb} +6 -8
  76. data/lib/aftership-tracking-sdk/models/{carbon_emissions_tracking.rb → tracking_carbon_emissions.rb} +4 -6
  77. data/lib/aftership-tracking-sdk/models/{courier_estimated_delivery_date_tracking.rb → tracking_courier_estimated_delivery_date.rb} +5 -7
  78. data/lib/aftership-tracking-sdk/models/{custom_estimated_delivery_date_create_tracking_response.rb → tracking_custom_estimated_delivery_date.rb} +8 -10
  79. data/lib/aftership-tracking-sdk/models/tracking_custom_estimated_delivery_date_type.rb +26 -0
  80. data/lib/aftership-tracking-sdk/models/{customers_tracking.rb → tracking_customers.rb} +7 -9
  81. data/lib/aftership-tracking-sdk/models/{first_estimated_delivery_tracking.rb → tracking_first_estimated_delivery.rb} +11 -13
  82. data/lib/aftership-tracking-sdk/models/tracking_first_estimated_delivery_source.rb +28 -0
  83. data/lib/aftership-tracking-sdk/models/tracking_first_estimated_delivery_type.rb +26 -0
  84. data/lib/aftership-tracking-sdk/models/{first_mile_tracking.rb → tracking_first_mile.rb} +7 -9
  85. data/lib/aftership-tracking-sdk/models/{last_mile_tracking.rb → tracking_last_mile.rb} +10 -12
  86. data/lib/aftership-tracking-sdk/models/tracking_last_mile_source.rb +26 -0
  87. data/lib/aftership-tracking-sdk/models/{latest_estimated_delivery_tracking.rb → tracking_latest_estimated_delivery.rb} +13 -15
  88. data/lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery_source.rb +28 -0
  89. data/lib/aftership-tracking-sdk/models/tracking_latest_estimated_delivery_type.rb +26 -0
  90. data/lib/aftership-tracking-sdk/models/tracking_response.rb +2 -4
  91. data/lib/aftership-tracking-sdk/models/tracking_response_for_get_trackings.rb +4 -6
  92. data/lib/aftership-tracking-sdk/models/{data_tracking_response_for_get_trackings.rb → tracking_response_for_get_trackings_data.rb} +6 -8
  93. data/lib/aftership-tracking-sdk/models/{pagination_data_tracking_response_for_get_trackings.rb → tracking_response_for_get_trackings_data_pagination.rb} +5 -7
  94. data/lib/aftership-tracking-sdk/models/{shipment_weight_tracking.rb → tracking_shipment_weight.rb} +4 -6
  95. data/lib/aftership-tracking-sdk/models/tracking_signature_requirement.rb +29 -0
  96. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request.rb +34 -36
  97. data/lib/aftership-tracking-sdk/models/{customers_update_tracking_by_id_request.rb → update_tracking_by_id_request_customers.rb} +7 -9
  98. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_request_delivery_type.rb +27 -0
  99. data/lib/aftership-tracking-sdk/models/update_tracking_by_id_response.rb +3 -887
  100. data/lib/aftership-tracking-sdk/sign_string.rb +2 -2
  101. data/lib/aftership-tracking-sdk/version.rb +1 -1
  102. metadata +53 -109
  103. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_create_tracking_response.rb +0 -183
  104. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.rb +0 -183
  105. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_get_tracking_by_id_response.rb +0 -183
  106. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +0 -183
  107. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.rb +0 -183
  108. data/lib/aftership-tracking-sdk/models/aftership_estimated_delivery_date_update_tracking_by_id_response.rb +0 -183
  109. data/lib/aftership-tracking-sdk/models/carbon_emissions_create_tracking_response.rb +0 -163
  110. data/lib/aftership-tracking-sdk/models/carbon_emissions_get_tracking_by_id_response.rb +0 -163
  111. data/lib/aftership-tracking-sdk/models/carbon_emissions_retrack_tracking_by_id_response.rb +0 -163
  112. data/lib/aftership-tracking-sdk/models/carbon_emissions_update_tracking_by_id_response.rb +0 -163
  113. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_create_tracking_response.rb +0 -173
  114. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_delete_tracking_by_id_response.rb +0 -173
  115. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_get_tracking_by_id_response.rb +0 -173
  116. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +0 -173
  117. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.rb +0 -173
  118. data/lib/aftership-tracking-sdk/models/courier_estimated_delivery_date_update_tracking_by_id_response.rb +0 -173
  119. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_delete_tracking_by_id_response.rb +0 -183
  120. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_get_tracking_by_id_response.rb +0 -183
  121. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.rb +0 -183
  122. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.rb +0 -183
  123. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_tracking.rb +0 -183
  124. data/lib/aftership-tracking-sdk/models/custom_estimated_delivery_date_update_tracking_by_id_response.rb +0 -183
  125. data/lib/aftership-tracking-sdk/models/customers_create_tracking_response.rb +0 -193
  126. data/lib/aftership-tracking-sdk/models/customers_delete_tracking_by_id_response.rb +0 -193
  127. data/lib/aftership-tracking-sdk/models/customers_get_tracking_by_id_response.rb +0 -193
  128. data/lib/aftership-tracking-sdk/models/customers_mark_tracking_completed_by_id_response.rb +0 -193
  129. data/lib/aftership-tracking-sdk/models/customers_retrack_tracking_by_id_response.rb +0 -193
  130. data/lib/aftership-tracking-sdk/models/customers_update_tracking_by_id_response.rb +0 -193
  131. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_request.rb +0 -193
  132. data/lib/aftership-tracking-sdk/models/destination_address_estimated_delivery_date_response.rb +0 -193
  133. data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_request.rb +0 -183
  134. data/lib/aftership-tracking-sdk/models/estimated_pickup_estimated_delivery_date_response.rb +0 -193
  135. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_create_tracking_response.rb +0 -193
  136. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_delete_tracking_by_id_response.rb +0 -193
  137. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_get_tracking_by_id_response.rb +0 -193
  138. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_mark_tracking_completed_by_id_response.rb +0 -193
  139. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_retrack_tracking_by_id_response.rb +0 -193
  140. data/lib/aftership-tracking-sdk/models/first_estimated_delivery_update_tracking_by_id_response.rb +0 -193
  141. data/lib/aftership-tracking-sdk/models/first_mile_create_tracking_response.rb +0 -193
  142. data/lib/aftership-tracking-sdk/models/first_mile_delete_tracking_by_id_response.rb +0 -193
  143. data/lib/aftership-tracking-sdk/models/first_mile_get_tracking_by_id_response.rb +0 -193
  144. data/lib/aftership-tracking-sdk/models/first_mile_mark_tracking_completed_by_id_response.rb +0 -193
  145. data/lib/aftership-tracking-sdk/models/first_mile_retrack_tracking_by_id_response.rb +0 -193
  146. data/lib/aftership-tracking-sdk/models/first_mile_update_tracking_by_id_response.rb +0 -193
  147. data/lib/aftership-tracking-sdk/models/last_mile_create_tracking_response.rb +0 -203
  148. data/lib/aftership-tracking-sdk/models/last_mile_delete_tracking_by_id_response.rb +0 -203
  149. data/lib/aftership-tracking-sdk/models/last_mile_get_tracking_by_id_response.rb +0 -203
  150. data/lib/aftership-tracking-sdk/models/last_mile_mark_tracking_completed_by_id_response.rb +0 -203
  151. data/lib/aftership-tracking-sdk/models/last_mile_retrack_tracking_by_id_response.rb +0 -203
  152. data/lib/aftership-tracking-sdk/models/last_mile_update_tracking_by_id_response.rb +0 -203
  153. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_create_tracking_response.rb +0 -203
  154. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_delete_tracking_by_id_response.rb +0 -203
  155. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_get_tracking_by_id_response.rb +0 -203
  156. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.rb +0 -203
  157. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_retrack_tracking_by_id_response.rb +0 -203
  158. data/lib/aftership-tracking-sdk/models/latest_estimated_delivery_update_tracking_by_id_response.rb +0 -203
  159. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.rb +0 -163
  160. data/lib/aftership-tracking-sdk/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.rb +0 -163
  161. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_request.rb +0 -193
  162. data/lib/aftership-tracking-sdk/models/origin_address_estimated_delivery_date_response.rb +0 -193
  163. data/lib/aftership-tracking-sdk/models/pagination.rb +0 -164
  164. data/lib/aftership-tracking-sdk/models/predict_request.rb +0 -223
  165. data/lib/aftership-tracking-sdk/models/shipment_weight_create_tracking_response.rb +0 -163
  166. data/lib/aftership-tracking-sdk/models/shipment_weight_delete_tracking_by_id_response.rb +0 -163
  167. data/lib/aftership-tracking-sdk/models/shipment_weight_get_tracking_by_id_response.rb +0 -163
  168. data/lib/aftership-tracking-sdk/models/shipment_weight_mark_tracking_completed_by_id_response.rb +0 -163
  169. data/lib/aftership-tracking-sdk/models/shipment_weight_retrack_tracking_by_id_response.rb +0 -163
  170. data/lib/aftership-tracking-sdk/models/shipment_weight_update_tracking_by_id_response.rb +0 -163
  171. data/lib/aftership-tracking-sdk/models/slug_group.rb +0 -37
  172. data/lib/aftership-tracking-sdk/models/weight_estimated_delivery_date_response.rb +0 -163
@@ -2,892 +2,8 @@
2
2
  # Do not edit the class manually.
3
3
  module AftershipAPI::Model
4
4
  class MarkTrackingCompletedByIdResponse
5
-
6
- # A system-generated tracking ID by default, which can be customized by the user when creating a tracking.
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
- # Tracking number.
23
- # tracking_number?: String;
24
- attr_accessor :tracking_number
25
-
26
- # 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 .
27
- # slug?: String;
28
- attr_accessor :slug
29
-
30
- # Whether or not AfterShip will continue tracking the shipment. Value is false when no further updates for a few days since last update.
31
- # active?: Boolean;
32
- attr_accessor :active
33
-
34
- # 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.
35
- # custom_fields?: Object;
36
- attr_accessor :custom_fields
37
-
38
- # Total transit time in days.- For delivered shipments: Transit time (in days) = Delivered date - Pick-up date- For undelivered shipments: Transit time (in days) = Current date - Pick-up dateValue as `null` for the shipment without pick-up date.
39
- # transit_time?: Integer;
40
- attr_accessor :transit_time
41
-
42
- # The for the origin country/region. E.g. USA for the United States.
43
- # origin_country_region?: String;
44
- attr_accessor :origin_country_region
45
-
46
- # The state of the sender’s address.
47
- # origin_state?: String;
48
- attr_accessor :origin_state
49
-
50
- # The city of the sender’s address.
51
- # origin_city?: String;
52
- attr_accessor :origin_city
53
-
54
- # The postal code of the sender’s address.
55
- # origin_postal_code?: String;
56
- attr_accessor :origin_postal_code
57
-
58
- # The sender address that the shipment is shipping from.
59
- # origin_raw_location?: String;
60
- attr_accessor :origin_raw_location
61
-
62
- # The for the destination country/region. E.g. USA for the United States.
63
- # destination_country_region?: String;
64
- attr_accessor :destination_country_region
65
-
66
- # The state of the recipient’s address.
67
- # destination_state?: String;
68
- attr_accessor :destination_state
69
-
70
- # The city of the recipient’s address.
71
- # destination_city?: String;
72
- attr_accessor :destination_city
73
-
74
- # The postal code of the recipient’s address.
75
- # destination_postal_code?: String;
76
- attr_accessor :destination_postal_code
77
-
78
- # The shipping address that the shipment is shipping to.
79
- # destination_raw_location?: String;
80
- attr_accessor :destination_raw_location
81
-
82
- # Destination country/region of the tracking detected from the courier. ISO Alpha-3 (three letters). Value will be `null` if the courier doesn't provide the destination country.
83
- # courier_destination_country_region?: String;
84
- attr_accessor :courier_destination_country_region
85
-
86
- # The field contains the estimated delivery date provided by the carrier.
87
- # courier_estimated_delivery_date?: CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse;
88
- attr_accessor :courier_estimated_delivery_date
89
-
90
- # Text field for the note.
91
- # note?: String;
92
- attr_accessor :note
93
-
94
- # A globally-unique identifier for the order.
95
- # order_id?: String;
96
- attr_accessor :order_id
97
-
98
- # The URL for the order in your system or store.
99
- # order_id_path?: String;
100
- attr_accessor :order_id_path
101
-
102
- # 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.
103
- # order_date?: String;
104
- attr_accessor :order_date
105
-
106
- # Number of packages under the tracking.
107
- # shipment_package_count?: Float;
108
- attr_accessor :shipment_package_count
109
-
110
- # 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
111
- # shipment_pickup_date?: String;
112
- attr_accessor :shipment_pickup_date
113
-
114
- # 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
115
- # shipment_delivery_date?: String;
116
- attr_accessor :shipment_delivery_date
117
-
118
- # The carrier service type for the shipment.
119
- # shipment_type?: String;
120
- attr_accessor :shipment_type
121
-
122
- # 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
123
- # shipment_weight?: ShipmentWeightMarkTrackingCompletedByIdResponse;
124
- attr_accessor :shipment_weight
125
-
126
- # Signed by information for delivered shipment.
127
- # signed_by?: String;
128
- attr_accessor :signed_by
129
-
130
- # Source of how this tracking is added.
131
- # source?: String;
132
- attr_accessor :source
133
-
134
- # Current status of tracking. (
135
- # tag?: Tag;
136
- attr_accessor :tag
137
-
138
- # Current subtag of tracking. (
139
- # subtag?: String;
140
- attr_accessor :subtag
141
-
142
- # Normalized tracking message. (
143
- # subtag_message?: String;
144
- attr_accessor :subtag_message
145
-
146
- # By default this field shows the `tracking_number`, but you can customize it as you wish with any info (e.g. the order number).
147
- # title?: String;
148
- attr_accessor :title
149
-
150
- # Number of attempts AfterShip tracks at courier's system.
151
- # tracked_count?: Float;
152
- attr_accessor :tracked_count
153
-
154
- # Indicates if the shipment is trackable till the final destination.Three possible values:- true- false- null
155
- # last_mile_tracking_supported?: Boolean;
156
- attr_accessor :last_mile_tracking_supported
157
-
158
- # 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.
159
- # language?: String;
160
- attr_accessor :language
161
-
162
- # Deprecated
163
- # unique_token?: String;
164
- attr_accessor :unique_token
165
-
166
- # Array of checkpoint object describes the checkpoint information.
167
- # checkpoints?: Checkpoint[];
168
- attr_accessor :checkpoints
169
-
170
- # Phone number(s) subscribed to receive sms notifications.
171
- # subscribed_smses?: String[];
172
- attr_accessor :subscribed_smses
173
-
174
- # Email address(es) subscribed to receive email notifications.
175
- # subscribed_emails?: String[];
176
- attr_accessor :subscribed_emails
177
-
178
- # 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`.
179
- # return_to_sender?: Boolean;
180
- attr_accessor :return_to_sender
181
-
182
- # The promised delivery date of the order. It uses the formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZ
183
- # order_promised_delivery_date?: String;
184
- attr_accessor :order_promised_delivery_date
185
-
186
- # Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door
187
- # delivery_type?: String;
188
- attr_accessor :delivery_type
189
-
190
- # Shipment pickup location for receiver
191
- # pickup_location?: String;
192
- attr_accessor :pickup_location
193
-
194
- # Shipment pickup note for receiver
195
- # pickup_note?: String;
196
- attr_accessor :pickup_note
197
-
198
- # 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.
199
- # courier_tracking_link?: String;
200
- attr_accessor :courier_tracking_link
201
-
202
- # 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
203
- # first_attempted_at?: String;
204
- attr_accessor :first_attempted_at
205
-
206
- # 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.
207
- # courier_redirect_link?: String;
208
- attr_accessor :courier_redirect_link
209
-
210
- # 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.
211
- # tracking_account_number?: String;
212
- attr_accessor :tracking_account_number
213
-
214
- # 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.
215
- # tracking_key?: String;
216
- attr_accessor :tracking_key
217
-
218
- # The date and time when the shipment is shipped by the merchant and ready for pickup by the carrier. The field supports the following formats:- YYYY-MM-DD- YYYY-MM-DDTHH:mm:ss- YYYY-MM-DDTHH:mm:ssZThe field serves two key purposes:- Calculate processing time metrics in the Order-to-delivery Analytics dashboard. To ensure accurate analytics, it's recommended to include timezone information when configuring this value- Required by certain carriers to retrieve tracking information as an additional tracking field.
219
- # tracking_ship_date?: String;
220
- attr_accessor :tracking_ship_date
221
-
222
- # Whether the tracking is delivered on time or not.
223
- # on_time_status?: String;
224
- attr_accessor :on_time_status
225
-
226
- # The difference days of the on time.
227
- # on_time_difference?: Float;
228
- attr_accessor :on_time_difference
229
-
230
- # The tags of the order.
231
- # order_tags?: String[];
232
- attr_accessor :order_tags
233
-
234
- # 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.
235
- # aftership_estimated_delivery_date?: AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse;
236
- attr_accessor :aftership_estimated_delivery_date
237
-
238
- # Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone.
239
- # custom_estimated_delivery_date?: CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse;
240
- attr_accessor :custom_estimated_delivery_date
241
-
242
- # A unique, human-readable identifier for the order.
243
- # order_number?: String;
244
- attr_accessor :order_number
245
-
246
- # 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.
247
- # first_estimated_delivery?: FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse;
248
- attr_accessor :first_estimated_delivery
249
-
250
- # 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.
251
- # latest_estimated_delivery?: LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse;
252
- attr_accessor :latest_estimated_delivery
253
-
254
- # Used to add tags to your shipments to help categorize and filter them easily.
255
- # shipment_tags?: String[];
256
- attr_accessor :shipment_tags
257
-
258
- # 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.
259
- # courier_connection_id?: String;
260
- attr_accessor :courier_connection_id
261
-
262
- # The model contains the total amount of carbon emissions generated by the shipment. - AfterShip will provide this data only when it is available, and its availability is contingent upon the location and weight information that AfterShip can obtain.- The values will be accessible solely for shipments that have been successfully delivered. However, in the event of a shipping update after the delivery status has been achieved, the value may change.- It’s a paid service and only for Tracking Enterprise users, please contact your customer success manager if you want to know more.
263
- # carbon_emissions?: CarbonEmissionsMarkTrackingCompletedByIdResponse;
264
- attr_accessor :carbon_emissions
265
-
266
- # 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 .
267
- # location_id?: String;
268
- attr_accessor :location_id
269
-
270
- # 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.
271
- # shipping_method?: String;
272
- attr_accessor :shipping_method
273
-
274
- # 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.
275
- # failed_delivery_attempts?: Integer;
276
- attr_accessor :failed_delivery_attempts
277
-
278
- # 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>
279
- # signature_requirement?: String;
280
- attr_accessor :signature_requirement
281
-
282
- # 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.
283
- # delivery_location_type?: String;
284
- attr_accessor :delivery_location_type
285
-
286
- # 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.
287
- # aftership_tracking_url?: String;
288
- attr_accessor :aftership_tracking_url
289
-
290
- # 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.
291
- # aftership_tracking_order_url?: String;
292
- attr_accessor :aftership_tracking_order_url
293
-
294
- # The field contains information about the first leg of the shipping starting from the carrier picking up the shipment from the shipper to the point where they hand it over to the last-mile carrier. Once AfterShip detects the shipment is multi-leg, we will populate the first-mile information under this object.
295
- # first_mile?: FirstMileMarkTrackingCompletedByIdResponse;
296
- attr_accessor :first_mile
297
-
298
- # This field contains information about the last leg of the shipment, starting from the carrier who hands it over to the last-mile carrier, all the way to delivery. Once AfterShip detects that the shipment involves multiple legs and identifies the last-mile carrier, we will populate the last-mile carrier information in this object. Alternatively, the user can provide this information in this field to specify the last-mile carrier, which is helpful if AfterShip is unable to detect it automatically.
299
- # last_mile?: LastMileMarkTrackingCompletedByIdResponse;
300
- attr_accessor :last_mile
301
-
302
- # The field contains the customer information associated with the tracking. A maximum of three customer objects are allowed.
303
- # customers?: CustomersMarkTrackingCompletedByIdResponse[];
304
- attr_accessor :customers
305
-
306
- # Initializes the object
307
- # @param [Hash] attributes Model attributes in the form of hash
308
- def initialize(attributes = {})
309
- if (!attributes.is_a?(Hash))
310
- fail ArgumentError, "The input argument (attributes) must be a hash in `AftershipAPI::MarkTrackingCompletedByIdResponse` initialize method"
311
- end
312
-
313
- attributes = attributes.each_with_object({}) { |(k, v), h|
314
- h[k.to_sym] = v
315
- }
316
-
317
- if attributes.key?(:'id')
318
- self.id = attributes[:'id']
319
- end
320
-
321
- if attributes.key?(:'legacy_id')
322
- self.legacy_id = attributes[:'legacy_id']
323
- end
324
-
325
- if attributes.key?(:'created_at')
326
- self.created_at = attributes[:'created_at']
327
- end
328
-
329
- if attributes.key?(:'updated_at')
330
- self.updated_at = attributes[:'updated_at']
331
- end
332
-
333
- if attributes.key?(:'tracking_number')
334
- self.tracking_number = attributes[:'tracking_number']
335
- end
336
-
337
- if attributes.key?(:'slug')
338
- self.slug = attributes[:'slug']
339
- end
340
-
341
- if attributes.key?(:'active')
342
- self.active = attributes[:'active']
343
- end
344
-
345
- if attributes.key?(:'custom_fields')
346
- self.custom_fields = attributes[:'custom_fields']
347
- end
348
-
349
- if attributes.key?(:'transit_time')
350
- self.transit_time = attributes[:'transit_time']
351
- end
352
-
353
- if attributes.key?(:'origin_country_region')
354
- self.origin_country_region = attributes[:'origin_country_region']
355
- end
356
-
357
- if attributes.key?(:'origin_state')
358
- self.origin_state = attributes[:'origin_state']
359
- end
360
-
361
- if attributes.key?(:'origin_city')
362
- self.origin_city = attributes[:'origin_city']
363
- end
364
-
365
- if attributes.key?(:'origin_postal_code')
366
- self.origin_postal_code = attributes[:'origin_postal_code']
367
- end
368
-
369
- if attributes.key?(:'origin_raw_location')
370
- self.origin_raw_location = attributes[:'origin_raw_location']
371
- end
372
-
373
- if attributes.key?(:'destination_country_region')
374
- self.destination_country_region = attributes[:'destination_country_region']
375
- end
376
-
377
- if attributes.key?(:'destination_state')
378
- self.destination_state = attributes[:'destination_state']
379
- end
380
-
381
- if attributes.key?(:'destination_city')
382
- self.destination_city = attributes[:'destination_city']
383
- end
384
-
385
- if attributes.key?(:'destination_postal_code')
386
- self.destination_postal_code = attributes[:'destination_postal_code']
387
- end
388
-
389
- if attributes.key?(:'destination_raw_location')
390
- self.destination_raw_location = attributes[:'destination_raw_location']
391
- end
392
-
393
- if attributes.key?(:'courier_destination_country_region')
394
- self.courier_destination_country_region = attributes[:'courier_destination_country_region']
395
- end
396
-
397
- if attributes.key?(:'courier_estimated_delivery_date')
398
- self.courier_estimated_delivery_date = attributes[:'courier_estimated_delivery_date']
399
- end
400
-
401
- if attributes.key?(:'note')
402
- self.note = attributes[:'note']
403
- end
404
-
405
- if attributes.key?(:'order_id')
406
- self.order_id = attributes[:'order_id']
407
- end
408
-
409
- if attributes.key?(:'order_id_path')
410
- self.order_id_path = attributes[:'order_id_path']
411
- end
412
-
413
- if attributes.key?(:'order_date')
414
- self.order_date = attributes[:'order_date']
415
- end
416
-
417
- if attributes.key?(:'shipment_package_count')
418
- self.shipment_package_count = attributes[:'shipment_package_count']
419
- end
420
-
421
- if attributes.key?(:'shipment_pickup_date')
422
- self.shipment_pickup_date = attributes[:'shipment_pickup_date']
423
- end
424
-
425
- if attributes.key?(:'shipment_delivery_date')
426
- self.shipment_delivery_date = attributes[:'shipment_delivery_date']
427
- end
428
-
429
- if attributes.key?(:'shipment_type')
430
- self.shipment_type = attributes[:'shipment_type']
431
- end
432
-
433
- if attributes.key?(:'shipment_weight')
434
- self.shipment_weight = attributes[:'shipment_weight']
435
- end
436
-
437
- if attributes.key?(:'signed_by')
438
- self.signed_by = attributes[:'signed_by']
439
- end
440
-
441
- if attributes.key?(:'source')
442
- self.source = attributes[:'source']
443
- end
444
-
445
- if attributes.key?(:'tag')
446
- self.tag = attributes[:'tag']
447
- end
448
-
449
- if attributes.key?(:'subtag')
450
- self.subtag = attributes[:'subtag']
451
- end
452
-
453
- if attributes.key?(:'subtag_message')
454
- self.subtag_message = attributes[:'subtag_message']
455
- end
456
-
457
- if attributes.key?(:'title')
458
- self.title = attributes[:'title']
459
- end
460
-
461
- if attributes.key?(:'tracked_count')
462
- self.tracked_count = attributes[:'tracked_count']
463
- end
464
-
465
- if attributes.key?(:'last_mile_tracking_supported')
466
- self.last_mile_tracking_supported = attributes[:'last_mile_tracking_supported']
467
- end
468
-
469
- if attributes.key?(:'language')
470
- self.language = attributes[:'language']
471
- end
472
-
473
- if attributes.key?(:'unique_token')
474
- self.unique_token = attributes[:'unique_token']
475
- end
476
-
477
- if attributes.key?(:'checkpoints')
478
- self.checkpoints = attributes[:'checkpoints']
479
- end
480
-
481
- if attributes.key?(:'subscribed_smses')
482
- self.subscribed_smses = attributes[:'subscribed_smses']
483
- end
484
-
485
- if attributes.key?(:'subscribed_emails')
486
- self.subscribed_emails = attributes[:'subscribed_emails']
487
- end
488
-
489
- if attributes.key?(:'return_to_sender')
490
- self.return_to_sender = attributes[:'return_to_sender']
491
- end
492
-
493
- if attributes.key?(:'order_promised_delivery_date')
494
- self.order_promised_delivery_date = attributes[:'order_promised_delivery_date']
495
- end
496
-
497
- if attributes.key?(:'delivery_type')
498
- self.delivery_type = attributes[:'delivery_type']
499
- end
500
-
501
- if attributes.key?(:'pickup_location')
502
- self.pickup_location = attributes[:'pickup_location']
503
- end
504
-
505
- if attributes.key?(:'pickup_note')
506
- self.pickup_note = attributes[:'pickup_note']
507
- end
508
-
509
- if attributes.key?(:'courier_tracking_link')
510
- self.courier_tracking_link = attributes[:'courier_tracking_link']
511
- end
512
-
513
- if attributes.key?(:'first_attempted_at')
514
- self.first_attempted_at = attributes[:'first_attempted_at']
515
- end
516
-
517
- if attributes.key?(:'courier_redirect_link')
518
- self.courier_redirect_link = attributes[:'courier_redirect_link']
519
- end
520
-
521
- if attributes.key?(:'tracking_account_number')
522
- self.tracking_account_number = attributes[:'tracking_account_number']
523
- end
524
-
525
- if attributes.key?(:'tracking_key')
526
- self.tracking_key = attributes[:'tracking_key']
527
- end
528
-
529
- if attributes.key?(:'tracking_ship_date')
530
- self.tracking_ship_date = attributes[:'tracking_ship_date']
531
- end
532
-
533
- if attributes.key?(:'on_time_status')
534
- self.on_time_status = attributes[:'on_time_status']
535
- end
536
-
537
- if attributes.key?(:'on_time_difference')
538
- self.on_time_difference = attributes[:'on_time_difference']
539
- end
540
-
541
- if attributes.key?(:'order_tags')
542
- self.order_tags = attributes[:'order_tags']
543
- end
544
-
545
- if attributes.key?(:'aftership_estimated_delivery_date')
546
- self.aftership_estimated_delivery_date = attributes[:'aftership_estimated_delivery_date']
547
- end
548
-
549
- if attributes.key?(:'custom_estimated_delivery_date')
550
- self.custom_estimated_delivery_date = attributes[:'custom_estimated_delivery_date']
551
- end
552
-
553
- if attributes.key?(:'order_number')
554
- self.order_number = attributes[:'order_number']
555
- end
556
-
557
- if attributes.key?(:'first_estimated_delivery')
558
- self.first_estimated_delivery = attributes[:'first_estimated_delivery']
559
- end
560
-
561
- if attributes.key?(:'latest_estimated_delivery')
562
- self.latest_estimated_delivery = attributes[:'latest_estimated_delivery']
563
- end
564
-
565
- if attributes.key?(:'shipment_tags')
566
- self.shipment_tags = attributes[:'shipment_tags']
567
- end
568
-
569
- if attributes.key?(:'courier_connection_id')
570
- self.courier_connection_id = attributes[:'courier_connection_id']
571
- end
572
-
573
- if attributes.key?(:'carbon_emissions')
574
- self.carbon_emissions = attributes[:'carbon_emissions']
575
- end
576
-
577
- if attributes.key?(:'location_id')
578
- self.location_id = attributes[:'location_id']
579
- end
580
-
581
- if attributes.key?(:'shipping_method')
582
- self.shipping_method = attributes[:'shipping_method']
583
- end
584
-
585
- if attributes.key?(:'failed_delivery_attempts')
586
- self.failed_delivery_attempts = attributes[:'failed_delivery_attempts']
587
- end
588
-
589
- if attributes.key?(:'signature_requirement')
590
- self.signature_requirement = attributes[:'signature_requirement']
591
- end
592
-
593
- if attributes.key?(:'delivery_location_type')
594
- self.delivery_location_type = attributes[:'delivery_location_type']
595
- end
596
-
597
- if attributes.key?(:'aftership_tracking_url')
598
- self.aftership_tracking_url = attributes[:'aftership_tracking_url']
599
- end
600
-
601
- if attributes.key?(:'aftership_tracking_order_url')
602
- self.aftership_tracking_order_url = attributes[:'aftership_tracking_order_url']
603
- end
604
-
605
- if attributes.key?(:'first_mile')
606
- self.first_mile = attributes[:'first_mile']
607
- end
608
-
609
- if attributes.key?(:'last_mile')
610
- self.last_mile = attributes[:'last_mile']
611
- end
612
-
613
- if attributes.key?(:'customers')
614
- self.customers = attributes[:'customers']
615
- end
616
- end
617
-
618
- # Attribute type mapping.
619
- def self.openapi_types
620
- {
621
- :'id' => :'String',
622
- :'legacy_id' => :'String',
623
- :'created_at' => :'String',
624
- :'updated_at' => :'String',
625
- :'tracking_number' => :'String',
626
- :'slug' => :'String',
627
- :'active' => :'Boolean',
628
- :'custom_fields' => :'Object',
629
- :'transit_time' => :'Integer',
630
- :'origin_country_region' => :'String',
631
- :'origin_state' => :'String',
632
- :'origin_city' => :'String',
633
- :'origin_postal_code' => :'String',
634
- :'origin_raw_location' => :'String',
635
- :'destination_country_region' => :'String',
636
- :'destination_state' => :'String',
637
- :'destination_city' => :'String',
638
- :'destination_postal_code' => :'String',
639
- :'destination_raw_location' => :'String',
640
- :'courier_destination_country_region' => :'String',
641
- :'courier_estimated_delivery_date' => :'CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse',
642
- :'note' => :'String',
643
- :'order_id' => :'String',
644
- :'order_id_path' => :'String',
645
- :'order_date' => :'String',
646
- :'shipment_package_count' => :'Float',
647
- :'shipment_pickup_date' => :'String',
648
- :'shipment_delivery_date' => :'String',
649
- :'shipment_type' => :'String',
650
- :'shipment_weight' => :'ShipmentWeightMarkTrackingCompletedByIdResponse',
651
- :'signed_by' => :'String',
652
- :'source' => :'String',
653
- :'tag' => :'Tag',
654
- :'subtag' => :'String',
655
- :'subtag_message' => :'String',
656
- :'title' => :'String',
657
- :'tracked_count' => :'Float',
658
- :'last_mile_tracking_supported' => :'Boolean',
659
- :'language' => :'String',
660
- :'unique_token' => :'String',
661
- :'checkpoints' => :'Array<Checkpoint>',
662
- :'subscribed_smses' => :'Array<String>',
663
- :'subscribed_emails' => :'Array<String>',
664
- :'return_to_sender' => :'Boolean',
665
- :'order_promised_delivery_date' => :'String',
666
- :'delivery_type' => :'String',
667
- :'pickup_location' => :'String',
668
- :'pickup_note' => :'String',
669
- :'courier_tracking_link' => :'String',
670
- :'first_attempted_at' => :'String',
671
- :'courier_redirect_link' => :'String',
672
- :'tracking_account_number' => :'String',
673
- :'tracking_key' => :'String',
674
- :'tracking_ship_date' => :'String',
675
- :'on_time_status' => :'String',
676
- :'on_time_difference' => :'Float',
677
- :'order_tags' => :'Array<String>',
678
- :'aftership_estimated_delivery_date' => :'AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse',
679
- :'custom_estimated_delivery_date' => :'CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse',
680
- :'order_number' => :'String',
681
- :'first_estimated_delivery' => :'FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse',
682
- :'latest_estimated_delivery' => :'LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse',
683
- :'shipment_tags' => :'Array<String>',
684
- :'courier_connection_id' => :'String',
685
- :'carbon_emissions' => :'CarbonEmissionsMarkTrackingCompletedByIdResponse',
686
- :'location_id' => :'String',
687
- :'shipping_method' => :'String',
688
- :'failed_delivery_attempts' => :'Integer',
689
- :'signature_requirement' => :'String',
690
- :'delivery_location_type' => :'String',
691
- :'aftership_tracking_url' => :'String',
692
- :'aftership_tracking_order_url' => :'String',
693
- :'first_mile' => :'FirstMileMarkTrackingCompletedByIdResponse',
694
- :'last_mile' => :'LastMileMarkTrackingCompletedByIdResponse',
695
- :'customers' => :'Array<CustomersMarkTrackingCompletedByIdResponse>',
696
- }
697
- end
698
-
699
- # Attribute mapping from ruby-style variable name to JSON key.
700
- def self.attribute_map
701
- {
702
- :'id' => :'id',
703
- :'legacy_id' => :'legacy_id',
704
- :'created_at' => :'created_at',
705
- :'updated_at' => :'updated_at',
706
- :'tracking_number' => :'tracking_number',
707
- :'slug' => :'slug',
708
- :'active' => :'active',
709
- :'custom_fields' => :'custom_fields',
710
- :'transit_time' => :'transit_time',
711
- :'origin_country_region' => :'origin_country_region',
712
- :'origin_state' => :'origin_state',
713
- :'origin_city' => :'origin_city',
714
- :'origin_postal_code' => :'origin_postal_code',
715
- :'origin_raw_location' => :'origin_raw_location',
716
- :'destination_country_region' => :'destination_country_region',
717
- :'destination_state' => :'destination_state',
718
- :'destination_city' => :'destination_city',
719
- :'destination_postal_code' => :'destination_postal_code',
720
- :'destination_raw_location' => :'destination_raw_location',
721
- :'courier_destination_country_region' => :'courier_destination_country_region',
722
- :'courier_estimated_delivery_date' => :'courier_estimated_delivery_date',
723
- :'note' => :'note',
724
- :'order_id' => :'order_id',
725
- :'order_id_path' => :'order_id_path',
726
- :'order_date' => :'order_date',
727
- :'shipment_package_count' => :'shipment_package_count',
728
- :'shipment_pickup_date' => :'shipment_pickup_date',
729
- :'shipment_delivery_date' => :'shipment_delivery_date',
730
- :'shipment_type' => :'shipment_type',
731
- :'shipment_weight' => :'shipment_weight',
732
- :'signed_by' => :'signed_by',
733
- :'source' => :'source',
734
- :'tag' => :'tag',
735
- :'subtag' => :'subtag',
736
- :'subtag_message' => :'subtag_message',
737
- :'title' => :'title',
738
- :'tracked_count' => :'tracked_count',
739
- :'last_mile_tracking_supported' => :'last_mile_tracking_supported',
740
- :'language' => :'language',
741
- :'unique_token' => :'unique_token',
742
- :'checkpoints' => :'checkpoints',
743
- :'subscribed_smses' => :'subscribed_smses',
744
- :'subscribed_emails' => :'subscribed_emails',
745
- :'return_to_sender' => :'return_to_sender',
746
- :'order_promised_delivery_date' => :'order_promised_delivery_date',
747
- :'delivery_type' => :'delivery_type',
748
- :'pickup_location' => :'pickup_location',
749
- :'pickup_note' => :'pickup_note',
750
- :'courier_tracking_link' => :'courier_tracking_link',
751
- :'first_attempted_at' => :'first_attempted_at',
752
- :'courier_redirect_link' => :'courier_redirect_link',
753
- :'tracking_account_number' => :'tracking_account_number',
754
- :'tracking_key' => :'tracking_key',
755
- :'tracking_ship_date' => :'tracking_ship_date',
756
- :'on_time_status' => :'on_time_status',
757
- :'on_time_difference' => :'on_time_difference',
758
- :'order_tags' => :'order_tags',
759
- :'aftership_estimated_delivery_date' => :'aftership_estimated_delivery_date',
760
- :'custom_estimated_delivery_date' => :'custom_estimated_delivery_date',
761
- :'order_number' => :'order_number',
762
- :'first_estimated_delivery' => :'first_estimated_delivery',
763
- :'latest_estimated_delivery' => :'latest_estimated_delivery',
764
- :'shipment_tags' => :'shipment_tags',
765
- :'courier_connection_id' => :'courier_connection_id',
766
- :'carbon_emissions' => :'carbon_emissions',
767
- :'location_id' => :'location_id',
768
- :'shipping_method' => :'shipping_method',
769
- :'failed_delivery_attempts' => :'failed_delivery_attempts',
770
- :'signature_requirement' => :'signature_requirement',
771
- :'delivery_location_type' => :'delivery_location_type',
772
- :'aftership_tracking_url' => :'aftership_tracking_url',
773
- :'aftership_tracking_order_url' => :'aftership_tracking_order_url',
774
- :'first_mile' => :'first_mile',
775
- :'last_mile' => :'last_mile',
776
- :'customers' => :'customers',
777
- }
778
- end
779
-
780
- # Builds the object from hash
781
- # @param attributes [Hash] Model attributes in the form of hash
782
- # @return [Object] Returns the model itself
783
- def self.build_from_hash(attributes)
784
- return nil unless attributes.is_a?(Hash)
785
- attributes = attributes.transform_keys(&:to_sym)
786
- transformed_hash = {}
787
- openapi_types.each_pair do |key, type|
788
- if attributes.key?(key) && attributes[key].nil?
789
- transformed_hash["#{key}"] = nil
790
- elsif type =~ /\AArray<(.*)>/i
791
- # check to ensure the input is an array given that the attribute
792
- # is documented as an array but the input is not
793
- if attributes[key].is_a?(Array)
794
- transformed_hash["#{key}"] = attributes[key].map { |v| _deserialize($1, v) }
795
- end
796
- elsif !attributes[key].nil?
797
- transformed_hash["#{key}"] = _deserialize(type, attributes[key])
798
- end
799
- end
800
- new(transformed_hash)
801
- end
802
-
803
- # Deserializes the data based on type
804
- # @param type [String] Data type
805
- # @param value [String] Value to be deserialized
806
- # @return [Object] Deserialized data
807
- def self._deserialize(type, value)
808
- case type.to_sym
809
- when :Time
810
- Time.parse(value)
811
- when :Date
812
- Date.parse(value)
813
- when :String
814
- value.to_s
815
- when :Integer
816
- value.to_i
817
- when :Float
818
- value.to_f
819
- when :Boolean
820
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
821
- true
822
- else
823
- false
824
- end
825
- when :Object
826
- # generic object (usually a Hash), return directly
827
- value
828
- when /\AArray<(?<inner_type>.+)>\z/
829
- inner_type = Regexp.last_match[:inner_type]
830
- value.map { |v| _deserialize(inner_type, v) }
831
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
832
- k_type = Regexp.last_match[:k_type]
833
- v_type = Regexp.last_match[:v_type]
834
- {}.tap do |hash|
835
- value.each do |k, v|
836
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
837
- end
838
- end
839
- else # model
840
- klass = AftershipAPI::Model.const_get(type)
841
- klass.build_from_hash(value)
842
- end
843
- end
844
-
845
- # Returns the string representation of the object
846
- # @return [String] String presentation of the object
847
- def to_s
848
- to_hash.to_s
849
- end
850
-
851
- # to_body is an alias to to_hash (backward compatibility)
852
- # @return [Hash] Returns the object in the form of hash
853
- def to_body
854
- to_hash
855
- end
856
-
857
- # Returns the object in the form of hash
858
- # @return [Hash] Returns the object in the form of hash
859
- def to_hash
860
- hash = {}
861
- self.class.attribute_map.each_pair do |attr, param|
862
- value = self.send(attr)
863
- next if value.nil?
864
-
865
- hash[param] = _to_hash(value)
866
- end
867
- hash
868
- end
869
-
870
- # Outputs non-array value in the form of hash
871
- # For object, use to_hash. Otherwise, just return the value
872
- # @param value [Object] Any valid value
873
- # @return [Hash] Returns the value in the form of hash
874
- def _to_hash(value)
875
- if value.is_a?(Array)
876
- value.compact.map { |v| _to_hash(v) }
877
- elsif value.is_a?(Hash)
878
- {}.tap do |hash|
879
- value.each { |k, v| hash[k] = _to_hash(v) }
880
- end
881
- elsif value.respond_to? :to_hash
882
- value.to_hash
883
- else
884
- value
885
- end
886
- end
887
-
888
- def to_json(*a)
889
- to_hash.to_json(*a)
890
- end
5
+ attr_accessor :response_header
6
+ # data: Tracking
7
+ attr_accessor :data
891
8
  end
892
9
  end
893
-