diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 363b449..dac1f4b 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 986026b6-d725-4b86-9c4d-67f6e6904a30 management: - docChecksum: f8a55a9af3dcccda8c950270aef6ae0b + docChecksum: 7445f937979a0cde668af1a2056afb53 docVersion: "2018-02-08" - speakeasyVersion: 1.320.0 - generationVersion: 2.354.1 - releaseVersion: 3.5.2 - configChecksum: d21130000a36db6b79228f1b89cf7b4d + speakeasyVersion: 1.324.0 + generationVersion: 2.356.0 + releaseVersion: 3.6.0 + configChecksum: 11415c94d8f7069c29cfe47328426455 repoURL: https://github.com/goshippo/shippo-python-sdk.git installationURL: https://github.com/goshippo/shippo-python-sdk.git published: true @@ -28,6 +28,7 @@ features: responseFormat: 0.1.0 sdkHooks: 0.1.0 unions: 2.82.8 + webhooks: 1.0.0 generatedFiles: - src/shippo/sdkconfiguration.py - src/shippo/addresses.py @@ -202,6 +203,9 @@ generatedFiles: - src/shippo/models/components/webhookeventtypeenum.py - src/shippo/models/components/webhookpaginatedlist.py - src/shippo/models/components/security.py + - src/shippo/models/components/webhookpayloadbatch.py + - src/shippo/models/components/webhookpayloadtrack.py + - src/shippo/models/components/webhookpayloadtransaction.py - src/shippo/models/components/addressvalidationresultsmessagecodeenum.py - src/shippo/models/components/addressvalidationresultsmessagesourceenum.py - src/shippo/models/components/servicelevel.py @@ -487,6 +491,9 @@ generatedFiles: - docs/models/components/webhookeventtypeenum.md - docs/models/components/webhookpaginatedlist.md - docs/models/components/security.md + - docs/models/components/webhookpayloadbatch.md + - docs/models/components/webhookpayloadtrack.md + - docs/models/components/webhookpayloadtransaction.md - docs/models/components/addressvalidationresultsmessagecodeenum.md - docs/models/components/addressvalidationresultsmessagesourceenum.md - docs/models/components/servicelevel.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 18ae601..8595b9c 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 3.5.2 + version: 3.6.0 additionalDependencies: dependencies: {} extraDependencies: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4478ef6..b22e86b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,18 @@ -speakeasyVersion: 1.320.0 +speakeasyVersion: 1.324.0 sources: openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:f90bc15450d9d938a5715834b2a31319537b3b2a3d5bfeb12c5f5d6a479198e1 - sourceBlobDigest: sha256:cc2d3fd651ec3f6f48445ebf471dda1b4b392a81735f9308846c14857fd86cb3 + sourceRevisionDigest: sha256:2206bb518ed76670db14016ecb363a1f8b5c5ef68f044bbaeb38c5bf560defb3 + sourceBlobDigest: sha256:19c24aa4453ebc5fa8b22964087ee8bff1e7527f52a6998c838ec153c5f42ce2 tags: - latest - - fix-makefile + - main targets: first-target: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:f90bc15450d9d938a5715834b2a31319537b3b2a3d5bfeb12c5f5d6a479198e1 - sourceBlobDigest: sha256:cc2d3fd651ec3f6f48445ebf471dda1b4b392a81735f9308846c14857fd86cb3 + sourceRevisionDigest: sha256:2206bb518ed76670db14016ecb363a1f8b5c5ef68f044bbaeb38c5bf560defb3 + sourceBlobDigest: sha256:19c24aa4453ebc5fa8b22964087ee8bff1e7527f52a6998c838ec153c5f42ce2 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/RELEASES.md b/RELEASES.md index d756f27..595a967 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -328,4 +328,14 @@ Based on: ### Generated - [python v3.5.2] . ### Releases -- [PyPI v3.5.2] https://pypi.org/project/shippo/3.5.2 - . \ No newline at end of file +- [PyPI v3.5.2] https://pypi.org/project/shippo/3.5.2 - . + +## 2024-07-01 18:12:30 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.324.0 (2.356.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.6.0] . +### Releases +- [PyPI v3.6.0] https://pypi.org/project/shippo/3.6.0 - . \ No newline at end of file diff --git a/docs/models/components/carrierparceltemplate.md b/docs/models/components/carrierparceltemplate.md index b7f0c5e..3284fcd 100644 --- a/docs/models/components/carrierparceltemplate.md +++ b/docs/models/components/carrierparceltemplate.md @@ -8,7 +8,7 @@ | `carrier` | *Optional[str]* | :heavy_minus_sign: | The name of the carrier that provides this parcel template | FedEx | | `distance_unit` | [Optional[components.DistanceUnitEnum]](../../models/components/distanceunitenum.md) | :heavy_minus_sign: | The measure unit used for length, width and height. | in | | `height` | *Optional[str]* | :heavy_minus_sign: | The height of the package, in units specified by the distance_unit attribute | 1.5 | -| `is_variable_dimensions` | *Optional[str]* | :heavy_minus_sign: | True if the carrier parcel template allows custom dimensions, such as USPS Softpack. | false | +| `is_variable_dimensions` | *Optional[bool]* | :heavy_minus_sign: | True if the carrier parcel template allows custom dimensions, such as USPS Softpack. | false | | `length` | *Optional[str]* | :heavy_minus_sign: | The length of the package, in units specified by the distance_unit attribute | 12.375 | | `name` | *Optional[str]* | :heavy_minus_sign: | The name of the carrier parcel template | FedEx® Small Box (S1) | | `token` | *Optional[str]* | :heavy_minus_sign: | The unique string representation of the carrier parcel template | FedEx_Box_Small_1 | diff --git a/docs/models/components/insurance.md b/docs/models/components/insurance.md index b4cf65a..31a34e9 100644 --- a/docs/models/components/insurance.md +++ b/docs/models/components/insurance.md @@ -1,6 +1,9 @@ # Insurance -To add 3rd party insurance powered by XCover, specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance to you shipment, do not set these parameters. +To add 3rd party insurance powered by XCover, +specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance +by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance +to your shipment, do not set these parameters. ## Fields diff --git a/docs/models/components/servicegroup.md b/docs/models/components/servicegroup.md index 19abff1..6dc58c2 100644 --- a/docs/models/components/servicegroup.md +++ b/docs/models/components/servicegroup.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | -| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | -| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | -| `object_id` | *str* | :heavy_check_mark: | The unique identifier of the given Service Group object. | 80feb1633d4a43c898f005850 | -| `service_levels` | List[[components.ServiceLevelWithParent](../../models/components/servicelevelwithparent.md)] | :heavy_check_mark: | N/A | | -| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | -| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING` | 5 | -| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | -| `is_active` | *Optional[bool]* | :heavy_minus_sign: | True if the service group is enabled, false otherwise. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | +| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.

`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.

`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.

`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | +| `object_id` | *str* | :heavy_check_mark: | The unique identifier of the given Service Group object. | 80feb1633d4a43c898f005850 | +| `service_levels` | List[[components.ServiceLevelWithParent](../../models/components/servicelevelwithparent.md)] | :heavy_check_mark: | N/A | | +| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | +| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum
cart total (total cost of items in the cart) for this service group to be returned for rates at
checkout. Optional unless type is `FREE_SHIPPING` | 5 | +| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | +| `is_active` | *Optional[bool]* | :heavy_minus_sign: | True if the service group is enabled, false otherwise. | true | \ No newline at end of file diff --git a/docs/models/components/servicegroupcreaterequest.md b/docs/models/components/servicegroupcreaterequest.md index 4429370..2e3e062 100644 --- a/docs/models/components/servicegroupcreaterequest.md +++ b/docs/models/components/servicegroupcreaterequest.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | -| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | -| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | -| `service_levels` | List[[components.ServiceGroupAccountAndServiceLevel](../../models/components/servicegroupaccountandservicelevel.md)] | :heavy_check_mark: | N/A | | -| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | -| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING` | 5 | -| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | +| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.

`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.

`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.

