From b32ec9f3569e9b0f17d9010bcc99a957d4b72435 Mon Sep 17 00:00:00 2001 From: Watson Zuo Date: Mon, 20 Oct 2025 17:08:42 +0800 Subject: [PATCH 1/2] update structure --- .github/workflows/release.yml | 2 +- README.md | 319 +++++++---- poetry.lock | 415 +++++++------- pyproject.toml | 28 +- tracking/__init__.py | 2 +- tracking/api/__init__.py | 4 +- tracking/api/courier.py | 53 +- tracking/api/courier_connection.py | 104 ++-- tracking/api/estimated_delivery_date.py | 14 +- tracking/api/tracking.py | 217 ++++---- tracking/client.py | 7 +- tracking/exceptions.py | 5 +- tracking/models/__init__.py | 524 ++++++------------ ...ery_date_delete_tracking_by_id_response.py | 39 -- ...livery_date_get_tracking_by_id_response.py | 39 -- ..._mark_tracking_completed_by_id_response.py | 39 -- ...ry_date_retrack_tracking_by_id_response.py | 39 -- ...ership_estimated_delivery_date_tracking.py | 39 -- ...ery_date_update_tracking_by_id_response.py | 39 -- ...issions_retrack_tracking_by_id_response.py | 37 -- tracking/models/carbon_emissions_tracking.py | 37 -- ...missions_update_tracking_by_id_response.py | 37 -- tracking/models/checkpoint.py | 11 +- ...checkpoint.py => checkpoint_coordinate.py} | 4 +- ...nts_checkpoint.py => checkpoint_events.py} | 8 +- ...ckpoint.py => checkpoint_events_reason.py} | 4 +- tracking/models/checkpoint_source.py | 18 + tracking/models/courier.py | 9 +- tracking/models/courier_connection.py | 2 +- ...on_response_for_get_courier_connections.py | 6 +- ...ponse_for_get_courier_connections_data.py} | 10 +- ...et_courier_connections_data_pagination.py} | 4 +- ..._id_response.py => courier_credentials.py} | 13 +- ..._delivery_date_create_tracking_response.py | 38 -- ...ery_date_delete_tracking_by_id_response.py | 38 -- ..._mark_tracking_completed_by_id_response.py | 38 -- ...ry_date_retrack_tracking_by_id_response.py | 38 -- ...ourier_estimated_delivery_date_tracking.py | 38 -- ...ery_date_update_tracking_by_id_response.py | 38 -- tracking/models/courier_response.py | 4 +- ...r_response.py => courier_response_data.py} | 4 +- tracking/models/create_tracking_request.py | 13 +- ...y => create_tracking_request_customers.py} | 4 +- .../create_tracking_request_delivery_type.py | 19 + ...y => create_tracking_request_last_mile.py} | 7 +- tracking/models/create_tracking_response.py | 114 +--- ..._delivery_date_create_tracking_response.py | 39 -- ...livery_date_get_tracking_by_id_response.py | 39 -- ...ry_date_retrack_tracking_by_id_response.py | 39 -- ...custom_estimated_delivery_date_tracking.py | 39 -- ...ery_date_update_tracking_by_id_response.py | 39 -- ...ustomers_delete_tracking_by_id_response.py | 40 -- .../customers_get_tracking_by_id_response.py | 40 -- ..._mark_tracking_completed_by_id_response.py | 40 -- ...stomers_retrack_tracking_by_id_response.py | 40 -- ...customers_update_tracking_by_id_request.py | 40 -- ...ustomers_update_tracking_by_id_response.py | 40 -- ...lete_courier_connections_by_id_response.py | 13 +- .../models/delete_tracking_by_id_response.py | 120 +--- tracking/models/detect_courier_response.py | 10 +- ...nse.py => detect_courier_response_data.py} | 11 +- .../models/estimated_delivery_date_request.py | 24 +- ...ivery_date_request_destination_address.py} | 4 +- ...delivery_date_request_estimated_pickup.py} | 10 +- ...estimated_pickup_order_processing_time.py} | 4 +- ...d_delivery_date_request_origin_address.py} | 4 +- ...estimated_delivery_date_request_weight.py} | 4 +- .../estimated_delivery_date_response.py | 24 +- ...very_date_response_destination_address.py} | 4 +- ...elivery_date_response_estimated_pickup.py} | 10 +- ...estimated_pickup_order_processing_time.py} | 4 +- ..._delivery_date_response_origin_address.py} | 4 +- ...stimated_delivery_date_response_weight.py} | 4 +- .../estimated_pickup_predict_response.py | 44 -- ...mated_delivery_create_tracking_response.py | 40 -- ...delivery_delete_tracking_by_id_response.py | 40 -- ...ed_delivery_get_tracking_by_id_response.py | 40 -- ..._mark_tracking_completed_by_id_response.py | 40 -- ...elivery_retrack_tracking_by_id_response.py | 40 -- .../first_estimated_delivery_tracking.py | 40 -- ...delivery_update_tracking_by_id_response.py | 40 -- ..._mark_tracking_completed_by_id_response.py | 40 -- ...st_mile_retrack_tracking_by_id_response.py | 40 -- tracking/models/first_mile_tracking.py | 40 -- ...rst_mile_update_tracking_by_id_response.py | 40 -- .../get_courier_connections_by_id_response.py | 13 +- .../get_courier_connections_response.py | 11 +- .../get_courier_connections_response_data.py | 42 ++ ...r_connections_response_data_pagination.py} | 4 +- tracking/models/get_couriers_response.py | 10 +- ...urier.py => get_couriers_response_data.py} | 9 +- .../models/get_tracking_by_id_response.py | 114 +--- tracking/models/get_trackings_response.py | 11 +- ...ings.py => get_trackings_response_data.py} | 10 +- ...get_trackings_response_data_pagination.py} | 4 +- .../last_mile_create_tracking_request.py | 37 -- .../last_mile_create_tracking_response.py | 41 -- ...ast_mile_delete_tracking_by_id_response.py | 41 -- .../last_mile_get_tracking_by_id_response.py | 41 -- ..._mark_tracking_completed_by_id_response.py | 41 -- ...st_mile_retrack_tracking_by_id_response.py | 41 -- tracking/models/last_mile_tracking.py | 41 -- ...ast_mile_update_tracking_by_id_response.py | 41 -- ...delivery_delete_tracking_by_id_response.py | 41 -- ..._mark_tracking_completed_by_id_response.py | 41 -- ...elivery_retrack_tracking_by_id_response.py | 41 -- .../latest_estimated_delivery_tracking.py | 41 -- ...delivery_update_tracking_by_id_response.py | 41 -- .../mark_tracking_completed_by_id_request.py | 6 +- ...tracking_completed_by_id_request_reason.py | 19 + .../mark_tracking_completed_by_id_response.py | 124 +---- tracking/models/meta.py | 4 +- tracking/models/meta_type.py | 22 + ..._pickup_estimated_delivery_date_request.py | 37 -- ...pickup_estimated_delivery_date_response.py | 37 -- ...g_time_estimated_pickup_predict_request.py | 37 -- ..._time_estimated_pickup_predict_response.py | 37 -- ...address_estimated_delivery_date_request.py | 40 -- ...ddress_estimated_delivery_date_response.py | 40 -- .../models/origin_address_predict_request.py | 40 -- .../models/origin_address_predict_response.py | 40 -- .../post_courier_connections_request.py | 2 +- .../post_courier_connections_response.py | 13 +- tracking/models/predict_batch_response.py | 9 +- .../models/predict_batch_response_data.py | 38 ++ tracking/models/predict_request.py | 48 -- tracking/models/predict_response.py | 28 +- .../put_courier_connections_by_id_request.py | 2 +- .../put_courier_connections_by_id_response.py | 13 +- .../models/retrack_tracking_by_id_response.py | 120 +--- ...hipment_weight_create_tracking_response.py | 37 -- ...t_weight_delete_tracking_by_id_response.py | 37 -- ...ment_weight_get_tracking_by_id_response.py | 37 -- ..._mark_tracking_completed_by_id_response.py | 37 -- ..._weight_retrack_tracking_by_id_response.py | 37 -- tracking/models/shipment_weight_tracking.py | 37 -- ...t_weight_update_tracking_by_id_response.py | 37 -- tracking/models/tag.py | 10 +- tracking/models/tracking.py | 51 +- ...king_aftership_estimated_delivery_date.py} | 4 +- tracking/models/tracking_carbon_emissions.py | 37 ++ ...acking_courier_estimated_delivery_date.py} | 4 +- ...racking_custom_estimated_delivery_date.py} | 12 +- ...ing_custom_estimated_delivery_date_type.py | 18 + ...mers_tracking.py => tracking_customers.py} | 4 +- ...y => tracking_first_estimated_delivery.py} | 14 +- ...racking_first_estimated_delivery_source.py | 20 + .../tracking_first_estimated_delivery_type.py | 18 + ...ing_response.py => tracking_first_mile.py} | 4 +- ...y_id_response.py => tracking_last_mile.py} | 9 +- tracking/models/tracking_last_mile_source.py | 18 + ... => tracking_latest_estimated_delivery.py} | 15 +- ...acking_latest_estimated_delivery_source.py | 20 + ...tracking_latest_estimated_delivery_type.py | 18 + .../tracking_response_for_get_trackings.py | 6 +- ...acking_response_for_get_trackings_data.py} | 15 +- ...onse_for_get_trackings_data_pagination.py} | 4 +- tracking/models/tracking_shipment_weight.py | 37 ++ .../models/tracking_signature_requirement.py | 21 + .../models/update_tracking_by_id_request.py | 13 +- ...pdate_tracking_by_id_request_customers.py} | 4 +- ...te_tracking_by_id_request_delivery_type.py | 19 + .../models/update_tracking_by_id_response.py | 120 +--- .../weight_estimated_delivery_date_request.py | 37 -- ...weight_estimated_delivery_date_response.py | 37 -- tracking/models/weight_predict_request.py | 37 -- tracking/models/weight_predict_response.py | 37 -- tracking/request.py | 9 +- tracking/response.py | 38 +- 169 files changed, 1521 insertions(+), 4655 deletions(-) delete mode 100644 tracking/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.py delete mode 100644 tracking/models/aftership_estimated_delivery_date_get_tracking_by_id_response.py delete mode 100644 tracking/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/aftership_estimated_delivery_date_tracking.py delete mode 100644 tracking/models/aftership_estimated_delivery_date_update_tracking_by_id_response.py delete mode 100644 tracking/models/carbon_emissions_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/carbon_emissions_tracking.py delete mode 100644 tracking/models/carbon_emissions_update_tracking_by_id_response.py rename tracking/models/{coordinate_checkpoint.py => checkpoint_coordinate.py} (85%) rename tracking/models/{events_checkpoint.py => checkpoint_events.py} (83%) rename tracking/models/{reason_events_checkpoint.py => checkpoint_events_reason.py} (90%) create mode 100644 tracking/models/checkpoint_source.py rename tracking/models/{data_courier_connection_response_for_get_courier_connections.py => courier_connection_response_for_get_courier_connections_data.py} (72%) rename tracking/models/{pagination_data_courier_connection_response_for_get_courier_connections.py => courier_connection_response_for_get_courier_connections_data_pagination.py} (87%) rename tracking/models/{custom_estimated_delivery_date_mark_tracking_completed_by_id_response.py => courier_credentials.py} (68%) delete mode 100644 tracking/models/courier_estimated_delivery_date_create_tracking_response.py delete mode 100644 tracking/models/courier_estimated_delivery_date_delete_tracking_by_id_response.py delete mode 100644 tracking/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/courier_estimated_delivery_date_tracking.py delete mode 100644 tracking/models/courier_estimated_delivery_date_update_tracking_by_id_response.py rename tracking/models/{data_courier_response.py => courier_response_data.py} (94%) rename tracking/models/{customers_create_tracking_request.py => create_tracking_request_customers.py} (92%) create mode 100644 tracking/models/create_tracking_request_delivery_type.py rename tracking/models/{first_mile_delete_tracking_by_id_response.py => create_tracking_request_last_mile.py} (63%) delete mode 100644 tracking/models/custom_estimated_delivery_date_create_tracking_response.py delete mode 100644 tracking/models/custom_estimated_delivery_date_get_tracking_by_id_response.py delete mode 100644 tracking/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/custom_estimated_delivery_date_tracking.py delete mode 100644 tracking/models/custom_estimated_delivery_date_update_tracking_by_id_response.py delete mode 100644 tracking/models/customers_delete_tracking_by_id_response.py delete mode 100644 tracking/models/customers_get_tracking_by_id_response.py delete mode 100644 tracking/models/customers_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/customers_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/customers_update_tracking_by_id_request.py delete mode 100644 tracking/models/customers_update_tracking_by_id_response.py rename tracking/models/{pagination_get_trackings_response.py => detect_courier_response_data.py} (81%) rename tracking/models/{destination_address_estimated_delivery_date_request.py => estimated_delivery_date_request_destination_address.py} (88%) rename tracking/models/{estimated_pickup_estimated_delivery_date_request.py => estimated_delivery_date_request_estimated_pickup.py} (73%) rename tracking/models/{carbon_emissions_delete_tracking_by_id_response.py => estimated_delivery_date_request_estimated_pickup_order_processing_time.py} (86%) rename tracking/models/{destination_address_predict_request.py => estimated_delivery_date_request_origin_address.py} (86%) rename tracking/models/{carbon_emissions_get_tracking_by_id_response.py => estimated_delivery_date_request_weight.py} (88%) rename tracking/models/{destination_address_estimated_delivery_date_response.py => estimated_delivery_date_response_destination_address.py} (88%) rename tracking/models/{estimated_pickup_estimated_delivery_date_response.py => estimated_delivery_date_response_estimated_pickup.py} (73%) rename tracking/models/{carbon_emissions_mark_tracking_completed_by_id_response.py => estimated_delivery_date_response_estimated_pickup_order_processing_time.py} (86%) rename tracking/models/{destination_address_predict_response.py => estimated_delivery_date_response_origin_address.py} (86%) rename tracking/models/{carbon_emissions_create_tracking_response.py => estimated_delivery_date_response_weight.py} (88%) delete mode 100644 tracking/models/estimated_pickup_predict_response.py delete mode 100644 tracking/models/first_estimated_delivery_create_tracking_response.py delete mode 100644 tracking/models/first_estimated_delivery_delete_tracking_by_id_response.py delete mode 100644 tracking/models/first_estimated_delivery_get_tracking_by_id_response.py delete mode 100644 tracking/models/first_estimated_delivery_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/first_estimated_delivery_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/first_estimated_delivery_tracking.py delete mode 100644 tracking/models/first_estimated_delivery_update_tracking_by_id_response.py delete mode 100644 tracking/models/first_mile_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/first_mile_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/first_mile_tracking.py delete mode 100644 tracking/models/first_mile_update_tracking_by_id_response.py create mode 100644 tracking/models/get_courier_connections_response_data.py rename tracking/models/{pagination.py => get_courier_connections_response_data_pagination.py} (90%) rename tracking/models/{credentials_courier.py => get_couriers_response_data.py} (82%) rename tracking/models/{data_tracking_response_for_get_trackings.py => get_trackings_response_data.py} (76%) rename tracking/models/{pagination_data_tracking_response_for_get_trackings.py => get_trackings_response_data_pagination.py} (86%) delete mode 100644 tracking/models/last_mile_create_tracking_request.py delete mode 100644 tracking/models/last_mile_create_tracking_response.py delete mode 100644 tracking/models/last_mile_delete_tracking_by_id_response.py delete mode 100644 tracking/models/last_mile_get_tracking_by_id_response.py delete mode 100644 tracking/models/last_mile_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/last_mile_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/last_mile_tracking.py delete mode 100644 tracking/models/last_mile_update_tracking_by_id_response.py delete mode 100644 tracking/models/latest_estimated_delivery_delete_tracking_by_id_response.py delete mode 100644 tracking/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/latest_estimated_delivery_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/latest_estimated_delivery_tracking.py delete mode 100644 tracking/models/latest_estimated_delivery_update_tracking_by_id_response.py create mode 100644 tracking/models/mark_tracking_completed_by_id_request_reason.py create mode 100644 tracking/models/meta_type.py delete mode 100644 tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.py delete mode 100644 tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.py delete mode 100644 tracking/models/order_processing_time_estimated_pickup_predict_request.py delete mode 100644 tracking/models/order_processing_time_estimated_pickup_predict_response.py delete mode 100644 tracking/models/origin_address_estimated_delivery_date_request.py delete mode 100644 tracking/models/origin_address_estimated_delivery_date_response.py delete mode 100644 tracking/models/origin_address_predict_request.py delete mode 100644 tracking/models/origin_address_predict_response.py create mode 100644 tracking/models/predict_batch_response_data.py delete mode 100644 tracking/models/predict_request.py delete mode 100644 tracking/models/shipment_weight_create_tracking_response.py delete mode 100644 tracking/models/shipment_weight_delete_tracking_by_id_response.py delete mode 100644 tracking/models/shipment_weight_get_tracking_by_id_response.py delete mode 100644 tracking/models/shipment_weight_mark_tracking_completed_by_id_response.py delete mode 100644 tracking/models/shipment_weight_retrack_tracking_by_id_response.py delete mode 100644 tracking/models/shipment_weight_tracking.py delete mode 100644 tracking/models/shipment_weight_update_tracking_by_id_response.py rename tracking/models/{aftership_estimated_delivery_date_create_tracking_response.py => tracking_aftership_estimated_delivery_date.py} (82%) create mode 100644 tracking/models/tracking_carbon_emissions.py rename tracking/models/{courier_estimated_delivery_date_get_tracking_by_id_response.py => tracking_courier_estimated_delivery_date.py} (89%) rename tracking/models/{latest_estimated_delivery_get_tracking_by_id_response.py => tracking_custom_estimated_delivery_date.py} (72%) create mode 100644 tracking/models/tracking_custom_estimated_delivery_date_type.py rename tracking/models/{customers_tracking.py => tracking_customers.py} (94%) rename tracking/models/{custom_estimated_delivery_date_delete_tracking_by_id_response.py => tracking_first_estimated_delivery.py} (56%) create mode 100644 tracking/models/tracking_first_estimated_delivery_source.py create mode 100644 tracking/models/tracking_first_estimated_delivery_type.py rename tracking/models/{first_mile_create_tracking_response.py => tracking_first_mile.py} (76%) rename tracking/models/{first_mile_get_tracking_by_id_response.py => tracking_last_mile.py} (62%) create mode 100644 tracking/models/tracking_last_mile_source.py rename tracking/models/{latest_estimated_delivery_create_tracking_response.py => tracking_latest_estimated_delivery.py} (56%) create mode 100644 tracking/models/tracking_latest_estimated_delivery_source.py create mode 100644 tracking/models/tracking_latest_estimated_delivery_type.py rename tracking/models/{estimated_pickup_predict_request.py => tracking_response_for_get_trackings_data.py} (67%) rename tracking/models/{pagination_get_courier_connections_response.py => tracking_response_for_get_trackings_data_pagination.py} (85%) create mode 100644 tracking/models/tracking_shipment_weight.py create mode 100644 tracking/models/tracking_signature_requirement.py rename tracking/models/{customers_create_tracking_response.py => update_tracking_by_id_request_customers.py} (92%) create mode 100644 tracking/models/update_tracking_by_id_request_delivery_type.py delete mode 100644 tracking/models/weight_estimated_delivery_date_request.py delete mode 100644 tracking/models/weight_estimated_delivery_date_response.py delete mode 100644 tracking/models/weight_predict_request.py delete mode 100644 tracking/models/weight_predict_response.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 034768c..ae6ec60 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: ${{ steps.get_version.outputs.VERSION }} path: dist diff --git a/README.md b/README.md index 0b67eca..ace3f58 100644 --- a/README.md +++ b/README.md @@ -38,17 +38,8 @@ Before you begin to integrate: ### API and SDK Version -Each SDK version is designed to work with a specific API version. Please refer to the table below to identify the supported API versions for each SDK version, ensuring you select the appropriate SDK version for the API version you intend to use. - -| SDK Version | Supported API Version | Branch | -| ----------- | --------------------- | ------------------------------------------------------------- | -| 7.x.x | 2025-07 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-07 | -| 6.x.x | 2025-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-04 | -| 5.x.x | 2025-01 | https://github.com/AfterShip/tracking-sdk-python/tree/2025-01 | -| 4.x.x | 2024-10 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-10 | -| 3.x.x | 2024-07 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-07 | -| 2.x.x | 2024-04 | https://github.com/AfterShip/tracking-sdk-python/tree/2024-04 | -| <=1.x.x | Legacy API | https://github.com/AfterShip/aftership-sdk-python | +- SDK Version: +- API Version: 2025-07 ## Quick Start @@ -65,7 +56,7 @@ Create AfterShip instance with options | Name | Type | Required | Description | | ---------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------- | | api_key | string | ✔ | Your AfterShip API key | -| auth_type | enum | | Default value: `auth.ApiKey`
AES authentication: `auth.Aes`
RSA authentication: `auth.Rsa` | +| auth_type | enum | | Default value: `ApiKey`
AES authentication: `Aes`
RSA authentication: `Rsa` | | api_secret | string | | Required if the authentication type is `auth.Aes` or `auth.Rsa` | | domain | string | | AfterShip API domain. Default value: https://api.aftership.com | | user_agent | string | | User-defined user-agent string, please follow [RFC9110](https://www.rfc-editor.org/rfc/rfc9110#field.user-agent) format standard. | @@ -77,8 +68,7 @@ Create AfterShip instance with options ```python import tracking -from tracking import exceptions -from tracking import auth +from tracking import exceptions, auth try: sdk = tracking.Client( @@ -87,8 +77,15 @@ try: authentication_type=auth.ApiKey, ) ) - result = sdk.tracking.get_tracking_by_id("") + + + result = sdk.tracking.get_tracking_by_id( + 'valid_value', + + + ) print(result) + except exceptions.InvalidOptionError: pass except exceptions.InvalidApiKeyError: @@ -99,7 +96,7 @@ except exceptions.RateLimitExceedError: ## Rate Limiter -See the [Rate Limit](https://www.aftership.com/docs/tracking/2025-07/quickstart/api-quick-start) to understand the AfterShip rate limit policy. +See the [Rate Limit](https://www.aftership.com/docs/tracking/quickstart/rate-limit) to understand the AfterShip rate limit policy. ## Error Handling @@ -114,114 +111,153 @@ The SDK will return an error object when there is any error during the request, | response_body | string | API response body. | | response_header | object | API response header. | - ### Error List -| code | meta_code | status_code | message | -| --------------------------------- | --------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| INVALID_REQUEST | 400 | 400 | The request was invalid or cannot be otherwise served. | -| INVALID_JSON | 4001 | 400 | Invalid JSON data. | -| TRACKING_ALREADY_EXIST | 4003 | 400 | Tracking already exists. | -| TRACKING_DOES_NOT_EXIST | 4004 | 404 | Tracking does not exist. | -| TRACKING_NUMBER_INVALID | 4005 | 400 | The value of tracking_number is invalid. | -| TRACKING_REQUIRED | 4006 | 400 | tracking object is required. | -| TRACKING_NUMBER_REQUIRED | 4007 | 400 | tracking_number is required. | -| VALUE_INVALID | 4008 | 400 | The value of [field_name] is invalid. | -| VALUE_REQUIRED | 4009 | 400 | [field_name] is required. | -| SLUG_INVALID | 4010 | 400 | The value of slug is invalid. | -| MISSING_OR_INVALID_REQUIRED_FIELD | 4011 | 400 | Missing or invalid value of the required fields for this courier. Besides tracking_number, also required: [field_name] | -| BAD_COURIER | 4012 | 400 | The error message will be one of the following:
1. Unable to import shipment as the carrier is not on your approved list for carrier auto-detection. Add the carrier here: https://admin.aftership.com/settings/couriers
2. Unable to import shipment as we don’t recognize the carrier from this tracking number.
3. Unable to import shipment as the tracking number has an invalid format.
4. Unable to import shipment as this carrier is no longer supported.
5. Unable to import shipment as the tracking number does not belong to a carrier in that group. | -| INACTIVE_RETRACK_NOT_ALLOWED | 4013 | 400 | Retrack is not allowed. You can only retrack an inactive tracking. | -| NOTIFICATION_REUQIRED | 4014 | 400 | notification object is required. | -| ID_INVALID | 4015 | 400 | The value of id is invalid. | -| RETRACK_ONCE_ALLOWED | 4016 | 400 | Retrack is not allowed. You can only retrack each shipment once. | -| TRACKING_NUMBER_FORMAT_INVALID | 4017 | 400 | The format of tracking_number is invalid. | -| API_KEY_INVALID | 401 | 401 | The API key is invalid. | -| REQUEST_NOT_ALLOWED | 403 | 403 | The request is understood, but it has been refused or access is not allowed. | -| NOT_FOUND | 404 | 404 | The URI requested is invalid or the resource requested does not exist. | -| TOO_MANY_REQUEST | 429 | 429 | You have exceeded the API call rate limit. The default limit is 10 requests per second. | -| INTERNAL_ERROR | 500 502 503 504 | 500 502 503 504 | Something went wrong on AfterShip's end. | +| code | meta_code | status_code | message | +| --------------------------------- | --------------- | --------------- | ------- | +| INVALID_REQUEST | 400 | 400 | The request was invalid or cannot be otherwise served. | +| INVALID_JSON | 4001 | 400 | Invalid JSON data. | +| TRACKING_ALREADY_EXIST | 4003 | 400 | Tracking already exists. | +| TRACKING_DOES_NOT_EXIST | 4004 | 404 | Tracking does not exist. | +| TRACKING_NUMBER_INVALID | 4005 | 400 | The value of tracking_number is invalid. | +| TRACKING_REQUIRED | 4006 | 400 | tracking object is required. | +| TRACKING_NUMBER_REQUIRED | 4007 | 400 | tracking_number is required. | +| VALUE_INVALID | 4008 | 400 | The value of [field_name] is invalid. | +| VALUE_REQUIRED | 4009 | 400 | [field_name] is required. | +| SLUG_INVALID | 4010 | 400 | The value of slug is invalid. | +| MISSING_OR_INVALID_REQUIRED_FIELD | 4011 | 400 | Missing or invalid value of the required fields for this courier. Besides tracking_number, also required: [field_name] | +| BAD_COURIER | 4012 | 400 | The error message will be one of the following:1. Unable to import shipment as the carrier is not on your approved list for carrier auto-detection. Add the carrier here: https://admin.aftership.com/settings/couriers2. Unable to import shipment as we don't recognize the carrier from this tracking number.3. Unable to import shipment as the tracking number has an invalid format.4. Unable to import shipment as this carrier is no longer supported.5. Unable to import shipment as the tracking number does not belong to a carrier in that group. | +| INACTIVE_RETRACK_NOT_ALLOWED | 4013 | 400 | Retrack is not allowed. You can only retrack an inactive tracking. | +| NOTIFICATION_REQUIRED | 4014 | 400 | notification object is required. | +| ID_INVALID | 4015 | 400 | The value of id is invalid. | +| RETRACK_ONCE_ALLOWED | 4016 | 400 | Retrack is not allowed. You can only retrack each shipment once. | +| TRACKING_NUMBER_FORMAT_INVALID | 4017 | 400 | The format of tracking_number is invalid. | +| API_KEY_INVALID | 401 | 401 | The API Key is invalid. | +| REQUEST_NOT_ALLOWED | 403 | 403 | The request is understood, but it has been refused or access is not allowed. | +| NOT_FOUND | 404 | 404 | The URI requested is invalid or the resource requested does not exist. | +| TOO_MANY_REQUEST | 429 | 429 | You have exceeded the API call rate limit. The default limit is 10 requests per second. | +| INTERNAL_ERROR | 500 | 500 | Something went wrong on AfterShip's end. | +| INTERNAL_ERROR | 502 | 502 | Something went wrong on AfterShip's end. | +| INTERNAL_ERROR | 503 | 503 | Something went wrong on AfterShip's end. | +| INTERNAL_ERROR | 504 | 504 | Something went wrong on AfterShip's end. | ## Endpoints The AfterShip instance has the following properties which are exactly the same as the API endpoints: -- courier - Get a list of our supported couriers. -- tracking - Create trackings, update trackings, and get tracking results. -- courier-connection - Create courier connections, update courier connections, and get courier connections results. -- estimated-delivery-date - Get estimated delivery date for your order. - +- tracking + - Get trackings + - Create a tracking + - Get a tracking by ID + - Update a tracking by ID + - Delete a tracking by ID + - Retrack an expired tracking by ID + - Mark tracking as completed by ID +- courier + - Get couriers + - Detect courier +- courier_connection + - Get courier connections + - Create courier connections + - Get courier connection by id + - Update courier connection by id + - Delete courier connection by id +- estimated_delivery_date + - Prediction for the Estimated Delivery Date + - Batch prediction for the Estimated Delivery Date ### /trackings - -**POST** /trackings +**GET** /trackings ```python -import tracking -from tracking import ( - auth, - exceptions -) -try: - sdk = tracking.Client( - tracking.Configuration( - api_key="YOUR_API_KEY", - api_secret="YOUR_API_SECRET", - authentication_type=auth.Aes, - ) - ) - data = tracking.CreateTrackingRequest() - data.tracking_number = "" - data.slug = "" - result = sdk.tracking.create_tracking(data) - print(result) -except exceptions.InvalidOptionError: - pass +result = sdk.tracking.get_trackings( + + + +) +print(result) ``` -**DELETE** /trackings/:id +**POST** /trackings ```python -sdk.tracking.delete_tracking_by_id("") +req = tracking.CreateTrackingRequest() + + +req.tracking_number = 'valid_value' + + +result = sdk.tracking.create_tracking( + + req, + +) +print(result) ``` -**GET** /trackings +**GET** /trackings/{id} ```python -result = sdk.tracking.get_trackings(keyword="1234") + +result = sdk.tracking.get_tracking_by_id( + 'valid_value', + + +) print(result) ``` -**GET** /trackings/:id +**PUT** /trackings/{id} ```python -result = sdk.tracking.get_tracking_by_id("") +req = tracking.UpdateTrackingByIdRequest() + + +result = sdk.tracking.update_tracking_by_id( + 'valid_value', + req, + +) print(result) ``` -**PUT** /trackings/:id +**DELETE** /trackings/{id} ```python -data = tracking.UpdateTrackingByIdRequest() -data.note = "test" -result = sdk.tracking.update_tracking_by_id("", data) + +result = sdk.tracking.delete_tracking_by_id( + 'valid_value', + + +) print(result) ``` -**POST** /trackings/:id/retrack +**POST** /trackings/{id}/retrack ```python -result = sdk.tracking.retrack_tracking_by_id("") + +result = sdk.tracking.retrack_tracking_by_id( + 'valid_value', + + +) print(result) ``` -**POST** /trackings/:id/mark-as-completed +**POST** /trackings/{id}/mark-as-completed ```python -data = tracking.MarkTrackingCompletedByIdRequest() -data.reason = "DELIVERED" -result = sdk.tracking.mark_tracking_completed_by_id("", data) +req = tracking.MarkTrackingCompletedByIdRequest() + + + +result = sdk.tracking.mark_tracking_completed_by_id( + 'valid_value', + req, + +) print(result) ``` @@ -229,16 +265,29 @@ print(result) **GET** /couriers ```python -result = sdk.courier.get_couriers() + +result = sdk.courier.get_couriers( + + + +) print(result) ``` **POST** /couriers/detect ```python -data = tracking.DetectCourierRequest() -data.tracking_number = "" -result = sdk.courier.detect_courier(data) +req = tracking.DetectCourierRequest() + + +req.tracking_number = 'valid_value' + + +result = sdk.courier.detect_courier( + + req, + +) print(result) ``` @@ -246,56 +295,116 @@ print(result) **GET** /courier-connections ```python -result = sdk.courier_connection.get_courier_connections() + +result = sdk.courier_connection.get_courier_connections( + + + +) print(result) ``` **POST** /courier-connections ```python -data = tracking.PostCourierConnectionsRequest() -data.courier_slug = "dhl-api" -data.credentials = {"api_key": ""} -result = sdk.courier_connection.post_courier_connections(data) +req = tracking.PostCourierConnectionsRequest() + + +req.courier_slug = 'valid_value' + + +req.credentials = {} + + +result = sdk.courier_connection.post_courier_connections( + + req, + +) print(result) ``` -**GET** /courier-connections/:id +**GET** /courier-connections/{id} ```python -result = sdk.courier_connection.get_courier_connections_by_id("") + +result = sdk.courier_connection.get_courier_connections_by_id( + 'valid_value', + + +) print(result) ``` -**PATCH** /courier-connections/:id +**PATCH** /courier-connections/{id} ```python -data = PutCourierConnectionsByIdRequest() -data.credentials={"api_key": ""} -result = sdk.courier_connection.put_courier_connections_by_id("", data) +req = tracking.PutCourierConnectionsByIdRequest() + + +req.credentials = {} + + +result = sdk.courier_connection.put_courier_connections_by_id( + 'valid_value', + req, + +) print(result) ``` -**DELETE** /courier-connections/:id +**DELETE** /courier-connections/{id} ```python -result = sdk.courier_connection.delete_courier_connections_by_id("") + +result = sdk.courier_connection.delete_courier_connections_by_id( + 'valid_value', + + +) print(result) ``` ### /estimated-delivery-date +**POST** /estimated-delivery-date/predict + +```python +req = tracking.EstimatedDeliveryDateRequest() + + +req.slug = 'valid_value' + + +req.origin_address = tracking.EstimatedDeliveryDateRequestOriginAddress() + + +req.destination_address = tracking.EstimatedDeliveryDateRequestDestinationAddress() + + +result = sdk.estimated_delivery_date.predict( + + req, + +) +print(result) +``` **POST** /estimated-delivery-date/predict-batch ```python req = tracking.PredictBatchRequest() -date = tracking.EstimatedDeliveryDateRequest() -date.slug = '' -req.estimated_delivery_dates = [date] -result = sdk.estimated_delivery_date.predict_batch(req) + + + +result = sdk.estimated_delivery_date.predict_batch( + + req, + +) print(result) ``` + ## Help If you get stuck, we're here to help: diff --git a/poetry.lock b/poetry.lock index b58b176..53bc2a5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "annotated-types" @@ -7,8 +7,8 @@ description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" files = [ -{file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, -{file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, + {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, + {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] [package.dependencies] @@ -16,13 +16,13 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} [[package]] name = "anyio" -version = "4.5.2" +version = "4.4.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" files = [ -{file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"}, -{file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"}, + {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, + {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"}, ] [package.dependencies] @@ -32,19 +32,19 @@ sniffio = ">=1.1" typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"] -trio = ["trio (>=0.26.1)"] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "certifi" -version = "2025.4.26" +version = "2024.7.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ -{file = "certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3"}, -{file = "certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6"}, + {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, + {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, ] [[package]] @@ -54,8 +54,8 @@ description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ -{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, -{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] [[package]] @@ -65,8 +65,8 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ -{file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, -{file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, + {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, + {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, ] [package.extras] @@ -79,8 +79,8 @@ description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.6.1" files = [ -{file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, -{file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, + {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, + {file = "flake8-5.0.4.tar.gz", hash = "sha256:6fbe320aad8d6b95cec8b8e47bc933004678dc63095be98528b7bdd2a9f510db"}, ] [package.dependencies] @@ -90,45 +90,45 @@ pyflakes = ">=2.5.0,<2.6.0" [[package]] name = "h11" -version = "0.16.0" +version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ -{file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, -{file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, + {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, + {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] [[package]] name = "httpcore" -version = "1.0.9" +version = "1.0.5" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ -{file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, -{file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, + {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, + {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.16" +h11 = ">=0.13,<0.15" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<1.0)"] +trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" -version = "0.28.1" +version = "0.27.0" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ -{file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, -{file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] @@ -136,28 +136,25 @@ anyio = "*" certifi = "*" httpcore = "==1.*" idna = "*" +sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.10" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.5" files = [ -{file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, -{file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] -[package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] - [[package]] name = "iniconfig" version = "2.0.0" @@ -165,8 +162,8 @@ description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" files = [ -{file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, -{file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] [[package]] @@ -176,8 +173,8 @@ description = "McCabe checker, plugin for flake8" optional = false python-versions = ">=3.6" files = [ -{file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, -{file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] @@ -187,8 +184,8 @@ description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ -{file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, -{file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] @@ -198,8 +195,8 @@ description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ -{file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, -{file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -213,8 +210,8 @@ description = "Python style guide checker" optional = false python-versions = ">=3.6" files = [ -{file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, -{file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, + {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, + {file = "pycodestyle-2.9.1.tar.gz", hash = "sha256:2c9607871d58c76354b697b42f5d57e1ada7d261c261efac224b664affdc5785"}, ] [[package]] @@ -224,38 +221,38 @@ description = "Cryptographic library for Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ -{file = "pycryptodome-3.20.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f0e6d631bae3f231d3634f91ae4da7a960f7ff87f2865b2d2b831af1dfb04e9a"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:baee115a9ba6c5d2709a1e88ffe62b73ecc044852a925dcb67713a288c4ec70f"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:417a276aaa9cb3be91f9014e9d18d10e840a7a9b9a9be64a42f553c5b50b4d1d"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a1250b7ea809f752b68e3e6f3fd946b5939a52eaeea18c73bdab53e9ba3c2dd"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-musllinux_1_1_aarch64.whl", hash = "sha256:d5954acfe9e00bc83ed9f5cb082ed22c592fbbef86dc48b907238be64ead5c33"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-win32.whl", hash = "sha256:06d6de87c19f967f03b4cf9b34e538ef46e99a337e9a61a77dbe44b2cbcf0690"}, -{file = "pycryptodome-3.20.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ec0bb1188c1d13426039af8ffcb4dbe3aad1d7680c35a62d8eaf2a529b5d3d4f"}, -{file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:5601c934c498cd267640b57569e73793cb9a83506f7c73a8ec57a516f5b0b091"}, -{file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d29daa681517f4bc318cd8a23af87e1f2a7bad2fe361e8aa29c77d652a065de4"}, -{file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3427d9e5310af6680678f4cce149f54e0bb4af60101c7f2c16fdf878b39ccccc"}, -{file = "pycryptodome-3.20.0-cp27-cp27mu-musllinux_1_1_aarch64.whl", hash = "sha256:3cd3ef3aee1079ae44afaeee13393cf68b1058f70576b11439483e34f93cf818"}, -{file = "pycryptodome-3.20.0-cp35-abi3-macosx_10_9_universal2.whl", hash = "sha256:ac1c7c0624a862f2e53438a15c9259d1655325fc2ec4392e66dc46cdae24d044"}, -{file = "pycryptodome-3.20.0-cp35-abi3-macosx_10_9_x86_64.whl", hash = "sha256:76658f0d942051d12a9bd08ca1b6b34fd762a8ee4240984f7c06ddfb55eaf15a"}, -{file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f35d6cee81fa145333137009d9c8ba90951d7d77b67c79cbe5f03c7eb74d8fe2"}, -{file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76cb39afede7055127e35a444c1c041d2e8d2f1f9c121ecef573757ba4cd2c3c"}, -{file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a4c4dc60b78ec41d2afa392491d788c2e06edf48580fbfb0dd0f828af49d25"}, -{file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fb3b87461fa35afa19c971b0a2b7456a7b1db7b4eba9a8424666104925b78128"}, -{file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_i686.whl", hash = "sha256:acc2614e2e5346a4a4eab6e199203034924313626f9620b7b4b38e9ad74b7e0c"}, -{file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:210ba1b647837bfc42dd5a813cdecb5b86193ae11a3f5d972b9a0ae2c7e9e4b4"}, -{file = "pycryptodome-3.20.0-cp35-abi3-win32.whl", hash = "sha256:8d6b98d0d83d21fb757a182d52940d028564efe8147baa9ce0f38d057104ae72"}, -{file = "pycryptodome-3.20.0-cp35-abi3-win_amd64.whl", hash = "sha256:9b3ae153c89a480a0ec402e23db8d8d84a3833b65fa4b15b81b83be9d637aab9"}, -{file = "pycryptodome-3.20.0-pp27-pypy_73-manylinux2010_x86_64.whl", hash = "sha256:4401564ebf37dfde45d096974c7a159b52eeabd9969135f0426907db367a652a"}, -{file = "pycryptodome-3.20.0-pp27-pypy_73-win32.whl", hash = "sha256:ec1f93feb3bb93380ab0ebf8b859e8e5678c0f010d2d78367cf6bc30bfeb148e"}, -{file = "pycryptodome-3.20.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:acae12b9ede49f38eb0ef76fdec2df2e94aad85ae46ec85be3648a57f0a7db04"}, -{file = "pycryptodome-3.20.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f47888542a0633baff535a04726948e876bf1ed880fddb7c10a736fa99146ab3"}, -{file = "pycryptodome-3.20.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e0e4a987d38cfc2e71b4a1b591bae4891eeabe5fa0f56154f576e26287bfdea"}, -{file = "pycryptodome-3.20.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c18b381553638414b38705f07d1ef0a7cf301bc78a5f9bc17a957eb19446834b"}, -{file = "pycryptodome-3.20.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a60fedd2b37b4cb11ccb5d0399efe26db9e0dd149016c1cc6c8161974ceac2d6"}, -{file = "pycryptodome-3.20.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:405002eafad114a2f9a930f5db65feef7b53c4784495dd8758069b89baf68eab"}, -{file = "pycryptodome-3.20.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2ab6ab0cb755154ad14e507d1df72de9897e99fd2d4922851a276ccc14f4f1a5"}, -{file = "pycryptodome-3.20.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:acf6e43fa75aca2d33e93409f2dafe386fe051818ee79ee8a3e21de9caa2ac9e"}, -{file = "pycryptodome-3.20.0.tar.gz", hash = "sha256:09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f0e6d631bae3f231d3634f91ae4da7a960f7ff87f2865b2d2b831af1dfb04e9a"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:baee115a9ba6c5d2709a1e88ffe62b73ecc044852a925dcb67713a288c4ec70f"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:417a276aaa9cb3be91f9014e9d18d10e840a7a9b9a9be64a42f553c5b50b4d1d"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a1250b7ea809f752b68e3e6f3fd946b5939a52eaeea18c73bdab53e9ba3c2dd"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-musllinux_1_1_aarch64.whl", hash = "sha256:d5954acfe9e00bc83ed9f5cb082ed22c592fbbef86dc48b907238be64ead5c33"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-win32.whl", hash = "sha256:06d6de87c19f967f03b4cf9b34e538ef46e99a337e9a61a77dbe44b2cbcf0690"}, + {file = "pycryptodome-3.20.0-cp27-cp27m-win_amd64.whl", hash = "sha256:ec0bb1188c1d13426039af8ffcb4dbe3aad1d7680c35a62d8eaf2a529b5d3d4f"}, + {file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:5601c934c498cd267640b57569e73793cb9a83506f7c73a8ec57a516f5b0b091"}, + {file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d29daa681517f4bc318cd8a23af87e1f2a7bad2fe361e8aa29c77d652a065de4"}, + {file = "pycryptodome-3.20.0-cp27-cp27mu-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3427d9e5310af6680678f4cce149f54e0bb4af60101c7f2c16fdf878b39ccccc"}, + {file = "pycryptodome-3.20.0-cp27-cp27mu-musllinux_1_1_aarch64.whl", hash = "sha256:3cd3ef3aee1079ae44afaeee13393cf68b1058f70576b11439483e34f93cf818"}, + {file = "pycryptodome-3.20.0-cp35-abi3-macosx_10_9_universal2.whl", hash = "sha256:ac1c7c0624a862f2e53438a15c9259d1655325fc2ec4392e66dc46cdae24d044"}, + {file = "pycryptodome-3.20.0-cp35-abi3-macosx_10_9_x86_64.whl", hash = "sha256:76658f0d942051d12a9bd08ca1b6b34fd762a8ee4240984f7c06ddfb55eaf15a"}, + {file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f35d6cee81fa145333137009d9c8ba90951d7d77b67c79cbe5f03c7eb74d8fe2"}, + {file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76cb39afede7055127e35a444c1c041d2e8d2f1f9c121ecef573757ba4cd2c3c"}, + {file = "pycryptodome-3.20.0-cp35-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49a4c4dc60b78ec41d2afa392491d788c2e06edf48580fbfb0dd0f828af49d25"}, + {file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fb3b87461fa35afa19c971b0a2b7456a7b1db7b4eba9a8424666104925b78128"}, + {file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_i686.whl", hash = "sha256:acc2614e2e5346a4a4eab6e199203034924313626f9620b7b4b38e9ad74b7e0c"}, + {file = "pycryptodome-3.20.0-cp35-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:210ba1b647837bfc42dd5a813cdecb5b86193ae11a3f5d972b9a0ae2c7e9e4b4"}, + {file = "pycryptodome-3.20.0-cp35-abi3-win32.whl", hash = "sha256:8d6b98d0d83d21fb757a182d52940d028564efe8147baa9ce0f38d057104ae72"}, + {file = "pycryptodome-3.20.0-cp35-abi3-win_amd64.whl", hash = "sha256:9b3ae153c89a480a0ec402e23db8d8d84a3833b65fa4b15b81b83be9d637aab9"}, + {file = "pycryptodome-3.20.0-pp27-pypy_73-manylinux2010_x86_64.whl", hash = "sha256:4401564ebf37dfde45d096974c7a159b52eeabd9969135f0426907db367a652a"}, + {file = "pycryptodome-3.20.0-pp27-pypy_73-win32.whl", hash = "sha256:ec1f93feb3bb93380ab0ebf8b859e8e5678c0f010d2d78367cf6bc30bfeb148e"}, + {file = "pycryptodome-3.20.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:acae12b9ede49f38eb0ef76fdec2df2e94aad85ae46ec85be3648a57f0a7db04"}, + {file = "pycryptodome-3.20.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f47888542a0633baff535a04726948e876bf1ed880fddb7c10a736fa99146ab3"}, + {file = "pycryptodome-3.20.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e0e4a987d38cfc2e71b4a1b591bae4891eeabe5fa0f56154f576e26287bfdea"}, + {file = "pycryptodome-3.20.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:c18b381553638414b38705f07d1ef0a7cf301bc78a5f9bc17a957eb19446834b"}, + {file = "pycryptodome-3.20.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a60fedd2b37b4cb11ccb5d0399efe26db9e0dd149016c1cc6c8161974ceac2d6"}, + {file = "pycryptodome-3.20.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:405002eafad114a2f9a930f5db65feef7b53c4784495dd8758069b89baf68eab"}, + {file = "pycryptodome-3.20.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2ab6ab0cb755154ad14e507d1df72de9897e99fd2d4922851a276ccc14f4f1a5"}, + {file = "pycryptodome-3.20.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:acf6e43fa75aca2d33e93409f2dafe386fe051818ee79ee8a3e21de9caa2ac9e"}, + {file = "pycryptodome-3.20.0.tar.gz", hash = "sha256:09609209ed7de61c2b560cc5c8c4fbf892f8b15b1faf7e4cbffac97db1fffda7"}, ] [[package]] @@ -265,16 +262,16 @@ description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ -{file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, -{file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, + {file = "pydantic-2.8.2-py3-none-any.whl", hash = "sha256:73ee9fddd406dc318b885c7a2eab8a6472b68b8fb5ba8150949fc3db939f23c8"}, + {file = "pydantic-2.8.2.tar.gz", hash = "sha256:6f62c13d067b0755ad1c21a34bdd06c0c12625a22b0fc09c6b149816604f7c2a"}, ] [package.dependencies] annotated-types = ">=0.4.0" pydantic-core = "2.20.1" typing-extensions = [ -{version = ">=4.12.2", markers = "python_version >= \"3.13\""}, -{version = ">=4.6.1", markers = "python_version < \"3.13\""}, + {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, + {version = ">=4.6.1", markers = "python_version < \"3.13\""}, ] [package.extras] @@ -287,95 +284,95 @@ description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ -{file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, -{file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, -{file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, -{file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, -{file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, -{file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, -{file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, -{file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, -{file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, -{file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, -{file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, -{file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, -{file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, -{file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, -{file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, -{file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, -{file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, -{file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, -{file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, -{file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, -{file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, -{file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, -{file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, -{file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, -{file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, -{file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, -{file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, -{file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, -{file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, -{file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, -{file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, -{file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, -{file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, -{file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, -{file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, -{file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, -{file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, -{file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, -{file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, -{file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, -{file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, -{file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, -{file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, -{file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, -{file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3acae97ffd19bf091c72df4d726d552c473f3576409b2a7ca36b2f535ffff4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41f4c96227a67a013e7de5ff8f20fb496ce573893b7f4f2707d065907bffdbd6"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f239eb799a2081495ea659d8d4a43a8f42cd1fe9ff2e7e436295c38a10c286a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53e431da3fc53360db73eedf6f7124d1076e1b4ee4276b36fb25514544ceb4a3"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f1f62b2413c3a0e846c3b838b2ecd6c7a19ec6793b2a522745b0869e37ab5bc1"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5d41e6daee2813ecceea8eda38062d69e280b39df793f5a942fa515b8ed67953"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d482efec8b7dc6bfaedc0f166b2ce349df0011f5d2f1f25537ced4cfc34fd98"}, + {file = "pydantic_core-2.20.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e93e1a4b4b33daed65d781a57a522ff153dcf748dee70b40c7258c5861e1768a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e7c4ea22b6739b162c9ecaaa41d718dfad48a244909fe7ef4b54c0b530effc5a"}, + {file = "pydantic_core-2.20.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4f2790949cf385d985a31984907fecb3896999329103df4e4983a4a41e13e840"}, + {file = "pydantic_core-2.20.1-cp310-none-win32.whl", hash = "sha256:5e999ba8dd90e93d57410c5e67ebb67ffcaadcea0ad973240fdfd3a135506250"}, + {file = "pydantic_core-2.20.1-cp310-none-win_amd64.whl", hash = "sha256:512ecfbefef6dac7bc5eaaf46177b2de58cdf7acac8793fe033b24ece0b9566c"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d2a8fa9d6d6f891f3deec72f5cc668e6f66b188ab14bb1ab52422fe8e644f312"}, + {file = "pydantic_core-2.20.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:175873691124f3d0da55aeea1d90660a6ea7a3cfea137c38afa0a5ffabe37b88"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37eee5b638f0e0dcd18d21f59b679686bbd18917b87db0193ae36f9c23c355fc"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25e9185e2d06c16ee438ed39bf62935ec436474a6ac4f9358524220f1b236e43"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:150906b40ff188a3260cbee25380e7494ee85048584998c1e66df0c7a11c17a6"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ad4aeb3e9a97286573c03df758fc7627aecdd02f1da04516a86dc159bf70121"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3f3ed29cd9f978c604708511a1f9c2fdcb6c38b9aae36a51905b8811ee5cbf1"}, + {file = "pydantic_core-2.20.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b0dae11d8f5ded51699c74d9548dcc5938e0804cc8298ec0aa0da95c21fff57b"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:faa6b09ee09433b87992fb5a2859efd1c264ddc37280d2dd5db502126d0e7f27"}, + {file = "pydantic_core-2.20.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9dc1b507c12eb0481d071f3c1808f0529ad41dc415d0ca11f7ebfc666e66a18b"}, + {file = "pydantic_core-2.20.1-cp311-none-win32.whl", hash = "sha256:fa2fddcb7107e0d1808086ca306dcade7df60a13a6c347a7acf1ec139aa6789a"}, + {file = "pydantic_core-2.20.1-cp311-none-win_amd64.whl", hash = "sha256:40a783fb7ee353c50bd3853e626f15677ea527ae556429453685ae32280c19c2"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:595ba5be69b35777474fa07f80fc260ea71255656191adb22a8c53aba4479231"}, + {file = "pydantic_core-2.20.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a4f55095ad087474999ee28d3398bae183a66be4823f753cd7d67dd0153427c9"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9aa05d09ecf4c75157197f27cdc9cfaeb7c5f15021c6373932bf3e124af029f"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e97fdf088d4b31ff4ba35db26d9cc472ac7ef4a2ff2badeabf8d727b3377fc52"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bc633a9fe1eb87e250b5c57d389cf28998e4292336926b0b6cdaee353f89a237"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d573faf8eb7e6b1cbbcb4f5b247c60ca8be39fe2c674495df0eb4318303137fe"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26dc97754b57d2fd00ac2b24dfa341abffc380b823211994c4efac7f13b9e90e"}, + {file = "pydantic_core-2.20.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:33499e85e739a4b60c9dac710c20a08dc73cb3240c9a0e22325e671b27b70d24"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:bebb4d6715c814597f85297c332297c6ce81e29436125ca59d1159b07f423eb1"}, + {file = "pydantic_core-2.20.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:516d9227919612425c8ef1c9b869bbbee249bc91912c8aaffb66116c0b447ebd"}, + {file = "pydantic_core-2.20.1-cp312-none-win32.whl", hash = "sha256:469f29f9093c9d834432034d33f5fe45699e664f12a13bf38c04967ce233d688"}, + {file = "pydantic_core-2.20.1-cp312-none-win_amd64.whl", hash = "sha256:035ede2e16da7281041f0e626459bcae33ed998cca6a0a007a5ebb73414ac72d"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0827505a5c87e8aa285dc31e9ec7f4a17c81a813d45f70b1d9164e03a813a686"}, + {file = "pydantic_core-2.20.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19c0fa39fa154e7e0b7f82f88ef85faa2a4c23cc65aae2f5aea625e3c13c735a"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa223cd1e36b642092c326d694d8bf59b71ddddc94cdb752bbbb1c5c91d833b"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c336a6d235522a62fef872c6295a42ecb0c4e1d0f1a3e500fe949415761b8a19"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7eb6a0587eded33aeefea9f916899d42b1799b7b14b8f8ff2753c0ac1741edac"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:70c8daf4faca8da5a6d655f9af86faf6ec2e1768f4b8b9d0226c02f3d6209703"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e9fa4c9bf273ca41f940bceb86922a7667cd5bf90e95dbb157cbb8441008482c"}, + {file = "pydantic_core-2.20.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:11b71d67b4725e7e2a9f6e9c0ac1239bbc0c48cce3dc59f98635efc57d6dac83"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:270755f15174fb983890c49881e93f8f1b80f0b5e3a3cc1394a255706cabd203"}, + {file = "pydantic_core-2.20.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c81131869240e3e568916ef4c307f8b99583efaa60a8112ef27a366eefba8ef0"}, + {file = "pydantic_core-2.20.1-cp313-none-win32.whl", hash = "sha256:b91ced227c41aa29c672814f50dbb05ec93536abf8f43cd14ec9521ea09afe4e"}, + {file = "pydantic_core-2.20.1-cp313-none-win_amd64.whl", hash = "sha256:65db0f2eefcaad1a3950f498aabb4875c8890438bc80b19362cf633b87a8ab20"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:4745f4ac52cc6686390c40eaa01d48b18997cb130833154801a442323cc78f91"}, + {file = "pydantic_core-2.20.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a8ad4c766d3f33ba8fd692f9aa297c9058970530a32c728a2c4bfd2616d3358b"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41e81317dd6a0127cabce83c0c9c3fbecceae981c8391e6f1dec88a77c8a569a"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04024d270cf63f586ad41fff13fde4311c4fc13ea74676962c876d9577bcc78f"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eaad4ff2de1c3823fddf82f41121bdf453d922e9a238642b1dedb33c4e4f98ad"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:26ab812fa0c845df815e506be30337e2df27e88399b985d0bb4e3ecfe72df31c"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c5ebac750d9d5f2706654c638c041635c385596caf68f81342011ddfa1e5598"}, + {file = "pydantic_core-2.20.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2aafc5a503855ea5885559eae883978c9b6d8c8993d67766ee73d82e841300dd"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4868f6bd7c9d98904b748a2653031fc9c2f85b6237009d475b1008bfaeb0a5aa"}, + {file = "pydantic_core-2.20.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa2f457b4af386254372dfa78a2eda2563680d982422641a85f271c859df1987"}, + {file = "pydantic_core-2.20.1-cp38-none-win32.whl", hash = "sha256:225b67a1f6d602de0ce7f6c1c3ae89a4aa25d3de9be857999e9124f15dab486a"}, + {file = "pydantic_core-2.20.1-cp38-none-win_amd64.whl", hash = "sha256:6b507132dcfc0dea440cce23ee2182c0ce7aba7054576efc65634f080dbe9434"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:b03f7941783b4c4a26051846dea594628b38f6940a2fdc0df00b221aed39314c"}, + {file = "pydantic_core-2.20.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1eedfeb6089ed3fad42e81a67755846ad4dcc14d73698c120a82e4ccf0f1f9f6"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:635fee4e041ab9c479e31edda27fcf966ea9614fff1317e280d99eb3e5ab6fe2"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:77bf3ac639c1ff567ae3b47f8d4cc3dc20f9966a2a6dd2311dcc055d3d04fb8a"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ed1b0132f24beeec5a78b67d9388656d03e6a7c837394f99257e2d55b461611"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6514f963b023aeee506678a1cf821fe31159b925c4b76fe2afa94cc70b3222b"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10d4204d8ca33146e761c79f83cc861df20e7ae9f6487ca290a97702daf56006"}, + {file = "pydantic_core-2.20.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d036c7187b9422ae5b262badb87a20a49eb6c5238b2004e96d4da1231badef1"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9ebfef07dbe1d93efb94b4700f2d278494e9162565a54f124c404a5656d7ff09"}, + {file = "pydantic_core-2.20.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6b9d9bb600328a1ce523ab4f454859e9d439150abb0906c5a1983c146580ebab"}, + {file = "pydantic_core-2.20.1-cp39-none-win32.whl", hash = "sha256:784c1214cb6dd1e3b15dd8b91b9a53852aed16671cc3fbe4786f4f1db07089e2"}, + {file = "pydantic_core-2.20.1-cp39-none-win_amd64.whl", hash = "sha256:d2fe69c5434391727efa54b47a1e7986bb0186e72a41b203df8f5b0a19a4f669"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a45f84b09ac9c3d35dfcf6a27fd0634d30d183205230a0ebe8373a0e8cfa0906"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d02a72df14dfdbaf228424573a07af10637bd490f0901cee872c4f434a735b94"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2b27e6af28f07e2f195552b37d7d66b150adbaa39a6d327766ffd695799780f"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:084659fac3c83fd674596612aeff6041a18402f1e1bc19ca39e417d554468482"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:242b8feb3c493ab78be289c034a1f659e8826e2233786e36f2893a950a719bb6"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:38cf1c40a921d05c5edc61a785c0ddb4bed67827069f535d794ce6bcded919fc"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e0bbdd76ce9aa5d4209d65f2b27fc6e5ef1312ae6c5333c26db3f5ade53a1e99"}, + {file = "pydantic_core-2.20.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:254ec27fdb5b1ee60684f91683be95e5133c994cc54e86a0b0963afa25c8f8a6"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:407653af5617f0757261ae249d3fba09504d7a71ab36ac057c938572d1bc9331"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:c693e916709c2465b02ca0ad7b387c4f8423d1db7b4649c551f27a529181c5ad"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5b5ff4911aea936a47d9376fd3ab17e970cc543d1b68921886e7f64bd28308d1"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177f55a886d74f1808763976ac4efd29b7ed15c69f4d838bbd74d9d09cf6fa86"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:964faa8a861d2664f0c7ab0c181af0bea66098b1919439815ca8803ef136fc4e"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:4dd484681c15e6b9a977c785a345d3e378d72678fd5f1f3c0509608da24f2ac0"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f6d6cff3538391e8486a431569b77921adfcdef14eb18fbf19b7c0a5294d4e6a"}, + {file = "pydantic_core-2.20.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a6d511cc297ff0883bc3708b465ff82d7560193169a8b93260f74ecb0a5e08a7"}, + {file = "pydantic_core-2.20.1.tar.gz", hash = "sha256:26ca695eeee5f9f1aeeb211ffc12f10bcb6f71e2989988fda61dabd65db878d4"}, ] [package.dependencies] @@ -388,8 +385,8 @@ description = "passive checker of Python programs" optional = false python-versions = ">=3.6" files = [ -{file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, -{file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, + {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, + {file = "pyflakes-2.5.0.tar.gz", hash = "sha256:491feb020dca48ccc562a8c0cbe8df07ee13078df59813b83959cbdada312ea3"}, ] [[package]] @@ -399,8 +396,8 @@ description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ -{file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, -{file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, + {file = "pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5"}, + {file = "pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce"}, ] [package.dependencies] @@ -421,8 +418,8 @@ description = "Retrying" optional = false python-versions = "*" files = [ -{file = "retrying-1.3.4-py3-none-any.whl", hash = "sha256:8cc4d43cb8e1125e0ff3344e9de678fefd85db3b750b81b2240dc0183af37b35"}, -{file = "retrying-1.3.4.tar.gz", hash = "sha256:345da8c5765bd982b1d1915deb9102fd3d1f7ad16bd84a9700b85f64d24e8f3e"}, + {file = "retrying-1.3.4-py3-none-any.whl", hash = "sha256:8cc4d43cb8e1125e0ff3344e9de678fefd85db3b750b81b2240dc0183af37b35"}, + {file = "retrying-1.3.4.tar.gz", hash = "sha256:345da8c5765bd982b1d1915deb9102fd3d1f7ad16bd84a9700b85f64d24e8f3e"}, ] [package.dependencies] @@ -435,23 +432,23 @@ description = "An extremely fast Python linter and code formatter, written in Ru optional = false python-versions = ">=3.7" files = [ -{file = "ruff-0.4.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c2c4d0859305ac5a16310eec40e4e9a9dec5dcdfbe92697acd99624e8638dac"}, -{file = "ruff-0.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a79489607d1495685cdd911a323a35871abfb7a95d4f98fc6f85e799227ac46e"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1dd1681dfa90a41b8376a61af05cc4dc5ff32c8f14f5fe20dba9ff5deb80cd6"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c75c53bb79d71310dc79fb69eb4902fba804a81f374bc86a9b117a8d077a1784"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18238c80ee3d9100d3535d8eb15a59c4a0753b45cc55f8bf38f38d6a597b9739"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d8f71885bce242da344989cae08e263de29752f094233f932d4f5cfb4ef36a81"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:330421543bd3222cdfec481e8ff3460e8702ed1e58b494cf9d9e4bf90db52b9d"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e9b6fb3a37b772628415b00c4fc892f97954275394ed611056a4b8a2631365e"}, -{file = "ruff-0.4.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f54c481b39a762d48f64d97351048e842861c6662d63ec599f67d515cb417f6"}, -{file = "ruff-0.4.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:67fe086b433b965c22de0b4259ddfe6fa541c95bf418499bedb9ad5fb8d1c631"}, -{file = "ruff-0.4.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:acfaaab59543382085f9eb51f8e87bac26bf96b164839955f244d07125a982ef"}, -{file = "ruff-0.4.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3cea07079962b2941244191569cf3a05541477286f5cafea638cd3aa94b56815"}, -{file = "ruff-0.4.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:338a64ef0748f8c3a80d7f05785930f7965d71ca260904a9321d13be24b79695"}, -{file = "ruff-0.4.10-py3-none-win32.whl", hash = "sha256:ffe3cd2f89cb54561c62e5fa20e8f182c0a444934bf430515a4b422f1ab7b7ca"}, -{file = "ruff-0.4.10-py3-none-win_amd64.whl", hash = "sha256:67f67cef43c55ffc8cc59e8e0b97e9e60b4837c8f21e8ab5ffd5d66e196e25f7"}, -{file = "ruff-0.4.10-py3-none-win_arm64.whl", hash = "sha256:dd1fcee327c20addac7916ca4e2653fbbf2e8388d8a6477ce5b4e986b68ae6c0"}, -{file = "ruff-0.4.10.tar.gz", hash = "sha256:3aa4f2bc388a30d346c56524f7cacca85945ba124945fe489952aadb6b5cd804"}, + {file = "ruff-0.4.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c2c4d0859305ac5a16310eec40e4e9a9dec5dcdfbe92697acd99624e8638dac"}, + {file = "ruff-0.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a79489607d1495685cdd911a323a35871abfb7a95d4f98fc6f85e799227ac46e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1dd1681dfa90a41b8376a61af05cc4dc5ff32c8f14f5fe20dba9ff5deb80cd6"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c75c53bb79d71310dc79fb69eb4902fba804a81f374bc86a9b117a8d077a1784"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18238c80ee3d9100d3535d8eb15a59c4a0753b45cc55f8bf38f38d6a597b9739"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d8f71885bce242da344989cae08e263de29752f094233f932d4f5cfb4ef36a81"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:330421543bd3222cdfec481e8ff3460e8702ed1e58b494cf9d9e4bf90db52b9d"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e9b6fb3a37b772628415b00c4fc892f97954275394ed611056a4b8a2631365e"}, + {file = "ruff-0.4.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f54c481b39a762d48f64d97351048e842861c6662d63ec599f67d515cb417f6"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:67fe086b433b965c22de0b4259ddfe6fa541c95bf418499bedb9ad5fb8d1c631"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:acfaaab59543382085f9eb51f8e87bac26bf96b164839955f244d07125a982ef"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3cea07079962b2941244191569cf3a05541477286f5cafea638cd3aa94b56815"}, + {file = "ruff-0.4.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:338a64ef0748f8c3a80d7f05785930f7965d71ca260904a9321d13be24b79695"}, + {file = "ruff-0.4.10-py3-none-win32.whl", hash = "sha256:ffe3cd2f89cb54561c62e5fa20e8f182c0a444934bf430515a4b422f1ab7b7ca"}, + {file = "ruff-0.4.10-py3-none-win_amd64.whl", hash = "sha256:67f67cef43c55ffc8cc59e8e0b97e9e60b4837c8f21e8ab5ffd5d66e196e25f7"}, + {file = "ruff-0.4.10-py3-none-win_arm64.whl", hash = "sha256:dd1fcee327c20addac7916ca4e2653fbbf2e8388d8a6477ce5b4e986b68ae6c0"}, + {file = "ruff-0.4.10.tar.gz", hash = "sha256:3aa4f2bc388a30d346c56524f7cacca85945ba124945fe489952aadb6b5cd804"}, ] [[package]] @@ -461,8 +458,8 @@ description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ -{file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, -{file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] [[package]] @@ -472,8 +469,8 @@ description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" files = [ -{file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, -{file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] [[package]] @@ -483,8 +480,8 @@ description = "Sans-I/O implementation of SOCKS4, SOCKS4A, and SOCKS5." optional = false python-versions = ">=3.6" files = [ -{file = "socksio-1.0.0-py3-none-any.whl", hash = "sha256:95dc1f15f9b34e8d7b16f06d74b8ccf48f609af32ab33c608d08761c5dcbb1f3"}, -{file = "socksio-1.0.0.tar.gz", hash = "sha256:f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac"}, + {file = "socksio-1.0.0-py3-none-any.whl", hash = "sha256:95dc1f15f9b34e8d7b16f06d74b8ccf48f609af32ab33c608d08761c5dcbb1f3"}, + {file = "socksio-1.0.0.tar.gz", hash = "sha256:f88beb3da5b5c38b9890469de67d0cb0f9d494b78b106ca1845f96c10b91c4ac"}, ] [[package]] @@ -494,8 +491,8 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.7" files = [ -{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, -{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] [[package]] @@ -505,8 +502,8 @@ description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ -{file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, -{file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] @@ -516,8 +513,8 @@ description = "HTTP library with thread-safe connection pooling, file post, and optional = false python-versions = ">=3.8" files = [ -{file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, -{file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -529,4 +526,4 @@ zstd = ["zstandard (>=0.18.0)"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "e0b79263522982369adfb7f126c6f464ce5ab97955af1af928358975142bc0fa" +content-hash = "f4dc3863a79f37180dffdb48dfb2dba5a54de46477a55b21b3346051dfc9188a" diff --git a/pyproject.toml b/pyproject.toml index 654fa27..c80d0e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,38 +1,38 @@ [tool.poetry] name = "aftership-tracking-sdk" -version = "7.1.0" +version = "8.0.0" description = "The official AfterShip Tracking Python API library" authors = ["AfterShip "] license = "MIT" readme = "README.md" -keywords = ["aftership", "tracking", "track", "fedex", "ups", "usps", "dhl", "shipping", "fulfillment", "couriers", "carriers", "logistics"] +keywords = ["aftership", "tracking", "dhl"] classifiers = [ -"Development Status :: 5 - Production/Stable", -"Intended Audience :: Developers", -"License :: OSI Approved :: MIT License", -"Topic :: Software Development", -"Programming Language :: Python :: 3.8", -"Programming Language :: Python :: 3.9", -"Programming Language :: Python :: 3.10", -"Programming Language :: Python :: 3.11", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ] packages = [ -{ include = "tracking" }, -{ include = "*.md" }, -{ include = "LICENSE" }, + { include = "tracking" }, + { include = "*.md" }, + { include = "LICENSE" }, ] [tool.poetry.dependencies] python = "^3.8" pycryptodome = ">= 3.9.0" pydantic = ">=2" +httpx = ">=0.27.0" retrying = "^1.3.4" typing_extensions = ">=4.7.1" urllib3 = "^2.2.2" socksio = "^1.0.0" -httpx = "^0.28.1" [tool.poetry.group.dev.dependencies] ruff = "^0.4.8" diff --git a/tracking/__init__.py b/tracking/__init__.py index 262c831..38a4f6b 100644 --- a/tracking/__init__.py +++ b/tracking/__init__.py @@ -11,4 +11,4 @@ from . import exceptions from .models import * -__version__ = "7.1.0" +__version__ = "8.0.0" diff --git a/tracking/api/__init__.py b/tracking/api/__init__.py index adcd68f..1ecb692 100644 --- a/tracking/api/__init__.py +++ b/tracking/api/__init__.py @@ -4,13 +4,13 @@ # Do not edit the class manually. __all__ = [ + "TrackingApi", "CourierApi", "CourierConnectionApi", "EstimatedDeliveryDateApi", - "TrackingApi", ] +from .tracking import TrackingApi from .courier import CourierApi from .courier_connection import CourierConnectionApi from .estimated_delivery_date import EstimatedDeliveryDateApi -from .tracking import TrackingApi diff --git a/tracking/api/courier.py b/tracking/api/courier.py index 39c2282..d365ea1 100644 --- a/tracking/api/courier.py +++ b/tracking/api/courier.py @@ -8,9 +8,9 @@ from tracking.models import ( + GetCouriersResponse, DetectCourierRequest, DetectCourierResponse, - GetCouriersResponse, ) from tracking.request import ApiClient, validate_params @@ -19,12 +19,9 @@ class CourierApi(ApiClient): """CourierApi api implements""" @validate_params - def detect_courier( - self, detect_courier_request: Union[DetectCourierRequest, dict], **kwargs - ) -> DetectCourierResponse: + def get_couriers(self, **kwargs) -> GetCouriersResponse: """ - Return a list of matched couriers based on tracking number format and or a list of couriers. - :param detect_courier_request: + Return a list of couriers. :param kwargs: request options: **headers** (dict): support custom headers. @@ -32,21 +29,28 @@ def detect_courier( verify the identity of requested hosts. Either `True` (default CA bundle), a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). + query params: + **active**: bool. get user activated couriers + **slug**: str. Unique courier code Use comma for multiple values. (Example: dhl,ups,usps) """ - url = "/tracking/2025-07/couriers/detect" + url = "/tracking/2025-07/couriers" - body = detect_courier_request - if not isinstance(body, dict): - body = detect_courier_request.model_dump(exclude_none=True) - body = json.dumps(body) + params_keys = { + "active", + "slug", + } + params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} - result = self._request("POST", url=url, body=body, **kwargs) - return DetectCourierResponse().from_dict(result) + result = self._request("GET", url=url, params=params, **kwargs) + return GetCouriersResponse.model_validate(result) @validate_params - def get_couriers(self, **kwargs) -> GetCouriersResponse: + def detect_courier( + self, detect_courier_request: Union[DetectCourierRequest, dict], **kwargs + ) -> DetectCourierResponse: """ - Return a list of couriers. + Return a list of matched couriers based on tracking number format and or a list of couriers. + :param detect_courier_request: :param kwargs: request options: **headers** (dict): support custom headers. @@ -54,16 +58,13 @@ def get_couriers(self, **kwargs) -> GetCouriersResponse: verify the identity of requested hosts. Either `True` (default CA bundle), a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). - query params: - **active**: bool. get user activated couriers - **slug**: str. Unique courier code Use comma for multiple values. (Example: dhl,ups,usps) """ - url = "/tracking/2025-07/couriers" - params_keys = { - "active", - "slug", - } - params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} + url = "/tracking/2025-07/couriers/detect" - result = self._request("GET", url=url, params=params, **kwargs) - return GetCouriersResponse().from_dict(result) + body = detect_courier_request + if not isinstance(body, dict): + body = detect_courier_request.model_dump(exclude_none=True, mode="json") + body = json.dumps(body) + + result = self._request("POST", url=url, body=body, **kwargs) + return DetectCourierResponse.model_validate(result) diff --git a/tracking/api/courier_connection.py b/tracking/api/courier_connection.py index 1a63f2e..3aa7a47 100644 --- a/tracking/api/courier_connection.py +++ b/tracking/api/courier_connection.py @@ -9,13 +9,13 @@ from pydantic import Field from tracking.models import ( - DeleteCourierConnectionsByIdResponse, GetCourierConnectionsResponse, - GetCourierConnectionsByIdResponse, PostCourierConnectionsRequest, PostCourierConnectionsResponse, + GetCourierConnectionsByIdResponse, PutCourierConnectionsByIdRequest, PutCourierConnectionsByIdResponse, + DeleteCourierConnectionsByIdResponse, ) from tracking.request import ApiClient, validate_params @@ -23,26 +23,6 @@ class CourierConnectionApi(ApiClient): """CourierConnectionApi api implements""" - @validate_params - def delete_courier_connections_by_id( - self, courier_connection_id: Annotated[str, Field(min_length=1)], **kwargs - ) -> DeleteCourierConnectionsByIdResponse: - """ - Delete a courier connection. - :param courier_connection_id: str. - :param kwargs: - request options: - **headers** (dict): support custom headers. - **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to - verify the identity of requested hosts. Either `True` (default CA bundle), - a path to an SSL certificate file, an `ssl.SSLContext`, or `False` - (which will disable verification). - """ - url = f"/tracking/2025-07/courier-connections/{courier_connection_id}" - - result = self._request("DELETE", url=url, **kwargs) - return DeleteCourierConnectionsByIdResponse().from_dict(result) - @validate_params def get_courier_connections(self, **kwargs) -> GetCourierConnectionsResponse: """ @@ -60,6 +40,7 @@ def get_courier_connections(self, **kwargs) -> GetCourierConnectionsResponse: **limit**: str. Number of courier connections each page contain. (Default: 100, Max: 200) """ url = "/tracking/2025-07/courier-connections" + params_keys = { "courier_slug", "cursor", @@ -68,20 +49,15 @@ def get_courier_connections(self, **kwargs) -> GetCourierConnectionsResponse: params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} result = self._request("GET", url=url, params=params, **kwargs) - return GetCourierConnectionsResponse().from_dict( - { - "pagination": result.get("pagination"), - "courier_connections": result.get("courier_connections"), - } - ) + return GetCourierConnectionsResponse.model_validate(result) @validate_params - def get_courier_connections_by_id( - self, courier_connection_id: Annotated[str, Field(min_length=1)], **kwargs - ) -> GetCourierConnectionsByIdResponse: + def post_courier_connections( + self, post_courier_connections_request: Union[PostCourierConnectionsRequest, dict], **kwargs + ) -> PostCourierConnectionsResponse: """ - Get courier connection results of a single courier connection. - :param courier_connection_id: str. + + :param post_courier_connections_request: :param kwargs: request options: **headers** (dict): support custom headers. @@ -90,18 +66,23 @@ def get_courier_connections_by_id( a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). """ - url = f"/tracking/2025-07/courier-connections/{courier_connection_id}" + url = "/tracking/2025-07/courier-connections" - result = self._request("GET", url=url, **kwargs) - return GetCourierConnectionsByIdResponse().from_dict(result) + body = post_courier_connections_request + if not isinstance(body, dict): + body = post_courier_connections_request.model_dump(exclude_none=True, mode="json") + body = json.dumps(body) + + result = self._request("POST", url=url, body=body, **kwargs) + return PostCourierConnectionsResponse.model_validate(result) @validate_params - def post_courier_connections( - self, post_courier_connections_request: Union[PostCourierConnectionsRequest, dict], **kwargs - ) -> PostCourierConnectionsResponse: + def get_courier_connections_by_id( + self, id: Annotated[str, Field(min_length=1)], **kwargs + ) -> GetCourierConnectionsByIdResponse: """ - - :param post_courier_connections_request: + Get courier connection results of a single courier connection. + :param id: str. :param kwargs: request options: **headers** (dict): support custom headers. @@ -110,26 +91,21 @@ def post_courier_connections( a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). """ - url = "/tracking/2025-07/courier-connections" - - body = post_courier_connections_request - if not isinstance(body, dict): - body = post_courier_connections_request.model_dump(exclude_none=True) - body = json.dumps(body) + url = f"/tracking/2025-07/courier-connections/{id}" - result = self._request("POST", url=url, body=body, **kwargs) - return PostCourierConnectionsResponse().from_dict(result) + result = self._request("GET", url=url, **kwargs) + return GetCourierConnectionsByIdResponse.model_validate(result) @validate_params def put_courier_connections_by_id( self, - courier_connection_id: Annotated[str, Field(min_length=1)], + id: Annotated[str, Field(min_length=1)], put_courier_connections_by_id_request: Union[PutCourierConnectionsByIdRequest, dict], **kwargs, ) -> PutCourierConnectionsByIdResponse: """ Update a courier connection. - :param courier_connection_id: str. + :param id: str. :param put_courier_connections_by_id_request: :param kwargs: request options: @@ -139,12 +115,32 @@ def put_courier_connections_by_id( a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). """ - url = f"/tracking/2025-07/courier-connections/{courier_connection_id}" + url = f"/tracking/2025-07/courier-connections/{id}" body = put_courier_connections_by_id_request if not isinstance(body, dict): - body = put_courier_connections_by_id_request.model_dump(exclude_none=True) + body = put_courier_connections_by_id_request.model_dump(exclude_none=True, mode="json") body = json.dumps(body) result = self._request("PATCH", url=url, body=body, **kwargs) - return PutCourierConnectionsByIdResponse().from_dict(result) + return PutCourierConnectionsByIdResponse.model_validate(result) + + @validate_params + def delete_courier_connections_by_id( + self, id: Annotated[str, Field(min_length=1)], **kwargs + ) -> DeleteCourierConnectionsByIdResponse: + """ + Delete a courier connection. + :param id: str. + :param kwargs: + request options: + **headers** (dict): support custom headers. + **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to + verify the identity of requested hosts. Either `True` (default CA bundle), + a path to an SSL certificate file, an `ssl.SSLContext`, or `False` + (which will disable verification). + """ + url = f"/tracking/2025-07/courier-connections/{id}" + + result = self._request("DELETE", url=url, **kwargs) + return DeleteCourierConnectionsByIdResponse.model_validate(result) diff --git a/tracking/api/estimated_delivery_date.py b/tracking/api/estimated_delivery_date.py index 4a37854..5ea39e2 100644 --- a/tracking/api/estimated_delivery_date.py +++ b/tracking/api/estimated_delivery_date.py @@ -8,7 +8,7 @@ from tracking.models import ( - PredictRequest, + EstimatedDeliveryDateRequest, PredictResponse, PredictBatchRequest, PredictBatchResponse, @@ -20,7 +20,9 @@ class EstimatedDeliveryDateApi(ApiClient): """EstimatedDeliveryDateApi api implements""" @validate_params - def predict(self, predict_request: Union[PredictRequest, dict], **kwargs) -> PredictResponse: + def predict( + self, predict_request: Union[EstimatedDeliveryDateRequest, dict], **kwargs + ) -> PredictResponse: """ > The estimated delivery date is provided by AfterShip, based on its AI-predictive model. You can display the EDD on the product page, cart, and order checkout page. It indicates when a customer will receive the order.You can use to activate this feature. :param predict_request: @@ -36,11 +38,11 @@ def predict(self, predict_request: Union[PredictRequest, dict], **kwargs) -> Pre body = predict_request if not isinstance(body, dict): - body = predict_request.model_dump(exclude_none=True) + body = predict_request.model_dump(exclude_none=True, mode="json") body = json.dumps(body) result = self._request("POST", url=url, body=body, **kwargs) - return PredictResponse().from_dict(result) + return PredictResponse.model_validate(result) @validate_params def predict_batch( @@ -61,8 +63,8 @@ def predict_batch( body = predict_batch_request if not isinstance(body, dict): - body = predict_batch_request.model_dump(exclude_none=True) + body = predict_batch_request.model_dump(exclude_none=True, mode="json") body = json.dumps(body) result = self._request("POST", url=url, body=body, **kwargs) - return PredictBatchResponse().from_dict(result) + return PredictBatchResponse.model_validate(result) diff --git a/tracking/api/tracking.py b/tracking/api/tracking.py index 054b9ae..b9348ee 100644 --- a/tracking/api/tracking.py +++ b/tracking/api/tracking.py @@ -9,16 +9,16 @@ from pydantic import Field from tracking.models import ( + GetTrackingsResponse, CreateTrackingRequest, CreateTrackingResponse, - DeleteTrackingByIdResponse, GetTrackingByIdResponse, - GetTrackingsResponse, - MarkTrackingCompletedByIdRequest, - MarkTrackingCompletedByIdResponse, - RetrackTrackingByIdResponse, UpdateTrackingByIdRequest, UpdateTrackingByIdResponse, + DeleteTrackingByIdResponse, + RetrackTrackingByIdResponse, + MarkTrackingCompletedByIdRequest, + MarkTrackingCompletedByIdResponse, ) from tracking.request import ApiClient, validate_params @@ -26,79 +26,6 @@ class TrackingApi(ApiClient): """TrackingApi api implements""" - @validate_params - def create_tracking( - self, create_tracking_request: Union[CreateTrackingRequest, dict], **kwargs - ) -> CreateTrackingResponse: - """ - Create a tracking.
- :param create_tracking_request: - :param kwargs: - request options: - **headers** (dict): support custom headers. - **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to - verify the identity of requested hosts. Either `True` (default CA bundle), - a path to an SSL certificate file, an `ssl.SSLContext`, or `False` - (which will disable verification). - """ - url = "/tracking/2025-07/trackings" - - body = create_tracking_request - if not isinstance(body, dict): - body = create_tracking_request.model_dump(exclude_none=True) - body = json.dumps(body) - - result = self._request("POST", url=url, body=body, **kwargs) - return CreateTrackingResponse().from_dict(result) - - @validate_params - def delete_tracking_by_id( - self, tracking_id: Annotated[str, Field(min_length=1)], **kwargs - ) -> DeleteTrackingByIdResponse: - """ - Delete a tracking. - :param tracking_id: str. tracking ID. - :param kwargs: - request options: - **headers** (dict): support custom headers. - **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to - verify the identity of requested hosts. Either `True` (default CA bundle), - a path to an SSL certificate file, an `ssl.SSLContext`, or `False` - (which will disable verification). - """ - url = f"/tracking/2025-07/trackings/{tracking_id}" - - result = self._request("DELETE", url=url, **kwargs) - return DeleteTrackingByIdResponse().from_dict(result) - - @validate_params - def get_tracking_by_id( - self, tracking_id: Annotated[str, Field(min_length=1)], **kwargs - ) -> GetTrackingByIdResponse: - """ - Get tracking results of a single tracking. - :param tracking_id: str. tracking ID. - :param kwargs: - request options: - **headers** (dict): support custom headers. - **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to - verify the identity of requested hosts. Either `True` (default CA bundle), - a path to an SSL certificate file, an `ssl.SSLContext`, or `False` - (which will disable verification). - query params: - **fields**: str. List of fields to include in the response. Use comma for multiple values. Fields to include: `destination_postal_code`, `tracking_ship_date`, `tracking_account_number`, `tracking_key`, `origin_country_region`, `destination_country_region`, `destination_state`, `title`, `order_id`, `tag`, `checkpoints` - **lang**: str. Translate checkpoint messages from the carrier’s provided language to the target language. Supported target languages include:
    - English (en)
    - French (fr)
    - French Canadian (fr-CA)
    - Arabic (ar)
    - Bulgarian (bg)
    - Catalan (ca)
    - Croatian (hr)
    - Czech (cs)
    - Danish (da)
    - Dutch (nl)
    - Estonian (et)
    - Filipino (tl)
    - Finnish (fi)
    - German (de)
    - Greek (el)
    - Hebrew (he)
    - Hindi (hi)
    - Hungarian (hu)
    - Indonesian (id)
    - Italian (it)
    - Japanese (ja)
    - Korean (ko)
    - Latvian (lv)
    - Lithuanian (lt)
    - Malay (ms)
    - Polish (pl)
    - Portuguese (pt)
    - Romanian (ro)
    - Russian (ru)
    - Serbian (sr)
    - Slovak (sk)
    - Slovenian (sl)
    - Spanish (es)
    - Swedish (sv)
    - Thai (th)
    - Turkish (tr)
    - Ukrainian (uk)
    - Vietnamese (vi)
    - Simplified Chinese (zh-Hans)
    - Traditional Chinese (zh-Hant)
    - Norwegian (nb)