`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | +| `service_levels` | List[[components.ServiceGroupAccountAndServiceLevel](../../models/components/servicegroupaccountandservicelevel.md)] | :heavy_check_mark: | N/A | | +| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | +| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum
cart total (total cost of items in the cart) for this service group to be returned for rates at
checkout. Optional unless type is `FREE_SHIPPING` | 5 | +| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | \ No newline at end of file diff --git a/docs/models/components/servicegrouptypeenum.md b/docs/models/components/servicegrouptypeenum.md index df022cf..7c150b4 100644 --- a/docs/models/components/servicegrouptypeenum.md +++ b/docs/models/components/servicegrouptypeenum.md @@ -1,6 +1,9 @@ # ServiceGroupTypeEnum -The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` +The type of the service group.
+`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
+`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
+`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` ## Values diff --git a/docs/models/components/servicegroupupdaterequest.md b/docs/models/components/servicegroupupdaterequest.md index abff9c3..42b2566 100644 --- a/docs/models/components/servicegroupupdaterequest.md +++ b/docs/models/components/servicegroupupdaterequest.md @@ -3,16 +3,16 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | -| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | -| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | -| `object_id` | *str* | :heavy_check_mark: | The unique identifier of the given Service Group object. | 80feb1633d4a43c898f005850 | -| `is_active` | *bool* | :heavy_check_mark: | True if the service group is enabled, false otherwise. | true | -| `service_levels` | List[[components.ServiceGroupAccountAndServiceLevel](../../models/components/servicegroupaccountandservicelevel.md)] | :heavy_check_mark: | N/A | | -| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | -| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | -| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING` | 5 | -| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *str* | :heavy_check_mark: | Description for the service group | USPS shipping options | +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | +| `type` | [components.ServiceGroupTypeEnum](../../models/components/servicegrouptypeenum.md) | :heavy_check_mark: | The type of the service group.

`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.

`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.

`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` | FLAT_RATE | +| `object_id` | *str* | :heavy_check_mark: | The unique identifier of the given Service Group object. | 80feb1633d4a43c898f005850 | +| `is_active` | *bool* | :heavy_check_mark: | True if the service group is enabled, false otherwise. | true | +| `service_levels` | List[[components.ServiceGroupAccountAndServiceLevel](../../models/components/servicegroupaccountandservicelevel.md)] | :heavy_check_mark: | N/A | | +| `flat_rate` | *Optional[str]* | :heavy_minus_sign: | String representation of an amount to be returned as the flat rate
if 1. The service group is of type `LIVE_RATE` and no matching rates
were found; or 2. The service group is of type `FLAT_RATE`. Either
integers or decimals are accepted. Required unless type is
`FREE_SHIPPING` | 5 | +| `flat_rate_currency` | *Optional[str]* | :heavy_minus_sign: | required unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_currency` | *Optional[str]* | :heavy_minus_sign: | optional unless type is `FREE_SHIPPING`. (ISO 4217 currency) | USD | +| `free_shipping_threshold_min` | *Optional[str]* | :heavy_minus_sign: | For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum
cart total (total cost of items in the cart) for this service group to be returned for rates at
checkout. Optional unless type is `FREE_SHIPPING` | 5 | +| `rate_adjustment` | *Optional[int]* | :heavy_minus_sign: | The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount. | 15 | \ No newline at end of file diff --git a/docs/models/components/shipmentextra.md b/docs/models/components/shipmentextra.md index ebecea3..735a9b5 100644 --- a/docs/models/components/shipmentextra.md +++ b/docs/models/components/shipmentextra.md @@ -5,55 +5,55 @@ An object holding optional extra services to be requested. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `accounts_receivable_customer_account` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `alcohol` | [Optional[components.Alcohol]](../../models/components/alcohol.md) | :heavy_minus_sign: | Indicates that a shipment contains Alcohol (Fedex and UPS only). | -| `ancillary_endorsement` | [Optional[components.AncillaryEndorsement]](../../models/components/ancillaryendorsement.md) | :heavy_minus_sign: | Specify an ancillary service endorsement to provide the USPS with instructions on how to handle undeliverable-as-addressed pieces (DHL eCommerce only). | -| `appropriation_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `authority_to_leave` | *Optional[bool]* | :heavy_minus_sign: | Request `true` to give carrier permission to leave the parcel in a safe place if no one answers the
door (where supported). When set to `false`, if no one is available to receive the item, the parcel
will not be left (*surcharges may be applicable). | -| `bill_of_lading_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `billing` | [Optional[components.Billing]](../../models/components/billing.md) | :heavy_minus_sign: | Specify billing details (UPS, FedEx, and DHL Germany only). | -| `bypass_address_validation` | *Optional[bool]* | :heavy_minus_sign: | Bypasses address validation (USPS, UPS, & LaserShip only). | -| `carbon_neutral` | *Optional[bool]* | :heavy_minus_sign: | Request carbon offsets by passing true (UPS only). | -| `carrier_hub_id` | *Optional[str]* | :heavy_minus_sign: | Identifies the carrier injection site. | -| `carrier_hub_travel_time` | *Optional[int]* | :heavy_minus_sign: | Travel time in hours from fulfillment center to carrier injection site. | -| `cod` | [Optional[components.Cod]](../../models/components/cod.md) | :heavy_minus_sign: | Specify collection on delivery details (UPS only). | -| `cod_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `container_type` | *Optional[str]* | :heavy_minus_sign: | Specify container type. | -| `critical_pull_time` | *Optional[str]* | :heavy_minus_sign: | Carrier arrival time to pickup packages from the fulfillment center.
UTC format: `%Y-%m-%dT%H:%M:%SZ` | -| `customer_branch` | *Optional[str]* | :heavy_minus_sign: | Specify customer branch (Lasership only). | -| `customer_reference` | [Optional[components.CustomerReference]](../../models/components/customerreference.md) | :heavy_minus_sign: | Specify the reference field on the label (FedEx and UPS only). | -| `dangerous_goods` | [Optional[components.DangerousGoodsObject]](../../models/components/dangerousgoodsobject.md) | :heavy_minus_sign: | Container for specifying the presence of dangerous materials. This is specific to USPS, and if any contents
are provided, only certain USPS service levels will be eligible. For more information, see our
guide on hazardous or dangerous materials shipping. | -| `dangerous_goods_code` | [Optional[components.DangerousGoodsCode]](../../models/components/dangerousgoodscode.md) | :heavy_minus_sign: | Dangerous Goods Code (DHL eCommerce only). See Category Codes | -| `dealer_order_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `delivery_instructions` | *Optional[str]* | :heavy_minus_sign: | Specify delivery instructions. Up to 500 characters. (FedEx and OnTrac only). | -| `dept_number` | [Optional[components.DepartmentNumber]](../../models/components/departmentnumber.md) | :heavy_minus_sign: | Specify the department number field on the label (FedEx and UPS only). | -| `dry_ice` | [Optional[components.DryIce]](../../models/components/dryice.md) | :heavy_minus_sign: | Specify that the package contains Dry Ice (FedEx, Veho, and UPS only). | -| `fda_product_code` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `fulfillment_center` | *Optional[str]* | :heavy_minus_sign: | The fulfilment center where the package originates from. | -| `insurance` | [Optional[components.Insurance]](../../models/components/insurance.md) | :heavy_minus_sign: | To add 3rd party insurance powered by XCover, specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance to you shipment, do not set these parameters. | -| `invoice_number` | [Optional[components.InvoiceNumber]](../../models/components/invoicenumber.md) | :heavy_minus_sign: | Specify the invoice number field on the label (FedEx and UPS only). | -| `is_return` | *Optional[bool]* | :heavy_minus_sign: | This field specifies if it is a scan-based return shipment. See the Create a return shipment section for more details. | -| `lasership_attrs` | List[[components.ShipmentExtraLasershipAttributesEnum](../../models/components/shipmentextralasershipattributesenum.md)] | :heavy_minus_sign: | Specify Lasership Attributes (Lasership only). Multiple options accepted. | -| `lasership_declared_value` | *Optional[str]* | :heavy_minus_sign: | Declared value (Lasership only). Defaults to `50.00`. | -| `manifest_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `model_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `part_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `po_number` | [Optional[components.PoNumber]](../../models/components/ponumber.md) | :heavy_minus_sign: | Specify the PO number field on the label (FedEx and UPS only). | -| `preferred_delivery_timeframe` | [Optional[components.PreferredDeliveryTimeframe]](../../models/components/preferreddeliverytimeframe.md) | :heavy_minus_sign: | Required for DHL Germany Paket Sameday. Designates a desired timeframe for delivery. Format is `HHMMHHMM` | -| `premium` | *Optional[bool]* | :heavy_minus_sign: | Add premium service to a shipment (DHL Germany international shipments only). | -| `production_code` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `purchase_request_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `qr_code_requested` | *Optional[bool]* | :heavy_minus_sign: | Request a QR code for a given transaction when creating a shipping label (USPS domestic and Evri UK only). | -| `reference_1` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. | -| `reference_2` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. For DHL eCommerce, this field can be used for billing reference. | -| `request_retail_rates` | *Optional[bool]* | :heavy_minus_sign: | Returns retail rates instead of account-based rates (UPS and FedEx only). | -| `return_service_type` | [Optional[components.ReturnServiceType]](../../models/components/returnservicetype.md) | :heavy_minus_sign: | Request additional return option for return shipments (UPS and Lasership only). | -| `rma_number` | [Optional[components.RmaNumber]](../../models/components/rmanumber.md) | :heavy_minus_sign: | Specify the RMA number field on the label (FedEx and UPS only). | -| `saturday_delivery` | *Optional[bool]* | :heavy_minus_sign: | Marks shipment as to be delivered on a Saturday. | -| `salesperson_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `serial_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `signature_confirmation` | [Optional[components.SignatureConfirmation]](../../models/components/signatureconfirmation.md) | :heavy_minus_sign: | Request standard or adult signature confirmation. You can alternatively request Certified Mail (USPS only)
or Indirect signature (FedEx only) or Carrier Confirmation (Deutsche Post only). | -| `store_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | -| `transaction_reference_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accounts_receivable_customer_account` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `alcohol` | [Optional[components.Alcohol]](../../models/components/alcohol.md) | :heavy_minus_sign: | Indicates that a shipment contains Alcohol (Fedex and UPS only). | +| `ancillary_endorsement` | [Optional[components.AncillaryEndorsement]](../../models/components/ancillaryendorsement.md) | :heavy_minus_sign: | Specify an ancillary service endorsement to provide the USPS with instructions on how to handle undeliverable-as-addressed pieces (DHL eCommerce only). | +| `appropriation_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `authority_to_leave` | *Optional[bool]* | :heavy_minus_sign: | Request `true` to give carrier permission to leave the parcel in a safe place if no one answers the
door (where supported). When set to `false`, if no one is available to receive the item, the parcel
will not be left (*surcharges may be applicable). | +| `bill_of_lading_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `billing` | [Optional[components.Billing]](../../models/components/billing.md) | :heavy_minus_sign: | Specify billing details (UPS, FedEx, and DHL Germany only). | +| `bypass_address_validation` | *Optional[bool]* | :heavy_minus_sign: | Bypasses address validation (USPS, UPS, & LaserShip only). | +| `carbon_neutral` | *Optional[bool]* | :heavy_minus_sign: | Request carbon offsets by passing true (UPS only). | +| `carrier_hub_id` | *Optional[str]* | :heavy_minus_sign: | Identifies the carrier injection site. | +| `carrier_hub_travel_time` | *Optional[int]* | :heavy_minus_sign: | Travel time in hours from fulfillment center to carrier injection site. | +| `cod` | [Optional[components.Cod]](../../models/components/cod.md) | :heavy_minus_sign: | Specify collection on delivery details (UPS only). | +| `cod_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `container_type` | *Optional[str]* | :heavy_minus_sign: | Specify container type. | +| `critical_pull_time` | *Optional[str]* | :heavy_minus_sign: | Carrier arrival time to pickup packages from the fulfillment center.
UTC format: `%Y-%m-%dT%H:%M:%SZ` | +| `customer_branch` | *Optional[str]* | :heavy_minus_sign: | Specify customer branch (Lasership only). | +| `customer_reference` | [Optional[components.CustomerReference]](../../models/components/customerreference.md) | :heavy_minus_sign: | Specify the reference field on the label (FedEx and UPS only). | +| `dangerous_goods` | [Optional[components.DangerousGoodsObject]](../../models/components/dangerousgoodsobject.md) | :heavy_minus_sign: | Container for specifying the presence of dangerous materials. This is specific to USPS, and if any contents
are provided, only certain USPS service levels will be eligible. For more information, see our
guide on hazardous or dangerous materials shipping. | +| `dangerous_goods_code` | [Optional[components.DangerousGoodsCode]](../../models/components/dangerousgoodscode.md) | :heavy_minus_sign: | Dangerous Goods Code (DHL eCommerce only). See Category Codes | +| `dealer_order_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `delivery_instructions` | *Optional[str]* | :heavy_minus_sign: | Specify delivery instructions. Up to 500 characters. (FedEx and OnTrac only). | +| `dept_number` | [Optional[components.DepartmentNumber]](../../models/components/departmentnumber.md) | :heavy_minus_sign: | Specify the department number field on the label (FedEx and UPS only). | +| `dry_ice` | [Optional[components.DryIce]](../../models/components/dryice.md) | :heavy_minus_sign: | Specify that the package contains Dry Ice (FedEx, Veho, and UPS only). | +| `fda_product_code` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `fulfillment_center` | *Optional[str]* | :heavy_minus_sign: | The fulfilment center where the package originates from. | +| `insurance` | [Optional[components.Insurance]](../../models/components/insurance.md) | :heavy_minus_sign: | To add 3rd party insurance powered by XCover,
specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance
by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance
to your shipment, do not set these parameters. | +| `invoice_number` | [Optional[components.InvoiceNumber]](../../models/components/invoicenumber.md) | :heavy_minus_sign: | Specify the invoice number field on the label (FedEx and UPS only). | +| `is_return` | *Optional[bool]* | :heavy_minus_sign: | This field specifies if it is a scan-based return shipment. See the Create a return shipment section for more details. | +| `lasership_attrs` | List[[components.ShipmentExtraLasershipAttributesEnum](../../models/components/shipmentextralasershipattributesenum.md)] | :heavy_minus_sign: | Specify Lasership Attributes (Lasership only). Multiple options accepted. | +| `lasership_declared_value` | *Optional[str]* | :heavy_minus_sign: | Declared value (Lasership only). Defaults to `50.00`. | +| `manifest_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `model_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `part_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `po_number` | [Optional[components.PoNumber]](../../models/components/ponumber.md) | :heavy_minus_sign: | Specify the PO number field on the label (FedEx and UPS only). | +| `preferred_delivery_timeframe` | [Optional[components.PreferredDeliveryTimeframe]](../../models/components/preferreddeliverytimeframe.md) | :heavy_minus_sign: | Required for DHL Germany Paket Sameday. Designates a desired timeframe for delivery. Format is `HHMMHHMM` | +| `premium` | *Optional[bool]* | :heavy_minus_sign: | Add premium service to a shipment (DHL Germany international shipments only). | +| `production_code` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `purchase_request_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `qr_code_requested` | *Optional[bool]* | :heavy_minus_sign: | Request a QR code for a given transaction when creating a shipping label (USPS domestic and Evri UK only). | +| `reference_1` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. | +| `reference_2` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. For DHL eCommerce, this field can be used for billing reference. | +| `request_retail_rates` | *Optional[bool]* | :heavy_minus_sign: | Returns retail rates instead of account-based rates (UPS and FedEx only). | +| `return_service_type` | [Optional[components.ReturnServiceType]](../../models/components/returnservicetype.md) | :heavy_minus_sign: | Request additional return option for return shipments (UPS and Lasership only). | +| `rma_number` | [Optional[components.RmaNumber]](../../models/components/rmanumber.md) | :heavy_minus_sign: | Specify the RMA number field on the label (FedEx and UPS only). | +| `saturday_delivery` | *Optional[bool]* | :heavy_minus_sign: | Marks shipment as to be delivered on a Saturday. | +| `salesperson_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `serial_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `signature_confirmation` | [Optional[components.SignatureConfirmation]](../../models/components/signatureconfirmation.md) | :heavy_minus_sign: | Request standard or adult signature confirmation. You can alternatively request Certified Mail (USPS only)
or Indirect signature (FedEx only) or Carrier Confirmation (Deutsche Post only). | +| `store_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | +| `transaction_reference_number` | [Optional[components.UPSReferenceFields]](../../models/components/upsreferencefields.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/webhookeventtypeenum.md b/docs/models/components/webhookeventtypeenum.md index 35c62a7..f127c91 100644 --- a/docs/models/components/webhookeventtypeenum.md +++ b/docs/models/components/webhookeventtypeenum.md @@ -1,5 +1,7 @@ # WebhookEventTypeEnum +Type of event that triggered the webhook. + ## Values diff --git a/docs/models/components/webhookpayloadbatch.md b/docs/models/components/webhookpayloadbatch.md new file mode 100644 index 0000000..aa8ebd7 --- /dev/null +++ b/docs/models/components/webhookpayloadbatch.md @@ -0,0 +1,12 @@ +# WebhookPayloadBatch + +Content of the webhook posted to the external URL + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `event` | [Optional[components.WebhookEventTypeEnum]](../../models/components/webhookeventtypeenum.md) | :heavy_minus_sign: | Type of event that triggered the webhook. | +| `test` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the webhook is a test webhook or not. | +| `data` | *Optional[str]* | :heavy_minus_sign: | A string containing the batch object ID, of the form 'batch {batchId} (created\|processing complete)'. | \ No newline at end of file diff --git a/docs/models/components/webhookpayloadtrack.md b/docs/models/components/webhookpayloadtrack.md new file mode 100644 index 0000000..0c7ee29 --- /dev/null +++ b/docs/models/components/webhookpayloadtrack.md @@ -0,0 +1,12 @@ +# WebhookPayloadTrack + +Content of the webhook posted to the external URL + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `event` | [Optional[components.WebhookEventTypeEnum]](../../models/components/webhookeventtypeenum.md) | :heavy_minus_sign: | Type of event that triggered the webhook. | +| `test` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the webhook is a test webhook or not. | +| `data` | [Optional[components.Track]](../../models/components/track.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/webhookpayloadtransaction.md b/docs/models/components/webhookpayloadtransaction.md new file mode 100644 index 0000000..492b179 --- /dev/null +++ b/docs/models/components/webhookpayloadtransaction.md @@ -0,0 +1,12 @@ +# WebhookPayloadTransaction + +Content of the webhook posted to the external URL + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `event` | [Optional[components.WebhookEventTypeEnum]](../../models/components/webhookeventtypeenum.md) | :heavy_minus_sign: | Type of event that triggered the webhook. | +| `test` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the webhook is a test webhook or not. | +| `data` | [Optional[components.Transaction]](../../models/components/transaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/webhookupdaterequest.md b/docs/models/components/webhookupdaterequest.md index a936d4a..559dc41 100644 --- a/docs/models/components/webhookupdaterequest.md +++ b/docs/models/components/webhookupdaterequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `event` | [components.WebhookEventTypeEnum](../../models/components/webhookeventtypeenum.md) | :heavy_check_mark: | N/A | +| `event` | [components.WebhookEventTypeEnum](../../models/components/webhookeventtypeenum.md) | :heavy_check_mark: | Type of event that triggered the webhook. | | `url` | *str* | :heavy_check_mark: | URL webhook events are sent to. | | `active` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the webhook is active or not. | | `is_test` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the webhook is a test webhook or not. | \ No newline at end of file diff --git a/docs/models/operations/listshipmentsrequest.md b/docs/models/operations/listshipmentsrequest.md index b09d8f1..e3fe159 100644 --- a/docs/models/operations/listshipmentsrequest.md +++ b/docs/models/operations/listshipmentsrequest.md @@ -3,7 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page number you want to select | -| `results` | *Optional[int]* | :heavy_minus_sign: | The number of results to return per page (max 100) | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `page` | *Optional[int]* | :heavy_minus_sign: | The page number you want to select | +| `results` | *Optional[int]* | :heavy_minus_sign: | The number of results to return per page (max 100) | +| `object_created_gt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Object(s) created greater than a provided date and time. | +| `object_created_gte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Object(s) created greater than or equal to a provided date and time. | +| `object_created_lt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Object(s) created lesser than a provided date and time. | +| `object_created_lte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Object(s) created lesser than or equal to a provided date and time. | \ No newline at end of file diff --git a/docs/sdks/carrierparceltemplates/README.md b/docs/sdks/carrierparceltemplates/README.md index 40115c1..8708c98 100644 --- a/docs/sdks/carrierparceltemplates/README.md +++ b/docs/sdks/carrierparceltemplates/README.md @@ -14,7 +14,13 @@ A carrier parcel template represents a package used for shipping that has preset ## list -List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
+List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
+ ### Example Usage diff --git a/docs/sdks/shipments/README.md b/docs/sdks/shipments/README.md index 700f952..4b2ebe1 100644 --- a/docs/sdks/shipments/README.md +++ b/docs/sdks/shipments/README.md @@ -41,6 +41,7 @@ Optional path parameters:
```python import shippo +from shippo.models import operations s = shippo.Shippo( api_key_header="", @@ -48,7 +49,7 @@ s = shippo.Shippo( ) -res = s.shipments.list(page=1, results=25) +res = s.shipments.list(request=operations.ListShipmentsRequest()) if res is not None: # handle response @@ -58,10 +59,9 @@ if res is not None: ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `page` | *Optional[int]* | :heavy_minus_sign: | The page number you want to select | -| `results` | *Optional[int]* | :heavy_minus_sign: | The number of results to return per page (max 100) | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `request` | [operations.ListShipmentsRequest](../../models/operations/listshipmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index acece79..df5ca5c 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -6,6 +6,10 @@ Webhooks are a way for Shippo to notify your application when a specific event occurs. For example, when a label is purchased or when a shipment tracking status has changed. You can use webhooks to trigger actions in your application, such as sending an email or updating a database. +# Webhook Payload +The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration. + + ### Available Operations * [create_webhook](#create_webhook) - Create a new webhook @@ -147,7 +151,7 @@ s = shippo.Shippo( res = s.webhooks.update_webhook(webhook_id='', webhook_update_request=components.WebhookUpdateRequest( event=components.WebhookEventTypeEnum.BATCH_CREATED, - url='https://small-cock.info', + url='http://crooked-acknowledgment.biz', )) if res is not None: diff --git a/setup.py b/setup.py index 3bb49da..146d225 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setuptools.setup( name='shippo', - version='3.5.2', + version='3.6.0', author='Shippo', description='Shipping API Python library (USPS, FedEx, UPS and more)', license = 'MIT License', diff --git a/src/shippo/carrier_parcel_templates.py b/src/shippo/carrier_parcel_templates.py index 031861f..628163d 100644 --- a/src/shippo/carrier_parcel_templates.py +++ b/src/shippo/carrier_parcel_templates.py @@ -21,7 +21,13 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: def list(self, include: Optional[operations.Include] = None, carrier: Optional[str] = None) -> components.CarrierParcelTemplateList: r"""List all carrier parcel templates - List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
  • `include=all` (the default). Includes templates from all carriers
  • `include=user`. Includes templates only from carriers which the user has added (whether or not they're currently enabled)
  • `include=enabled`. includes templates only for carriers which the user has added and enabled
  • `carrier=*token*`. filter by specific carrier, e.g. fedex, usps
+ List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
+
    +
  • `include=all` (the default). Includes templates from all carriers
  • +
  • `include=user`. Includes templates only from carriers which the user has added (whether or not they're currently enabled)
  • +
  • `include=enabled`. includes templates only for carriers which the user has added and enabled
  • +
  • `carrier=*token*`. filter by specific carrier, e.g. fedex, usps
  • +
""" hook_ctx = HookContext(operation_id='ListCarrierParcelTemplates', oauth2_scopes=[], security_source=self.sdk_configuration.security) request = operations.ListCarrierParcelTemplatesRequest( diff --git a/src/shippo/models/components/__init__.py b/src/shippo/models/components/__init__.py index ae137ad..4ddf1c8 100644 --- a/src/shippo/models/components/__init__.py +++ b/src/shippo/models/components/__init__.py @@ -144,7 +144,10 @@ from .webhook import * from .webhookeventtypeenum import * from .webhookpaginatedlist import * +from .webhookpayloadbatch import * +from .webhookpayloadtrack import * +from .webhookpayloadtransaction import * from .webhookupdaterequest import * from .weightunitenum import * -__all__ = ["Address","AddressCompleteCreateRequest","AddressCreateRequest","AddressFrom","AddressImporter","AddressPaginatedList","AddressReturn","AddressTo","AddressValidationResults","AddressValidationResultsMessage","AddressValidationResultsMessageCodeEnum","AddressValidationResultsMessageSourceEnum","Alcohol","AncillaryEndorsement","AramexAustraliaParcelTemplate","Attributes","Authentication","Batch","BatchCreateRequest","BatchShipment","BatchShipmentCreateRequest","BatchShipmentPaginatedList","BatchStatus","Billing","BuildingLocationType","BuildingType","CarrierAccount","CarrierAccountBase","CarrierAccountBaseParameters","CarrierAccountCanadaPostCreateParameters","CarrierAccountCanadaPostCreateRequest","CarrierAccountChronopostCreateRequest","CarrierAccountChronopostCreateRequestParameters","CarrierAccountColissimoCreateRequest","CarrierAccountColissimoCreateRequestParameters","CarrierAccountCorreosCreateRequest","CarrierAccountCorreosCreateRequestParameters","CarrierAccountDHLExpressCreateRequest","CarrierAccountDHLExpressCreateRequestParameters","CarrierAccountDPDUKCreateRequest","CarrierAccountDPDUKCreateRequestParameters","CarrierAccountDeutschePostCreateRequest","CarrierAccountDeutschePostCreateRequestParameters","CarrierAccountDpdDeCreateRequest","CarrierAccountDpdDeCreateRequestParameters","CarrierAccountFedExCreateRequest","CarrierAccountFedExCreateRequestParameters","CarrierAccountHermesUKCreateRequest","CarrierAccountHermesUKCreateRequestParameters","CarrierAccountMondialRelayCreateRequest","CarrierAccountMondialRelayCreateRequestParameters","CarrierAccountPaginatedList","CarrierAccountParameters","CarrierAccountPosteItalianeCreateRequest","CarrierAccountPosteItalianeCreateRequestParameters","CarrierAccountRegistrationStatus","CarrierAccountServiceLevel","CarrierAccountUPSCreateRequest","CarrierAccountUPSCreateRequestParameters","CarrierAccountUSPSCreateRequest","CarrierAccountUSPSCreateRequestParameters","CarrierAccountWithExtraInfo","CarrierAccountWithExtraInfoStatus","CarrierAccountWithExtraInfoType","CarrierParcelTemplate","CarrierParcelTemplateList","CarriersEnum","Cod","ConnectExistingOwnAccountRequest","ConnectExistingOwnAccountRequestParameters","CoreRate","CouriersPleaseParcelTemplate","CreatedBy","CustomerReference","CustomsDeclaration","CustomsDeclarationB13AFilingOptionEnum","CustomsDeclarationContentsTypeEnum","CustomsDeclarationCreateRequest","CustomsDeclarationEelPfcEnum","CustomsDeclarationIncotermEnum","CustomsDeclarationNonDeliveryOptionEnum","CustomsDeclarationPaginatedList","CustomsExporterIdentification","CustomsInvoicedCharges","CustomsItem","CustomsItemCreateRequest","CustomsItemPaginatedList","CustomsTaxIdentification","CustomsTaxIdentificationType","DHLECommerceParcelTemplate","DPDUKParcelTemplate","DangerousGoodsBiologicalMaterial","DangerousGoodsCode","DangerousGoodsLithiumBatteries","DangerousGoodsObject","DefaultParcelTemplate","DefaultParcelTemplateUpdateRequest","DepartmentNumber","DistanceUnitEnum","DryIce","FedExConnectExistingOwnAccountParameters","FedExParcelTemplate","InstantTransactionCreateRequest","Insurance","InvoiceNumber","LabelFileType","LabelFileTypeEnum","Latitude","LineItem","LineItemBase","LiveRate","LiveRateCreateRequest","LiveRateCreateRequestAddressFrom","LiveRateCreateRequestAddressTo","LiveRateCreateRequestParcel","LiveRatePaginatedList","Location","Longitude","Manifest","ManifestCreateRequest","ManifestCreateRequestAddressFrom","ManifestPaginatedList","ManifestStatus","ObjectInfo","ObjectResults","ObjectState","ObjectStateEnum","Order","OrderCreateRequest","OrderPaginatedList","OrderStatusEnum","Parameters","Parcel","ParcelCreateFromTemplateRequest","ParcelCreateRequest","ParcelExtra","ParcelInsurance","ParcelInsuranceProvider","ParcelPaginatedList","ParcelTemplateEnumSet","Parcels","ParentServicelevel","PaymentMethod","Pickup","PickupBase","PickupStatus","PoNumber","PreferredDeliveryTimeframe","Provider","Rate","RatePaginatedList","RecipientType","Refund","RefundPaginatedList","RefundRequestBody","RefundStatus","ResponseMessage","ReturnServiceType","RmaNumber","Security","ServiceGroup","ServiceGroupAccountAndServiceLevel","ServiceGroupCreateRequest","ServiceGroupTypeEnum","ServiceGroupUpdateRequest","ServiceLevel","ServiceLevelAPCPostalEnum","ServiceLevelAPGEnum","ServiceLevelAirterraEnum","ServiceLevelAramexAustraliaEnum","ServiceLevelAsendiaEnum","ServiceLevelAustraliaPostEnum","ServiceLevelBetterTrucksEnum","ServiceLevelCDLEnum","ServiceLevelCanadaPostEnum","ServiceLevelChronopostEnum","ServiceLevelColissimoEnum","ServiceLevelCorreosEspanaEnum","ServiceLevelCouriersPleaseEnum","ServiceLevelDHLExpressEnum","ServiceLevelDHLGermanyEnum","ServiceLevelDHLeCommerceEnum","ServiceLevelDPDDEEnum","ServiceLevelDPDUKEnum","ServiceLevelDeutschePostEnum","ServiceLevelEnumSet","ServiceLevelEvriUKEnum","ServiceLevelFedExEnum","ServiceLevelGLSUSEnum","ServiceLevelGlobegisticsEnum","ServiceLevelJitsuEnum","ServiceLevelLSOEnum","ServiceLevelLasershipEnum","ServiceLevelMaergoEnum","ServiceLevelMondialRelayEnum","ServiceLevelOnTracEnum","ServiceLevelParcelforceEnum","ServiceLevelPostItalianeEnum","ServiceLevelPurolatorEnum","ServiceLevelRoyalMailEnum","ServiceLevelSendleEnum","ServiceLevelSwyftEnum","ServiceLevelUDSEnum","ServiceLevelUPSEnum","ServiceLevelUSPSEnum","ServiceLevelVehoEnum","ServiceLevelWithParent","ServiceLevelePostGlobalEnum","Shipment","ShipmentCreateRequest","ShipmentCreateRequestCustomsDeclaration","ShipmentExtra","ShipmentExtraLasershipAttributesEnum","ShipmentExtraReturnServiceTypeLasershipEnum","ShipmentExtraReturnServiceTypeUPSEnum","ShipmentPaginatedList","ShipmentStatus","ShippoAccount","ShippoAccountPaginatedList","ShippoAccountUpdateRequest","ShopApp","SignatureConfirmation","Status","Track","TrackingStatus","TrackingStatusEnum","TrackingStatusLocationBase","TrackingStatusSubstatus","TracksRequest","Transaction","TransactionCreateRequest","TransactionPaginatedList","TransactionRate","TransactionStatusEnum","Type","UPSConnectExistingOwnAccountParameters","UPSParcelTemplate","UPSReferenceFields","USPSParcelTemplate","UserParcelTemplate","UserParcelTemplateCreateRequest","UserParcelTemplateList","UserParcelTemplateUpdateRequest","UserParcelTemplateWithCarrierTemplateCreateRequest","UserParcelTemplateWithoutCarrierTemplateCreateRequest","Webhook","WebhookEventTypeEnum","WebhookPaginatedList","WebhookUpdateRequest","WeightUnitEnum"] +__all__ = ["Address","AddressCompleteCreateRequest","AddressCreateRequest","AddressFrom","AddressImporter","AddressPaginatedList","AddressReturn","AddressTo","AddressValidationResults","AddressValidationResultsMessage","AddressValidationResultsMessageCodeEnum","AddressValidationResultsMessageSourceEnum","Alcohol","AncillaryEndorsement","AramexAustraliaParcelTemplate","Attributes","Authentication","Batch","BatchCreateRequest","BatchShipment","BatchShipmentCreateRequest","BatchShipmentPaginatedList","BatchStatus","Billing","BuildingLocationType","BuildingType","CarrierAccount","CarrierAccountBase","CarrierAccountBaseParameters","CarrierAccountCanadaPostCreateParameters","CarrierAccountCanadaPostCreateRequest","CarrierAccountChronopostCreateRequest","CarrierAccountChronopostCreateRequestParameters","CarrierAccountColissimoCreateRequest","CarrierAccountColissimoCreateRequestParameters","CarrierAccountCorreosCreateRequest","CarrierAccountCorreosCreateRequestParameters","CarrierAccountDHLExpressCreateRequest","CarrierAccountDHLExpressCreateRequestParameters","CarrierAccountDPDUKCreateRequest","CarrierAccountDPDUKCreateRequestParameters","CarrierAccountDeutschePostCreateRequest","CarrierAccountDeutschePostCreateRequestParameters","CarrierAccountDpdDeCreateRequest","CarrierAccountDpdDeCreateRequestParameters","CarrierAccountFedExCreateRequest","CarrierAccountFedExCreateRequestParameters","CarrierAccountHermesUKCreateRequest","CarrierAccountHermesUKCreateRequestParameters","CarrierAccountMondialRelayCreateRequest","CarrierAccountMondialRelayCreateRequestParameters","CarrierAccountPaginatedList","CarrierAccountParameters","CarrierAccountPosteItalianeCreateRequest","CarrierAccountPosteItalianeCreateRequestParameters","CarrierAccountRegistrationStatus","CarrierAccountServiceLevel","CarrierAccountUPSCreateRequest","CarrierAccountUPSCreateRequestParameters","CarrierAccountUSPSCreateRequest","CarrierAccountUSPSCreateRequestParameters","CarrierAccountWithExtraInfo","CarrierAccountWithExtraInfoStatus","CarrierAccountWithExtraInfoType","CarrierParcelTemplate","CarrierParcelTemplateList","CarriersEnum","Cod","ConnectExistingOwnAccountRequest","ConnectExistingOwnAccountRequestParameters","CoreRate","CouriersPleaseParcelTemplate","CreatedBy","CustomerReference","CustomsDeclaration","CustomsDeclarationB13AFilingOptionEnum","CustomsDeclarationContentsTypeEnum","CustomsDeclarationCreateRequest","CustomsDeclarationEelPfcEnum","CustomsDeclarationIncotermEnum","CustomsDeclarationNonDeliveryOptionEnum","CustomsDeclarationPaginatedList","CustomsExporterIdentification","CustomsInvoicedCharges","CustomsItem","CustomsItemCreateRequest","CustomsItemPaginatedList","CustomsTaxIdentification","CustomsTaxIdentificationType","DHLECommerceParcelTemplate","DPDUKParcelTemplate","DangerousGoodsBiologicalMaterial","DangerousGoodsCode","DangerousGoodsLithiumBatteries","DangerousGoodsObject","DefaultParcelTemplate","DefaultParcelTemplateUpdateRequest","DepartmentNumber","DistanceUnitEnum","DryIce","FedExConnectExistingOwnAccountParameters","FedExParcelTemplate","InstantTransactionCreateRequest","Insurance","InvoiceNumber","LabelFileType","LabelFileTypeEnum","Latitude","LineItem","LineItemBase","LiveRate","LiveRateCreateRequest","LiveRateCreateRequestAddressFrom","LiveRateCreateRequestAddressTo","LiveRateCreateRequestParcel","LiveRatePaginatedList","Location","Longitude","Manifest","ManifestCreateRequest","ManifestCreateRequestAddressFrom","ManifestPaginatedList","ManifestStatus","ObjectInfo","ObjectResults","ObjectState","ObjectStateEnum","Order","OrderCreateRequest","OrderPaginatedList","OrderStatusEnum","Parameters","Parcel","ParcelCreateFromTemplateRequest","ParcelCreateRequest","ParcelExtra","ParcelInsurance","ParcelInsuranceProvider","ParcelPaginatedList","ParcelTemplateEnumSet","Parcels","ParentServicelevel","PaymentMethod","Pickup","PickupBase","PickupStatus","PoNumber","PreferredDeliveryTimeframe","Provider","Rate","RatePaginatedList","RecipientType","Refund","RefundPaginatedList","RefundRequestBody","RefundStatus","ResponseMessage","ReturnServiceType","RmaNumber","Security","ServiceGroup","ServiceGroupAccountAndServiceLevel","ServiceGroupCreateRequest","ServiceGroupTypeEnum","ServiceGroupUpdateRequest","ServiceLevel","ServiceLevelAPCPostalEnum","ServiceLevelAPGEnum","ServiceLevelAirterraEnum","ServiceLevelAramexAustraliaEnum","ServiceLevelAsendiaEnum","ServiceLevelAustraliaPostEnum","ServiceLevelBetterTrucksEnum","ServiceLevelCDLEnum","ServiceLevelCanadaPostEnum","ServiceLevelChronopostEnum","ServiceLevelColissimoEnum","ServiceLevelCorreosEspanaEnum","ServiceLevelCouriersPleaseEnum","ServiceLevelDHLExpressEnum","ServiceLevelDHLGermanyEnum","ServiceLevelDHLeCommerceEnum","ServiceLevelDPDDEEnum","ServiceLevelDPDUKEnum","ServiceLevelDeutschePostEnum","ServiceLevelEnumSet","ServiceLevelEvriUKEnum","ServiceLevelFedExEnum","ServiceLevelGLSUSEnum","ServiceLevelGlobegisticsEnum","ServiceLevelJitsuEnum","ServiceLevelLSOEnum","ServiceLevelLasershipEnum","ServiceLevelMaergoEnum","ServiceLevelMondialRelayEnum","ServiceLevelOnTracEnum","ServiceLevelParcelforceEnum","ServiceLevelPostItalianeEnum","ServiceLevelPurolatorEnum","ServiceLevelRoyalMailEnum","ServiceLevelSendleEnum","ServiceLevelSwyftEnum","ServiceLevelUDSEnum","ServiceLevelUPSEnum","ServiceLevelUSPSEnum","ServiceLevelVehoEnum","ServiceLevelWithParent","ServiceLevelePostGlobalEnum","Shipment","ShipmentCreateRequest","ShipmentCreateRequestCustomsDeclaration","ShipmentExtra","ShipmentExtraLasershipAttributesEnum","ShipmentExtraReturnServiceTypeLasershipEnum","ShipmentExtraReturnServiceTypeUPSEnum","ShipmentPaginatedList","ShipmentStatus","ShippoAccount","ShippoAccountPaginatedList","ShippoAccountUpdateRequest","ShopApp","SignatureConfirmation","Status","Track","TrackingStatus","TrackingStatusEnum","TrackingStatusLocationBase","TrackingStatusSubstatus","TracksRequest","Transaction","TransactionCreateRequest","TransactionPaginatedList","TransactionRate","TransactionStatusEnum","Type","UPSConnectExistingOwnAccountParameters","UPSParcelTemplate","UPSReferenceFields","USPSParcelTemplate","UserParcelTemplate","UserParcelTemplateCreateRequest","UserParcelTemplateList","UserParcelTemplateUpdateRequest","UserParcelTemplateWithCarrierTemplateCreateRequest","UserParcelTemplateWithoutCarrierTemplateCreateRequest","Webhook","WebhookEventTypeEnum","WebhookPaginatedList","WebhookPayloadBatch","WebhookPayloadTrack","WebhookPayloadTransaction","WebhookUpdateRequest","WeightUnitEnum"] diff --git a/src/shippo/models/components/carrierparceltemplate.py b/src/shippo/models/components/carrierparceltemplate.py index aaf46d2..6463bc1 100644 --- a/src/shippo/models/components/carrierparceltemplate.py +++ b/src/shippo/models/components/carrierparceltemplate.py @@ -17,7 +17,7 @@ class CarrierParcelTemplate: r"""The measure unit used for length, width and height.""" height: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('height'), 'exclude': lambda f: f is None }}) r"""The height of the package, in units specified by the distance_unit attribute""" - is_variable_dimensions: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_variable_dimensions'), 'exclude': lambda f: f is None }}) + is_variable_dimensions: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_variable_dimensions'), 'exclude': lambda f: f is None }}) r"""True if the carrier parcel template allows custom dimensions, such as USPS Softpack.""" length: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('length'), 'exclude': lambda f: f is None }}) r"""The length of the package, in units specified by the distance_unit attribute""" diff --git a/src/shippo/models/components/insurance.py b/src/shippo/models/components/insurance.py index 25c3781..f38dbbf 100644 --- a/src/shippo/models/components/insurance.py +++ b/src/shippo/models/components/insurance.py @@ -18,7 +18,11 @@ class Provider(str, Enum): @dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Insurance: - r"""To add 3rd party insurance powered by XCover, specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance to you shipment, do not set these parameters.""" + r"""To add 3rd party insurance powered by XCover, + specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance + by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance + to your shipment, do not set these parameters. + """ amount: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }}) r"""Declared value of the goods you want to insure.""" content: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('content'), 'exclude': lambda f: f is None }}) diff --git a/src/shippo/models/components/servicegroup.py b/src/shippo/models/components/servicegroup.py index 4d76d53..86a171c 100644 --- a/src/shippo/models/components/servicegroup.py +++ b/src/shippo/models/components/servicegroup.py @@ -17,7 +17,11 @@ class ServiceGroup: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) r"""Name for the service group that will be shown to customers in the response""" type: ServiceGroupTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - r"""The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min`""" + r"""The type of the service group.
+ `LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
+ `FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
+ `FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` + """ object_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('object_id') }}) r"""The unique identifier of the given Service Group object.""" service_levels: List[ServiceLevelWithParent] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service_levels') }}) @@ -33,7 +37,10 @@ class ServiceGroup: free_shipping_threshold_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_currency'), 'exclude': lambda f: f is None }}) r"""optional unless type is `FREE_SHIPPING`. (ISO 4217 currency)""" free_shipping_threshold_min: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_min'), 'exclude': lambda f: f is None }}) - r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING`""" + r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum + cart total (total cost of items in the cart) for this service group to be returned for rates at + checkout. Optional unless type is `FREE_SHIPPING` + """ rate_adjustment: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate_adjustment'), 'exclude': lambda f: f is None }}) r"""The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount.""" is_active: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_active'), 'exclude': lambda f: f is None }}) diff --git a/src/shippo/models/components/servicegroupcreaterequest.py b/src/shippo/models/components/servicegroupcreaterequest.py index c1b923d..9f75869 100644 --- a/src/shippo/models/components/servicegroupcreaterequest.py +++ b/src/shippo/models/components/servicegroupcreaterequest.py @@ -17,7 +17,11 @@ class ServiceGroupCreateRequest: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) r"""Name for the service group that will be shown to customers in the response""" type: ServiceGroupTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - r"""The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min`""" + r"""The type of the service group.
+ `LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
+ `FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
+ `FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` + """ service_levels: List[ServiceGroupAccountAndServiceLevel] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('service_levels') }}) flat_rate: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('flat_rate'), 'exclude': lambda f: f is None }}) r"""String representation of an amount to be returned as the flat rate @@ -31,7 +35,10 @@ class ServiceGroupCreateRequest: free_shipping_threshold_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_currency'), 'exclude': lambda f: f is None }}) r"""optional unless type is `FREE_SHIPPING`. (ISO 4217 currency)""" free_shipping_threshold_min: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_min'), 'exclude': lambda f: f is None }}) - r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING`""" + r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum + cart total (total cost of items in the cart) for this service group to be returned for rates at + checkout. Optional unless type is `FREE_SHIPPING` + """ rate_adjustment: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate_adjustment'), 'exclude': lambda f: f is None }}) r"""The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount.""" diff --git a/src/shippo/models/components/servicegrouptypeenum.py b/src/shippo/models/components/servicegrouptypeenum.py index ccf8a57..b3699fa 100644 --- a/src/shippo/models/components/servicegrouptypeenum.py +++ b/src/shippo/models/components/servicegrouptypeenum.py @@ -5,7 +5,11 @@ class ServiceGroupTypeEnum(str, Enum): - r"""The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min`""" + r"""The type of the service group.
+ `LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
+ `FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
+ `FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` + """ LIVE_RATE = 'LIVE_RATE' FLAT_RATE = 'FLAT_RATE' FREE_SHIPPING = 'FREE_SHIPPING' diff --git a/src/shippo/models/components/servicegroupupdaterequest.py b/src/shippo/models/components/servicegroupupdaterequest.py index b65ff31..2c0cdda 100644 --- a/src/shippo/models/components/servicegroupupdaterequest.py +++ b/src/shippo/models/components/servicegroupupdaterequest.py @@ -17,7 +17,11 @@ class ServiceGroupUpdateRequest: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }}) r"""Name for the service group that will be shown to customers in the response""" type: ServiceGroupTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }}) - r"""The type of the service group.
`LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min`""" + r"""The type of the service group.
+ `LIVE_RATE` - Shippo will make a rating request and return real-time rates for the shipping group, only falling back to the specified flat rate amount if no rates match a service level in the service group.
+ `FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
+ `FREE_SHIPPING` - Returns a shipping option with a price of $0 only if the total cost of items exceeds the amount defined by `free_shipping_threshold_min` + """ object_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('object_id') }}) r"""The unique identifier of the given Service Group object.""" is_active: bool = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_active') }}) @@ -35,7 +39,10 @@ class ServiceGroupUpdateRequest: free_shipping_threshold_currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_currency'), 'exclude': lambda f: f is None }}) r"""optional unless type is `FREE_SHIPPING`. (ISO 4217 currency)""" free_shipping_threshold_min: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('free_shipping_threshold_min'), 'exclude': lambda f: f is None }}) - r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum cart total (total cost of items in the cart) for this service group to be returned for rates at checkout. Optional unless type is `FREE_SHIPPING`""" + r"""For service groups of type `FREE_SHIPPING`, this field must be required to configure the minimum + cart total (total cost of items in the cart) for this service group to be returned for rates at + checkout. Optional unless type is `FREE_SHIPPING` + """ rate_adjustment: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('rate_adjustment'), 'exclude': lambda f: f is None }}) r"""The amount in percent (%) that the service group's returned rate should be adjusted. For example, if this field is set to 5 and the matched rate price is $5.00, the returned value of the service group will be $5.25. Negative integers are also accepted and will discount the rate price by the defined percentage amount.""" diff --git a/src/shippo/models/components/shipmentextra.py b/src/shippo/models/components/shipmentextra.py index a5a0289..27cbd85 100644 --- a/src/shippo/models/components/shipmentextra.py +++ b/src/shippo/models/components/shipmentextra.py @@ -120,7 +120,11 @@ class ShipmentExtra: fulfillment_center: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fulfillment_center'), 'exclude': lambda f: f is None }}) r"""The fulfilment center where the package originates from.""" insurance: Optional[Insurance] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('insurance'), 'exclude': lambda f: f is None }}) - r"""To add 3rd party insurance powered by XCover, specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance to you shipment, do not set these parameters.""" + r"""To add 3rd party insurance powered by XCover, + specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance + by additionally specifying `provider` (UPS, FedEx and OnTrac only).