- """ - url = f"/tracking/2025-07/trackings/{tracking_id}" - params_keys = { - "fields", - "lang", - } - params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} - - result = self._request("GET", url=url, params=params, **kwargs) - return GetTrackingByIdResponse().from_dict(result) - @validate_params def get_trackings(self, **kwargs) -> GetTrackingsResponse: """ @@ -131,6 +58,7 @@ def get_trackings(self, **kwargs) -> GetTrackingsResponse: **order_id**: str. A globally-unique identifier for the order. Use comma for multiple values.(Example: 6845a095a27a4caeb27487806f058add,4845a095a27a4caeb27487806f058abc) """ url = "/tracking/2025-07/trackings" + params_keys = { "cursor", "limit", @@ -154,24 +82,15 @@ def get_trackings(self, **kwargs) -> GetTrackingsResponse: params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} result = self._request("GET", url=url, params=params, **kwargs) - return GetTrackingsResponse().from_dict( - { - "pagination": result.get("pagination"), - "trackings": result.get("trackings"), - } - ) + return GetTrackingsResponse.model_validate(result) @validate_params - def mark_tracking_completed_by_id( - self, - tracking_id: Annotated[str, Field(min_length=1)], - mark_tracking_completed_by_id_request: Union[MarkTrackingCompletedByIdRequest, dict], - **kwargs, - ) -> MarkTrackingCompletedByIdResponse: + def create_tracking( + self, create_tracking_request: Union[CreateTrackingRequest, dict], **kwargs + ) -> CreateTrackingResponse: """ - Mark a tracking as completed. The tracking won't auto update until retrack it. - :param tracking_id: str. tracking id. - :param mark_tracking_completed_by_id_request: + Create a tracking.
+ :param create_tracking_request: :param kwargs: request options: **headers** (dict): support custom headers. @@ -180,23 +99,23 @@ def mark_tracking_completed_by_id( a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). """ - url = f"/tracking/2025-07/trackings/{tracking_id}/mark-as-completed" + url = "/tracking/2025-07/trackings" - body = mark_tracking_completed_by_id_request + body = create_tracking_request if not isinstance(body, dict): - body = mark_tracking_completed_by_id_request.model_dump(exclude_none=True) + body = create_tracking_request.model_dump(exclude_none=True, mode="json") body = json.dumps(body) result = self._request("POST", url=url, body=body, **kwargs) - return MarkTrackingCompletedByIdResponse().from_dict(result) + return CreateTrackingResponse.model_validate(result) @validate_params - def retrack_tracking_by_id( - self, tracking_id: Annotated[str, Field(min_length=1)], **kwargs - ) -> RetrackTrackingByIdResponse: + def get_tracking_by_id( + self, id: Annotated[str, Field(min_length=1)], **kwargs + ) -> GetTrackingByIdResponse: """ - Retrack an expired tracking. Max 3 times per tracking. - :param tracking_id: str. tracking id. + Get tracking results of a single tracking. + :param id: str. tracking ID :param kwargs: request options: **headers** (dict): support custom headers. @@ -204,22 +123,31 @@ def retrack_tracking_by_id( verify the identity of requested hosts. Either `True` (default CA bundle), a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). + query params: + **fields**: str. List of fields to include in the response. Use comma for multiple values. Fields to include: `destination_postal_code`, `tracking_ship_date`, `tracking_account_number`, `tracking_key`, `origin_country_region`, `destination_country_region`, `destination_state`, `title`, `order_id`, `tag`, `checkpoints` + **lang**: str. Translate checkpoint messages from the carrier’s provided language to the target language. Supported target languages include:</br>&nbsp;&nbsp;&nbsp;&nbsp;- English (en)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French (fr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- French Canadian (fr-CA)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Arabic (ar)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Bulgarian (bg)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Catalan (ca)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Croatian (hr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Czech (cs)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Danish (da)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Dutch (nl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Estonian (et)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Filipino (tl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Finnish (fi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- German (de)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Greek (el)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hebrew (he)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hindi (hi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Hungarian (hu)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Indonesian (id)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Italian (it)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Japanese (ja)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Korean (ko)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Latvian (lv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Lithuanian (lt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Malay (ms)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Polish (pl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Portuguese (pt)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Romanian (ro)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Russian (ru)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Serbian (sr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovak (sk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Slovenian (sl)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Spanish (es)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Swedish (sv)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Thai (th)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Turkish (tr)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Ukrainian (uk)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Vietnamese (vi)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Simplified Chinese (zh-Hans)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Traditional Chinese (zh-Hant)</br>&nbsp;&nbsp;&nbsp;&nbsp;- Norwegian (nb)</br> """ - url = f"/tracking/2025-07/trackings/{tracking_id}/retrack" + url = f"/tracking/2025-07/trackings/{id}" - result = self._request("POST", url=url, **kwargs) - return RetrackTrackingByIdResponse().from_dict(result) + params_keys = { + "fields", + "lang", + } + params = {key: kwargs.pop(key) for key in params_keys if key in kwargs} + + result = self._request("GET", url=url, params=params, **kwargs) + return GetTrackingByIdResponse.model_validate(result) @validate_params def update_tracking_by_id( self, - tracking_id: Annotated[str, Field(min_length=1)], + id: Annotated[str, Field(min_length=1)], update_tracking_by_id_request: Union[UpdateTrackingByIdRequest, dict], **kwargs, ) -> UpdateTrackingByIdResponse: """ Update a tracking. - :param tracking_id: str. tracking ID. + :param id: str. tracking ID :param update_tracking_by_id_request: :param kwargs: request options: @@ -229,12 +157,81 @@ def update_tracking_by_id( a path to an SSL certificate file, an `ssl.SSLContext`, or `False` (which will disable verification). """ - url = f"/tracking/2025-07/trackings/{tracking_id}" + url = f"/tracking/2025-07/trackings/{id}" body = update_tracking_by_id_request if not isinstance(body, dict): - body = update_tracking_by_id_request.model_dump(exclude_none=True) + body = update_tracking_by_id_request.model_dump(exclude_none=True, mode="json") body = json.dumps(body) result = self._request("PUT", url=url, body=body, **kwargs) - return UpdateTrackingByIdResponse().from_dict(result) + return UpdateTrackingByIdResponse.model_validate(result) + + @validate_params + def delete_tracking_by_id( + self, id: Annotated[str, Field(min_length=1)], **kwargs + ) -> DeleteTrackingByIdResponse: + """ + Delete a tracking. + :param id: str. tracking ID + :param kwargs: + request options: + **headers** (dict): support custom headers. + **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to + verify the identity of requested hosts. Either `True` (default CA bundle), + a path to an SSL certificate file, an `ssl.SSLContext`, or `False` + (which will disable verification). + """ + url = f"/tracking/2025-07/trackings/{id}" + + result = self._request("DELETE", url=url, **kwargs) + return DeleteTrackingByIdResponse.model_validate(result) + + @validate_params + def retrack_tracking_by_id( + self, id: Annotated[str, Field(min_length=1)], **kwargs + ) -> RetrackTrackingByIdResponse: + """ + Retrack an expired tracking. Max 3 times per tracking. + :param id: str. tracking id + :param kwargs: + request options: + **headers** (dict): support custom headers. + **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to + verify the identity of requested hosts. Either `True` (default CA bundle), + a path to an SSL certificate file, an `ssl.SSLContext`, or `False` + (which will disable verification). + """ + url = f"/tracking/2025-07/trackings/{id}/retrack" + + result = self._request("POST", url=url, **kwargs) + return RetrackTrackingByIdResponse.model_validate(result) + + @validate_params + def mark_tracking_completed_by_id( + self, + id: Annotated[str, Field(min_length=1)], + mark_tracking_completed_by_id_request: Union[MarkTrackingCompletedByIdRequest, dict], + **kwargs, + ) -> MarkTrackingCompletedByIdResponse: + """ + Mark a tracking as completed. The tracking won't auto update until retrack it. + :param id: str. tracking id + :param mark_tracking_completed_by_id_request: + :param kwargs: + request options: + **headers** (dict): support custom headers. + **verify** bool|str|SSLContext: SSL certificates (a.k.a CA bundle) used to + verify the identity of requested hosts. Either `True` (default CA bundle), + a path to an SSL certificate file, an `ssl.SSLContext`, or `False` + (which will disable verification). + """ + url = f"/tracking/2025-07/trackings/{id}/mark-as-completed" + + body = mark_tracking_completed_by_id_request + if not isinstance(body, dict): + body = mark_tracking_completed_by_id_request.model_dump(exclude_none=True, mode="json") + body = json.dumps(body) + + result = self._request("POST", url=url, body=body, **kwargs) + return MarkTrackingCompletedByIdResponse.model_validate(result) diff --git a/tracking/client.py b/tracking/client.py index 3060e05..a97a134 100644 --- a/tracking/client.py +++ b/tracking/client.py @@ -8,7 +8,10 @@ from typing import Optional from .configuration import Configuration -from .api import CourierApi, CourierConnectionApi, EstimatedDeliveryDateApi, TrackingApi +from .api import TrackingApi +from .api import CourierApi +from .api import CourierConnectionApi +from .api import EstimatedDeliveryDateApi class Client: @@ -16,7 +19,7 @@ def __init__(self, configuration: Optional[Configuration] = None) -> None: if configuration is None: configuration = Configuration() + self.tracking = TrackingApi(configuration) self.courier = CourierApi(configuration) self.courier_connection = CourierConnectionApi(configuration) self.estimated_delivery_date = EstimatedDeliveryDateApi(configuration) - self.tracking = TrackingApi(configuration) diff --git a/tracking/exceptions.py b/tracking/exceptions.py index a74771a..953c364 100644 --- a/tracking/exceptions.py +++ b/tracking/exceptions.py @@ -97,8 +97,7 @@ class ErrorCodeEnum(Enum): BAD_REQUEST = "BAD_REQUEST" RATE_LIMIT_EXCEED = "RATE_LIMIT_EXCEED" TIMED_OUT = "TIMED_OUT" - UNKNOW_ERROR = "UNKNOW_ERROR" - + UNKNOWN_ERROR = "UNKNOWN_ERROR" INVALID_REQUEST = "INVALID_REQUEST" INVALID_JSON = "INVALID_JSON" TRACKING_ALREADY_EXIST = "TRACKING_ALREADY_EXIST" @@ -112,7 +111,7 @@ class ErrorCodeEnum(Enum): MISSING_OR_INVALID_REQUIRED_FIELD = "MISSING_OR_INVALID_REQUIRED_FIELD" BAD_COURIER = "BAD_COURIER" INACTIVE_RETRACK_NOT_ALLOWED = "INACTIVE_RETRACK_NOT_ALLOWED" - NOTIFICATION_REUQIRED = "NOTIFICATION_REUQIRED" + NOTIFICATION_REQUIRED = "NOTIFICATION_REQUIRED" ID_INVALID = "ID_INVALID" RETRACK_ONCE_ALLOWED = "RETRACK_ONCE_ALLOWED" TRACKING_NUMBER_FORMAT_INVALID = "TRACKING_NUMBER_FORMAT_INVALID" diff --git a/tracking/models/__init__.py b/tracking/models/__init__.py index ae02483..a8e63df 100644 --- a/tracking/models/__init__.py +++ b/tracking/models/__init__.py @@ -4,399 +4,209 @@ # Do not edit the class manually. __all__ = [ - "AdditionalFields", - "AftershipEstimatedDeliveryDateCreateTrackingResponse", - "AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse", - "AftershipEstimatedDeliveryDateGetTrackingByIdResponse", - "AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse", - "AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse", - "AftershipEstimatedDeliveryDateTracking", - "AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse", - "CarbonEmissionsCreateTrackingResponse", - "CarbonEmissionsDeleteTrackingByIdResponse", - "CarbonEmissionsGetTrackingByIdResponse", - "CarbonEmissionsMarkTrackingCompletedByIdResponse", - "CarbonEmissionsRetrackTrackingByIdResponse", - "CarbonEmissionsTracking", - "CarbonEmissionsUpdateTrackingByIdResponse", + "TrackingResponseForGetTrackingsDataPagination", + "TrackingResponseForGetTrackingsData", + "TrackingResponseForGetTrackings", + "MetaType", + "Meta", + "TrackingCourierEstimatedDeliveryDate", + "TrackingShipmentWeight", + "TrackingAftershipEstimatedDeliveryDate", + "TrackingCustomEstimatedDeliveryDateType", + "TrackingCustomEstimatedDeliveryDate", + "TrackingFirstEstimatedDeliveryType", + "TrackingFirstEstimatedDeliverySource", + "TrackingFirstEstimatedDelivery", + "TrackingLatestEstimatedDeliveryType", + "TrackingLatestEstimatedDeliverySource", + "TrackingLatestEstimatedDelivery", + "TrackingCarbonEmissions", + "TrackingSignatureRequirement", + "TrackingFirstMile", + "TrackingLastMileSource", + "TrackingLastMile", + "TrackingCustomers", + "Tracking", + "Tag", + "CheckpointCoordinate", + "CheckpointEventsReason", + "CheckpointEvents", + "CheckpointSource", "Checkpoint", - "CoordinateCheckpoint", + "TrackingResponse", + "CourierResponseData", + "CourierResponse", + "CourierCredentials", "Courier", - "CourierConnection", + "AdditionalFields", + "CredentialField", + "SlugGroup", + "CourierConnectionResponseForGetCourierConnectionsDataPagination", + "CourierConnectionResponseForGetCourierConnectionsData", "CourierConnectionResponseForGetCourierConnections", - "CourierEstimatedDeliveryDateCreateTrackingResponse", - "CourierEstimatedDeliveryDateDeleteTrackingByIdResponse", - "CourierEstimatedDeliveryDateGetTrackingByIdResponse", - "CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse", - "CourierEstimatedDeliveryDateRetrackTrackingByIdResponse", - "CourierEstimatedDeliveryDateTracking", - "CourierEstimatedDeliveryDateUpdateTrackingByIdResponse", - "CourierResponse", + "CourierConnection", + "EstimatedDeliveryDateRequestOriginAddress", + "EstimatedDeliveryDateRequestDestinationAddress", + "EstimatedDeliveryDateRequestWeight", + "EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime", + "EstimatedDeliveryDateRequestEstimatedPickup", + "EstimatedDeliveryDateRequest", + "EstimatedDeliveryDateResponseOriginAddress", + "EstimatedDeliveryDateResponseDestinationAddress", + "EstimatedDeliveryDateResponseWeight", + "EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime", + "EstimatedDeliveryDateResponseEstimatedPickup", + "EstimatedDeliveryDateResponse", + "GetTrackingsResponseData", + "GetTrackingsResponseDataPagination", + "GetTrackingsResponse", + "CreateTrackingRequestDeliveryType", + "CreateTrackingRequestLastMile", + "CreateTrackingRequestCustomers", "CreateTrackingRequest", "CreateTrackingResponse", - "CredentialField", - "CredentialsCourier", - "CustomEstimatedDeliveryDateCreateTrackingResponse", - "CustomEstimatedDeliveryDateDeleteTrackingByIdResponse", - "CustomEstimatedDeliveryDateGetTrackingByIdResponse", - "CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse", - "CustomEstimatedDeliveryDateRetrackTrackingByIdResponse", - "CustomEstimatedDeliveryDateTracking", - "CustomEstimatedDeliveryDateUpdateTrackingByIdResponse", - "CustomersCreateTrackingRequest", - "CustomersCreateTrackingResponse", - "CustomersDeleteTrackingByIdResponse", - "CustomersGetTrackingByIdResponse", - "CustomersMarkTrackingCompletedByIdResponse", - "CustomersRetrackTrackingByIdResponse", - "CustomersTracking", - "CustomersUpdateTrackingByIdRequest", - "CustomersUpdateTrackingByIdResponse", - "DataCourierConnectionResponseForGetCourierConnections", - "DataCourierResponse", - "DataTrackingResponseForGetTrackings", - "DeleteCourierConnectionsByIdResponse", + "GetTrackingByIdResponse", + "UpdateTrackingByIdRequestDeliveryType", + "UpdateTrackingByIdRequestCustomers", + "UpdateTrackingByIdRequest", + "UpdateTrackingByIdResponse", "DeleteTrackingByIdResponse", - "DestinationAddressEstimatedDeliveryDateRequest", - "DestinationAddressEstimatedDeliveryDateResponse", - "DestinationAddressPredictRequest", - "DestinationAddressPredictResponse", + "RetrackTrackingByIdResponse", + "MarkTrackingCompletedByIdRequestReason", + "MarkTrackingCompletedByIdRequest", + "MarkTrackingCompletedByIdResponse", + "GetCouriersResponseData", + "GetCouriersResponse", "DetectCourierRequest", + "DetectCourierResponseData", "DetectCourierResponse", - "EstimatedDeliveryDateRequest", - "EstimatedDeliveryDateResponse", - "EstimatedPickupEstimatedDeliveryDateRequest", - "EstimatedPickupEstimatedDeliveryDateResponse", - "EstimatedPickupPredictRequest", - "EstimatedPickupPredictResponse", - "EventsCheckpoint", - "FirstEstimatedDeliveryCreateTrackingResponse", - "FirstEstimatedDeliveryDeleteTrackingByIdResponse", - "FirstEstimatedDeliveryGetTrackingByIdResponse", - "FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse", - "FirstEstimatedDeliveryRetrackTrackingByIdResponse", - "FirstEstimatedDeliveryTracking", - "FirstEstimatedDeliveryUpdateTrackingByIdResponse", - "FirstMileCreateTrackingResponse", - "FirstMileDeleteTrackingByIdResponse", - "FirstMileGetTrackingByIdResponse", - "FirstMileMarkTrackingCompletedByIdResponse", - "FirstMileRetrackTrackingByIdResponse", - "FirstMileTracking", - "FirstMileUpdateTrackingByIdResponse", - "GetCourierConnectionsByIdResponse", + "GetCourierConnectionsResponseData", + "GetCourierConnectionsResponseDataPagination", "GetCourierConnectionsResponse", - "GetCouriersResponse", - "GetTrackingByIdResponse", - "GetTrackingsResponse", - "LastMileCreateTrackingRequest", - "LastMileCreateTrackingResponse", - "LastMileDeleteTrackingByIdResponse", - "LastMileGetTrackingByIdResponse", - "LastMileMarkTrackingCompletedByIdResponse", - "LastMileRetrackTrackingByIdResponse", - "LastMileTracking", - "LastMileUpdateTrackingByIdResponse", - "LatestEstimatedDeliveryCreateTrackingResponse", - "LatestEstimatedDeliveryDeleteTrackingByIdResponse", - "LatestEstimatedDeliveryGetTrackingByIdResponse", - "LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse", - "LatestEstimatedDeliveryRetrackTrackingByIdResponse", - "LatestEstimatedDeliveryTracking", - "LatestEstimatedDeliveryUpdateTrackingByIdResponse", - "MarkTrackingCompletedByIdRequest", - "MarkTrackingCompletedByIdResponse", - "Meta", - "OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest", - "OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse", - "OrderProcessingTimeEstimatedPickupPredictRequest", - "OrderProcessingTimeEstimatedPickupPredictResponse", - "OriginAddressEstimatedDeliveryDateRequest", - "OriginAddressEstimatedDeliveryDateResponse", - "OriginAddressPredictRequest", - "OriginAddressPredictResponse", - "Pagination", - "PaginationDataCourierConnectionResponseForGetCourierConnections", - "PaginationDataTrackingResponseForGetTrackings", - "PaginationGetCourierConnectionsResponse", - "PaginationGetTrackingsResponse", "PostCourierConnectionsRequest", "PostCourierConnectionsResponse", - "PredictBatchRequest", - "PredictBatchResponse", - "PredictRequest", - "PredictResponse", + "GetCourierConnectionsByIdResponse", "PutCourierConnectionsByIdRequest", "PutCourierConnectionsByIdResponse", - "ReasonEventsCheckpoint", - "RetrackTrackingByIdResponse", - "ShipmentWeightCreateTrackingResponse", - "ShipmentWeightDeleteTrackingByIdResponse", - "ShipmentWeightGetTrackingByIdResponse", - "ShipmentWeightMarkTrackingCompletedByIdResponse", - "ShipmentWeightRetrackTrackingByIdResponse", - "ShipmentWeightTracking", - "ShipmentWeightUpdateTrackingByIdResponse", - "SlugGroup", - "Tag", - "Tracking", - "TrackingResponse", - "TrackingResponseForGetTrackings", - "UpdateTrackingByIdRequest", - "UpdateTrackingByIdResponse", - "WeightEstimatedDeliveryDateRequest", - "WeightEstimatedDeliveryDateResponse", - "WeightPredictRequest", - "WeightPredictResponse", + "DeleteCourierConnectionsByIdResponse", + "PredictResponse", + "PredictBatchRequest", + "PredictBatchResponseData", + "PredictBatchResponse", ] -from .additional_fields import AdditionalFields -from .aftership_estimated_delivery_date_create_tracking_response import ( - AftershipEstimatedDeliveryDateCreateTrackingResponse, -) -from .aftership_estimated_delivery_date_delete_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from .aftership_estimated_delivery_date_get_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateGetTrackingByIdResponse, -) -from .aftership_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, -) -from .aftership_estimated_delivery_date_retrack_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse, -) -from .aftership_estimated_delivery_date_tracking import AftershipEstimatedDeliveryDateTracking -from .aftership_estimated_delivery_date_update_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse, -) -from .carbon_emissions_create_tracking_response import CarbonEmissionsCreateTrackingResponse -from .carbon_emissions_delete_tracking_by_id_response import ( - CarbonEmissionsDeleteTrackingByIdResponse, -) -from .carbon_emissions_get_tracking_by_id_response import CarbonEmissionsGetTrackingByIdResponse -from .carbon_emissions_mark_tracking_completed_by_id_response import ( - CarbonEmissionsMarkTrackingCompletedByIdResponse, -) -from .carbon_emissions_retrack_tracking_by_id_response import ( - CarbonEmissionsRetrackTrackingByIdResponse, -) -from .carbon_emissions_tracking import CarbonEmissionsTracking -from .carbon_emissions_update_tracking_by_id_response import ( - CarbonEmissionsUpdateTrackingByIdResponse, +from .tracking_response_for_get_trackings_data_pagination import ( + TrackingResponseForGetTrackingsDataPagination, ) +from .tracking_response_for_get_trackings_data import TrackingResponseForGetTrackingsData +from .tracking_response_for_get_trackings import TrackingResponseForGetTrackings +from .meta_type import MetaType +from .meta import Meta +from .tracking_courier_estimated_delivery_date import TrackingCourierEstimatedDeliveryDate +from .tracking_shipment_weight import TrackingShipmentWeight +from .tracking_aftership_estimated_delivery_date import TrackingAftershipEstimatedDeliveryDate +from .tracking_custom_estimated_delivery_date_type import TrackingCustomEstimatedDeliveryDateType +from .tracking_custom_estimated_delivery_date import TrackingCustomEstimatedDeliveryDate +from .tracking_first_estimated_delivery_type import TrackingFirstEstimatedDeliveryType +from .tracking_first_estimated_delivery_source import TrackingFirstEstimatedDeliverySource +from .tracking_first_estimated_delivery import TrackingFirstEstimatedDelivery +from .tracking_latest_estimated_delivery_type import TrackingLatestEstimatedDeliveryType +from .tracking_latest_estimated_delivery_source import TrackingLatestEstimatedDeliverySource +from .tracking_latest_estimated_delivery import TrackingLatestEstimatedDelivery +from .tracking_carbon_emissions import TrackingCarbonEmissions +from .tracking_signature_requirement import TrackingSignatureRequirement +from .tracking_first_mile import TrackingFirstMile +from .tracking_last_mile_source import TrackingLastMileSource +from .tracking_last_mile import TrackingLastMile +from .tracking_customers import TrackingCustomers +from .tracking import Tracking +from .tag import Tag +from .checkpoint_coordinate import CheckpointCoordinate +from .checkpoint_events_reason import CheckpointEventsReason +from .checkpoint_events import CheckpointEvents +from .checkpoint_source import CheckpointSource from .checkpoint import Checkpoint -from .coordinate_checkpoint import CoordinateCheckpoint -from .courier import Courier -from .courier_connection import CourierConnection -from .courier_connection_response_for_get_courier_connections import ( - CourierConnectionResponseForGetCourierConnections, -) -from .courier_estimated_delivery_date_create_tracking_response import ( - CourierEstimatedDeliveryDateCreateTrackingResponse, -) -from .courier_estimated_delivery_date_delete_tracking_by_id_response import ( - CourierEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from .courier_estimated_delivery_date_get_tracking_by_id_response import ( - CourierEstimatedDeliveryDateGetTrackingByIdResponse, -) -from .courier_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, -) -from .courier_estimated_delivery_date_retrack_tracking_by_id_response import ( - CourierEstimatedDeliveryDateRetrackTrackingByIdResponse, -) -from .courier_estimated_delivery_date_tracking import CourierEstimatedDeliveryDateTracking -from .courier_estimated_delivery_date_update_tracking_by_id_response import ( - CourierEstimatedDeliveryDateUpdateTrackingByIdResponse, -) +from .tracking_response import TrackingResponse +from .courier_response_data import CourierResponseData from .courier_response import CourierResponse -from .create_tracking_request import CreateTrackingRequest -from .create_tracking_response import CreateTrackingResponse +from .courier_credentials import CourierCredentials +from .courier import Courier +from .additional_fields import AdditionalFields from .credential_field import CredentialField -from .credentials_courier import CredentialsCourier -from .custom_estimated_delivery_date_create_tracking_response import ( - CustomEstimatedDeliveryDateCreateTrackingResponse, -) -from .custom_estimated_delivery_date_delete_tracking_by_id_response import ( - CustomEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from .custom_estimated_delivery_date_get_tracking_by_id_response import ( - CustomEstimatedDeliveryDateGetTrackingByIdResponse, -) -from .custom_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, +from .slug_group import SlugGroup +from .courier_connection_response_for_get_courier_connections_data_pagination import ( + CourierConnectionResponseForGetCourierConnectionsDataPagination, ) -from .custom_estimated_delivery_date_retrack_tracking_by_id_response import ( - CustomEstimatedDeliveryDateRetrackTrackingByIdResponse, +from .courier_connection_response_for_get_courier_connections_data import ( + CourierConnectionResponseForGetCourierConnectionsData, ) -from .custom_estimated_delivery_date_tracking import CustomEstimatedDeliveryDateTracking -from .custom_estimated_delivery_date_update_tracking_by_id_response import ( - CustomEstimatedDeliveryDateUpdateTrackingByIdResponse, +from .courier_connection_response_for_get_courier_connections import ( + CourierConnectionResponseForGetCourierConnections, ) -from .customers_create_tracking_request import CustomersCreateTrackingRequest -from .customers_create_tracking_response import CustomersCreateTrackingResponse -from .customers_delete_tracking_by_id_response import CustomersDeleteTrackingByIdResponse -from .customers_get_tracking_by_id_response import CustomersGetTrackingByIdResponse -from .customers_mark_tracking_completed_by_id_response import ( - CustomersMarkTrackingCompletedByIdResponse, +from .courier_connection import CourierConnection +from .estimated_delivery_date_request_origin_address import ( + EstimatedDeliveryDateRequestOriginAddress, ) -from .customers_retrack_tracking_by_id_response import CustomersRetrackTrackingByIdResponse -from .customers_tracking import CustomersTracking -from .customers_update_tracking_by_id_request import CustomersUpdateTrackingByIdRequest -from .customers_update_tracking_by_id_response import CustomersUpdateTrackingByIdResponse -from .data_courier_connection_response_for_get_courier_connections import ( - DataCourierConnectionResponseForGetCourierConnections, +from .estimated_delivery_date_request_destination_address import ( + EstimatedDeliveryDateRequestDestinationAddress, ) -from .data_courier_response import DataCourierResponse -from .data_tracking_response_for_get_trackings import DataTrackingResponseForGetTrackings -from .delete_courier_connections_by_id_response import DeleteCourierConnectionsByIdResponse -from .delete_tracking_by_id_response import DeleteTrackingByIdResponse -from .destination_address_estimated_delivery_date_request import ( - DestinationAddressEstimatedDeliveryDateRequest, +from .estimated_delivery_date_request_weight import EstimatedDeliveryDateRequestWeight +from .estimated_delivery_date_request_estimated_pickup_order_processing_time import ( + EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime, ) -from .destination_address_estimated_delivery_date_response import ( - DestinationAddressEstimatedDeliveryDateResponse, +from .estimated_delivery_date_request_estimated_pickup import ( + EstimatedDeliveryDateRequestEstimatedPickup, ) -from .destination_address_predict_request import DestinationAddressPredictRequest -from .destination_address_predict_response import DestinationAddressPredictResponse -from .detect_courier_request import DetectCourierRequest -from .detect_courier_response import DetectCourierResponse from .estimated_delivery_date_request import EstimatedDeliveryDateRequest -from .estimated_delivery_date_response import EstimatedDeliveryDateResponse -from .estimated_pickup_estimated_delivery_date_request import ( - EstimatedPickupEstimatedDeliveryDateRequest, +from .estimated_delivery_date_response_origin_address import ( + EstimatedDeliveryDateResponseOriginAddress, ) -from .estimated_pickup_estimated_delivery_date_response import ( - EstimatedPickupEstimatedDeliveryDateResponse, +from .estimated_delivery_date_response_destination_address import ( + EstimatedDeliveryDateResponseDestinationAddress, ) -from .estimated_pickup_predict_request import EstimatedPickupPredictRequest -from .estimated_pickup_predict_response import EstimatedPickupPredictResponse -from .events_checkpoint import EventsCheckpoint -from .first_estimated_delivery_create_tracking_response import ( - FirstEstimatedDeliveryCreateTrackingResponse, +from .estimated_delivery_date_response_weight import EstimatedDeliveryDateResponseWeight +from .estimated_delivery_date_response_estimated_pickup_order_processing_time import ( + EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime, ) -from .first_estimated_delivery_delete_tracking_by_id_response import ( - FirstEstimatedDeliveryDeleteTrackingByIdResponse, +from .estimated_delivery_date_response_estimated_pickup import ( + EstimatedDeliveryDateResponseEstimatedPickup, ) -from .first_estimated_delivery_get_tracking_by_id_response import ( - FirstEstimatedDeliveryGetTrackingByIdResponse, -) -from .first_estimated_delivery_mark_tracking_completed_by_id_response import ( - FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse, -) -from .first_estimated_delivery_retrack_tracking_by_id_response import ( - FirstEstimatedDeliveryRetrackTrackingByIdResponse, -) -from .first_estimated_delivery_tracking import FirstEstimatedDeliveryTracking -from .first_estimated_delivery_update_tracking_by_id_response import ( - FirstEstimatedDeliveryUpdateTrackingByIdResponse, -) -from .first_mile_create_tracking_response import FirstMileCreateTrackingResponse -from .first_mile_delete_tracking_by_id_response import FirstMileDeleteTrackingByIdResponse -from .first_mile_get_tracking_by_id_response import FirstMileGetTrackingByIdResponse -from .first_mile_mark_tracking_completed_by_id_response import ( - FirstMileMarkTrackingCompletedByIdResponse, -) -from .first_mile_retrack_tracking_by_id_response import FirstMileRetrackTrackingByIdResponse -from .first_mile_tracking import FirstMileTracking -from .first_mile_update_tracking_by_id_response import FirstMileUpdateTrackingByIdResponse -from .get_courier_connections_by_id_response import GetCourierConnectionsByIdResponse -from .get_courier_connections_response import GetCourierConnectionsResponse -from .get_couriers_response import GetCouriersResponse -from .get_tracking_by_id_response import GetTrackingByIdResponse +from .estimated_delivery_date_response import EstimatedDeliveryDateResponse +from .get_trackings_response_data import GetTrackingsResponseData +from .get_trackings_response_data_pagination import GetTrackingsResponseDataPagination from .get_trackings_response import GetTrackingsResponse -from .last_mile_create_tracking_request import LastMileCreateTrackingRequest -from .last_mile_create_tracking_response import LastMileCreateTrackingResponse -from .last_mile_delete_tracking_by_id_response import LastMileDeleteTrackingByIdResponse -from .last_mile_get_tracking_by_id_response import LastMileGetTrackingByIdResponse -from .last_mile_mark_tracking_completed_by_id_response import ( - LastMileMarkTrackingCompletedByIdResponse, -) -from .last_mile_retrack_tracking_by_id_response import LastMileRetrackTrackingByIdResponse -from .last_mile_tracking import LastMileTracking -from .last_mile_update_tracking_by_id_response import LastMileUpdateTrackingByIdResponse -from .latest_estimated_delivery_create_tracking_response import ( - LatestEstimatedDeliveryCreateTrackingResponse, -) -from .latest_estimated_delivery_delete_tracking_by_id_response import ( - LatestEstimatedDeliveryDeleteTrackingByIdResponse, -) -from .latest_estimated_delivery_get_tracking_by_id_response import ( - LatestEstimatedDeliveryGetTrackingByIdResponse, -) -from .latest_estimated_delivery_mark_tracking_completed_by_id_response import ( - LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse, -) -from .latest_estimated_delivery_retrack_tracking_by_id_response import ( - LatestEstimatedDeliveryRetrackTrackingByIdResponse, -) -from .latest_estimated_delivery_tracking import LatestEstimatedDeliveryTracking -from .latest_estimated_delivery_update_tracking_by_id_response import ( - LatestEstimatedDeliveryUpdateTrackingByIdResponse, -) +from .create_tracking_request_delivery_type import CreateTrackingRequestDeliveryType +from .create_tracking_request_last_mile import CreateTrackingRequestLastMile +from .create_tracking_request_customers import CreateTrackingRequestCustomers +from .create_tracking_request import CreateTrackingRequest +from .create_tracking_response import CreateTrackingResponse +from .get_tracking_by_id_response import GetTrackingByIdResponse +from .update_tracking_by_id_request_delivery_type import UpdateTrackingByIdRequestDeliveryType +from .update_tracking_by_id_request_customers import UpdateTrackingByIdRequestCustomers +from .update_tracking_by_id_request import UpdateTrackingByIdRequest +from .update_tracking_by_id_response import UpdateTrackingByIdResponse +from .delete_tracking_by_id_response import DeleteTrackingByIdResponse +from .retrack_tracking_by_id_response import RetrackTrackingByIdResponse +from .mark_tracking_completed_by_id_request_reason import MarkTrackingCompletedByIdRequestReason from .mark_tracking_completed_by_id_request import MarkTrackingCompletedByIdRequest from .mark_tracking_completed_by_id_response import MarkTrackingCompletedByIdResponse -from .meta import Meta -from .order_processing_time_estimated_pickup_estimated_delivery_date_request import ( - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest, -) -from .order_processing_time_estimated_pickup_estimated_delivery_date_response import ( - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse, -) -from .order_processing_time_estimated_pickup_predict_request import ( - OrderProcessingTimeEstimatedPickupPredictRequest, -) -from .order_processing_time_estimated_pickup_predict_response import ( - OrderProcessingTimeEstimatedPickupPredictResponse, -) -from .origin_address_estimated_delivery_date_request import ( - OriginAddressEstimatedDeliveryDateRequest, -) -from .origin_address_estimated_delivery_date_response import ( - OriginAddressEstimatedDeliveryDateResponse, -) -from .origin_address_predict_request import OriginAddressPredictRequest -from .origin_address_predict_response import OriginAddressPredictResponse -from .pagination import Pagination -from .pagination_data_courier_connection_response_for_get_courier_connections import ( - PaginationDataCourierConnectionResponseForGetCourierConnections, -) -from .pagination_data_tracking_response_for_get_trackings import ( - PaginationDataTrackingResponseForGetTrackings, +from .get_couriers_response_data import GetCouriersResponseData +from .get_couriers_response import GetCouriersResponse +from .detect_courier_request import DetectCourierRequest +from .detect_courier_response_data import DetectCourierResponseData +from .detect_courier_response import DetectCourierResponse +from .get_courier_connections_response_data import GetCourierConnectionsResponseData +from .get_courier_connections_response_data_pagination import ( + GetCourierConnectionsResponseDataPagination, ) -from .pagination_get_courier_connections_response import PaginationGetCourierConnectionsResponse -from .pagination_get_trackings_response import PaginationGetTrackingsResponse +from .get_courier_connections_response import GetCourierConnectionsResponse from .post_courier_connections_request import PostCourierConnectionsRequest from .post_courier_connections_response import PostCourierConnectionsResponse -from .predict_batch_request import PredictBatchRequest -from .predict_batch_response import PredictBatchResponse -from .predict_request import PredictRequest -from .predict_response import PredictResponse +from .get_courier_connections_by_id_response import GetCourierConnectionsByIdResponse from .put_courier_connections_by_id_request import PutCourierConnectionsByIdRequest from .put_courier_connections_by_id_response import PutCourierConnectionsByIdResponse -from .reason_events_checkpoint import ReasonEventsCheckpoint -from .retrack_tracking_by_id_response import RetrackTrackingByIdResponse -from .shipment_weight_create_tracking_response import ShipmentWeightCreateTrackingResponse -from .shipment_weight_delete_tracking_by_id_response import ShipmentWeightDeleteTrackingByIdResponse -from .shipment_weight_get_tracking_by_id_response import ShipmentWeightGetTrackingByIdResponse -from .shipment_weight_mark_tracking_completed_by_id_response import ( - ShipmentWeightMarkTrackingCompletedByIdResponse, -) -from .shipment_weight_retrack_tracking_by_id_response import ( - ShipmentWeightRetrackTrackingByIdResponse, -) -from .shipment_weight_tracking import ShipmentWeightTracking -from .shipment_weight_update_tracking_by_id_response import ShipmentWeightUpdateTrackingByIdResponse -from .slug_group import SlugGroup -from .tag import Tag -from .tracking import Tracking -from .tracking_response import TrackingResponse -from .tracking_response_for_get_trackings import TrackingResponseForGetTrackings -from .update_tracking_by_id_request import UpdateTrackingByIdRequest -from .update_tracking_by_id_response import UpdateTrackingByIdResponse -from .weight_estimated_delivery_date_request import WeightEstimatedDeliveryDateRequest -from .weight_estimated_delivery_date_response import WeightEstimatedDeliveryDateResponse -from .weight_predict_request import WeightPredictRequest -from .weight_predict_response import WeightPredictResponse +from .delete_courier_connections_by_id_response import DeleteCourierConnectionsByIdResponse +from .predict_response import PredictResponse +from .predict_batch_request import PredictBatchRequest +from .predict_batch_response_data import PredictBatchResponseData +from .predict_batch_response import PredictBatchResponse diff --git a/tracking/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.py b/tracking/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.py deleted file mode 100644 index 9ed259d..0000000 --- a/tracking/models/aftership_estimated_delivery_date_delete_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse(BaseModel): - """ - AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/aftership_estimated_delivery_date_get_tracking_by_id_response.py b/tracking/models/aftership_estimated_delivery_date_get_tracking_by_id_response.py deleted file mode 100644 index 831eb04..0000000 --- a/tracking/models/aftership_estimated_delivery_date_get_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateGetTrackingByIdResponse(BaseModel): - """ - AftershipEstimatedDeliveryDateGetTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.py b/tracking/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.py deleted file mode 100644 index 2c0cd31..0000000 --- a/tracking/models/aftership_estimated_delivery_date_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse(BaseModel): - """ - AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.py b/tracking/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.py deleted file mode 100644 index 0420e8e..0000000 --- a/tracking/models/aftership_estimated_delivery_date_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse(BaseModel): - """ - AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/aftership_estimated_delivery_date_tracking.py b/tracking/models/aftership_estimated_delivery_date_tracking.py deleted file mode 100644 index 6e451e1..0000000 --- a/tracking/models/aftership_estimated_delivery_date_tracking.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateTracking(BaseModel): - """ - AftershipEstimatedDeliveryDateTracking - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/aftership_estimated_delivery_date_update_tracking_by_id_response.py b/tracking/models/aftership_estimated_delivery_date_update_tracking_by_id_response.py deleted file mode 100644 index e2958d5..0000000 --- a/tracking/models/aftership_estimated_delivery_date_update_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse(BaseModel): - """ - AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/carbon_emissions_retrack_tracking_by_id_response.py b/tracking/models/carbon_emissions_retrack_tracking_by_id_response.py deleted file mode 100644 index 7a5f8ae..0000000 --- a/tracking/models/carbon_emissions_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CarbonEmissionsRetrackTrackingByIdResponse(BaseModel): - """ - CarbonEmissionsRetrackTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/carbon_emissions_tracking.py b/tracking/models/carbon_emissions_tracking.py deleted file mode 100644 index fb98048..0000000 --- a/tracking/models/carbon_emissions_tracking.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CarbonEmissionsTracking(BaseModel): - """ - CarbonEmissionsTracking - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/carbon_emissions_update_tracking_by_id_response.py b/tracking/models/carbon_emissions_update_tracking_by_id_response.py deleted file mode 100644 index 6709557..0000000 --- a/tracking/models/carbon_emissions_update_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CarbonEmissionsUpdateTrackingByIdResponse(BaseModel): - """ - CarbonEmissionsUpdateTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/checkpoint.py b/tracking/models/checkpoint.py index f362328..242df8b 100644 --- a/tracking/models/checkpoint.py +++ b/tracking/models/checkpoint.py @@ -10,9 +10,10 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.coordinate_checkpoint import CoordinateCheckpoint +from tracking.models.checkpoint_coordinate import CheckpointCoordinate from tracking.models.tag import Tag -from tracking.models.events_checkpoint import EventsCheckpoint +from tracking.models.checkpoint_events import CheckpointEvents +from tracking.models.checkpoint_source import CheckpointSource class Checkpoint(BaseModel): @@ -27,7 +28,7 @@ class Checkpoint(BaseModel): city: Optional[str] = None state: Optional[str] = None zip: Optional[str] = None - coordinate: Optional[CoordinateCheckpoint] = None + coordinate: Optional[CheckpointCoordinate] = None country_region: Optional[str] = None country_region_name: Optional[str] = None message: Optional[str] = None @@ -35,8 +36,8 @@ class Checkpoint(BaseModel): subtag: Optional[str] = None subtag_message: Optional[str] = None raw_tag: Optional[str] = None - events: Optional[List[EventsCheckpoint]] = None - source: Optional[str] = None + events: Optional[List[CheckpointEvents]] = None + source: Optional[CheckpointSource] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/coordinate_checkpoint.py b/tracking/models/checkpoint_coordinate.py similarity index 85% rename from tracking/models/coordinate_checkpoint.py rename to tracking/models/checkpoint_coordinate.py index b3a8330..969ceb4 100644 --- a/tracking/models/coordinate_checkpoint.py +++ b/tracking/models/checkpoint_coordinate.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CoordinateCheckpoint(BaseModel): +class CheckpointCoordinate(BaseModel): """ - CoordinateCheckpoint + The latitude and longitude coordinates indicate the precise location of the shipments that are currently in transit. """ # noqa: E501 latitude: Optional[float] = None diff --git a/tracking/models/events_checkpoint.py b/tracking/models/checkpoint_events.py similarity index 83% rename from tracking/models/events_checkpoint.py rename to tracking/models/checkpoint_events.py index dab60e7..39aaba0 100644 --- a/tracking/models/events_checkpoint.py +++ b/tracking/models/checkpoint_events.py @@ -10,16 +10,16 @@ from typing import Any, Dict, Optional from typing_extensions import Self -from tracking.models.reason_events_checkpoint import ReasonEventsCheckpoint +from tracking.models.checkpoint_events_reason import CheckpointEventsReason -class EventsCheckpoint(BaseModel): +class CheckpointEvents(BaseModel): """ - EventsCheckpoint + CheckpointEvents """ # noqa: E501 code: Optional[str] = None - reason: Optional[ReasonEventsCheckpoint] = None + reason: Optional[CheckpointEventsReason] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/reason_events_checkpoint.py b/tracking/models/checkpoint_events_reason.py similarity index 90% rename from tracking/models/reason_events_checkpoint.py rename to tracking/models/checkpoint_events_reason.py index b5a799a..2718e9a 100644 --- a/tracking/models/reason_events_checkpoint.py +++ b/tracking/models/checkpoint_events_reason.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class ReasonEventsCheckpoint(BaseModel): +class CheckpointEventsReason(BaseModel): """ - ReasonEventsCheckpoint + Describes the specific reason that led to the event. """ # noqa: E501 code: Optional[str] = None diff --git a/tracking/models/checkpoint_source.py b/tracking/models/checkpoint_source.py new file mode 100644 index 0000000..74c6861 --- /dev/null +++ b/tracking/models/checkpoint_source.py @@ -0,0 +1,18 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class CheckpointSource(Enum): + """ + The source of the checkpoint, which can either be from the carrier or when the user marks the tracking as completed. + + allowed enum values + """ + + CARRIER = "carrier" + USER = "user" diff --git a/tracking/models/courier.py b/tracking/models/courier.py index 09c866b..c471119 100644 --- a/tracking/models/courier.py +++ b/tracking/models/courier.py @@ -10,7 +10,8 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.credentials_courier import CredentialsCourier +from tracking.models.additional_fields import AdditionalFields +from tracking.models.courier_credentials import CourierCredentials class Courier(BaseModel): @@ -23,12 +24,12 @@ class Courier(BaseModel): phone: Optional[str] = None other_name: Optional[str] = None web_url: Optional[str] = None - required_fields: Optional[List[str]] = None - optional_fields: Optional[List[str]] = None + required_fields: Optional[List[AdditionalFields]] = None + optional_fields: Optional[List[AdditionalFields]] = None default_language: Optional[str] = None support_languages: Optional[List[str]] = None service_from_country_regions: Optional[List[str]] = None - credentials: Optional[CredentialsCourier] = None + credentials: Optional[CourierCredentials] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/courier_connection.py b/tracking/models/courier_connection.py index bb38e50..a31cc98 100644 --- a/tracking/models/courier_connection.py +++ b/tracking/models/courier_connection.py @@ -18,7 +18,7 @@ class CourierConnection(BaseModel): id: Optional[str] = None courier_slug: Optional[str] = None - credentials: Optional[Any] = None + credentials: Optional[dict] = None created_at: Optional[str] = None updated_at: Optional[str] = None diff --git a/tracking/models/courier_connection_response_for_get_courier_connections.py b/tracking/models/courier_connection_response_for_get_courier_connections.py index 7acdf27..4ac3b14 100644 --- a/tracking/models/courier_connection_response_for_get_courier_connections.py +++ b/tracking/models/courier_connection_response_for_get_courier_connections.py @@ -11,8 +11,8 @@ from typing_extensions import Self from tracking.models.meta import Meta -from tracking.models.data_courier_connection_response_for_get_courier_connections import ( - DataCourierConnectionResponseForGetCourierConnections, +from tracking.models.courier_connection_response_for_get_courier_connections_data import ( + CourierConnectionResponseForGetCourierConnectionsData, ) @@ -22,7 +22,7 @@ class CourierConnectionResponseForGetCourierConnections(BaseModel): """ # noqa: E501 meta: Optional[Meta] = None - data: Optional[DataCourierConnectionResponseForGetCourierConnections] = None + data: Optional[CourierConnectionResponseForGetCourierConnectionsData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/data_courier_connection_response_for_get_courier_connections.py b/tracking/models/courier_connection_response_for_get_courier_connections_data.py similarity index 72% rename from tracking/models/data_courier_connection_response_for_get_courier_connections.py rename to tracking/models/courier_connection_response_for_get_courier_connections_data.py index d67a060..3da61c8 100644 --- a/tracking/models/data_courier_connection_response_for_get_courier_connections.py +++ b/tracking/models/courier_connection_response_for_get_courier_connections_data.py @@ -10,18 +10,18 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.pagination_data_courier_connection_response_for_get_courier_connections import ( - PaginationDataCourierConnectionResponseForGetCourierConnections, +from tracking.models.courier_connection_response_for_get_courier_connections_data_pagination import ( + CourierConnectionResponseForGetCourierConnectionsDataPagination, ) from tracking.models.courier_connection import CourierConnection -class DataCourierConnectionResponseForGetCourierConnections(BaseModel): +class CourierConnectionResponseForGetCourierConnectionsData(BaseModel): """ - DataCourierConnectionResponseForGetCourierConnections + CourierConnectionResponseForGetCourierConnectionsData """ # noqa: E501 - pagination: Optional[PaginationDataCourierConnectionResponseForGetCourierConnections] = None + pagination: Optional[CourierConnectionResponseForGetCourierConnectionsDataPagination] = None courier_connections: Optional[List[CourierConnection]] = None def to_str(self, **kwargs) -> str: diff --git a/tracking/models/pagination_data_courier_connection_response_for_get_courier_connections.py b/tracking/models/courier_connection_response_for_get_courier_connections_data_pagination.py similarity index 87% rename from tracking/models/pagination_data_courier_connection_response_for_get_courier_connections.py rename to tracking/models/courier_connection_response_for_get_courier_connections_data_pagination.py index 0fc65b4..ecfada4 100644 --- a/tracking/models/pagination_data_courier_connection_response_for_get_courier_connections.py +++ b/tracking/models/courier_connection_response_for_get_courier_connections_data_pagination.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class PaginationDataCourierConnectionResponseForGetCourierConnections(BaseModel): +class CourierConnectionResponseForGetCourierConnectionsDataPagination(BaseModel): """ - PaginationDataCourierConnectionResponseForGetCourierConnections + CourierConnectionResponseForGetCourierConnectionsDataPagination """ # noqa: E501 total: Optional[int] = None diff --git a/tracking/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.py b/tracking/models/courier_credentials.py similarity index 68% rename from tracking/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.py rename to tracking/models/courier_credentials.py index ac25651..bab684c 100644 --- a/tracking/models/custom_estimated_delivery_date_mark_tracking_completed_by_id_response.py +++ b/tracking/models/courier_credentials.py @@ -7,19 +7,18 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.credential_field import CredentialField -class CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse(BaseModel): + +class CourierCredentials(BaseModel): """ - CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse + Refers to the authentication details required for each specific carrier (such as API keys, username, password, etc.) that the user must provide to create a carrier connection. The content varies by carrier. """ # noqa: E501 - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None + fields: Optional[List[CredentialField]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/courier_estimated_delivery_date_create_tracking_response.py b/tracking/models/courier_estimated_delivery_date_create_tracking_response.py deleted file mode 100644 index 464e8cc..0000000 --- a/tracking/models/courier_estimated_delivery_date_create_tracking_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateCreateTrackingResponse(BaseModel): - """ - CourierEstimatedDeliveryDateCreateTrackingResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_delete_tracking_by_id_response.py b/tracking/models/courier_estimated_delivery_date_delete_tracking_by_id_response.py deleted file mode 100644 index 979c62e..0000000 --- a/tracking/models/courier_estimated_delivery_date_delete_tracking_by_id_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateDeleteTrackingByIdResponse(BaseModel): - """ - CourierEstimatedDeliveryDateDeleteTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.py b/tracking/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.py deleted file mode 100644 index a9da337..0000000 --- a/tracking/models/courier_estimated_delivery_date_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse(BaseModel): - """ - CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.py b/tracking/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.py deleted file mode 100644 index f248026..0000000 --- a/tracking/models/courier_estimated_delivery_date_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateRetrackTrackingByIdResponse(BaseModel): - """ - CourierEstimatedDeliveryDateRetrackTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_tracking.py b/tracking/models/courier_estimated_delivery_date_tracking.py deleted file mode 100644 index 0021ab3..0000000 --- a/tracking/models/courier_estimated_delivery_date_tracking.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateTracking(BaseModel): - """ - CourierEstimatedDeliveryDateTracking - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_update_tracking_by_id_response.py b/tracking/models/courier_estimated_delivery_date_update_tracking_by_id_response.py deleted file mode 100644 index e7bfa3b..0000000 --- a/tracking/models/courier_estimated_delivery_date_update_tracking_by_id_response.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CourierEstimatedDeliveryDateUpdateTrackingByIdResponse(BaseModel): - """ - CourierEstimatedDeliveryDateUpdateTrackingByIdResponse - """ # noqa: E501 - - estimated_delivery_date: Optional[str] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_response.py b/tracking/models/courier_response.py index 5f8611f..45febd8 100644 --- a/tracking/models/courier_response.py +++ b/tracking/models/courier_response.py @@ -11,7 +11,7 @@ from typing_extensions import Self from tracking.models.meta import Meta -from tracking.models.data_courier_response import DataCourierResponse +from tracking.models.courier_response_data import CourierResponseData class CourierResponse(BaseModel): @@ -20,7 +20,7 @@ class CourierResponse(BaseModel): """ # noqa: E501 meta: Optional[Meta] = None - data: Optional[DataCourierResponse] = None + data: Optional[CourierResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/data_courier_response.py b/tracking/models/courier_response_data.py similarity index 94% rename from tracking/models/data_courier_response.py rename to tracking/models/courier_response_data.py index 47e0643..6691595 100644 --- a/tracking/models/data_courier_response.py +++ b/tracking/models/courier_response_data.py @@ -13,9 +13,9 @@ from tracking.models.courier import Courier -class DataCourierResponse(BaseModel): +class CourierResponseData(BaseModel): """ - DataCourierResponse + CourierResponseData """ # noqa: E501 total: Optional[int] = None diff --git a/tracking/models/create_tracking_request.py b/tracking/models/create_tracking_request.py index 1af5f92..7031f0f 100644 --- a/tracking/models/create_tracking_request.py +++ b/tracking/models/create_tracking_request.py @@ -10,8 +10,9 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.last_mile_create_tracking_request import LastMileCreateTrackingRequest -from tracking.models.customers_create_tracking_request import CustomersCreateTrackingRequest +from tracking.models.create_tracking_request_delivery_type import CreateTrackingRequestDeliveryType +from tracking.models.create_tracking_request_last_mile import CreateTrackingRequestLastMile +from tracking.models.create_tracking_request_customers import CreateTrackingRequestCustomers class CreateTrackingRequest(BaseModel): @@ -24,11 +25,11 @@ class CreateTrackingRequest(BaseModel): slug: Optional[str] = None title: Optional[str] = None order_id: Optional[str] = None - custom_fields: Optional[Any] = None + custom_fields: Optional[dict] = None order_id_path: Optional[str] = None language: Optional[str] = None order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None + delivery_type: Optional[CreateTrackingRequestDeliveryType] = None pickup_location: Optional[str] = None pickup_note: Optional[str] = None tracking_account_number: Optional[str] = None @@ -53,8 +54,8 @@ class CreateTrackingRequest(BaseModel): courier_connection_id: Optional[str] = None location_id: Optional[str] = None shipping_method: Optional[str] = None - last_mile: Optional[LastMileCreateTrackingRequest] = None - customers: Optional[List[CustomersCreateTrackingRequest]] = None + last_mile: Optional[CreateTrackingRequestLastMile] = None + customers: Optional[List[CreateTrackingRequestCustomers]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/customers_create_tracking_request.py b/tracking/models/create_tracking_request_customers.py similarity index 92% rename from tracking/models/customers_create_tracking_request.py rename to tracking/models/create_tracking_request_customers.py index a616f95..de6affa 100644 --- a/tracking/models/customers_create_tracking_request.py +++ b/tracking/models/create_tracking_request_customers.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CustomersCreateTrackingRequest(BaseModel): +class CreateTrackingRequestCustomers(BaseModel): """ - CustomersCreateTrackingRequest + CreateTrackingRequestCustomers """ # noqa: E501 role: Optional[str] = None diff --git a/tracking/models/create_tracking_request_delivery_type.py b/tracking/models/create_tracking_request_delivery_type.py new file mode 100644 index 0000000..ca540bd --- /dev/null +++ b/tracking/models/create_tracking_request_delivery_type.py @@ -0,0 +1,19 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class CreateTrackingRequestDeliveryType(Enum): + """ + Shipment delivery type- pickup_at_store- pickup_at_courier- door_to_door + + allowed enum values + """ + + PICKUP_AT_STORE = "pickup_at_store" + DOOR_TO_DOOR = "door_to_door" + PICKUP_AT_COURIER = "pickup_at_courier" diff --git a/tracking/models/first_mile_delete_tracking_by_id_response.py b/tracking/models/create_tracking_request_last_mile.py similarity index 63% rename from tracking/models/first_mile_delete_tracking_by_id_response.py rename to tracking/models/create_tracking_request_last_mile.py index 7ed356b..9ea6ca3 100644 --- a/tracking/models/first_mile_delete_tracking_by_id_response.py +++ b/tracking/models/create_tracking_request_last_mile.py @@ -11,16 +11,13 @@ from typing_extensions import Self -class FirstMileDeleteTrackingByIdResponse(BaseModel): +class CreateTrackingRequestLastMile(BaseModel): """ - FirstMileDeleteTrackingByIdResponse + 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. """ # noqa: E501 tracking_number: Optional[str] = None slug: Optional[str] = None - transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None - courier_tracking_link: Optional[str] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/create_tracking_response.py b/tracking/models/create_tracking_response.py index 5644246..67fdb39 100644 --- a/tracking/models/create_tracking_response.py +++ b/tracking/models/create_tracking_response.py @@ -10,120 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_create_tracking_response import ( - CourierEstimatedDeliveryDateCreateTrackingResponse, -) -from tracking.models.shipment_weight_create_tracking_response import ( - ShipmentWeightCreateTrackingResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_create_tracking_response import ( - AftershipEstimatedDeliveryDateCreateTrackingResponse, -) -from tracking.models.custom_estimated_delivery_date_create_tracking_response import ( - CustomEstimatedDeliveryDateCreateTrackingResponse, -) -from tracking.models.first_estimated_delivery_create_tracking_response import ( - FirstEstimatedDeliveryCreateTrackingResponse, -) -from tracking.models.latest_estimated_delivery_create_tracking_response import ( - LatestEstimatedDeliveryCreateTrackingResponse, -) -from tracking.models.carbon_emissions_create_tracking_response import ( - CarbonEmissionsCreateTrackingResponse, -) -from tracking.models.first_mile_create_tracking_response import FirstMileCreateTrackingResponse -from tracking.models.last_mile_create_tracking_response import LastMileCreateTrackingResponse -from tracking.models.customers_create_tracking_response import CustomersCreateTrackingResponse +from tracking.models.tracking import Tracking class CreateTrackingResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateCreateTrackingResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightCreateTrackingResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateCreateTrackingResponse - ] = None - custom_estimated_delivery_date: Optional[CustomEstimatedDeliveryDateCreateTrackingResponse] = ( - None - ) - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryCreateTrackingResponse] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryCreateTrackingResponse] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsCreateTrackingResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileCreateTrackingResponse] = None - last_mile: Optional[LastMileCreateTrackingResponse] = None - customers: Optional[List[CustomersCreateTrackingResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/custom_estimated_delivery_date_create_tracking_response.py b/tracking/models/custom_estimated_delivery_date_create_tracking_response.py deleted file mode 100644 index 10bfc19..0000000 --- a/tracking/models/custom_estimated_delivery_date_create_tracking_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomEstimatedDeliveryDateCreateTrackingResponse(BaseModel): - """ - CustomEstimatedDeliveryDateCreateTrackingResponse - """ # noqa: E501 - - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/custom_estimated_delivery_date_get_tracking_by_id_response.py b/tracking/models/custom_estimated_delivery_date_get_tracking_by_id_response.py deleted file mode 100644 index 948ad09..0000000 --- a/tracking/models/custom_estimated_delivery_date_get_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomEstimatedDeliveryDateGetTrackingByIdResponse(BaseModel): - """ - CustomEstimatedDeliveryDateGetTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.py b/tracking/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.py deleted file mode 100644 index 5480d54..0000000 --- a/tracking/models/custom_estimated_delivery_date_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomEstimatedDeliveryDateRetrackTrackingByIdResponse(BaseModel): - """ - CustomEstimatedDeliveryDateRetrackTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/custom_estimated_delivery_date_tracking.py b/tracking/models/custom_estimated_delivery_date_tracking.py deleted file mode 100644 index 3b955e4..0000000 --- a/tracking/models/custom_estimated_delivery_date_tracking.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomEstimatedDeliveryDateTracking(BaseModel): - """ - CustomEstimatedDeliveryDateTracking - """ # noqa: E501 - - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/custom_estimated_delivery_date_update_tracking_by_id_response.py b/tracking/models/custom_estimated_delivery_date_update_tracking_by_id_response.py deleted file mode 100644 index fc7f7cc..0000000 --- a/tracking/models/custom_estimated_delivery_date_update_tracking_by_id_response.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomEstimatedDeliveryDateUpdateTrackingByIdResponse(BaseModel): - """ - CustomEstimatedDeliveryDateUpdateTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_delete_tracking_by_id_response.py b/tracking/models/customers_delete_tracking_by_id_response.py deleted file mode 100644 index 5f50177..0000000 --- a/tracking/models/customers_delete_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersDeleteTrackingByIdResponse(BaseModel): - """ - CustomersDeleteTrackingByIdResponse - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_get_tracking_by_id_response.py b/tracking/models/customers_get_tracking_by_id_response.py deleted file mode 100644 index 7157e1a..0000000 --- a/tracking/models/customers_get_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersGetTrackingByIdResponse(BaseModel): - """ - CustomersGetTrackingByIdResponse - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_mark_tracking_completed_by_id_response.py b/tracking/models/customers_mark_tracking_completed_by_id_response.py deleted file mode 100644 index 503b8d0..0000000 --- a/tracking/models/customers_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersMarkTrackingCompletedByIdResponse(BaseModel): - """ - CustomersMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_retrack_tracking_by_id_response.py b/tracking/models/customers_retrack_tracking_by_id_response.py deleted file mode 100644 index f2b6cb7..0000000 --- a/tracking/models/customers_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersRetrackTrackingByIdResponse(BaseModel): - """ - CustomersRetrackTrackingByIdResponse - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_update_tracking_by_id_request.py b/tracking/models/customers_update_tracking_by_id_request.py deleted file mode 100644 index 742ad44..0000000 --- a/tracking/models/customers_update_tracking_by_id_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersUpdateTrackingByIdRequest(BaseModel): - """ - CustomersUpdateTrackingByIdRequest - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/customers_update_tracking_by_id_response.py b/tracking/models/customers_update_tracking_by_id_response.py deleted file mode 100644 index 249017b..0000000 --- a/tracking/models/customers_update_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class CustomersUpdateTrackingByIdResponse(BaseModel): - """ - CustomersUpdateTrackingByIdResponse - """ # noqa: E501 - - role: Optional[str] = None - name: Optional[str] = None - phone_number: Optional[str] = None - email: Optional[str] = None - language: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/delete_courier_connections_by_id_response.py b/tracking/models/delete_courier_connections_by_id_response.py index 227e713..415a1f6 100644 --- a/tracking/models/delete_courier_connections_by_id_response.py +++ b/tracking/models/delete_courier_connections_by_id_response.py @@ -7,20 +7,19 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.courier_connection import CourierConnection + class DeleteCourierConnectionsByIdResponse(BaseModel): """ This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. - """ # noqa: E501 + """ - id: Optional[str] = None - courier_slug: Optional[str] = None - credentials: Optional[Any] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None + response_header: Dict[str, List[str]] = {} + data: Optional[CourierConnection] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/delete_tracking_by_id_response.py b/tracking/models/delete_tracking_by_id_response.py index 45150a2..635485a 100644 --- a/tracking/models/delete_tracking_by_id_response.py +++ b/tracking/models/delete_tracking_by_id_response.py @@ -10,126 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_delete_tracking_by_id_response import ( - CourierEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from tracking.models.shipment_weight_delete_tracking_by_id_response import ( - ShipmentWeightDeleteTrackingByIdResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_delete_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from tracking.models.custom_estimated_delivery_date_delete_tracking_by_id_response import ( - CustomEstimatedDeliveryDateDeleteTrackingByIdResponse, -) -from tracking.models.first_estimated_delivery_delete_tracking_by_id_response import ( - FirstEstimatedDeliveryDeleteTrackingByIdResponse, -) -from tracking.models.latest_estimated_delivery_delete_tracking_by_id_response import ( - LatestEstimatedDeliveryDeleteTrackingByIdResponse, -) -from tracking.models.carbon_emissions_delete_tracking_by_id_response import ( - CarbonEmissionsDeleteTrackingByIdResponse, -) -from tracking.models.first_mile_delete_tracking_by_id_response import ( - FirstMileDeleteTrackingByIdResponse, -) -from tracking.models.last_mile_delete_tracking_by_id_response import ( - LastMileDeleteTrackingByIdResponse, -) -from tracking.models.customers_delete_tracking_by_id_response import ( - CustomersDeleteTrackingByIdResponse, -) +from tracking.models.tracking import Tracking class DeleteTrackingByIdResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateDeleteTrackingByIdResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightDeleteTrackingByIdResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateDeleteTrackingByIdResponse - ] = None - custom_estimated_delivery_date: Optional[ - CustomEstimatedDeliveryDateDeleteTrackingByIdResponse - ] = None - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryDeleteTrackingByIdResponse] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryDeleteTrackingByIdResponse] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsDeleteTrackingByIdResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileDeleteTrackingByIdResponse] = None - last_mile: Optional[LastMileDeleteTrackingByIdResponse] = None - customers: Optional[List[CustomersDeleteTrackingByIdResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/detect_courier_response.py b/tracking/models/detect_courier_response.py index 71005bc..6e93be9 100644 --- a/tracking/models/detect_courier_response.py +++ b/tracking/models/detect_courier_response.py @@ -10,16 +10,14 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier import Courier +from tracking.models.detect_courier_response_data import DetectCourierResponseData class DetectCourierResponse(BaseModel): - """ - DetectCourierResponse - """ # noqa: E501 + """ """ - total: Optional[int] = None - couriers: Optional[List[Courier]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[DetectCourierResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/pagination_get_trackings_response.py b/tracking/models/detect_courier_response_data.py similarity index 81% rename from tracking/models/pagination_get_trackings_response.py rename to tracking/models/detect_courier_response_data.py index fc6139f..6709a5e 100644 --- a/tracking/models/pagination_get_trackings_response.py +++ b/tracking/models/detect_courier_response_data.py @@ -7,18 +7,19 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.courier import Courier -class PaginationGetTrackingsResponse(BaseModel): + +class DetectCourierResponseData(BaseModel): """ - PaginationGetTrackingsResponse + DetectCourierResponseData """ # noqa: E501 total: Optional[int] = None - next_cursor: Optional[str] = None - has_next_page: Optional[bool] = None + couriers: Optional[List[Courier]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/estimated_delivery_date_request.py b/tracking/models/estimated_delivery_date_request.py index 55fd84f..332ee5e 100644 --- a/tracking/models/estimated_delivery_date_request.py +++ b/tracking/models/estimated_delivery_date_request.py @@ -10,17 +10,17 @@ from typing import Any, Dict, Optional from typing_extensions import Self -from tracking.models.origin_address_estimated_delivery_date_request import ( - OriginAddressEstimatedDeliveryDateRequest, +from tracking.models.estimated_delivery_date_request_origin_address import ( + EstimatedDeliveryDateRequestOriginAddress, ) -from tracking.models.destination_address_estimated_delivery_date_request import ( - DestinationAddressEstimatedDeliveryDateRequest, +from tracking.models.estimated_delivery_date_request_destination_address import ( + EstimatedDeliveryDateRequestDestinationAddress, ) -from tracking.models.weight_estimated_delivery_date_request import ( - WeightEstimatedDeliveryDateRequest, +from tracking.models.estimated_delivery_date_request_weight import ( + EstimatedDeliveryDateRequestWeight, ) -from tracking.models.estimated_pickup_estimated_delivery_date_request import ( - EstimatedPickupEstimatedDeliveryDateRequest, +from tracking.models.estimated_delivery_date_request_estimated_pickup import ( + EstimatedDeliveryDateRequestEstimatedPickup, ) @@ -31,12 +31,12 @@ class EstimatedDeliveryDateRequest(BaseModel): slug: Optional[str] = None service_type_name: Optional[str] = None - origin_address: Optional[OriginAddressEstimatedDeliveryDateRequest] = None - destination_address: Optional[DestinationAddressEstimatedDeliveryDateRequest] = None - weight: Optional[WeightEstimatedDeliveryDateRequest] = None + origin_address: Optional[EstimatedDeliveryDateRequestOriginAddress] = None + destination_address: Optional[EstimatedDeliveryDateRequestDestinationAddress] = None + weight: Optional[EstimatedDeliveryDateRequestWeight] = None package_count: Optional[int] = None pickup_time: Optional[str] = None - estimated_pickup: Optional[EstimatedPickupEstimatedDeliveryDateRequest] = None + estimated_pickup: Optional[EstimatedDeliveryDateRequestEstimatedPickup] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/destination_address_estimated_delivery_date_request.py b/tracking/models/estimated_delivery_date_request_destination_address.py similarity index 88% rename from tracking/models/destination_address_estimated_delivery_date_request.py rename to tracking/models/estimated_delivery_date_request_destination_address.py index ea15673..45e55ab 100644 --- a/tracking/models/destination_address_estimated_delivery_date_request.py +++ b/tracking/models/estimated_delivery_date_request_destination_address.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class DestinationAddressEstimatedDeliveryDateRequest(BaseModel): +class EstimatedDeliveryDateRequestDestinationAddress(BaseModel): """ - DestinationAddressEstimatedDeliveryDateRequest + The final destination of the customer where the delivery will be made. """ # noqa: E501 country_region: Optional[str] = None diff --git a/tracking/models/estimated_pickup_estimated_delivery_date_request.py b/tracking/models/estimated_delivery_date_request_estimated_pickup.py similarity index 73% rename from tracking/models/estimated_pickup_estimated_delivery_date_request.py rename to tracking/models/estimated_delivery_date_request_estimated_pickup.py index 315c523..d60c88c 100644 --- a/tracking/models/estimated_pickup_estimated_delivery_date_request.py +++ b/tracking/models/estimated_delivery_date_request_estimated_pickup.py @@ -10,21 +10,21 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.order_processing_time_estimated_pickup_estimated_delivery_date_request import ( - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest, +from tracking.models.estimated_delivery_date_request_estimated_pickup_order_processing_time import ( + EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime, ) -class EstimatedPickupEstimatedDeliveryDateRequest(BaseModel): +class EstimatedDeliveryDateRequestEstimatedPickup(BaseModel): """ - EstimatedPickupEstimatedDeliveryDateRequest + The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. """ # noqa: E501 order_time: Optional[str] = None order_cutoff_time: Optional[str] = None business_days: Optional[List[int]] = None order_processing_time: Optional[ - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest + EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime ] = None def to_str(self, **kwargs) -> str: diff --git a/tracking/models/carbon_emissions_delete_tracking_by_id_response.py b/tracking/models/estimated_delivery_date_request_estimated_pickup_order_processing_time.py similarity index 86% rename from tracking/models/carbon_emissions_delete_tracking_by_id_response.py rename to tracking/models/estimated_delivery_date_request_estimated_pickup_order_processing_time.py index 7a7313c..c070612 100644 --- a/tracking/models/carbon_emissions_delete_tracking_by_id_response.py +++ b/tracking/models/estimated_delivery_date_request_estimated_pickup_order_processing_time.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CarbonEmissionsDeleteTrackingByIdResponse(BaseModel): +class EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime(BaseModel): """ - CarbonEmissionsDeleteTrackingByIdResponse + EstimatedDeliveryDateRequestEstimatedPickupOrderProcessingTime """ # noqa: E501 unit: Optional[str] = None diff --git a/tracking/models/destination_address_predict_request.py b/tracking/models/estimated_delivery_date_request_origin_address.py similarity index 86% rename from tracking/models/destination_address_predict_request.py rename to tracking/models/estimated_delivery_date_request_origin_address.py index a0afc2e..9c94edd 100644 --- a/tracking/models/destination_address_predict_request.py +++ b/tracking/models/estimated_delivery_date_request_origin_address.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class DestinationAddressPredictRequest(BaseModel): +class EstimatedDeliveryDateRequestOriginAddress(BaseModel): """ - DestinationAddressPredictRequest + The location from where the package is picked up by the carrier to be delivered to the final destination. """ # noqa: E501 country_region: Optional[str] = None diff --git a/tracking/models/carbon_emissions_get_tracking_by_id_response.py b/tracking/models/estimated_delivery_date_request_weight.py similarity index 88% rename from tracking/models/carbon_emissions_get_tracking_by_id_response.py rename to tracking/models/estimated_delivery_date_request_weight.py index 1fa9a26..8db5bbc 100644 --- a/tracking/models/carbon_emissions_get_tracking_by_id_response.py +++ b/tracking/models/estimated_delivery_date_request_weight.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CarbonEmissionsGetTrackingByIdResponse(BaseModel): +class EstimatedDeliveryDateRequestWeight(BaseModel): """ - CarbonEmissionsGetTrackingByIdResponse + AfterShip uses this object to calculate the total weight of the order. """ # noqa: E501 unit: Optional[str] = None diff --git a/tracking/models/estimated_delivery_date_response.py b/tracking/models/estimated_delivery_date_response.py index 81faf8f..403066b 100644 --- a/tracking/models/estimated_delivery_date_response.py +++ b/tracking/models/estimated_delivery_date_response.py @@ -10,17 +10,17 @@ from typing import Any, Dict, Optional from typing_extensions import Self -from tracking.models.origin_address_estimated_delivery_date_response import ( - OriginAddressEstimatedDeliveryDateResponse, +from tracking.models.estimated_delivery_date_response_origin_address import ( + EstimatedDeliveryDateResponseOriginAddress, ) -from tracking.models.destination_address_estimated_delivery_date_response import ( - DestinationAddressEstimatedDeliveryDateResponse, +from tracking.models.estimated_delivery_date_response_destination_address import ( + EstimatedDeliveryDateResponseDestinationAddress, ) -from tracking.models.weight_estimated_delivery_date_response import ( - WeightEstimatedDeliveryDateResponse, +from tracking.models.estimated_delivery_date_response_weight import ( + EstimatedDeliveryDateResponseWeight, ) -from tracking.models.estimated_pickup_estimated_delivery_date_response import ( - EstimatedPickupEstimatedDeliveryDateResponse, +from tracking.models.estimated_delivery_date_response_estimated_pickup import ( + EstimatedDeliveryDateResponseEstimatedPickup, ) @@ -32,12 +32,12 @@ class EstimatedDeliveryDateResponse(BaseModel): id: Optional[str] = None slug: Optional[str] = None service_type_name: Optional[str] = None - origin_address: Optional[OriginAddressEstimatedDeliveryDateResponse] = None - destination_address: Optional[DestinationAddressEstimatedDeliveryDateResponse] = None - weight: Optional[WeightEstimatedDeliveryDateResponse] = None + origin_address: Optional[EstimatedDeliveryDateResponseOriginAddress] = None + destination_address: Optional[EstimatedDeliveryDateResponseDestinationAddress] = None + weight: Optional[EstimatedDeliveryDateResponseWeight] = None package_count: Optional[int] = None pickup_time: Optional[str] = None - estimated_pickup: Optional[EstimatedPickupEstimatedDeliveryDateResponse] = None + estimated_pickup: Optional[EstimatedDeliveryDateResponseEstimatedPickup] = None estimated_delivery_date: Optional[str] = None confidence_code: Optional[float] = None estimated_delivery_date_min: Optional[str] = None diff --git a/tracking/models/destination_address_estimated_delivery_date_response.py b/tracking/models/estimated_delivery_date_response_destination_address.py similarity index 88% rename from tracking/models/destination_address_estimated_delivery_date_response.py rename to tracking/models/estimated_delivery_date_response_destination_address.py index 1720c95..362ab56 100644 --- a/tracking/models/destination_address_estimated_delivery_date_response.py +++ b/tracking/models/estimated_delivery_date_response_destination_address.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class DestinationAddressEstimatedDeliveryDateResponse(BaseModel): +class EstimatedDeliveryDateResponseDestinationAddress(BaseModel): """ - DestinationAddressEstimatedDeliveryDateResponse + The final destination of the customer where the delivery will be made. """ # noqa: E501 country_region: Optional[str] = None diff --git a/tracking/models/estimated_pickup_estimated_delivery_date_response.py b/tracking/models/estimated_delivery_date_response_estimated_pickup.py similarity index 73% rename from tracking/models/estimated_pickup_estimated_delivery_date_response.py rename to tracking/models/estimated_delivery_date_response_estimated_pickup.py index 3882fba..5eff390 100644 --- a/tracking/models/estimated_pickup_estimated_delivery_date_response.py +++ b/tracking/models/estimated_delivery_date_response_estimated_pickup.py @@ -10,21 +10,21 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.order_processing_time_estimated_pickup_estimated_delivery_date_response import ( - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse, +from tracking.models.estimated_delivery_date_response_estimated_pickup_order_processing_time import ( + EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime, ) -class EstimatedPickupEstimatedDeliveryDateResponse(BaseModel): +class EstimatedDeliveryDateResponseEstimatedPickup(BaseModel): """ - EstimatedPickupEstimatedDeliveryDateResponse + The local pickup time of the package.Either `pickup_time` or `estimated_pickup` is required. """ # noqa: E501 order_time: Optional[str] = None order_cutoff_time: Optional[str] = None business_days: Optional[List[int]] = None order_processing_time: Optional[ - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse + EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime ] = None pickup_time: Optional[str] = None diff --git a/tracking/models/carbon_emissions_mark_tracking_completed_by_id_response.py b/tracking/models/estimated_delivery_date_response_estimated_pickup_order_processing_time.py similarity index 86% rename from tracking/models/carbon_emissions_mark_tracking_completed_by_id_response.py rename to tracking/models/estimated_delivery_date_response_estimated_pickup_order_processing_time.py index b0048d4..e148aec 100644 --- a/tracking/models/carbon_emissions_mark_tracking_completed_by_id_response.py +++ b/tracking/models/estimated_delivery_date_response_estimated_pickup_order_processing_time.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CarbonEmissionsMarkTrackingCompletedByIdResponse(BaseModel): +class EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime(BaseModel): """ - CarbonEmissionsMarkTrackingCompletedByIdResponse + EstimatedDeliveryDateResponseEstimatedPickupOrderProcessingTime """ # noqa: E501 unit: Optional[str] = None diff --git a/tracking/models/destination_address_predict_response.py b/tracking/models/estimated_delivery_date_response_origin_address.py similarity index 86% rename from tracking/models/destination_address_predict_response.py rename to tracking/models/estimated_delivery_date_response_origin_address.py index 981d961..43e1af7 100644 --- a/tracking/models/destination_address_predict_response.py +++ b/tracking/models/estimated_delivery_date_response_origin_address.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class DestinationAddressPredictResponse(BaseModel): +class EstimatedDeliveryDateResponseOriginAddress(BaseModel): """ - DestinationAddressPredictResponse + The location from where the package is picked up by the carrier to be delivered to the final destination. """ # noqa: E501 country_region: Optional[str] = None diff --git a/tracking/models/carbon_emissions_create_tracking_response.py b/tracking/models/estimated_delivery_date_response_weight.py similarity index 88% rename from tracking/models/carbon_emissions_create_tracking_response.py rename to tracking/models/estimated_delivery_date_response_weight.py index 8d71b7d..066ba12 100644 --- a/tracking/models/carbon_emissions_create_tracking_response.py +++ b/tracking/models/estimated_delivery_date_response_weight.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CarbonEmissionsCreateTrackingResponse(BaseModel): +class EstimatedDeliveryDateResponseWeight(BaseModel): """ - CarbonEmissionsCreateTrackingResponse + AfterShip uses this object to calculate the total weight of the order. """ # noqa: E501 unit: Optional[str] = None diff --git a/tracking/models/estimated_pickup_predict_response.py b/tracking/models/estimated_pickup_predict_response.py deleted file mode 100644 index edd9cb7..0000000 --- a/tracking/models/estimated_pickup_predict_response.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, List, Optional -from typing_extensions import Self - -from tracking.models.order_processing_time_estimated_pickup_predict_response import ( - OrderProcessingTimeEstimatedPickupPredictResponse, -) - - -class EstimatedPickupPredictResponse(BaseModel): - """ - EstimatedPickupPredictResponse - """ # noqa: E501 - - order_time: Optional[str] = None - order_cutoff_time: Optional[str] = None - business_days: Optional[List[int]] = None - order_processing_time: Optional[OrderProcessingTimeEstimatedPickupPredictResponse] = None - pickup_time: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_create_tracking_response.py b/tracking/models/first_estimated_delivery_create_tracking_response.py deleted file mode 100644 index f297493..0000000 --- a/tracking/models/first_estimated_delivery_create_tracking_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryCreateTrackingResponse(BaseModel): - """ - FirstEstimatedDeliveryCreateTrackingResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_delete_tracking_by_id_response.py b/tracking/models/first_estimated_delivery_delete_tracking_by_id_response.py deleted file mode 100644 index fd34db8..0000000 --- a/tracking/models/first_estimated_delivery_delete_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryDeleteTrackingByIdResponse(BaseModel): - """ - FirstEstimatedDeliveryDeleteTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_get_tracking_by_id_response.py b/tracking/models/first_estimated_delivery_get_tracking_by_id_response.py deleted file mode 100644 index 026516a..0000000 --- a/tracking/models/first_estimated_delivery_get_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryGetTrackingByIdResponse(BaseModel): - """ - FirstEstimatedDeliveryGetTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_mark_tracking_completed_by_id_response.py b/tracking/models/first_estimated_delivery_mark_tracking_completed_by_id_response.py deleted file mode 100644 index ec00ce6..0000000 --- a/tracking/models/first_estimated_delivery_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse(BaseModel): - """ - FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_retrack_tracking_by_id_response.py b/tracking/models/first_estimated_delivery_retrack_tracking_by_id_response.py deleted file mode 100644 index a611089..0000000 --- a/tracking/models/first_estimated_delivery_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryRetrackTrackingByIdResponse(BaseModel): - """ - FirstEstimatedDeliveryRetrackTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_tracking.py b/tracking/models/first_estimated_delivery_tracking.py deleted file mode 100644 index 490234f..0000000 --- a/tracking/models/first_estimated_delivery_tracking.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryTracking(BaseModel): - """ - FirstEstimatedDeliveryTracking - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_estimated_delivery_update_tracking_by_id_response.py b/tracking/models/first_estimated_delivery_update_tracking_by_id_response.py deleted file mode 100644 index c046d89..0000000 --- a/tracking/models/first_estimated_delivery_update_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstEstimatedDeliveryUpdateTrackingByIdResponse(BaseModel): - """ - FirstEstimatedDeliveryUpdateTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_mile_mark_tracking_completed_by_id_response.py b/tracking/models/first_mile_mark_tracking_completed_by_id_response.py deleted file mode 100644 index 9da3786..0000000 --- a/tracking/models/first_mile_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstMileMarkTrackingCompletedByIdResponse(BaseModel): - """ - FirstMileMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None - courier_tracking_link: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_mile_retrack_tracking_by_id_response.py b/tracking/models/first_mile_retrack_tracking_by_id_response.py deleted file mode 100644 index 6f66c65..0000000 --- a/tracking/models/first_mile_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstMileRetrackTrackingByIdResponse(BaseModel): - """ - FirstMileRetrackTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None - courier_tracking_link: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_mile_tracking.py b/tracking/models/first_mile_tracking.py deleted file mode 100644 index 0a32014..0000000 --- a/tracking/models/first_mile_tracking.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstMileTracking(BaseModel): - """ - FirstMileTracking - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None - courier_tracking_link: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/first_mile_update_tracking_by_id_response.py b/tracking/models/first_mile_update_tracking_by_id_response.py deleted file mode 100644 index 6644bfa..0000000 --- a/tracking/models/first_mile_update_tracking_by_id_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class FirstMileUpdateTrackingByIdResponse(BaseModel): - """ - FirstMileUpdateTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None - courier_tracking_link: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/get_courier_connections_by_id_response.py b/tracking/models/get_courier_connections_by_id_response.py index bbe5861..75968eb 100644 --- a/tracking/models/get_courier_connections_by_id_response.py +++ b/tracking/models/get_courier_connections_by_id_response.py @@ -7,20 +7,19 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.courier_connection import CourierConnection + class GetCourierConnectionsByIdResponse(BaseModel): """ This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. - """ # noqa: E501 + """ - id: Optional[str] = None - courier_slug: Optional[str] = None - credentials: Optional[Any] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None + response_header: Dict[str, List[str]] = {} + data: Optional[CourierConnection] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/get_courier_connections_response.py b/tracking/models/get_courier_connections_response.py index 77a0642..a900b27 100644 --- a/tracking/models/get_courier_connections_response.py +++ b/tracking/models/get_courier_connections_response.py @@ -10,17 +10,14 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_connection import CourierConnection -from tracking.models.pagination import Pagination +from tracking.models.get_courier_connections_response_data import GetCourierConnectionsResponseData class GetCourierConnectionsResponse(BaseModel): - """ - GetCourierConnectionsResponse - """ # noqa: E501 + """ """ - pagination: Optional[Pagination] = None - courier_connections: Optional[List[CourierConnection]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[GetCourierConnectionsResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/get_courier_connections_response_data.py b/tracking/models/get_courier_connections_response_data.py new file mode 100644 index 0000000..e0cb997 --- /dev/null +++ b/tracking/models/get_courier_connections_response_data.py @@ -0,0 +1,42 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from __future__ import annotations +import pprint + +from pydantic import BaseModel +from typing import Any, Dict, List, Optional +from typing_extensions import Self + +from tracking.models.get_courier_connections_response_data_pagination import ( + GetCourierConnectionsResponseDataPagination, +) +from tracking.models.courier_connection import CourierConnection + + +class GetCourierConnectionsResponseData(BaseModel): + """ + GetCourierConnectionsResponseData + """ # noqa: E501 + + pagination: Optional[GetCourierConnectionsResponseDataPagination] = None + courier_connections: Optional[List[CourierConnection]] = None + + def to_str(self, **kwargs) -> str: + return pprint.pformat(self.model_dump(**kwargs)) + + def to_json(self, **kwargs) -> str: + return self.model_dump_json(**kwargs) + + def to_dict(self, **kwargs) -> Dict[str, Any]: + return self.model_dump(**kwargs) + + @classmethod + def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: + return cls.model_validate_json(json_str, **kwargs) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: + return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/pagination.py b/tracking/models/get_courier_connections_response_data_pagination.py similarity index 90% rename from tracking/models/pagination.py rename to tracking/models/get_courier_connections_response_data_pagination.py index f599559..f7f719c 100644 --- a/tracking/models/pagination.py +++ b/tracking/models/get_courier_connections_response_data_pagination.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class Pagination(BaseModel): +class GetCourierConnectionsResponseDataPagination(BaseModel): """ - Pagination + GetCourierConnectionsResponseDataPagination """ # noqa: E501 total: Optional[int] = None diff --git a/tracking/models/get_couriers_response.py b/tracking/models/get_couriers_response.py index 4961c0c..6fa96db 100644 --- a/tracking/models/get_couriers_response.py +++ b/tracking/models/get_couriers_response.py @@ -10,16 +10,14 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier import Courier +from tracking.models.get_couriers_response_data import GetCouriersResponseData class GetCouriersResponse(BaseModel): - """ - GetCouriersResponse - """ # noqa: E501 + """ """ - total: Optional[int] = None - couriers: Optional[List[Courier]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[GetCouriersResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/credentials_courier.py b/tracking/models/get_couriers_response_data.py similarity index 82% rename from tracking/models/credentials_courier.py rename to tracking/models/get_couriers_response_data.py index 4cc7228..ed28b43 100644 --- a/tracking/models/credentials_courier.py +++ b/tracking/models/get_couriers_response_data.py @@ -10,15 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.credential_field import CredentialField +from tracking.models.courier import Courier -class CredentialsCourier(BaseModel): +class GetCouriersResponseData(BaseModel): """ - CredentialsCourier + GetCouriersResponseData """ # noqa: E501 - fields: Optional[List[CredentialField]] = None + total: Optional[int] = None + couriers: Optional[List[Courier]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/get_tracking_by_id_response.py b/tracking/models/get_tracking_by_id_response.py index b649903..3764a98 100644 --- a/tracking/models/get_tracking_by_id_response.py +++ b/tracking/models/get_tracking_by_id_response.py @@ -10,120 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_get_tracking_by_id_response import ( - CourierEstimatedDeliveryDateGetTrackingByIdResponse, -) -from tracking.models.shipment_weight_get_tracking_by_id_response import ( - ShipmentWeightGetTrackingByIdResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_get_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateGetTrackingByIdResponse, -) -from tracking.models.custom_estimated_delivery_date_get_tracking_by_id_response import ( - CustomEstimatedDeliveryDateGetTrackingByIdResponse, -) -from tracking.models.first_estimated_delivery_get_tracking_by_id_response import ( - FirstEstimatedDeliveryGetTrackingByIdResponse, -) -from tracking.models.latest_estimated_delivery_get_tracking_by_id_response import ( - LatestEstimatedDeliveryGetTrackingByIdResponse, -) -from tracking.models.carbon_emissions_get_tracking_by_id_response import ( - CarbonEmissionsGetTrackingByIdResponse, -) -from tracking.models.first_mile_get_tracking_by_id_response import FirstMileGetTrackingByIdResponse -from tracking.models.last_mile_get_tracking_by_id_response import LastMileGetTrackingByIdResponse -from tracking.models.customers_get_tracking_by_id_response import CustomersGetTrackingByIdResponse +from tracking.models.tracking import Tracking class GetTrackingByIdResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateGetTrackingByIdResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightGetTrackingByIdResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateGetTrackingByIdResponse - ] = None - custom_estimated_delivery_date: Optional[CustomEstimatedDeliveryDateGetTrackingByIdResponse] = ( - None - ) - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryGetTrackingByIdResponse] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryGetTrackingByIdResponse] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsGetTrackingByIdResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileGetTrackingByIdResponse] = None - last_mile: Optional[LastMileGetTrackingByIdResponse] = None - customers: Optional[List[CustomersGetTrackingByIdResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/get_trackings_response.py b/tracking/models/get_trackings_response.py index 2d245c0..034ec16 100644 --- a/tracking/models/get_trackings_response.py +++ b/tracking/models/get_trackings_response.py @@ -10,17 +10,14 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.tracking import Tracking -from tracking.models.pagination import Pagination +from tracking.models.get_trackings_response_data import GetTrackingsResponseData class GetTrackingsResponse(BaseModel): - """ - GetTrackingsResponse - """ # noqa: E501 + """ """ - pagination: Optional[Pagination] = None - trackings: Optional[List[Tracking]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[GetTrackingsResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/data_tracking_response_for_get_trackings.py b/tracking/models/get_trackings_response_data.py similarity index 76% rename from tracking/models/data_tracking_response_for_get_trackings.py rename to tracking/models/get_trackings_response_data.py index 6d9efb9..b2318bf 100644 --- a/tracking/models/data_tracking_response_for_get_trackings.py +++ b/tracking/models/get_trackings_response_data.py @@ -10,18 +10,18 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.pagination_data_tracking_response_for_get_trackings import ( - PaginationDataTrackingResponseForGetTrackings, +from tracking.models.get_trackings_response_data_pagination import ( + GetTrackingsResponseDataPagination, ) from tracking.models.tracking import Tracking -class DataTrackingResponseForGetTrackings(BaseModel): +class GetTrackingsResponseData(BaseModel): """ - DataTrackingResponseForGetTrackings + GetTrackingsResponseData """ # noqa: E501 - pagination: Optional[PaginationDataTrackingResponseForGetTrackings] = None + pagination: Optional[GetTrackingsResponseDataPagination] = None trackings: Optional[List[Tracking]] = None def to_str(self, **kwargs) -> str: diff --git a/tracking/models/pagination_data_tracking_response_for_get_trackings.py b/tracking/models/get_trackings_response_data_pagination.py similarity index 86% rename from tracking/models/pagination_data_tracking_response_for_get_trackings.py rename to tracking/models/get_trackings_response_data_pagination.py index a234c9d..a39229b 100644 --- a/tracking/models/pagination_data_tracking_response_for_get_trackings.py +++ b/tracking/models/get_trackings_response_data_pagination.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class PaginationDataTrackingResponseForGetTrackings(BaseModel): +class GetTrackingsResponseDataPagination(BaseModel): """ - PaginationDataTrackingResponseForGetTrackings + The Pagination holds the information for the pagination when the response contains multiple objects. """ # noqa: E501 total: Optional[int] = None diff --git a/tracking/models/last_mile_create_tracking_request.py b/tracking/models/last_mile_create_tracking_request.py deleted file mode 100644 index 0fb1a18..0000000 --- a/tracking/models/last_mile_create_tracking_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileCreateTrackingRequest(BaseModel): - """ - LastMileCreateTrackingRequest - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_create_tracking_response.py b/tracking/models/last_mile_create_tracking_response.py deleted file mode 100644 index 052a011..0000000 --- a/tracking/models/last_mile_create_tracking_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileCreateTrackingResponse(BaseModel): - """ - LastMileCreateTrackingResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_delete_tracking_by_id_response.py b/tracking/models/last_mile_delete_tracking_by_id_response.py deleted file mode 100644 index 793c82a..0000000 --- a/tracking/models/last_mile_delete_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileDeleteTrackingByIdResponse(BaseModel): - """ - LastMileDeleteTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_get_tracking_by_id_response.py b/tracking/models/last_mile_get_tracking_by_id_response.py deleted file mode 100644 index d2b44c3..0000000 --- a/tracking/models/last_mile_get_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileGetTrackingByIdResponse(BaseModel): - """ - LastMileGetTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_mark_tracking_completed_by_id_response.py b/tracking/models/last_mile_mark_tracking_completed_by_id_response.py deleted file mode 100644 index 5381f8c..0000000 --- a/tracking/models/last_mile_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileMarkTrackingCompletedByIdResponse(BaseModel): - """ - LastMileMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_retrack_tracking_by_id_response.py b/tracking/models/last_mile_retrack_tracking_by_id_response.py deleted file mode 100644 index 0dac14a..0000000 --- a/tracking/models/last_mile_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileRetrackTrackingByIdResponse(BaseModel): - """ - LastMileRetrackTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_tracking.py b/tracking/models/last_mile_tracking.py deleted file mode 100644 index 5cdae9a..0000000 --- a/tracking/models/last_mile_tracking.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileTracking(BaseModel): - """ - LastMileTracking - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/last_mile_update_tracking_by_id_response.py b/tracking/models/last_mile_update_tracking_by_id_response.py deleted file mode 100644 index ffd6405..0000000 --- a/tracking/models/last_mile_update_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LastMileUpdateTrackingByIdResponse(BaseModel): - """ - LastMileUpdateTrackingByIdResponse - """ # noqa: E501 - - tracking_number: Optional[str] = None - slug: Optional[str] = None - transit_time: Optional[int] = None - courier_tracking_link: Optional[str] = None - courier_redirect_link: Optional[str] = None - source: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/latest_estimated_delivery_delete_tracking_by_id_response.py b/tracking/models/latest_estimated_delivery_delete_tracking_by_id_response.py deleted file mode 100644 index 8c4223f..0000000 --- a/tracking/models/latest_estimated_delivery_delete_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LatestEstimatedDeliveryDeleteTrackingByIdResponse(BaseModel): - """ - LatestEstimatedDeliveryDeleteTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - revise_reason: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.py b/tracking/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.py deleted file mode 100644 index fa5b2ed..0000000 --- a/tracking/models/latest_estimated_delivery_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse(BaseModel): - """ - LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - revise_reason: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/latest_estimated_delivery_retrack_tracking_by_id_response.py b/tracking/models/latest_estimated_delivery_retrack_tracking_by_id_response.py deleted file mode 100644 index fa1ee14..0000000 --- a/tracking/models/latest_estimated_delivery_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LatestEstimatedDeliveryRetrackTrackingByIdResponse(BaseModel): - """ - LatestEstimatedDeliveryRetrackTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - revise_reason: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/latest_estimated_delivery_tracking.py b/tracking/models/latest_estimated_delivery_tracking.py deleted file mode 100644 index 061a8a7..0000000 --- a/tracking/models/latest_estimated_delivery_tracking.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LatestEstimatedDeliveryTracking(BaseModel): - """ - LatestEstimatedDeliveryTracking - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - revise_reason: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/latest_estimated_delivery_update_tracking_by_id_response.py b/tracking/models/latest_estimated_delivery_update_tracking_by_id_response.py deleted file mode 100644 index 1d07a77..0000000 --- a/tracking/models/latest_estimated_delivery_update_tracking_by_id_response.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class LatestEstimatedDeliveryUpdateTrackingByIdResponse(BaseModel): - """ - LatestEstimatedDeliveryUpdateTrackingByIdResponse - """ # noqa: E501 - - type: Optional[str] = None - source: Optional[str] = None - datetime: Optional[str] = None - datetime_min: Optional[str] = None - datetime_max: Optional[str] = None - revise_reason: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/mark_tracking_completed_by_id_request.py b/tracking/models/mark_tracking_completed_by_id_request.py index f8d0131..a7fbbfb 100644 --- a/tracking/models/mark_tracking_completed_by_id_request.py +++ b/tracking/models/mark_tracking_completed_by_id_request.py @@ -10,13 +10,17 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.mark_tracking_completed_by_id_request_reason import ( + MarkTrackingCompletedByIdRequestReason, +) + class MarkTrackingCompletedByIdRequest(BaseModel): """ MarkTrackingCompletedByIdRequest """ # noqa: E501 - reason: Optional[str] = None + reason: Optional[MarkTrackingCompletedByIdRequestReason] = None event_datetime: Optional[str] = None def to_str(self, **kwargs) -> str: diff --git a/tracking/models/mark_tracking_completed_by_id_request_reason.py b/tracking/models/mark_tracking_completed_by_id_request_reason.py new file mode 100644 index 0000000..b6acf4f --- /dev/null +++ b/tracking/models/mark_tracking_completed_by_id_request_reason.py @@ -0,0 +1,19 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class MarkTrackingCompletedByIdRequestReason(Enum): + """ + One of `DELIVERED`, `LOST` or `RETURNED_TO_SENDER`.- Mark the tracking as completed with `DELIVERED`. The tag of the tracking will be updated to `Delivered` and the subtag will be updated to `Delivered_001`.- Mark the tracking as completed with `LOST`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_013`.- Mark the tracking as completed with `RETURNED_TO_SENDER`. The tag of the tracking will be updated to `Exception` and the subtag will be updated to `Exception_011`. + + allowed enum values + """ + + DELIVERED = "DELIVERED" + LOST = "LOST" + RETURNED_TO_SENDER = "RETURNED_TO_SENDER" diff --git a/tracking/models/mark_tracking_completed_by_id_response.py b/tracking/models/mark_tracking_completed_by_id_response.py index 8b0aebb..bcf64ea 100644 --- a/tracking/models/mark_tracking_completed_by_id_response.py +++ b/tracking/models/mark_tracking_completed_by_id_response.py @@ -10,130 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, -) -from tracking.models.shipment_weight_mark_tracking_completed_by_id_response import ( - ShipmentWeightMarkTrackingCompletedByIdResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, -) -from tracking.models.custom_estimated_delivery_date_mark_tracking_completed_by_id_response import ( - CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse, -) -from tracking.models.first_estimated_delivery_mark_tracking_completed_by_id_response import ( - FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse, -) -from tracking.models.latest_estimated_delivery_mark_tracking_completed_by_id_response import ( - LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse, -) -from tracking.models.carbon_emissions_mark_tracking_completed_by_id_response import ( - CarbonEmissionsMarkTrackingCompletedByIdResponse, -) -from tracking.models.first_mile_mark_tracking_completed_by_id_response import ( - FirstMileMarkTrackingCompletedByIdResponse, -) -from tracking.models.last_mile_mark_tracking_completed_by_id_response import ( - LastMileMarkTrackingCompletedByIdResponse, -) -from tracking.models.customers_mark_tracking_completed_by_id_response import ( - CustomersMarkTrackingCompletedByIdResponse, -) +from tracking.models.tracking import Tracking class MarkTrackingCompletedByIdResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateMarkTrackingCompletedByIdResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightMarkTrackingCompletedByIdResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateMarkTrackingCompletedByIdResponse - ] = None - custom_estimated_delivery_date: Optional[ - CustomEstimatedDeliveryDateMarkTrackingCompletedByIdResponse - ] = None - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryMarkTrackingCompletedByIdResponse] = ( - None - ) - latest_estimated_delivery: Optional[ - LatestEstimatedDeliveryMarkTrackingCompletedByIdResponse - ] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsMarkTrackingCompletedByIdResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileMarkTrackingCompletedByIdResponse] = None - last_mile: Optional[LastMileMarkTrackingCompletedByIdResponse] = None - customers: Optional[List[CustomersMarkTrackingCompletedByIdResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/meta.py b/tracking/models/meta.py index 29cc2cc..fd69610 100644 --- a/tracking/models/meta.py +++ b/tracking/models/meta.py @@ -10,6 +10,8 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.meta_type import MetaType + class Meta(BaseModel): """ @@ -18,7 +20,7 @@ class Meta(BaseModel): code: Optional[int] = None message: Optional[str] = None - type: Optional[str] = None + type: Optional[MetaType] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/meta_type.py b/tracking/models/meta_type.py new file mode 100644 index 0000000..e03a71d --- /dev/null +++ b/tracking/models/meta_type.py @@ -0,0 +1,22 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class MetaType(Enum): + """ + error type, only exist if the response status is not 2xx + + allowed enum values + """ + + BAD_REQUEST = "BadRequest" + UNAUTHORIZED = "Unauthorized" + FORBIDDEN = "Forbidden" + NOT_FOUND = "NotFound" + TOO_MANY_REQUESTS = "TooManyRequests" + INTERNAL_ERROR = "InternalError" diff --git a/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.py b/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.py deleted file mode 100644 index e0302bb..0000000 --- a/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest(BaseModel): - """ - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateRequest - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.py b/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.py deleted file mode 100644 index 8f81f62..0000000 --- a/tracking/models/order_processing_time_estimated_pickup_estimated_delivery_date_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse(BaseModel): - """ - OrderProcessingTimeEstimatedPickupEstimatedDeliveryDateResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/order_processing_time_estimated_pickup_predict_request.py b/tracking/models/order_processing_time_estimated_pickup_predict_request.py deleted file mode 100644 index 6c55f23..0000000 --- a/tracking/models/order_processing_time_estimated_pickup_predict_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OrderProcessingTimeEstimatedPickupPredictRequest(BaseModel): - """ - OrderProcessingTimeEstimatedPickupPredictRequest - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/order_processing_time_estimated_pickup_predict_response.py b/tracking/models/order_processing_time_estimated_pickup_predict_response.py deleted file mode 100644 index c5b3da4..0000000 --- a/tracking/models/order_processing_time_estimated_pickup_predict_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OrderProcessingTimeEstimatedPickupPredictResponse(BaseModel): - """ - OrderProcessingTimeEstimatedPickupPredictResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/origin_address_estimated_delivery_date_request.py b/tracking/models/origin_address_estimated_delivery_date_request.py deleted file mode 100644 index fb45a6a..0000000 --- a/tracking/models/origin_address_estimated_delivery_date_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OriginAddressEstimatedDeliveryDateRequest(BaseModel): - """ - OriginAddressEstimatedDeliveryDateRequest - """ # noqa: E501 - - country_region: Optional[str] = None - state: Optional[str] = None - city: Optional[str] = None - postal_code: Optional[str] = None - raw_location: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/origin_address_estimated_delivery_date_response.py b/tracking/models/origin_address_estimated_delivery_date_response.py deleted file mode 100644 index a2dff68..0000000 --- a/tracking/models/origin_address_estimated_delivery_date_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OriginAddressEstimatedDeliveryDateResponse(BaseModel): - """ - OriginAddressEstimatedDeliveryDateResponse - """ # noqa: E501 - - country_region: Optional[str] = None - state: Optional[str] = None - city: Optional[str] = None - postal_code: Optional[str] = None - raw_location: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/origin_address_predict_request.py b/tracking/models/origin_address_predict_request.py deleted file mode 100644 index 522fa70..0000000 --- a/tracking/models/origin_address_predict_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OriginAddressPredictRequest(BaseModel): - """ - OriginAddressPredictRequest - """ # noqa: E501 - - country_region: Optional[str] = None - state: Optional[str] = None - city: Optional[str] = None - postal_code: Optional[str] = None - raw_location: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/origin_address_predict_response.py b/tracking/models/origin_address_predict_response.py deleted file mode 100644 index 10842f5..0000000 --- a/tracking/models/origin_address_predict_response.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class OriginAddressPredictResponse(BaseModel): - """ - OriginAddressPredictResponse - """ # noqa: E501 - - country_region: Optional[str] = None - state: Optional[str] = None - city: Optional[str] = None - postal_code: Optional[str] = None - raw_location: Optional[str] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/post_courier_connections_request.py b/tracking/models/post_courier_connections_request.py index 9f0a168..e1e3c2a 100644 --- a/tracking/models/post_courier_connections_request.py +++ b/tracking/models/post_courier_connections_request.py @@ -17,7 +17,7 @@ class PostCourierConnectionsRequest(BaseModel): """ # noqa: E501 courier_slug: Optional[str] = None - credentials: Optional[Any] = None + credentials: Optional[dict] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/post_courier_connections_response.py b/tracking/models/post_courier_connections_response.py index 589c6f4..afb4af9 100644 --- a/tracking/models/post_courier_connections_response.py +++ b/tracking/models/post_courier_connections_response.py @@ -7,20 +7,19 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.courier_connection import CourierConnection + class PostCourierConnectionsResponse(BaseModel): """ This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. - """ # noqa: E501 + """ - id: Optional[str] = None - courier_slug: Optional[str] = None - credentials: Optional[Any] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None + response_header: Dict[str, List[str]] = {} + data: Optional[CourierConnection] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/predict_batch_response.py b/tracking/models/predict_batch_response.py index a41efa5..dc0161a 100644 --- a/tracking/models/predict_batch_response.py +++ b/tracking/models/predict_batch_response.py @@ -10,15 +10,14 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.estimated_delivery_date_response import EstimatedDeliveryDateResponse +from tracking.models.predict_batch_response_data import PredictBatchResponseData class PredictBatchResponse(BaseModel): - """ - PredictBatchResponse - """ # noqa: E501 + """ """ - estimated_delivery_dates: Optional[List[EstimatedDeliveryDateResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[PredictBatchResponseData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/predict_batch_response_data.py b/tracking/models/predict_batch_response_data.py new file mode 100644 index 0000000..cea29ef --- /dev/null +++ b/tracking/models/predict_batch_response_data.py @@ -0,0 +1,38 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from __future__ import annotations +import pprint + +from pydantic import BaseModel +from typing import Any, Dict, List, Optional +from typing_extensions import Self + +from tracking.models.estimated_delivery_date_response import EstimatedDeliveryDateResponse + + +class PredictBatchResponseData(BaseModel): + """ + PredictBatchResponseData + """ # noqa: E501 + + estimated_delivery_dates: Optional[List[EstimatedDeliveryDateResponse]] = None + + def to_str(self, **kwargs) -> str: + return pprint.pformat(self.model_dump(**kwargs)) + + def to_json(self, **kwargs) -> str: + return self.model_dump_json(**kwargs) + + def to_dict(self, **kwargs) -> Dict[str, Any]: + return self.model_dump(**kwargs) + + @classmethod + def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: + return cls.model_validate_json(json_str, **kwargs) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: + return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/predict_request.py b/tracking/models/predict_request.py deleted file mode 100644 index 9ac4039..0000000 --- a/tracking/models/predict_request.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - -from tracking.models.origin_address_predict_request import OriginAddressPredictRequest -from tracking.models.destination_address_predict_request import DestinationAddressPredictRequest -from tracking.models.weight_predict_request import WeightPredictRequest -from tracking.models.estimated_pickup_predict_request import EstimatedPickupPredictRequest - - -class PredictRequest(BaseModel): - """ - PredictRequest - """ # noqa: E501 - - slug: Optional[str] = None - service_type_name: Optional[str] = None - origin_address: Optional[OriginAddressPredictRequest] = None - destination_address: Optional[DestinationAddressPredictRequest] = None - weight: Optional[WeightPredictRequest] = None - package_count: Optional[int] = None - pickup_time: Optional[str] = None - estimated_pickup: Optional[EstimatedPickupPredictRequest] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/predict_response.py b/tracking/models/predict_response.py index ad05f2d..2ca0dc0 100644 --- a/tracking/models/predict_response.py +++ b/tracking/models/predict_response.py @@ -7,33 +7,17 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.origin_address_predict_response import OriginAddressPredictResponse -from tracking.models.destination_address_predict_response import DestinationAddressPredictResponse -from tracking.models.weight_predict_response import WeightPredictResponse -from tracking.models.estimated_pickup_predict_response import EstimatedPickupPredictResponse +from tracking.models.estimated_delivery_date_response import EstimatedDeliveryDateResponse class PredictResponse(BaseModel): - """ - PredictResponse - """ # noqa: E501 - - id: Optional[str] = None - slug: Optional[str] = None - service_type_name: Optional[str] = None - origin_address: Optional[OriginAddressPredictResponse] = None - destination_address: Optional[DestinationAddressPredictResponse] = None - weight: Optional[WeightPredictResponse] = None - package_count: Optional[int] = None - pickup_time: Optional[str] = None - estimated_pickup: Optional[EstimatedPickupPredictResponse] = None - estimated_delivery_date: Optional[str] = None - confidence_code: Optional[float] = None - estimated_delivery_date_min: Optional[str] = None - estimated_delivery_date_max: Optional[str] = None + """ """ + + response_header: Dict[str, List[str]] = {} + data: Optional[EstimatedDeliveryDateResponse] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/put_courier_connections_by_id_request.py b/tracking/models/put_courier_connections_by_id_request.py index ea2a5aa..75eb2b3 100644 --- a/tracking/models/put_courier_connections_by_id_request.py +++ b/tracking/models/put_courier_connections_by_id_request.py @@ -16,7 +16,7 @@ class PutCourierConnectionsByIdRequest(BaseModel): PutCourierConnectionsByIdRequest """ # noqa: E501 - credentials: Optional[Any] = None + credentials: Optional[dict] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/put_courier_connections_by_id_response.py b/tracking/models/put_courier_connections_by_id_response.py index e5ebeb2..ee736d3 100644 --- a/tracking/models/put_courier_connections_by_id_response.py +++ b/tracking/models/put_courier_connections_by_id_response.py @@ -7,20 +7,19 @@ import pprint from pydantic import BaseModel -from typing import Any, Dict, Optional +from typing import Any, Dict, List, Optional from typing_extensions import Self +from tracking.models.courier_connection import CourierConnection + class PutCourierConnectionsByIdResponse(BaseModel): """ This model represents user-created courier connection details. AfterShip will use this information to retrieve tracking updates from carriers based on the provided tracking numbers. - """ # noqa: E501 + """ - id: Optional[str] = None - courier_slug: Optional[str] = None - credentials: Optional[Any] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None + response_header: Dict[str, List[str]] = {} + data: Optional[CourierConnection] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/retrack_tracking_by_id_response.py b/tracking/models/retrack_tracking_by_id_response.py index cbd3773..e05f678 100644 --- a/tracking/models/retrack_tracking_by_id_response.py +++ b/tracking/models/retrack_tracking_by_id_response.py @@ -10,126 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_retrack_tracking_by_id_response import ( - CourierEstimatedDeliveryDateRetrackTrackingByIdResponse, -) -from tracking.models.shipment_weight_retrack_tracking_by_id_response import ( - ShipmentWeightRetrackTrackingByIdResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_retrack_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse, -) -from tracking.models.custom_estimated_delivery_date_retrack_tracking_by_id_response import ( - CustomEstimatedDeliveryDateRetrackTrackingByIdResponse, -) -from tracking.models.first_estimated_delivery_retrack_tracking_by_id_response import ( - FirstEstimatedDeliveryRetrackTrackingByIdResponse, -) -from tracking.models.latest_estimated_delivery_retrack_tracking_by_id_response import ( - LatestEstimatedDeliveryRetrackTrackingByIdResponse, -) -from tracking.models.carbon_emissions_retrack_tracking_by_id_response import ( - CarbonEmissionsRetrackTrackingByIdResponse, -) -from tracking.models.first_mile_retrack_tracking_by_id_response import ( - FirstMileRetrackTrackingByIdResponse, -) -from tracking.models.last_mile_retrack_tracking_by_id_response import ( - LastMileRetrackTrackingByIdResponse, -) -from tracking.models.customers_retrack_tracking_by_id_response import ( - CustomersRetrackTrackingByIdResponse, -) +from tracking.models.tracking import Tracking class RetrackTrackingByIdResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateRetrackTrackingByIdResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightRetrackTrackingByIdResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateRetrackTrackingByIdResponse - ] = None - custom_estimated_delivery_date: Optional[ - CustomEstimatedDeliveryDateRetrackTrackingByIdResponse - ] = None - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryRetrackTrackingByIdResponse] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryRetrackTrackingByIdResponse] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsRetrackTrackingByIdResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileRetrackTrackingByIdResponse] = None - last_mile: Optional[LastMileRetrackTrackingByIdResponse] = None - customers: Optional[List[CustomersRetrackTrackingByIdResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/shipment_weight_create_tracking_response.py b/tracking/models/shipment_weight_create_tracking_response.py deleted file mode 100644 index 0f5b4b4..0000000 --- a/tracking/models/shipment_weight_create_tracking_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightCreateTrackingResponse(BaseModel): - """ - ShipmentWeightCreateTrackingResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_delete_tracking_by_id_response.py b/tracking/models/shipment_weight_delete_tracking_by_id_response.py deleted file mode 100644 index 606979a..0000000 --- a/tracking/models/shipment_weight_delete_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightDeleteTrackingByIdResponse(BaseModel): - """ - ShipmentWeightDeleteTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_get_tracking_by_id_response.py b/tracking/models/shipment_weight_get_tracking_by_id_response.py deleted file mode 100644 index e561435..0000000 --- a/tracking/models/shipment_weight_get_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightGetTrackingByIdResponse(BaseModel): - """ - ShipmentWeightGetTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_mark_tracking_completed_by_id_response.py b/tracking/models/shipment_weight_mark_tracking_completed_by_id_response.py deleted file mode 100644 index 53a778a..0000000 --- a/tracking/models/shipment_weight_mark_tracking_completed_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightMarkTrackingCompletedByIdResponse(BaseModel): - """ - ShipmentWeightMarkTrackingCompletedByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_retrack_tracking_by_id_response.py b/tracking/models/shipment_weight_retrack_tracking_by_id_response.py deleted file mode 100644 index 5bdfaa8..0000000 --- a/tracking/models/shipment_weight_retrack_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightRetrackTrackingByIdResponse(BaseModel): - """ - ShipmentWeightRetrackTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_tracking.py b/tracking/models/shipment_weight_tracking.py deleted file mode 100644 index 158daf1..0000000 --- a/tracking/models/shipment_weight_tracking.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightTracking(BaseModel): - """ - ShipmentWeightTracking - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/shipment_weight_update_tracking_by_id_response.py b/tracking/models/shipment_weight_update_tracking_by_id_response.py deleted file mode 100644 index b8da315..0000000 --- a/tracking/models/shipment_weight_update_tracking_by_id_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class ShipmentWeightUpdateTrackingByIdResponse(BaseModel): - """ - ShipmentWeightUpdateTrackingByIdResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/tag.py b/tracking/models/tag.py index 311154d..33d6e39 100644 --- a/tracking/models/tag.py +++ b/tracking/models/tag.py @@ -15,11 +15,11 @@ class Tag(Enum): """ PENDING = "Pending" - INFORECEIVED = "InfoReceived" - INTRANSIT = "InTransit" - OUTFORDELIVERY = "OutForDelivery" - ATTEMPTFAIL = "AttemptFail" + INFO_RECEIVED = "InfoReceived" + IN_TRANSIT = "InTransit" + OUT_FOR_DELIVERY = "OutForDelivery" + ATTEMPT_FAIL = "AttemptFail" DELIVERED = "Delivered" - AVAILABLEFORPICKUP = "AvailableForPickup" + AVAILABLE_FOR_PICKUP = "AvailableForPickup" EXCEPTION = "Exception" EXPIRED = "Expired" diff --git a/tracking/models/tracking.py b/tracking/models/tracking.py index 72a7ec9..ba623c3 100644 --- a/tracking/models/tracking.py +++ b/tracking/models/tracking.py @@ -10,24 +10,25 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_tracking import ( - CourierEstimatedDeliveryDateTracking, +from tracking.models.tracking_courier_estimated_delivery_date import ( + TrackingCourierEstimatedDeliveryDate, ) -from tracking.models.shipment_weight_tracking import ShipmentWeightTracking +from tracking.models.tracking_shipment_weight import TrackingShipmentWeight from tracking.models.tag import Tag from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_tracking import ( - AftershipEstimatedDeliveryDateTracking, +from tracking.models.tracking_aftership_estimated_delivery_date import ( + TrackingAftershipEstimatedDeliveryDate, ) -from tracking.models.custom_estimated_delivery_date_tracking import ( - CustomEstimatedDeliveryDateTracking, +from tracking.models.tracking_custom_estimated_delivery_date import ( + TrackingCustomEstimatedDeliveryDate, ) -from tracking.models.first_estimated_delivery_tracking import FirstEstimatedDeliveryTracking -from tracking.models.latest_estimated_delivery_tracking import LatestEstimatedDeliveryTracking -from tracking.models.carbon_emissions_tracking import CarbonEmissionsTracking -from tracking.models.first_mile_tracking import FirstMileTracking -from tracking.models.last_mile_tracking import LastMileTracking -from tracking.models.customers_tracking import CustomersTracking +from tracking.models.tracking_first_estimated_delivery import TrackingFirstEstimatedDelivery +from tracking.models.tracking_latest_estimated_delivery import TrackingLatestEstimatedDelivery +from tracking.models.tracking_carbon_emissions import TrackingCarbonEmissions +from tracking.models.tracking_signature_requirement import TrackingSignatureRequirement +from tracking.models.tracking_first_mile import TrackingFirstMile +from tracking.models.tracking_last_mile import TrackingLastMile +from tracking.models.tracking_customers import TrackingCustomers class Tracking(BaseModel): @@ -42,7 +43,7 @@ class Tracking(BaseModel): tracking_number: Optional[str] = None slug: Optional[str] = None active: Optional[bool] = None - custom_fields: Optional[Any] = None + custom_fields: Optional[dict] = None transit_time: Optional[int] = None origin_country_region: Optional[str] = None origin_state: Optional[str] = None @@ -55,7 +56,7 @@ class Tracking(BaseModel): destination_postal_code: Optional[str] = None destination_raw_location: Optional[str] = None courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[CourierEstimatedDeliveryDateTracking] = None + courier_estimated_delivery_date: Optional[TrackingCourierEstimatedDeliveryDate] = None note: Optional[str] = None order_id: Optional[str] = None order_id_path: Optional[str] = None @@ -64,7 +65,7 @@ class Tracking(BaseModel): shipment_pickup_date: Optional[str] = None shipment_delivery_date: Optional[str] = None shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightTracking] = None + shipment_weight: Optional[TrackingShipmentWeight] = None signed_by: Optional[str] = None source: Optional[str] = None tag: Optional[Tag] = None @@ -92,24 +93,24 @@ class Tracking(BaseModel): on_time_status: Optional[str] = None on_time_difference: Optional[float] = None order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[AftershipEstimatedDeliveryDateTracking] = None - custom_estimated_delivery_date: Optional[CustomEstimatedDeliveryDateTracking] = None + aftership_estimated_delivery_date: Optional[TrackingAftershipEstimatedDeliveryDate] = None + custom_estimated_delivery_date: Optional[TrackingCustomEstimatedDeliveryDate] = None order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryTracking] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryTracking] = None + first_estimated_delivery: Optional[TrackingFirstEstimatedDelivery] = None + latest_estimated_delivery: Optional[TrackingLatestEstimatedDelivery] = None shipment_tags: Optional[List[str]] = None courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsTracking] = None + carbon_emissions: Optional[TrackingCarbonEmissions] = None location_id: Optional[str] = None shipping_method: Optional[str] = None failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None + signature_requirement: Optional[TrackingSignatureRequirement] = None delivery_location_type: Optional[str] = None aftership_tracking_url: Optional[str] = None aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileTracking] = None - last_mile: Optional[LastMileTracking] = None - customers: Optional[List[CustomersTracking]] = None + first_mile: Optional[TrackingFirstMile] = None + last_mile: Optional[TrackingLastMile] = None + customers: Optional[List[TrackingCustomers]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/aftership_estimated_delivery_date_create_tracking_response.py b/tracking/models/tracking_aftership_estimated_delivery_date.py similarity index 82% rename from tracking/models/aftership_estimated_delivery_date_create_tracking_response.py rename to tracking/models/tracking_aftership_estimated_delivery_date.py index 3bade42..4ca6167 100644 --- a/tracking/models/aftership_estimated_delivery_date_create_tracking_response.py +++ b/tracking/models/tracking_aftership_estimated_delivery_date.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class AftershipEstimatedDeliveryDateCreateTrackingResponse(BaseModel): +class TrackingAftershipEstimatedDeliveryDate(BaseModel): """ - AftershipEstimatedDeliveryDateCreateTrackingResponse + 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. """ # noqa: E501 estimated_delivery_date: Optional[str] = None diff --git a/tracking/models/tracking_carbon_emissions.py b/tracking/models/tracking_carbon_emissions.py new file mode 100644 index 0000000..27b04bd --- /dev/null +++ b/tracking/models/tracking_carbon_emissions.py @@ -0,0 +1,37 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from __future__ import annotations +import pprint + +from pydantic import BaseModel +from typing import Any, Dict, Optional +from typing_extensions import Self + + +class TrackingCarbonEmissions(BaseModel): + """ + 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. + """ # noqa: E501 + + unit: Optional[str] = None + value: Optional[float] = None + + def to_str(self, **kwargs) -> str: + return pprint.pformat(self.model_dump(**kwargs)) + + def to_json(self, **kwargs) -> str: + return self.model_dump_json(**kwargs) + + def to_dict(self, **kwargs) -> Dict[str, Any]: + return self.model_dump(**kwargs) + + @classmethod + def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: + return cls.model_validate_json(json_str, **kwargs) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: + return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/courier_estimated_delivery_date_get_tracking_by_id_response.py b/tracking/models/tracking_courier_estimated_delivery_date.py similarity index 89% rename from tracking/models/courier_estimated_delivery_date_get_tracking_by_id_response.py rename to tracking/models/tracking_courier_estimated_delivery_date.py index ff14e21..223a3b5 100644 --- a/tracking/models/courier_estimated_delivery_date_get_tracking_by_id_response.py +++ b/tracking/models/tracking_courier_estimated_delivery_date.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CourierEstimatedDeliveryDateGetTrackingByIdResponse(BaseModel): +class TrackingCourierEstimatedDeliveryDate(BaseModel): """ - CourierEstimatedDeliveryDateGetTrackingByIdResponse + The field contains the estimated delivery date provided by the carrier. """ # noqa: E501 estimated_delivery_date: Optional[str] = None diff --git a/tracking/models/latest_estimated_delivery_get_tracking_by_id_response.py b/tracking/models/tracking_custom_estimated_delivery_date.py similarity index 72% rename from tracking/models/latest_estimated_delivery_get_tracking_by_id_response.py rename to tracking/models/tracking_custom_estimated_delivery_date.py index 188b828..2569727 100644 --- a/tracking/models/latest_estimated_delivery_get_tracking_by_id_response.py +++ b/tracking/models/tracking_custom_estimated_delivery_date.py @@ -10,18 +10,20 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.tracking_custom_estimated_delivery_date_type import ( + TrackingCustomEstimatedDeliveryDateType, +) -class LatestEstimatedDeliveryGetTrackingByIdResponse(BaseModel): + +class TrackingCustomEstimatedDeliveryDate(BaseModel): """ - LatestEstimatedDeliveryGetTrackingByIdResponse + Estimated delivery time of the shipment based on your . It uses the format `YYYY-MM-DD` based on the shipment recipient’s timezone. """ # noqa: E501 - type: Optional[str] = None - source: Optional[str] = None + type: Optional[TrackingCustomEstimatedDeliveryDateType] = None datetime: Optional[str] = None datetime_min: Optional[str] = None datetime_max: Optional[str] = None - revise_reason: Optional[str] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/tracking_custom_estimated_delivery_date_type.py b/tracking/models/tracking_custom_estimated_delivery_date_type.py new file mode 100644 index 0000000..60f6f50 --- /dev/null +++ b/tracking/models/tracking_custom_estimated_delivery_date_type.py @@ -0,0 +1,18 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingCustomEstimatedDeliveryDateType(Enum): + """ + The format of the EDD. Either a single date or a date range. + + allowed enum values + """ + + RANGE = "range" + SPECIFIC = "specific" diff --git a/tracking/models/customers_tracking.py b/tracking/models/tracking_customers.py similarity index 94% rename from tracking/models/customers_tracking.py rename to tracking/models/tracking_customers.py index e16db7e..a975fed 100644 --- a/tracking/models/customers_tracking.py +++ b/tracking/models/tracking_customers.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CustomersTracking(BaseModel): +class TrackingCustomers(BaseModel): """ - CustomersTracking + TrackingCustomers """ # noqa: E501 role: Optional[str] = None diff --git a/tracking/models/custom_estimated_delivery_date_delete_tracking_by_id_response.py b/tracking/models/tracking_first_estimated_delivery.py similarity index 56% rename from tracking/models/custom_estimated_delivery_date_delete_tracking_by_id_response.py rename to tracking/models/tracking_first_estimated_delivery.py index 17e2ea1..ef08524 100644 --- a/tracking/models/custom_estimated_delivery_date_delete_tracking_by_id_response.py +++ b/tracking/models/tracking_first_estimated_delivery.py @@ -10,13 +10,21 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.tracking_first_estimated_delivery_type import ( + TrackingFirstEstimatedDeliveryType, +) +from tracking.models.tracking_first_estimated_delivery_source import ( + TrackingFirstEstimatedDeliverySource, +) -class CustomEstimatedDeliveryDateDeleteTrackingByIdResponse(BaseModel): + +class TrackingFirstEstimatedDelivery(BaseModel): """ - CustomEstimatedDeliveryDateDeleteTrackingByIdResponse + 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. """ # noqa: E501 - type: Optional[str] = None + type: Optional[TrackingFirstEstimatedDeliveryType] = None + source: Optional[TrackingFirstEstimatedDeliverySource] = None datetime: Optional[str] = None datetime_min: Optional[str] = None datetime_max: Optional[str] = None diff --git a/tracking/models/tracking_first_estimated_delivery_source.py b/tracking/models/tracking_first_estimated_delivery_source.py new file mode 100644 index 0000000..6aeca6a --- /dev/null +++ b/tracking/models/tracking_first_estimated_delivery_source.py @@ -0,0 +1,20 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingFirstEstimatedDeliverySource(Enum): + """ + The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. + + allowed enum values + """ + + CARRIER_EDD = "Carrier EDD" + AFTER_SHIP_EDD = "AfterShip EDD" + CUSTOM_EDD = "Custom EDD" + ORDER_EDD = "Order EDD" diff --git a/tracking/models/tracking_first_estimated_delivery_type.py b/tracking/models/tracking_first_estimated_delivery_type.py new file mode 100644 index 0000000..3ed8494 --- /dev/null +++ b/tracking/models/tracking_first_estimated_delivery_type.py @@ -0,0 +1,18 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingFirstEstimatedDeliveryType(Enum): + """ + The format of the EDD. Either a single date or a date range. + + allowed enum values + """ + + RANGE = "range" + SPECIFIC = "specific" diff --git a/tracking/models/first_mile_create_tracking_response.py b/tracking/models/tracking_first_mile.py similarity index 76% rename from tracking/models/first_mile_create_tracking_response.py rename to tracking/models/tracking_first_mile.py index 0c18c5a..7a03d19 100644 --- a/tracking/models/first_mile_create_tracking_response.py +++ b/tracking/models/tracking_first_mile.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class FirstMileCreateTrackingResponse(BaseModel): +class TrackingFirstMile(BaseModel): """ - FirstMileCreateTrackingResponse + 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. """ # noqa: E501 tracking_number: Optional[str] = None diff --git a/tracking/models/first_mile_get_tracking_by_id_response.py b/tracking/models/tracking_last_mile.py similarity index 62% rename from tracking/models/first_mile_get_tracking_by_id_response.py rename to tracking/models/tracking_last_mile.py index fa3d101..49c79f3 100644 --- a/tracking/models/first_mile_get_tracking_by_id_response.py +++ b/tracking/models/tracking_last_mile.py @@ -10,17 +10,20 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.tracking_last_mile_source import TrackingLastMileSource -class FirstMileGetTrackingByIdResponse(BaseModel): + +class TrackingLastMile(BaseModel): """ - FirstMileGetTrackingByIdResponse + 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. """ # noqa: E501 tracking_number: Optional[str] = None slug: Optional[str] = None transit_time: Optional[int] = None - courier_redirect_link: Optional[str] = None courier_tracking_link: Optional[str] = None + courier_redirect_link: Optional[str] = None + source: Optional[TrackingLastMileSource] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/tracking_last_mile_source.py b/tracking/models/tracking_last_mile_source.py new file mode 100644 index 0000000..6d04ea8 --- /dev/null +++ b/tracking/models/tracking_last_mile_source.py @@ -0,0 +1,18 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingLastMileSource(Enum): + """ + The field indicates the source of last-mile carrier. + + allowed enum values + """ + + SYSTEM = "system" + USER = "user" diff --git a/tracking/models/latest_estimated_delivery_create_tracking_response.py b/tracking/models/tracking_latest_estimated_delivery.py similarity index 56% rename from tracking/models/latest_estimated_delivery_create_tracking_response.py rename to tracking/models/tracking_latest_estimated_delivery.py index d9d8b2f..30d0c8a 100644 --- a/tracking/models/latest_estimated_delivery_create_tracking_response.py +++ b/tracking/models/tracking_latest_estimated_delivery.py @@ -10,14 +10,21 @@ from typing import Any, Dict, Optional from typing_extensions import Self +from tracking.models.tracking_latest_estimated_delivery_type import ( + TrackingLatestEstimatedDeliveryType, +) +from tracking.models.tracking_latest_estimated_delivery_source import ( + TrackingLatestEstimatedDeliverySource, +) -class LatestEstimatedDeliveryCreateTrackingResponse(BaseModel): + +class TrackingLatestEstimatedDelivery(BaseModel): """ - LatestEstimatedDeliveryCreateTrackingResponse + 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. """ # noqa: E501 - type: Optional[str] = None - source: Optional[str] = None + type: Optional[TrackingLatestEstimatedDeliveryType] = None + source: Optional[TrackingLatestEstimatedDeliverySource] = None datetime: Optional[str] = None datetime_min: Optional[str] = None datetime_max: Optional[str] = None diff --git a/tracking/models/tracking_latest_estimated_delivery_source.py b/tracking/models/tracking_latest_estimated_delivery_source.py new file mode 100644 index 0000000..080b55d --- /dev/null +++ b/tracking/models/tracking_latest_estimated_delivery_source.py @@ -0,0 +1,20 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingLatestEstimatedDeliverySource(Enum): + """ + The source of the EDD. Either the carrier, AfterShip AI, or based on your custom EDD settings. + + allowed enum values + """ + + CARRIER_EDD = "Carrier EDD" + AFTER_SHIP_EDD = "AfterShip EDD" + CUSTOM_EDD = "Custom EDD" + ORDER_EDD = "Order EDD" diff --git a/tracking/models/tracking_latest_estimated_delivery_type.py b/tracking/models/tracking_latest_estimated_delivery_type.py new file mode 100644 index 0000000..676d5f4 --- /dev/null +++ b/tracking/models/tracking_latest_estimated_delivery_type.py @@ -0,0 +1,18 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingLatestEstimatedDeliveryType(Enum): + """ + The format of the EDD. Either a single date or a date range. + + allowed enum values + """ + + RANGE = "range" + SPECIFIC = "specific" diff --git a/tracking/models/tracking_response_for_get_trackings.py b/tracking/models/tracking_response_for_get_trackings.py index af2cdbb..61ccb63 100644 --- a/tracking/models/tracking_response_for_get_trackings.py +++ b/tracking/models/tracking_response_for_get_trackings.py @@ -11,8 +11,8 @@ from typing_extensions import Self from tracking.models.meta import Meta -from tracking.models.data_tracking_response_for_get_trackings import ( - DataTrackingResponseForGetTrackings, +from tracking.models.tracking_response_for_get_trackings_data import ( + TrackingResponseForGetTrackingsData, ) @@ -22,7 +22,7 @@ class TrackingResponseForGetTrackings(BaseModel): """ # noqa: E501 meta: Optional[Meta] = None - data: Optional[DataTrackingResponseForGetTrackings] = None + data: Optional[TrackingResponseForGetTrackingsData] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/estimated_pickup_predict_request.py b/tracking/models/tracking_response_for_get_trackings_data.py similarity index 67% rename from tracking/models/estimated_pickup_predict_request.py rename to tracking/models/tracking_response_for_get_trackings_data.py index b9cf041..da1e4d3 100644 --- a/tracking/models/estimated_pickup_predict_request.py +++ b/tracking/models/tracking_response_for_get_trackings_data.py @@ -10,20 +10,19 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.order_processing_time_estimated_pickup_predict_request import ( - OrderProcessingTimeEstimatedPickupPredictRequest, +from tracking.models.tracking_response_for_get_trackings_data_pagination import ( + TrackingResponseForGetTrackingsDataPagination, ) +from tracking.models.tracking import Tracking -class EstimatedPickupPredictRequest(BaseModel): +class TrackingResponseForGetTrackingsData(BaseModel): """ - EstimatedPickupPredictRequest + TrackingResponseForGetTrackingsData """ # noqa: E501 - order_time: Optional[str] = None - order_cutoff_time: Optional[str] = None - business_days: Optional[List[int]] = None - order_processing_time: Optional[OrderProcessingTimeEstimatedPickupPredictRequest] = None + pagination: Optional[TrackingResponseForGetTrackingsDataPagination] = None + trackings: Optional[List[Tracking]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/pagination_get_courier_connections_response.py b/tracking/models/tracking_response_for_get_trackings_data_pagination.py similarity index 85% rename from tracking/models/pagination_get_courier_connections_response.py rename to tracking/models/tracking_response_for_get_trackings_data_pagination.py index 62fbeaa..0f244de 100644 --- a/tracking/models/pagination_get_courier_connections_response.py +++ b/tracking/models/tracking_response_for_get_trackings_data_pagination.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class PaginationGetCourierConnectionsResponse(BaseModel): +class TrackingResponseForGetTrackingsDataPagination(BaseModel): """ - PaginationGetCourierConnectionsResponse + The Pagination holds the information for the pagination when the response contains multiple objects. """ # noqa: E501 total: Optional[int] = None diff --git a/tracking/models/tracking_shipment_weight.py b/tracking/models/tracking_shipment_weight.py new file mode 100644 index 0000000..6d3e716 --- /dev/null +++ b/tracking/models/tracking_shipment_weight.py @@ -0,0 +1,37 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from __future__ import annotations +import pprint + +from pydantic import BaseModel +from typing import Any, Dict, Optional +from typing_extensions import Self + + +class TrackingShipmentWeight(BaseModel): + """ + 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 + """ # noqa: E501 + + unit: Optional[str] = None + value: Optional[float] = None + + def to_str(self, **kwargs) -> str: + return pprint.pformat(self.model_dump(**kwargs)) + + def to_json(self, **kwargs) -> str: + return self.model_dump_json(**kwargs) + + def to_dict(self, **kwargs) -> Dict[str, Any]: + return self.model_dump(**kwargs) + + @classmethod + def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: + return cls.model_validate_json(json_str, **kwargs) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: + return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/tracking_signature_requirement.py b/tracking/models/tracking_signature_requirement.py new file mode 100644 index 0000000..426ab12 --- /dev/null +++ b/tracking/models/tracking_signature_requirement.py @@ -0,0 +1,21 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class TrackingSignatureRequirement(Enum): + """ + 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.
+ + allowed enum values + """ + + SIGNATURE_REQUIRED = "signature_required" + ADULT_SIGNATURE_REQUIRED = "adult_signature_required" + INDIRECT_SIGNATURE_REQUIRED = "indirect_signature_required" + NO_SIGNATURE_REQUIRED = "no_signature_required" + NULL = "null" diff --git a/tracking/models/update_tracking_by_id_request.py b/tracking/models/update_tracking_by_id_request.py index eb1cf18..acc950c 100644 --- a/tracking/models/update_tracking_by_id_request.py +++ b/tracking/models/update_tracking_by_id_request.py @@ -10,8 +10,11 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.customers_update_tracking_by_id_request import ( - CustomersUpdateTrackingByIdRequest, +from tracking.models.update_tracking_by_id_request_delivery_type import ( + UpdateTrackingByIdRequestDeliveryType, +) +from tracking.models.update_tracking_by_id_request_customers import ( + UpdateTrackingByIdRequestCustomers, ) @@ -23,11 +26,11 @@ class UpdateTrackingByIdRequest(BaseModel): title: Optional[str] = None order_id: Optional[str] = None order_id_path: Optional[str] = None - custom_fields: Optional[Any] = None + custom_fields: Optional[dict] = None note: Optional[str] = None language: Optional[str] = None order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None + delivery_type: Optional[UpdateTrackingByIdRequestDeliveryType] = None pickup_location: Optional[str] = None pickup_note: Optional[str] = None slug: Optional[str] = None @@ -49,7 +52,7 @@ class UpdateTrackingByIdRequest(BaseModel): destination_raw_location: Optional[str] = None location_id: Optional[str] = None shipping_method: Optional[str] = None - customers: Optional[List[CustomersUpdateTrackingByIdRequest]] = None + customers: Optional[List[UpdateTrackingByIdRequestCustomers]] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/customers_create_tracking_response.py b/tracking/models/update_tracking_by_id_request_customers.py similarity index 92% rename from tracking/models/customers_create_tracking_response.py rename to tracking/models/update_tracking_by_id_request_customers.py index 5b68032..3f10c06 100644 --- a/tracking/models/customers_create_tracking_response.py +++ b/tracking/models/update_tracking_by_id_request_customers.py @@ -11,9 +11,9 @@ from typing_extensions import Self -class CustomersCreateTrackingResponse(BaseModel): +class UpdateTrackingByIdRequestCustomers(BaseModel): """ - CustomersCreateTrackingResponse + UpdateTrackingByIdRequestCustomers """ # noqa: E501 role: Optional[str] = None diff --git a/tracking/models/update_tracking_by_id_request_delivery_type.py b/tracking/models/update_tracking_by_id_request_delivery_type.py new file mode 100644 index 0000000..d687b96 --- /dev/null +++ b/tracking/models/update_tracking_by_id_request_delivery_type.py @@ -0,0 +1,19 @@ +# coding: utf-8 +# +# This code was auto generated by AfterShip SDK Generator. +# Do not edit the class manually. + +from enum import Enum, unique + + +@unique +class UpdateTrackingByIdRequestDeliveryType(Enum): + """ + Shipment delivery type- `pickup_at_store`- `pickup_at_courier`- `door_to_door` + + allowed enum values + """ + + PICKUP_AT_STORE = "pickup_at_store" + PICKUP_AT_COURIER = "pickup_at_courier" + DOOR_TO_DOOR = "door_to_door" diff --git a/tracking/models/update_tracking_by_id_response.py b/tracking/models/update_tracking_by_id_response.py index dea8cea..ccd442b 100644 --- a/tracking/models/update_tracking_by_id_response.py +++ b/tracking/models/update_tracking_by_id_response.py @@ -10,126 +10,16 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.courier_estimated_delivery_date_update_tracking_by_id_response import ( - CourierEstimatedDeliveryDateUpdateTrackingByIdResponse, -) -from tracking.models.shipment_weight_update_tracking_by_id_response import ( - ShipmentWeightUpdateTrackingByIdResponse, -) -from tracking.models.tag import Tag -from tracking.models.checkpoint import Checkpoint -from tracking.models.aftership_estimated_delivery_date_update_tracking_by_id_response import ( - AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse, -) -from tracking.models.custom_estimated_delivery_date_update_tracking_by_id_response import ( - CustomEstimatedDeliveryDateUpdateTrackingByIdResponse, -) -from tracking.models.first_estimated_delivery_update_tracking_by_id_response import ( - FirstEstimatedDeliveryUpdateTrackingByIdResponse, -) -from tracking.models.latest_estimated_delivery_update_tracking_by_id_response import ( - LatestEstimatedDeliveryUpdateTrackingByIdResponse, -) -from tracking.models.carbon_emissions_update_tracking_by_id_response import ( - CarbonEmissionsUpdateTrackingByIdResponse, -) -from tracking.models.first_mile_update_tracking_by_id_response import ( - FirstMileUpdateTrackingByIdResponse, -) -from tracking.models.last_mile_update_tracking_by_id_response import ( - LastMileUpdateTrackingByIdResponse, -) -from tracking.models.customers_update_tracking_by_id_response import ( - CustomersUpdateTrackingByIdResponse, -) +from tracking.models.tracking import Tracking class UpdateTrackingByIdResponse(BaseModel): """ - Object describes the tracking information.
- """ # noqa: E501 + Object describes the tracking information.<div style="display:none; height: 0"></div> + """ - id: Optional[str] = None - legacy_id: Optional[str] = None - created_at: Optional[str] = None - updated_at: Optional[str] = None - tracking_number: Optional[str] = None - slug: Optional[str] = None - active: Optional[bool] = None - custom_fields: Optional[Any] = None - transit_time: Optional[int] = None - origin_country_region: Optional[str] = None - origin_state: Optional[str] = None - origin_city: Optional[str] = None - origin_postal_code: Optional[str] = None - origin_raw_location: Optional[str] = None - destination_country_region: Optional[str] = None - destination_state: Optional[str] = None - destination_city: Optional[str] = None - destination_postal_code: Optional[str] = None - destination_raw_location: Optional[str] = None - courier_destination_country_region: Optional[str] = None - courier_estimated_delivery_date: Optional[ - CourierEstimatedDeliveryDateUpdateTrackingByIdResponse - ] = None - note: Optional[str] = None - order_id: Optional[str] = None - order_id_path: Optional[str] = None - order_date: Optional[str] = None - shipment_package_count: Optional[float] = None - shipment_pickup_date: Optional[str] = None - shipment_delivery_date: Optional[str] = None - shipment_type: Optional[str] = None - shipment_weight: Optional[ShipmentWeightUpdateTrackingByIdResponse] = None - signed_by: Optional[str] = None - source: Optional[str] = None - tag: Optional[Tag] = None - subtag: Optional[str] = None - subtag_message: Optional[str] = None - title: Optional[str] = None - tracked_count: Optional[float] = None - last_mile_tracking_supported: Optional[bool] = None - language: Optional[str] = None - unique_token: Optional[str] = None - checkpoints: Optional[List[Checkpoint]] = None - subscribed_smses: Optional[List[str]] = None - subscribed_emails: Optional[List[str]] = None - return_to_sender: Optional[bool] = None - order_promised_delivery_date: Optional[str] = None - delivery_type: Optional[str] = None - pickup_location: Optional[str] = None - pickup_note: Optional[str] = None - courier_tracking_link: Optional[str] = None - first_attempted_at: Optional[str] = None - courier_redirect_link: Optional[str] = None - tracking_account_number: Optional[str] = None - tracking_key: Optional[str] = None - tracking_ship_date: Optional[str] = None - on_time_status: Optional[str] = None - on_time_difference: Optional[float] = None - order_tags: Optional[List[str]] = None - aftership_estimated_delivery_date: Optional[ - AftershipEstimatedDeliveryDateUpdateTrackingByIdResponse - ] = None - custom_estimated_delivery_date: Optional[ - CustomEstimatedDeliveryDateUpdateTrackingByIdResponse - ] = None - order_number: Optional[str] = None - first_estimated_delivery: Optional[FirstEstimatedDeliveryUpdateTrackingByIdResponse] = None - latest_estimated_delivery: Optional[LatestEstimatedDeliveryUpdateTrackingByIdResponse] = None - shipment_tags: Optional[List[str]] = None - courier_connection_id: Optional[str] = None - carbon_emissions: Optional[CarbonEmissionsUpdateTrackingByIdResponse] = None - location_id: Optional[str] = None - shipping_method: Optional[str] = None - failed_delivery_attempts: Optional[int] = None - signature_requirement: Optional[str] = None - delivery_location_type: Optional[str] = None - aftership_tracking_url: Optional[str] = None - aftership_tracking_order_url: Optional[str] = None - first_mile: Optional[FirstMileUpdateTrackingByIdResponse] = None - last_mile: Optional[LastMileUpdateTrackingByIdResponse] = None - customers: Optional[List[CustomersUpdateTrackingByIdResponse]] = None + response_header: Dict[str, List[str]] = {} + data: Optional[Tracking] = None def to_str(self, **kwargs) -> str: return pprint.pformat(self.model_dump(**kwargs)) diff --git a/tracking/models/weight_estimated_delivery_date_request.py b/tracking/models/weight_estimated_delivery_date_request.py deleted file mode 100644 index f3937f8..0000000 --- a/tracking/models/weight_estimated_delivery_date_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class WeightEstimatedDeliveryDateRequest(BaseModel): - """ - WeightEstimatedDeliveryDateRequest - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/weight_estimated_delivery_date_response.py b/tracking/models/weight_estimated_delivery_date_response.py deleted file mode 100644 index c84f770..0000000 --- a/tracking/models/weight_estimated_delivery_date_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class WeightEstimatedDeliveryDateResponse(BaseModel): - """ - WeightEstimatedDeliveryDateResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/weight_predict_request.py b/tracking/models/weight_predict_request.py deleted file mode 100644 index baf0b93..0000000 --- a/tracking/models/weight_predict_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class WeightPredictRequest(BaseModel): - """ - WeightPredictRequest - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/models/weight_predict_response.py b/tracking/models/weight_predict_response.py deleted file mode 100644 index c0205e3..0000000 --- a/tracking/models/weight_predict_response.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from __future__ import annotations -import pprint - -from pydantic import BaseModel -from typing import Any, Dict, Optional -from typing_extensions import Self - - -class WeightPredictResponse(BaseModel): - """ - WeightPredictResponse - """ # noqa: E501 - - unit: Optional[str] = None - value: Optional[float] = None - - def to_str(self, **kwargs) -> str: - return pprint.pformat(self.model_dump(**kwargs)) - - def to_json(self, **kwargs) -> str: - return self.model_dump_json(**kwargs) - - def to_dict(self, **kwargs) -> Dict[str, Any]: - return self.model_dump(**kwargs) - - @classmethod - def from_json(cls, json_str: str, **kwargs) -> Optional[Self]: - return cls.model_validate_json(json_str, **kwargs) - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]], **kwargs) -> Optional[Self]: - return cls.model_validate(obj, **kwargs) if isinstance(obj, Dict) else None diff --git a/tracking/request.py b/tracking/request.py index 6de076d..0dc5e97 100644 --- a/tracking/request.py +++ b/tracking/request.py @@ -17,7 +17,7 @@ from tracking.response import parse_response from tracking.exceptions import ApiException, TimedOutError, BadRequestError, ErrorCodeEnum -_default_user_agent = "aftership-sdk-python/7.1.0 (https://www.aftership.com) httpx/0.19.0" +_default_user_agent = "tracking-sdk-python/8.0.0 (https://www.aftership.com) httpx/0.19.0" def validate_params(func): @@ -27,7 +27,7 @@ def wrapper(*args, **kwargs): funcx = validate_call(func) return funcx(*args, **kwargs) except ValidationError as e: - raise BadRequestError(code=ErrorCodeEnum.INVALID_OPTION, message=e) + raise BadRequestError(code=ErrorCodeEnum.BAD_REQUEST, message=e) return wrapper @@ -129,11 +129,8 @@ def wrap(ssl_ctx, req): response = client.send(req) except httpx.TimeoutException as e: raise TimedOutError( - code=ErrorCodeEnum.UNKNOW_ERROR, - meta_code=500, - status_code=500, + code=ErrorCodeEnum.TIMED_OUT, message=f"{e.__module__}.{e.__class__.__name__}: {e}", - response_body="", ) return parse_response(response) diff --git a/tracking/response.py b/tracking/response.py index 6cf1500..f65486b 100644 --- a/tracking/response.py +++ b/tracking/response.py @@ -31,7 +31,7 @@ } _error_meta_code_mapping = { - "400": ErrorCodeEnum.INTERNAL_ERROR, + "400": ErrorCodeEnum.INVALID_REQUEST, "4001": ErrorCodeEnum.INVALID_JSON, "4003": ErrorCodeEnum.TRACKING_ALREADY_EXIST, "4004": ErrorCodeEnum.TRACKING_DOES_NOT_EXIST, @@ -44,7 +44,7 @@ "4011": ErrorCodeEnum.MISSING_OR_INVALID_REQUIRED_FIELD, "4012": ErrorCodeEnum.BAD_COURIER, "4013": ErrorCodeEnum.INACTIVE_RETRACK_NOT_ALLOWED, - "4014": ErrorCodeEnum.NOTIFICATION_REUQIRED, + "4014": ErrorCodeEnum.NOTIFICATION_REQUIRED, "4015": ErrorCodeEnum.ID_INVALID, "4016": ErrorCodeEnum.RETRACK_ONCE_ALLOWED, "4017": ErrorCodeEnum.TRACKING_NUMBER_FORMAT_INVALID, @@ -54,22 +54,21 @@ "429": ErrorCodeEnum.TOO_MANY_REQUEST, "500": ErrorCodeEnum.INTERNAL_ERROR, "502": ErrorCodeEnum.INTERNAL_ERROR, + "503": ErrorCodeEnum.INTERNAL_ERROR, "504": ErrorCodeEnum.INTERNAL_ERROR, } -def get_error_code(meta_code: int) -> str: - if _error_meta_code_mapping.get(str(meta_code)): - return str(_error_meta_code_mapping[str(meta_code)]) - return str(ErrorCodeEnum.INTERNAL_ERROR) - - def parse_response(response: httpx.Response) -> Union[dict, None]: + headers = {k: response.headers.get_list(k) for k in response.headers.keys()} try: json_data = response.json() if response.status_code < 300: - return json_data["data"] + return { + "response_header": headers, + "data": json_data.get("data"), + } error_type = json_data["meta"]["type"] if error_type in error_mapping: @@ -77,20 +76,29 @@ def parse_response(response: httpx.Response) -> Union[dict, None]: else: error_cls = UnknownError + meta_code = json_data["meta"]["code"] + error_code = _error_meta_code_mapping.get(str(meta_code)) + if error_code is None: + if response.status_code >= 500: + error_code = ErrorCodeEnum.UNKNOWN_ERROR + elif response.status_code >= 400: + error_code = ErrorCodeEnum.BAD_REQUEST + else: + error_code = ErrorCodeEnum.UNKNOWN_ERROR + raise error_cls( - code=get_error_code(json_data["meta"]["code"]), - meta_code=json_data["meta"]["code"], + code=error_code, + meta_code=meta_code, status_code=response.status_code, message=json_data["meta"]["message"], response_body=response.text, - response_header=response.headers, + response_header=headers, ) except (json.JSONDecodeError, KeyError) as e: raise UnknownError( - code=ErrorCodeEnum.UNKNOW_ERROR, - meta_code=500, + code=ErrorCodeEnum.UNKNOWN_ERROR, status_code=response.status_code, message=f"{e.__module__}.{e.__class__.__name__}: {e}", response_body=response.text, - response_header=response.headers, + response_header=headers, ) From c45d00c4403c105f0ec55ab031f792792d969865 Mon Sep 17 00:00:00 2001 From: Watson Zuo Date: Mon, 20 Oct 2025 17:09:41 +0800 Subject: [PATCH 2/2] update slug group to string --- README.md | 166 +++++++++++----------- tracking/api/__init__.py | 8 +- tracking/client.py | 8 +- tracking/models/__init__.py | 2 - tracking/models/detect_courier_request.py | 4 +- tracking/models/slug_group.py | 28 ---- 6 files changed, 92 insertions(+), 124 deletions(-) delete mode 100644 tracking/models/slug_group.py diff --git a/README.md b/README.md index ace3f58..d8ecef3 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ If you need support using AfterShip products, please contact support@aftership.c - [Error Handling](#error-handling) - [Error List](#error-list) - [Endpoints](#endpoints) - - [/trackings](#trackings) - - [/couriers](#couriers) - [/courier-connections](#courier-connections) - [/estimated-delivery-date](#estimated-delivery-date) + - [/trackings](#trackings) + - [/couriers](#couriers) - [Help](#help) - [License](#license) @@ -145,6 +145,15 @@ The SDK will return an error object when there is any error during the request, The AfterShip instance has the following properties which are exactly the same as the API endpoints: +- courier_connection + - Get courier connections + - Create courier connections + - Get courier connection by id + - Update courier connection by id + - Delete courier connection by id +- estimated_delivery_date + - Prediction for the Estimated Delivery Date + - Batch prediction for the Estimated Delivery Date - tracking - Get trackings - Create a tracking @@ -156,22 +165,13 @@ The AfterShip instance has the following properties which are exactly the same a - courier - Get couriers - Detect courier -- courier_connection - - Get courier connections - - Create courier connections - - Get courier connection by id - - Update courier connection by id - - Delete courier connection by id -- estimated_delivery_date - - Prediction for the Estimated Delivery Date - - Batch prediction for the Estimated Delivery Date -### /trackings -**GET** /trackings +### /courier-connections +**GET** /courier-connections ```python -result = sdk.tracking.get_trackings( +result = sdk.courier_connection.get_courier_connections( @@ -179,16 +179,19 @@ result = sdk.tracking.get_trackings( print(result) ``` -**POST** /trackings +**POST** /courier-connections ```python -req = tracking.CreateTrackingRequest() +req = tracking.PostCourierConnectionsRequest() -req.tracking_number = 'valid_value' +req.courier_slug = 'valid_value' -result = sdk.tracking.create_tracking( +req.credentials = {} + + +result = sdk.courier_connection.post_courier_connections( req, @@ -196,11 +199,11 @@ result = sdk.tracking.create_tracking( print(result) ``` -**GET** /trackings/{id} +**GET** /courier-connections/{id} ```python -result = sdk.tracking.get_tracking_by_id( +result = sdk.courier_connection.get_courier_connections_by_id( 'valid_value', @@ -208,13 +211,16 @@ result = sdk.tracking.get_tracking_by_id( print(result) ``` -**PUT** /trackings/{id} +**PATCH** /courier-connections/{id} ```python -req = tracking.UpdateTrackingByIdRequest() +req = tracking.PutCourierConnectionsByIdRequest() -result = sdk.tracking.update_tracking_by_id( +req.credentials = {} + + +result = sdk.courier_connection.put_courier_connections_by_id( 'valid_value', req, @@ -222,11 +228,11 @@ result = sdk.tracking.update_tracking_by_id( print(result) ``` -**DELETE** /trackings/{id} +**DELETE** /courier-connections/{id} ```python -result = sdk.tracking.delete_tracking_by_id( +result = sdk.courier_connection.delete_courier_connections_by_id( 'valid_value', @@ -234,39 +240,51 @@ result = sdk.tracking.delete_tracking_by_id( print(result) ``` -**POST** /trackings/{id}/retrack +### /estimated-delivery-date +**POST** /estimated-delivery-date/predict ```python +req = tracking.EstimatedDeliveryDateRequest() -result = sdk.tracking.retrack_tracking_by_id( - 'valid_value', + +req.slug = 'valid_value' + + +req.origin_address = tracking.EstimatedDeliveryDateRequestOriginAddress() + + +req.destination_address = tracking.EstimatedDeliveryDateRequestDestinationAddress() + + +result = sdk.estimated_delivery_date.predict( + req, ) print(result) ``` -**POST** /trackings/{id}/mark-as-completed +**POST** /estimated-delivery-date/predict-batch ```python -req = tracking.MarkTrackingCompletedByIdRequest() +req = tracking.PredictBatchRequest() -result = sdk.tracking.mark_tracking_completed_by_id( - 'valid_value', +result = sdk.estimated_delivery_date.predict_batch( + req, ) print(result) ``` -### /couriers -**GET** /couriers +### /trackings +**GET** /trackings ```python -result = sdk.courier.get_couriers( +result = sdk.tracking.get_trackings( @@ -274,16 +292,16 @@ result = sdk.courier.get_couriers( print(result) ``` -**POST** /couriers/detect +**POST** /trackings ```python -req = tracking.DetectCourierRequest() +req = tracking.CreateTrackingRequest() req.tracking_number = 'valid_value' -result = sdk.courier.detect_courier( +result = sdk.tracking.create_tracking( req, @@ -291,44 +309,37 @@ result = sdk.courier.detect_courier( print(result) ``` -### /courier-connections -**GET** /courier-connections +**GET** /trackings/{id} ```python -result = sdk.courier_connection.get_courier_connections( - +result = sdk.tracking.get_tracking_by_id( + 'valid_value', ) print(result) ``` -**POST** /courier-connections +**PUT** /trackings/{id} ```python -req = tracking.PostCourierConnectionsRequest() - - -req.courier_slug = 'valid_value' - - -req.credentials = {} +req = tracking.UpdateTrackingByIdRequest() -result = sdk.courier_connection.post_courier_connections( - +result = sdk.tracking.update_tracking_by_id( + 'valid_value', req, ) print(result) ``` -**GET** /courier-connections/{id} +**DELETE** /trackings/{id} ```python -result = sdk.courier_connection.get_courier_connections_by_id( +result = sdk.tracking.delete_tracking_by_id( 'valid_value', @@ -336,67 +347,56 @@ result = sdk.courier_connection.get_courier_connections_by_id( print(result) ``` -**PATCH** /courier-connections/{id} +**POST** /trackings/{id}/retrack ```python -req = tracking.PutCourierConnectionsByIdRequest() - - -req.credentials = {} - -result = sdk.courier_connection.put_courier_connections_by_id( +result = sdk.tracking.retrack_tracking_by_id( 'valid_value', - req, + ) print(result) ``` -**DELETE** /courier-connections/{id} +**POST** /trackings/{id}/mark-as-completed ```python +req = tracking.MarkTrackingCompletedByIdRequest() -result = sdk.courier_connection.delete_courier_connections_by_id( + + +result = sdk.tracking.mark_tracking_completed_by_id( 'valid_value', - + req, ) print(result) ``` -### /estimated-delivery-date -**POST** /estimated-delivery-date/predict +### /couriers +**GET** /couriers ```python -req = tracking.EstimatedDeliveryDateRequest() - -req.slug = 'valid_value' - - -req.origin_address = tracking.EstimatedDeliveryDateRequestOriginAddress() - - -req.destination_address = tracking.EstimatedDeliveryDateRequestDestinationAddress() - - -result = sdk.estimated_delivery_date.predict( +result = sdk.courier.get_couriers( + - req, ) print(result) ``` -**POST** /estimated-delivery-date/predict-batch +**POST** /couriers/detect ```python -req = tracking.PredictBatchRequest() +req = tracking.DetectCourierRequest() +req.tracking_number = 'valid_value' -result = sdk.estimated_delivery_date.predict_batch( + +result = sdk.courier.detect_courier( req, diff --git a/tracking/api/__init__.py b/tracking/api/__init__.py index 1ecb692..4b6a28a 100644 --- a/tracking/api/__init__.py +++ b/tracking/api/__init__.py @@ -4,13 +4,13 @@ # Do not edit the class manually. __all__ = [ - "TrackingApi", - "CourierApi", "CourierConnectionApi", "EstimatedDeliveryDateApi", + "TrackingApi", + "CourierApi", ] -from .tracking import TrackingApi -from .courier import CourierApi from .courier_connection import CourierConnectionApi from .estimated_delivery_date import EstimatedDeliveryDateApi +from .tracking import TrackingApi +from .courier import CourierApi diff --git a/tracking/client.py b/tracking/client.py index a97a134..8832281 100644 --- a/tracking/client.py +++ b/tracking/client.py @@ -8,10 +8,10 @@ from typing import Optional from .configuration import Configuration -from .api import TrackingApi -from .api import CourierApi from .api import CourierConnectionApi from .api import EstimatedDeliveryDateApi +from .api import TrackingApi +from .api import CourierApi class Client: @@ -19,7 +19,7 @@ def __init__(self, configuration: Optional[Configuration] = None) -> None: if configuration is None: configuration = Configuration() - self.tracking = TrackingApi(configuration) - self.courier = CourierApi(configuration) self.courier_connection = CourierConnectionApi(configuration) self.estimated_delivery_date = EstimatedDeliveryDateApi(configuration) + self.tracking = TrackingApi(configuration) + self.courier = CourierApi(configuration) diff --git a/tracking/models/__init__.py b/tracking/models/__init__.py index a8e63df..70cb4c7 100644 --- a/tracking/models/__init__.py +++ b/tracking/models/__init__.py @@ -40,7 +40,6 @@ "Courier", "AdditionalFields", "CredentialField", - "SlugGroup", "CourierConnectionResponseForGetCourierConnectionsDataPagination", "CourierConnectionResponseForGetCourierConnectionsData", "CourierConnectionResponseForGetCourierConnections", @@ -133,7 +132,6 @@ from .courier import Courier from .additional_fields import AdditionalFields from .credential_field import CredentialField -from .slug_group import SlugGroup from .courier_connection_response_for_get_courier_connections_data_pagination import ( CourierConnectionResponseForGetCourierConnectionsDataPagination, ) diff --git a/tracking/models/detect_courier_request.py b/tracking/models/detect_courier_request.py index e4a77e6..84b4904 100644 --- a/tracking/models/detect_courier_request.py +++ b/tracking/models/detect_courier_request.py @@ -10,8 +10,6 @@ from typing import Any, Dict, List, Optional from typing_extensions import Self -from tracking.models.slug_group import SlugGroup - class DetectCourierRequest(BaseModel): """ @@ -25,7 +23,7 @@ class DetectCourierRequest(BaseModel): tracking_account_number: Optional[str] = None tracking_key: Optional[str] = None destination_state: Optional[str] = None - slug_group: Optional[SlugGroup] = None + slug_group: Optional[str] = None origin_country_region: Optional[str] = None destination_country_region: Optional[str] = None diff --git a/tracking/models/slug_group.py b/tracking/models/slug_group.py deleted file mode 100644 index e1a8f6c..0000000 --- a/tracking/models/slug_group.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 -# -# This code was auto generated by AfterShip SDK Generator. -# Do not edit the class manually. - -from enum import Enum, unique - - -@unique -class SlugGroup(Enum): - """ - Slug group is a group of slugs which belong to same courier. For example, when you inpit "fedex-group" as slug_group, AfterShip will detect the tracking with "fedex-uk", "fedex-fims", and other slugs which belong to "fedex". It cannot be used with slug at the same time. ( - - allowed enum values - """ - - AMAZON_GROUP = "amazon-group" - FEDEX_GROUP = "fedex-group" - TOLL_GROUP = "toll-group" - TAQBIN_GROUP = "taqbin-group" - TNT_GROUP = "tnt-group" - CJ_GROUP = "cj-group" - HERMES_GROUP = "hermes-group" - DPD_GROUP = "dpd-group" - GLS_GROUP = "gls-group" - DHL_GROUP = "dhl-group" - FASTWAY_GROUP = "fastway-group" - ASENDIA_GROUP = "asendia-group"