If you do not want to add insurance + to your shipment, do not set these parameters. + """ invoice_number: Optional[InvoiceNumber] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('invoice_number'), 'exclude': lambda f: f is None }}) r"""Specify the invoice number field on the label (FedEx and UPS only).""" is_return: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('is_return'), 'exclude': lambda f: f is None }}) diff --git a/src/shippo/models/components/webhookeventtypeenum.py b/src/shippo/models/components/webhookeventtypeenum.py index b186032..e2d80a8 100644 --- a/src/shippo/models/components/webhookeventtypeenum.py +++ b/src/shippo/models/components/webhookeventtypeenum.py @@ -5,6 +5,7 @@ class WebhookEventTypeEnum(str, Enum): + r"""Type of event that triggered the webhook.""" TRANSACTION_CREATED = 'transaction_created' TRANSACTION_UPDATED = 'transaction_updated' TRACK_UPDATED = 'track_updated' diff --git a/src/shippo/models/components/webhookpayloadbatch.py b/src/shippo/models/components/webhookpayloadbatch.py new file mode 100644 index 0000000..62d0771 --- /dev/null +++ b/src/shippo/models/components/webhookpayloadbatch.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from .webhookeventtypeenum import WebhookEventTypeEnum +from dataclasses_json import Undefined, dataclass_json +from shippo import utils +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class WebhookPayloadBatch: + r"""Content of the webhook posted to the external URL""" + event: Optional[WebhookEventTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('event'), 'exclude': lambda f: f is None }}) + r"""Type of event that triggered the webhook.""" + test: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('test'), 'exclude': lambda f: f is None }}) + r"""Determines whether the webhook is a test webhook or not.""" + data: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) + r"""A string containing the batch object ID, of the form 'batch {batchId} (created|processing complete)'.""" + + diff --git a/src/shippo/models/components/webhookpayloadtrack.py b/src/shippo/models/components/webhookpayloadtrack.py new file mode 100644 index 0000000..29d6285 --- /dev/null +++ b/src/shippo/models/components/webhookpayloadtrack.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from .track import Track +from .webhookeventtypeenum import WebhookEventTypeEnum +from dataclasses_json import Undefined, dataclass_json +from shippo import utils +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class WebhookPayloadTrack: + r"""Content of the webhook posted to the external URL""" + event: Optional[WebhookEventTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('event'), 'exclude': lambda f: f is None }}) + r"""Type of event that triggered the webhook.""" + test: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('test'), 'exclude': lambda f: f is None }}) + r"""Determines whether the webhook is a test webhook or not.""" + data: Optional[Track] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) + + diff --git a/src/shippo/models/components/webhookpayloadtransaction.py b/src/shippo/models/components/webhookpayloadtransaction.py new file mode 100644 index 0000000..503d9cf --- /dev/null +++ b/src/shippo/models/components/webhookpayloadtransaction.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.""" + +from __future__ import annotations +import dataclasses +from .transaction import Transaction +from .webhookeventtypeenum import WebhookEventTypeEnum +from dataclasses_json import Undefined, dataclass_json +from shippo import utils +from typing import Optional + + +@dataclass_json(undefined=Undefined.EXCLUDE) +@dataclasses.dataclass +class WebhookPayloadTransaction: + r"""Content of the webhook posted to the external URL""" + event: Optional[WebhookEventTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('event'), 'exclude': lambda f: f is None }}) + r"""Type of event that triggered the webhook.""" + test: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('test'), 'exclude': lambda f: f is None }}) + r"""Determines whether the webhook is a test webhook or not.""" + data: Optional[Transaction] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }}) + + diff --git a/src/shippo/models/components/webhookupdaterequest.py b/src/shippo/models/components/webhookupdaterequest.py index dc63cc3..5a2ef8b 100644 --- a/src/shippo/models/components/webhookupdaterequest.py +++ b/src/shippo/models/components/webhookupdaterequest.py @@ -12,6 +12,7 @@ @dataclasses.dataclass class WebhookUpdateRequest: event: WebhookEventTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('event') }}) + r"""Type of event that triggered the webhook.""" url: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('url') }}) r"""URL webhook events are sent to.""" active: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('active'), 'exclude': lambda f: f is None }}) diff --git a/src/shippo/models/operations/listshipments.py b/src/shippo/models/operations/listshipments.py index dfa636a..d6951a7 100644 --- a/src/shippo/models/operations/listshipments.py +++ b/src/shippo/models/operations/listshipments.py @@ -2,6 +2,7 @@ from __future__ import annotations import dataclasses +from datetime import datetime from typing import Optional @@ -19,5 +20,13 @@ class ListShipmentsRequest: r"""The page number you want to select""" results: Optional[int] = dataclasses.field(default=25, metadata={'query_param': { 'field_name': 'results', 'style': 'form', 'explode': True }}) r"""The number of results to return per page (max 100)""" + object_created_gt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'object_created_gt', 'style': 'form', 'explode': True }}) + r"""Object(s) created greater than a provided date and time.""" + object_created_gte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'object_created_gte', 'style': 'form', 'explode': True }}) + r"""Object(s) created greater than or equal to a provided date and time.""" + object_created_lt: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'object_created_lt', 'style': 'form', 'explode': True }}) + r"""Object(s) created lesser than a provided date and time.""" + object_created_lte: Optional[datetime] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'object_created_lte', 'style': 'form', 'explode': True }}) + r"""Object(s) created lesser than or equal to a provided date and time.""" diff --git a/src/shippo/sdk.py b/src/shippo/sdk.py index 7c398ec..9a9cbff 100644 --- a/src/shippo/sdk.py +++ b/src/shippo/sdk.py @@ -170,6 +170,10 @@ class Shippo: webhooks: Webhooks r"""Webhooks are a way for Shippo to notify your application when a specific event occurs. For example, when a label is purchased or when a shipment tracking status has changed. You can use webhooks to trigger actions in your application, such as sending an email or updating a database. + + # Webhook Payload + The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration. + """ sdk_configuration: SDKConfiguration diff --git a/src/shippo/sdkconfiguration.py b/src/shippo/sdkconfiguration.py index 03c6bc8..85f7f96 100644 --- a/src/shippo/sdkconfiguration.py +++ b/src/shippo/sdkconfiguration.py @@ -24,9 +24,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = 'python' openapi_doc_version: str = '2018-02-08' - sdk_version: str = '3.5.2' - gen_version: str = '2.354.1' - user_agent: str = 'speakeasy-sdk/python 3.5.2 2.354.1 2018-02-08 shippo' + sdk_version: str = '3.6.0' + gen_version: str = '2.356.0' + user_agent: str = 'speakeasy-sdk/python 3.6.0 2.356.0 2018-02-08 shippo' retry_config: Optional[RetryConfig] = None def __post_init__(self): diff --git a/src/shippo/shipments.py b/src/shippo/shipments.py index a32b32a..b54f603 100644 --- a/src/shippo/shipments.py +++ b/src/shippo/shipments.py @@ -22,7 +22,7 @@ def __init__(self, sdk_config: SDKConfiguration) -> None: - def list(self, page: Optional[int] = None, results: Optional[int] = None) -> components.ShipmentPaginatedList: + def list(self, request: operations.ListShipmentsRequest) -> components.ShipmentPaginatedList: r"""List all shipments Returns a list of all shipment objects.

In order to filter results, you must use the below path parameters. @@ -44,11 +44,6 @@ def list(self, page: Optional[int] = None, results: Optional[int] = None) -> com `https://api.goshippo.com/shipments/?object_created_gte=2017-01-01T00:00:30&object_created_lt=2017-04-01T00:00:30` """ hook_ctx = HookContext(operation_id='ListShipments', oauth2_scopes=[], security_source=self.sdk_configuration.security) - request = operations.ListShipmentsRequest( - page=page, - results=results, - ) - _globals = operations.ListShipmentsGlobals( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ) diff --git a/src/shippo/webhooks.py b/src/shippo/webhooks.py index f3efdd4..0ec11e0 100644 --- a/src/shippo/webhooks.py +++ b/src/shippo/webhooks.py @@ -10,6 +10,10 @@ class Webhooks: r"""Webhooks are a way for Shippo to notify your application when a specific event occurs. For example, when a label is purchased or when a shipment tracking status has changed. You can use webhooks to trigger actions in your application, such as sending an email or updating a database. + + # Webhook Payload + The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration. + """ sdk_configuration: SDKConfiguration