diff --git a/.gitignore b/.gitignore index a0c6cfa6..a561b9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +**/__pycache__/ +**/.speakeasy/temp/ +**/.speakeasy/logs/ +.env +.env.local .venv/ pyrightconfig.json .speakeasy/reports diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index be0e647e..d5aefa19 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,785 +1,3025 @@ lockVersion: 2.0.0 id: 986026b6-d725-4b86-9c4d-67f6e6904a30 management: - docChecksum: ace15c0d1b81b595278d710d80bb795b + docChecksum: 780d610b9b2c75536928af1793861d09 docVersion: "2018-02-08" - speakeasyVersion: 1.521.1 - generationVersion: 2.558.5 - releaseVersion: 4.0.0 - configChecksum: 2bfc606265cf61a2b40af4e9c57595e5 + speakeasyVersion: 1.755.0 + generationVersion: 2.865.2 + releaseVersion: 5.0.0 + configChecksum: fc36f24d02a05c077e3941839e642f5e repoURL: https://github.com/goshippo/shippo-python-sdk.git installationURL: https://github.com/goshippo/shippo-python-sdk.git published: true +persistentEdits: + generation_id: f73f056d-c744-42db-a841-869fe86bfa68 + pristine_commit_hash: 5c618fedb081e6e9b7dbec40ee21d47066d68cd2 + pristine_tree_hash: 9d44a9b06233d5167f95bc2c76d622d6acad0fac features: python: additionalDependencies: 1.0.0 - constsAndDefaults: 1.0.5 - core: 5.12.4 + constsAndDefaults: 1.0.7 + core: 6.0.18 + decimal: 1.0.0 defaultEnabledRetries: 0.2.0 - enumUnions: 0.1.0 + enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 flattening: 3.1.1 - globalSecurity: 3.0.3 + globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.1.0 + globalServerURLs: 3.2.1 globals: 3.0.0 hiddenGlobals: 1.0.0 includes: 3.0.0 - nameOverrides: 3.0.1 - nullables: 1.0.1 - responseFormat: 1.0.1 - retries: 3.0.2 - sdkHooks: 1.0.1 - unions: 3.0.4 + nameOverrides: 3.0.3 + nullables: 1.0.2 + responseFormat: 1.1.0 + retries: 3.0.4 + sdkHooks: 1.2.1 + unions: 3.1.4 webhooks: 2.0.0 -generatedFiles: - - .gitattributes - - .python-version - - .vscode/settings.json - - USAGE.md - - docs/models/components/address.md - - docs/models/components/addresscompletecreaterequest.md - - docs/models/components/addresscreaterequest.md - - docs/models/components/addressimporter.md - - docs/models/components/addresspaginatedlist.md - - docs/models/components/addressreturn.md - - docs/models/components/addressvalidationresults.md - - docs/models/components/addressvalidationresultsmessage.md - - docs/models/components/addressvalidationresultsmessagecodeenum.md - - docs/models/components/addressvalidationresultsmessagesourceenum.md - - docs/models/components/alcohol.md - - docs/models/components/ancillaryendorsement.md - - docs/models/components/attribute.md - - docs/models/components/authentication.md - - docs/models/components/batch.md - - docs/models/components/batchcreaterequest.md - - docs/models/components/batchshipment.md - - docs/models/components/batchshipmentcreaterequest.md - - docs/models/components/batchshipmentpaginatedlist.md - - docs/models/components/batchshipmentstatus.md - - docs/models/components/batchstatus.md - - docs/models/components/billing.md - - docs/models/components/billingtype.md - - docs/models/components/buildinglocationtype.md - - docs/models/components/buildingtype.md - - docs/models/components/carrieraccount.md - - docs/models/components/carrieraccountbase.md - - docs/models/components/carrieraccountbaseparameters.md - - docs/models/components/carrieraccountcanadapostcreateparameters.md - - docs/models/components/carrieraccountcanadapostcreaterequest.md - - docs/models/components/carrieraccountchronopostcreaterequest.md - - docs/models/components/carrieraccountchronopostcreaterequestparameters.md - - docs/models/components/carrieraccountcolissimocreaterequest.md - - docs/models/components/carrieraccountcolissimocreaterequestparameters.md - - docs/models/components/carrieraccountcorreoscreaterequest.md - - docs/models/components/carrieraccountcorreoscreaterequestparameters.md - - docs/models/components/carrieraccountdeutschepostcreaterequest.md - - docs/models/components/carrieraccountdeutschepostcreaterequestparameters.md - - docs/models/components/carrieraccountdhlexpresscreaterequest.md - - docs/models/components/carrieraccountdhlexpresscreaterequestparameters.md - - docs/models/components/carrieraccountdpddecreaterequest.md - - docs/models/components/carrieraccountdpddecreaterequestparameters.md - - docs/models/components/carrieraccountdpdukcreaterequest.md - - docs/models/components/carrieraccountdpdukcreaterequestparameters.md - - docs/models/components/carrieraccountfedexcreaterequest.md - - docs/models/components/carrieraccountfedexcreaterequestparameters.md - - docs/models/components/carrieraccounthermesukcreaterequest.md - - docs/models/components/carrieraccounthermesukcreaterequestparameters.md - - docs/models/components/carrieraccountmondialrelaycreaterequest.md - - docs/models/components/carrieraccountmondialrelaycreaterequestparameters.md - - docs/models/components/carrieraccountpaginatedlist.md - - docs/models/components/carrieraccountparameters.md - - docs/models/components/carrieraccountposteitalianecreaterequest.md - - docs/models/components/carrieraccountposteitalianecreaterequestparameters.md - - docs/models/components/carrieraccountregistrationstatus.md - - docs/models/components/carrieraccountsendlecreaterequest.md - - docs/models/components/carrieraccountsendlecreaterequestparameters.md - - docs/models/components/carrieraccountservicelevel.md - - docs/models/components/carrieraccountupscreaterequest.md - - docs/models/components/carrieraccountupscreaterequestparameters.md - - docs/models/components/carrieraccountuspscreaterequest.md - - docs/models/components/carrieraccountuspscreaterequestparameters.md - - docs/models/components/carrieraccountwithextrainfo.md - - docs/models/components/carrieraccountwithextrainfoparameters.md - - docs/models/components/carrieraccountwithextrainfostatus.md - - docs/models/components/carrieraccountwithextrainfotype.md - - docs/models/components/carrierparceltemplate.md - - docs/models/components/carrierparceltemplatelist.md - - docs/models/components/carriersenum.md - - docs/models/components/cod.md - - docs/models/components/connectexistingownaccountrequest.md - - docs/models/components/connectexistingownaccountrequestparameters.md - - docs/models/components/corerate.md - - docs/models/components/createdby.md - - docs/models/components/customerreference.md - - docs/models/components/customsdeclaration.md - - docs/models/components/customsdeclarationaddress.md - - docs/models/components/customsdeclarationb13afilingoptionenum.md - - docs/models/components/customsdeclarationcontentstypeenum.md - - docs/models/components/customsdeclarationcreaterequest.md - - docs/models/components/customsdeclarationcreaterequestaddress.md - - docs/models/components/customsdeclarationcreaterequestdutiespayor.md - - docs/models/components/customsdeclarationcreaterequesttype.md - - docs/models/components/customsdeclarationdutiespayor.md - - docs/models/components/customsdeclarationeelpfcenum.md - - docs/models/components/customsdeclarationincotermenum.md - - docs/models/components/customsdeclarationnondeliveryoptionenum.md - - docs/models/components/customsdeclarationpaginatedlist.md - - docs/models/components/customsdeclarationtype.md - - docs/models/components/customsdeclarationunion.md - - docs/models/components/customsexporteridentification.md - - docs/models/components/customsinvoicedcharges.md - - docs/models/components/customsitem.md - - docs/models/components/customsitemcreaterequest.md - - docs/models/components/customsitempaginatedlist.md - - docs/models/components/customstaxidentification.md - - docs/models/components/customstaxidentificationtype.md - - docs/models/components/dangerousgoodsbiologicalmaterial.md - - docs/models/components/dangerousgoodscode.md - - docs/models/components/dangerousgoodslithiumbatteries.md - - docs/models/components/dangerousgoodsobject.md - - docs/models/components/defaultparceltemplate.md - - docs/models/components/defaultparceltemplateupdaterequest.md - - docs/models/components/departmentnumber.md - - docs/models/components/distanceunitenum.md - - docs/models/components/dryice.md - - docs/models/components/fedexconnectexistingownaccountparameters.md - - docs/models/components/instanttransactioncreaterequest.md - - docs/models/components/insurance.md - - docs/models/components/insuranceprovider.md - - docs/models/components/invoicenumber.md - - docs/models/components/labelfiletype.md - - docs/models/components/labelfiletypeenum.md - - docs/models/components/latitude.md - - docs/models/components/lineitem.md - - docs/models/components/lineitembase.md - - docs/models/components/liverate.md - - docs/models/components/liveratecreaterequest.md - - docs/models/components/liveratecreaterequestaddressfrom.md - - docs/models/components/liveratecreaterequestaddressto.md - - docs/models/components/liveratecreaterequestparcel.md - - docs/models/components/liveratepaginatedlist.md - - docs/models/components/location.md - - docs/models/components/longitude.md - - docs/models/components/manifest.md - - docs/models/components/manifestcreaterequest.md - - docs/models/components/manifestcreaterequestaddressfrom.md - - docs/models/components/manifestpaginatedlist.md - - docs/models/components/manifeststatus.md - - docs/models/components/objectinfo.md - - docs/models/components/objectresults.md - - docs/models/components/objectstate.md - - docs/models/components/objectstateenum.md - - docs/models/components/order.md - - docs/models/components/ordercreaterequest.md - - docs/models/components/orderpaginatedlist.md - - docs/models/components/ordershopappenum.md - - docs/models/components/orderstatusenum.md - - docs/models/components/ordertransaction.md - - docs/models/components/parcel.md - - docs/models/components/parcelcreatefromtemplaterequest.md - - docs/models/components/parcelcreaterequest.md - - docs/models/components/parcelextra.md - - docs/models/components/parcelinsurance.md - - docs/models/components/parcelinsuranceprovider.md - - docs/models/components/parcelpaginatedlist.md - - docs/models/components/parceltemplatearamexaustraliaenum.md - - docs/models/components/parceltemplatedhlecommerceenum.md - - docs/models/components/parceltemplatedpdukenum.md - - docs/models/components/parceltemplateenumset.md - - docs/models/components/parceltemplatefedexenum.md - - docs/models/components/parceltemplateupsenum.md - - docs/models/components/parceltemplateuspsenum.md - - docs/models/components/paymentmethod.md - - docs/models/components/pickup.md - - docs/models/components/pickupbase.md - - docs/models/components/pickupstatus.md - - docs/models/components/ponumber.md - - docs/models/components/preferreddeliverytimeframe.md - - docs/models/components/rate.md - - docs/models/components/ratepaginatedlist.md - - docs/models/components/rateunion.md - - docs/models/components/recipienttype.md - - docs/models/components/refund.md - - docs/models/components/refundpaginatedlist.md - - docs/models/components/refundrequestbody.md - - docs/models/components/refundstatus.md - - docs/models/components/responsemessage.md - - docs/models/components/returnservicetype.md - - docs/models/components/rmanumber.md - - docs/models/components/security.md - - docs/models/components/servicegroup.md - - docs/models/components/servicegroupaccountandservicelevel.md - - docs/models/components/servicegroupcreaterequest.md - - docs/models/components/servicegrouptypeenum.md - - docs/models/components/servicegroupupdaterequest.md - - docs/models/components/servicelevel.md - - docs/models/components/servicelevelairterraenum.md - - docs/models/components/servicelevelapcpostalenum.md - - docs/models/components/servicelevelapgenum.md - - docs/models/components/servicelevelaramexaustraliaenum.md - - docs/models/components/servicelevelasendiaenum.md - - docs/models/components/servicelevelaustraliapostenum.md - - docs/models/components/servicelevelbettertrucksenum.md - - docs/models/components/servicelevelcanadapostenum.md - - docs/models/components/servicelevelcdlenum.md - - docs/models/components/servicelevelchronopostenum.md - - docs/models/components/servicelevelcolissimoenum.md - - docs/models/components/servicelevelcorreosespanaenum.md - - docs/models/components/serviceleveldeutschepostenum.md - - docs/models/components/serviceleveldhlecommerceenum.md - - docs/models/components/serviceleveldhlexpressenum.md - - docs/models/components/serviceleveldhlgermanyenum.md - - docs/models/components/serviceleveldpddeenum.md - - docs/models/components/serviceleveldpdukenum.md - - docs/models/components/servicelevelenumset.md - - docs/models/components/servicelevelepostglobalenum.md - - docs/models/components/servicelevelevriukenum.md - - docs/models/components/servicelevelfedexenum.md - - docs/models/components/servicelevelglobegisticsenum.md - - docs/models/components/servicelevelglsusenum.md - - docs/models/components/serviceleveljitsuenum.md - - docs/models/components/servicelevellasershipenum.md - - docs/models/components/servicelevellsoenum.md - - docs/models/components/servicelevelmondialrelayenum.md - - docs/models/components/servicelevelontracenum.md - - docs/models/components/servicelevelparcelforceenum.md - - docs/models/components/servicelevelpostitalianeenum.md - - docs/models/components/servicelevelpurolatorenum.md - - docs/models/components/servicelevelroyalmailenum.md - - docs/models/components/servicelevelsendleenum.md - - docs/models/components/servicelevelswyftenum.md - - docs/models/components/serviceleveludsenum.md - - docs/models/components/servicelevelupsenum.md - - docs/models/components/serviceleveluspsenum.md - - docs/models/components/servicelevelvehoenum.md - - docs/models/components/servicelevelwithparent.md - - docs/models/components/shipment.md - - docs/models/components/shipmentcreaterequest.md - - docs/models/components/shipmentcreaterequestaddressfrom.md - - docs/models/components/shipmentcreaterequestaddressto.md - - docs/models/components/shipmentcreaterequestparcel.md - - docs/models/components/shipmentextra.md - - docs/models/components/shipmentextralasershipattributesenum.md - - docs/models/components/shipmentextrareturnservicetypelasershipenum.md - - docs/models/components/shipmentextrareturnservicetypeupsenum.md - - docs/models/components/shipmentpaginatedlist.md - - docs/models/components/shipmentstatus.md - - docs/models/components/shippoaccount.md - - docs/models/components/shippoaccountpaginatedlist.md - - docs/models/components/shippoaccountupdaterequest.md - - docs/models/components/signatureconfirmation.md - - docs/models/components/track.md - - docs/models/components/trackingstatus.md - - docs/models/components/trackingstatusenum.md - - docs/models/components/trackingstatuslocationbase.md - - docs/models/components/trackingstatussubstatus.md - - docs/models/components/tracksrequest.md - - docs/models/components/transaction.md - - docs/models/components/transactioncreaterequest.md - - docs/models/components/transactionpaginatedlist.md - - docs/models/components/transactionstatusenum.md - - docs/models/components/upsconnectexistingownaccountparameters.md - - docs/models/components/upsreferencefields.md - - docs/models/components/userparceltemplate.md - - docs/models/components/userparceltemplatecreaterequest.md - - docs/models/components/userparceltemplatelist.md - - docs/models/components/userparceltemplateupdaterequest.md - - docs/models/components/userparceltemplatewithcarriertemplatecreaterequest.md - - docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md - - docs/models/components/webhook.md - - docs/models/components/webhookeventtypeenum.md - - docs/models/components/webhookpaginatedlist.md - - docs/models/components/webhookpayload.md - - docs/models/components/webhookpayloadbatch.md - - docs/models/components/webhookpayloadtrack.md - - docs/models/components/webhookpayloadtransaction.md - - docs/models/components/webhookupdaterequest.md - - docs/models/components/weightunitenum.md - - docs/models/errors/badrequesterror.md - - docs/models/errors/notfounderror.md - - docs/models/errors/unauthorizederror.md - - docs/models/internal/globals.md - - docs/models/operations/addshipmentstobatchglobals.md - - docs/models/operations/addshipmentstobatchrequest.md - - docs/models/operations/carrier.md - - docs/models/operations/createaddressglobals.md - - docs/models/operations/createbatchglobals.md - - docs/models/operations/createcarrieraccountglobals.md - - docs/models/operations/createcustomsdeclarationglobals.md - - docs/models/operations/createcustomsitemglobals.md - - docs/models/operations/createliverateglobals.md - - docs/models/operations/createmanifestglobals.md - - docs/models/operations/createorderglobals.md - - docs/models/operations/createparcelglobals.md - - docs/models/operations/createparcelrequest.md - - docs/models/operations/createpickupglobals.md - - docs/models/operations/createrefundglobals.md - - docs/models/operations/createservicegroupglobals.md - - docs/models/operations/createshipmentglobals.md - - docs/models/operations/createshippoaccountglobals.md - - docs/models/operations/createtrackglobals.md - - docs/models/operations/createtransactionglobals.md - - docs/models/operations/createtransactionrequest.md - - docs/models/operations/createuserparceltemplateglobals.md - - docs/models/operations/deletedefaultparceltemplateglobals.md - - docs/models/operations/deletedefaultparceltemplaterequest.md - - docs/models/operations/deleteservicegroupglobals.md - - docs/models/operations/deleteservicegrouprequest.md - - docs/models/operations/deleteuserparceltemplateglobals.md - - docs/models/operations/deleteuserparceltemplaterequest.md - - docs/models/operations/deletewebhookrequest.md - - docs/models/operations/getaddressglobals.md - - docs/models/operations/getaddressrequest.md - - docs/models/operations/getbatchglobals.md - - docs/models/operations/getbatchrequest.md - - docs/models/operations/getcarrieraccountglobals.md - - docs/models/operations/getcarrieraccountrequest.md - - docs/models/operations/getcarrierparceltemplateglobals.md - - docs/models/operations/getcarrierparceltemplaterequest.md - - docs/models/operations/getcarrierregistrationstatusglobals.md - - docs/models/operations/getcarrierregistrationstatusrequest.md - - docs/models/operations/getcustomsdeclarationglobals.md - - docs/models/operations/getcustomsdeclarationrequest.md - - docs/models/operations/getcustomsitemglobals.md - - docs/models/operations/getcustomsitemrequest.md - - docs/models/operations/getdefaultparceltemplateglobals.md - - docs/models/operations/getdefaultparceltemplaterequest.md - - docs/models/operations/getmanifestglobals.md - - docs/models/operations/getmanifestrequest.md - - docs/models/operations/getorderglobals.md - - docs/models/operations/getorderrequest.md - - docs/models/operations/getparcelglobals.md - - docs/models/operations/getparcelrequest.md - - docs/models/operations/getrateglobals.md - - docs/models/operations/getraterequest.md - - docs/models/operations/getrefundglobals.md - - docs/models/operations/getrefundrequest.md - - docs/models/operations/getshipmentglobals.md - - docs/models/operations/getshipmentrequest.md - - docs/models/operations/getshippoaccountglobals.md - - docs/models/operations/getshippoaccountrequest.md - - docs/models/operations/gettrackglobals.md - - docs/models/operations/gettrackrequest.md - - docs/models/operations/gettransactionglobals.md - - docs/models/operations/gettransactionrequest.md - - docs/models/operations/getuserparceltemplateglobals.md - - docs/models/operations/getuserparceltemplaterequest.md - - docs/models/operations/getwebhookrequest.md - - docs/models/operations/include.md - - docs/models/operations/initiateoauth2signinglobals.md - - docs/models/operations/initiateoauth2signinrequest.md - - docs/models/operations/initiateoauth2signinresponse.md - - docs/models/operations/listaddressesglobals.md - - docs/models/operations/listaddressesrequest.md - - docs/models/operations/listcarrieraccountsglobals.md - - docs/models/operations/listcarrieraccountsrequest.md - - docs/models/operations/listcarrierparceltemplatesglobals.md - - docs/models/operations/listcarrierparceltemplatesrequest.md - - docs/models/operations/listcustomsdeclarationsglobals.md - - docs/models/operations/listcustomsdeclarationsrequest.md - - docs/models/operations/listcustomsitemsglobals.md - - docs/models/operations/listcustomsitemsrequest.md - - docs/models/operations/listmanifestsglobals.md - - docs/models/operations/listmanifestsrequest.md - - docs/models/operations/listordersglobals.md - - docs/models/operations/listordersrequest.md - - docs/models/operations/listparcelsglobals.md - - docs/models/operations/listparcelsrequest.md - - docs/models/operations/listrefundsglobals.md - - docs/models/operations/listrefundsrequest.md - - docs/models/operations/listservicegroupsglobals.md - - docs/models/operations/listservicegroupsrequest.md - - docs/models/operations/listshipmentratesbycurrencycodeglobals.md - - docs/models/operations/listshipmentratesbycurrencycoderequest.md - - docs/models/operations/listshipmentratesglobals.md - - docs/models/operations/listshipmentratesrequest.md - - docs/models/operations/listshipmentsglobals.md - - docs/models/operations/listshipmentsrequest.md - - docs/models/operations/listshippoaccountsglobals.md - - docs/models/operations/listshippoaccountsrequest.md - - docs/models/operations/listtransactionsglobals.md - - docs/models/operations/listtransactionsrequest.md - - docs/models/operations/listuserparceltemplatesglobals.md - - docs/models/operations/listuserparceltemplatesrequest.md - - docs/models/operations/purchasebatchglobals.md - - docs/models/operations/purchasebatchrequest.md - - docs/models/operations/registercarrieraccountglobals.md - - docs/models/operations/registercarrieraccountrequest.md - - docs/models/operations/removeshipmentsfrombatchglobals.md - - docs/models/operations/removeshipmentsfrombatchrequest.md - - docs/models/operations/updatecarrieraccountglobals.md - - docs/models/operations/updatecarrieraccountrequest.md - - docs/models/operations/updatedefaultparceltemplateglobals.md - - docs/models/operations/updateservicegroupglobals.md - - docs/models/operations/updateshippoaccountglobals.md - - docs/models/operations/updateshippoaccountrequest.md - - docs/models/operations/updateuserparceltemplateglobals.md - - docs/models/operations/updateuserparceltemplaterequest.md - - docs/models/operations/updatewebhookrequest.md - - docs/models/operations/validateaddressglobals.md - - docs/models/operations/validateaddressrequest.md - - docs/models/utils/retryconfig.md - - docs/sdks/addresses/README.md - - docs/sdks/batches/README.md - - docs/sdks/carrieraccounts/README.md - - docs/sdks/carrierparceltemplates/README.md - - docs/sdks/customsdeclarations/README.md - - docs/sdks/customsitems/README.md - - docs/sdks/manifests/README.md - - docs/sdks/orders/README.md - - docs/sdks/parcels/README.md - - docs/sdks/pickups/README.md - - docs/sdks/rates/README.md - - docs/sdks/ratesatcheckout/README.md - - docs/sdks/refunds/README.md - - docs/sdks/servicegroups/README.md - - docs/sdks/shipments/README.md - - docs/sdks/shippo/README.md - - docs/sdks/shippoaccounts/README.md - - docs/sdks/trackingstatus/README.md - - docs/sdks/transactions/README.md - - docs/sdks/userparceltemplates/README.md - - docs/sdks/webhooks/README.md - - poetry.toml - - py.typed - - pylintrc - - pyproject.toml - - scripts/prepare_readme.py - - scripts/publish.sh - - src/shippo/__init__.py - - src/shippo/_hooks/__init__.py - - src/shippo/_hooks/sdkhooks.py - - src/shippo/_hooks/types.py - - src/shippo/_version.py - - src/shippo/addresses.py - - src/shippo/basesdk.py - - src/shippo/batches.py - - src/shippo/carrier_accounts.py - - src/shippo/carrier_parcel_templates.py - - src/shippo/customs_declarations.py - - src/shippo/customs_items.py - - src/shippo/httpclient.py - - src/shippo/manifests.py - - src/shippo/models/__init__.py - - src/shippo/models/components/__init__.py - - src/shippo/models/components/address.py - - src/shippo/models/components/addresscompletecreaterequest.py - - src/shippo/models/components/addresscreaterequest.py - - src/shippo/models/components/addressimporter.py - - src/shippo/models/components/addresspaginatedlist.py - - src/shippo/models/components/addressvalidationresults.py - - src/shippo/models/components/addressvalidationresultsmessage.py - - src/shippo/models/components/addressvalidationresultsmessagecodeenum.py - - src/shippo/models/components/addressvalidationresultsmessagesourceenum.py - - src/shippo/models/components/alcohol.py - - src/shippo/models/components/batch.py - - src/shippo/models/components/batchcreaterequest.py - - src/shippo/models/components/batchshipment.py - - src/shippo/models/components/batchshipmentcreaterequest.py - - src/shippo/models/components/batchshipmentpaginatedlist.py - - src/shippo/models/components/billing.py - - src/shippo/models/components/carrieraccount.py - - src/shippo/models/components/carrieraccountbase.py - - src/shippo/models/components/carrieraccountcanadapostcreateparameters.py - - src/shippo/models/components/carrieraccountcanadapostcreaterequest.py - - src/shippo/models/components/carrieraccountchronopostcreaterequest.py - - src/shippo/models/components/carrieraccountcolissimocreaterequest.py - - src/shippo/models/components/carrieraccountcorreoscreaterequest.py - - src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py - - src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py - - src/shippo/models/components/carrieraccountdhlexpresscreaterequestparameters.py - - src/shippo/models/components/carrieraccountdpddecreaterequest.py - - src/shippo/models/components/carrieraccountdpdukcreaterequest.py - - src/shippo/models/components/carrieraccountfedexcreaterequest.py - - src/shippo/models/components/carrieraccounthermesukcreaterequest.py - - src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py - - src/shippo/models/components/carrieraccountpaginatedlist.py - - src/shippo/models/components/carrieraccountposteitalianecreaterequest.py - - src/shippo/models/components/carrieraccountregistrationstatus.py - - src/shippo/models/components/carrieraccountsendlecreaterequest.py - - src/shippo/models/components/carrieraccountservicelevel.py - - src/shippo/models/components/carrieraccountupscreaterequest.py - - src/shippo/models/components/carrieraccountupscreaterequestparameters.py - - src/shippo/models/components/carrieraccountuspscreaterequest.py - - src/shippo/models/components/carrieraccountwithextrainfo.py - - src/shippo/models/components/carrierparceltemplate.py - - src/shippo/models/components/carrierparceltemplatelist.py - - src/shippo/models/components/carriersenum.py - - src/shippo/models/components/cod.py - - src/shippo/models/components/connectexistingownaccountrequest.py - - src/shippo/models/components/corerate.py - - src/shippo/models/components/customerreference.py - - src/shippo/models/components/customsdeclaration.py - - src/shippo/models/components/customsdeclarationb13afilingoptionenum.py - - src/shippo/models/components/customsdeclarationcontentstypeenum.py - - src/shippo/models/components/customsdeclarationcreaterequest.py - - src/shippo/models/components/customsdeclarationeelpfcenum.py - - src/shippo/models/components/customsdeclarationincotermenum.py - - src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py - - src/shippo/models/components/customsdeclarationpaginatedlist.py - - src/shippo/models/components/customsexporteridentification.py - - src/shippo/models/components/customsinvoicedcharges.py - - src/shippo/models/components/customsitem.py - - src/shippo/models/components/customsitemcreaterequest.py - - src/shippo/models/components/customsitempaginatedlist.py - - src/shippo/models/components/customstaxidentification.py - - src/shippo/models/components/dangerousgoodsbiologicalmaterial.py - - src/shippo/models/components/dangerousgoodslithiumbatteries.py - - src/shippo/models/components/dangerousgoodsobject.py - - src/shippo/models/components/defaultparceltemplate.py - - src/shippo/models/components/defaultparceltemplateupdaterequest.py - - src/shippo/models/components/departmentnumber.py - - src/shippo/models/components/distanceunitenum.py - - src/shippo/models/components/dryice.py - - src/shippo/models/components/fedexconnectexistingownaccountparameters.py - - src/shippo/models/components/instanttransactioncreaterequest.py - - src/shippo/models/components/insurance.py - - src/shippo/models/components/invoicenumber.py - - src/shippo/models/components/labelfiletypeenum.py - - src/shippo/models/components/lineitem.py - - src/shippo/models/components/lineitembase.py - - src/shippo/models/components/liverate.py - - src/shippo/models/components/liveratecreaterequest.py - - src/shippo/models/components/liveratepaginatedlist.py - - src/shippo/models/components/location.py - - src/shippo/models/components/manifest.py - - src/shippo/models/components/manifestcreaterequest.py - - src/shippo/models/components/manifestpaginatedlist.py - - src/shippo/models/components/objectstateenum.py - - src/shippo/models/components/order.py - - src/shippo/models/components/ordercreaterequest.py - - src/shippo/models/components/orderpaginatedlist.py - - src/shippo/models/components/ordershopappenum.py - - src/shippo/models/components/orderstatusenum.py - - src/shippo/models/components/parcel.py - - src/shippo/models/components/parcelcreatefromtemplaterequest.py - - src/shippo/models/components/parcelcreaterequest.py - - src/shippo/models/components/parcelextra.py - - src/shippo/models/components/parcelinsurance.py - - src/shippo/models/components/parcelpaginatedlist.py - - src/shippo/models/components/parceltemplatearamexaustraliaenum.py - - src/shippo/models/components/parceltemplatedhlecommerceenum.py - - src/shippo/models/components/parceltemplatedpdukenum.py - - src/shippo/models/components/parceltemplateenumset.py - - src/shippo/models/components/parceltemplatefedexenum.py - - src/shippo/models/components/parceltemplateupsenum.py - - src/shippo/models/components/parceltemplateuspsenum.py - - src/shippo/models/components/pickup.py - - src/shippo/models/components/pickupbase.py - - src/shippo/models/components/ponumber.py - - src/shippo/models/components/rate.py - - src/shippo/models/components/ratepaginatedlist.py - - src/shippo/models/components/refund.py - - src/shippo/models/components/refundpaginatedlist.py - - src/shippo/models/components/refundrequestbody.py - - src/shippo/models/components/responsemessage.py - - src/shippo/models/components/rmanumber.py - - src/shippo/models/components/security.py - - src/shippo/models/components/servicegroup.py - - src/shippo/models/components/servicegroupaccountandservicelevel.py - - src/shippo/models/components/servicegroupcreaterequest.py - - src/shippo/models/components/servicegrouptypeenum.py - - src/shippo/models/components/servicegroupupdaterequest.py - - src/shippo/models/components/servicelevel.py - - src/shippo/models/components/servicelevelairterraenum.py - - src/shippo/models/components/servicelevelapcpostalenum.py - - src/shippo/models/components/servicelevelapgenum.py - - src/shippo/models/components/servicelevelaramexaustraliaenum.py - - src/shippo/models/components/servicelevelasendiaenum.py - - src/shippo/models/components/servicelevelaustraliapostenum.py - - src/shippo/models/components/servicelevelbettertrucksenum.py - - src/shippo/models/components/servicelevelcanadapostenum.py - - src/shippo/models/components/servicelevelcdlenum.py - - src/shippo/models/components/servicelevelchronopostenum.py - - src/shippo/models/components/servicelevelcolissimoenum.py - - src/shippo/models/components/servicelevelcorreosespanaenum.py - - src/shippo/models/components/serviceleveldeutschepostenum.py - - src/shippo/models/components/serviceleveldhlecommerceenum.py - - src/shippo/models/components/serviceleveldhlexpressenum.py - - src/shippo/models/components/serviceleveldhlgermanyenum.py - - src/shippo/models/components/serviceleveldpddeenum.py - - src/shippo/models/components/serviceleveldpdukenum.py - - src/shippo/models/components/servicelevelenumset.py - - src/shippo/models/components/servicelevelepostglobalenum.py - - src/shippo/models/components/servicelevelevriukenum.py - - src/shippo/models/components/servicelevelfedexenum.py - - src/shippo/models/components/servicelevelglobegisticsenum.py - - src/shippo/models/components/servicelevelglsusenum.py - - src/shippo/models/components/serviceleveljitsuenum.py - - src/shippo/models/components/servicelevellasershipenum.py - - src/shippo/models/components/servicelevellsoenum.py - - src/shippo/models/components/servicelevelmondialrelayenum.py - - src/shippo/models/components/servicelevelontracenum.py - - src/shippo/models/components/servicelevelparcelforceenum.py - - src/shippo/models/components/servicelevelpostitalianeenum.py - - src/shippo/models/components/servicelevelpurolatorenum.py - - src/shippo/models/components/servicelevelroyalmailenum.py - - src/shippo/models/components/servicelevelsendleenum.py - - src/shippo/models/components/servicelevelswyftenum.py - - src/shippo/models/components/serviceleveludsenum.py - - src/shippo/models/components/servicelevelupsenum.py - - src/shippo/models/components/serviceleveluspsenum.py - - src/shippo/models/components/servicelevelvehoenum.py - - src/shippo/models/components/servicelevelwithparent.py - - src/shippo/models/components/shipment.py - - src/shippo/models/components/shipmentcreaterequest.py - - src/shippo/models/components/shipmentextra.py - - src/shippo/models/components/shipmentextralasershipattributesenum.py - - src/shippo/models/components/shipmentextrareturnservicetypelasershipenum.py - - src/shippo/models/components/shipmentextrareturnservicetypeupsenum.py - - src/shippo/models/components/shipmentpaginatedlist.py - - src/shippo/models/components/shippoaccount.py - - src/shippo/models/components/shippoaccountpaginatedlist.py - - src/shippo/models/components/shippoaccountupdaterequest.py - - src/shippo/models/components/track.py - - src/shippo/models/components/trackingstatus.py - - src/shippo/models/components/trackingstatusenum.py - - src/shippo/models/components/trackingstatuslocationbase.py - - src/shippo/models/components/trackingstatussubstatus.py - - src/shippo/models/components/tracksrequest.py - - src/shippo/models/components/transaction.py - - src/shippo/models/components/transactioncreaterequest.py - - src/shippo/models/components/transactionpaginatedlist.py - - src/shippo/models/components/transactionstatusenum.py - - src/shippo/models/components/upsconnectexistingownaccountparameters.py - - src/shippo/models/components/upsreferencefields.py - - src/shippo/models/components/userparceltemplate.py - - src/shippo/models/components/userparceltemplatecreaterequest.py - - src/shippo/models/components/userparceltemplatelist.py - - src/shippo/models/components/userparceltemplateupdaterequest.py - - src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py - - src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py - - src/shippo/models/components/webhook.py - - src/shippo/models/components/webhookeventtypeenum.py - - src/shippo/models/components/webhookpaginatedlist.py - - src/shippo/models/components/webhookpayload.py - - src/shippo/models/components/webhookpayloadbatch.py - - src/shippo/models/components/webhookpayloadtrack.py - - src/shippo/models/components/webhookpayloadtransaction.py - - src/shippo/models/components/webhookupdaterequest.py - - src/shippo/models/components/weightunitenum.py - - src/shippo/models/errors/__init__.py - - src/shippo/models/errors/initiateoauth2signin.py - - src/shippo/models/errors/sdkerror.py - - src/shippo/models/internal/__init__.py - - src/shippo/models/internal/globals.py - - src/shippo/models/operations/__init__.py - - src/shippo/models/operations/addshipmentstobatch.py - - src/shippo/models/operations/createaddress.py - - src/shippo/models/operations/createbatch.py - - src/shippo/models/operations/createcarrieraccount.py - - src/shippo/models/operations/createcustomsdeclaration.py - - src/shippo/models/operations/createcustomsitem.py - - src/shippo/models/operations/createliverate.py - - src/shippo/models/operations/createmanifest.py - - src/shippo/models/operations/createorder.py - - src/shippo/models/operations/createparcel.py - - src/shippo/models/operations/createpickup.py - - src/shippo/models/operations/createrefund.py - - src/shippo/models/operations/createservicegroup.py - - src/shippo/models/operations/createshipment.py - - src/shippo/models/operations/createshippoaccount.py - - src/shippo/models/operations/createtrack.py - - src/shippo/models/operations/createtransaction.py - - src/shippo/models/operations/createuserparceltemplate.py - - src/shippo/models/operations/deletedefaultparceltemplate.py - - src/shippo/models/operations/deleteservicegroup.py - - src/shippo/models/operations/deleteuserparceltemplate.py - - src/shippo/models/operations/deletewebhook.py - - src/shippo/models/operations/getaddress.py - - src/shippo/models/operations/getbatch.py - - src/shippo/models/operations/getcarrieraccount.py - - src/shippo/models/operations/getcarrierparceltemplate.py - - src/shippo/models/operations/getcarrierregistrationstatus.py - - src/shippo/models/operations/getcustomsdeclaration.py - - src/shippo/models/operations/getcustomsitem.py - - src/shippo/models/operations/getdefaultparceltemplate.py - - src/shippo/models/operations/getmanifest.py - - src/shippo/models/operations/getorder.py - - src/shippo/models/operations/getparcel.py - - src/shippo/models/operations/getrate.py - - src/shippo/models/operations/getrefund.py - - src/shippo/models/operations/getshipment.py - - src/shippo/models/operations/getshippoaccount.py - - src/shippo/models/operations/gettrack.py - - src/shippo/models/operations/gettransaction.py - - src/shippo/models/operations/getuserparceltemplate.py - - src/shippo/models/operations/getwebhook.py - - src/shippo/models/operations/initiateoauth2signin.py - - src/shippo/models/operations/listaddresses.py - - src/shippo/models/operations/listcarrieraccounts.py - - src/shippo/models/operations/listcarrierparceltemplates.py - - src/shippo/models/operations/listcustomsdeclarations.py - - src/shippo/models/operations/listcustomsitems.py - - src/shippo/models/operations/listmanifests.py - - src/shippo/models/operations/listorders.py - - src/shippo/models/operations/listparcels.py - - src/shippo/models/operations/listrefunds.py - - src/shippo/models/operations/listservicegroups.py - - src/shippo/models/operations/listshipmentrates.py - - src/shippo/models/operations/listshipmentratesbycurrencycode.py - - src/shippo/models/operations/listshipments.py - - src/shippo/models/operations/listshippoaccounts.py - - src/shippo/models/operations/listtransactions.py - - src/shippo/models/operations/listuserparceltemplates.py - - src/shippo/models/operations/purchasebatch.py - - src/shippo/models/operations/registercarrieraccount.py - - src/shippo/models/operations/removeshipmentsfrombatch.py - - src/shippo/models/operations/updatecarrieraccount.py - - src/shippo/models/operations/updatedefaultparceltemplate.py - - src/shippo/models/operations/updateservicegroup.py - - src/shippo/models/operations/updateshippoaccount.py - - src/shippo/models/operations/updateuserparceltemplate.py - - src/shippo/models/operations/updatewebhook.py - - src/shippo/models/operations/validateaddress.py - - src/shippo/orders.py - - src/shippo/parcels.py - - src/shippo/pickups.py - - src/shippo/py.typed - - src/shippo/rates.py - - src/shippo/rates_at_checkout.py - - src/shippo/refunds.py - - src/shippo/sdk.py - - src/shippo/sdkconfiguration.py - - src/shippo/service_groups.py - - src/shippo/shipments.py - - src/shippo/shippo_accounts.py - - src/shippo/tracking_status.py - - src/shippo/transactions.py - - src/shippo/types/__init__.py - - src/shippo/types/basemodel.py - - src/shippo/user_parcel_templates.py - - src/shippo/utils/__init__.py - - src/shippo/utils/annotations.py - - src/shippo/utils/enums.py - - src/shippo/utils/eventstreaming.py - - src/shippo/utils/forms.py - - src/shippo/utils/headers.py - - src/shippo/utils/logger.py - - src/shippo/utils/metadata.py - - src/shippo/utils/queryparams.py - - src/shippo/utils/requestbodies.py - - src/shippo/utils/retries.py - - src/shippo/utils/security.py - - src/shippo/utils/serializers.py - - src/shippo/utils/url.py - - src/shippo/utils/values.py - - src/shippo/webhooks.py +trackedFiles: + .gitattributes: + id: 24139dae6567 + last_write_checksum: sha1:53134de3ada576f37c22276901e1b5b6d85cd2da + pristine_git_object: 4d75d59008e4d8609876d263419a9dc56c8d6f3a + .vscode/settings.json: + id: 89aa447020cd + last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526 + pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae + USAGE.md: + id: 3aed33ce6e6f + last_write_checksum: sha1:d1ed321f1cfc25888deffb6714078686cea66f38 + pristine_git_object: 301aadd09176d959cab92c2bc1a1f3cd0ddfc25a + docs/models/components/address.md: + id: 897900884ecb + last_write_checksum: sha1:f0dcf71354263edab4a268e9d75f622d7b5a3369 + pristine_git_object: 18836890b341e17595b364306fb744008f39d4d9 + docs/models/components/addresscompletecreaterequest.md: + id: 8b64971d854c + last_write_checksum: sha1:6563a77c581f02a3fe49aff15fd835824aa15042 + pristine_git_object: 152939d6e810c9c4649516179136591461623ff6 + docs/models/components/addresscreaterequest.md: + id: 1138a35a4bf8 + last_write_checksum: sha1:c0e39ba352799cef5f7fe3a3533885b6ff66636a + pristine_git_object: 227d4437959bd9985fcd864eabcb95582ba9e78c + docs/models/components/addressimporter.md: + id: db1b3ee1399d + last_write_checksum: sha1:f6cd6292904ee9c70c1d3475e4000b8b45af1559 + pristine_git_object: 6aafac72fbeaff0ede4d76c8d1aa83422b2ac46c + docs/models/components/addresspaginatedlist.md: + id: a173613ecbaf + last_write_checksum: sha1:8371ec0083d9d8993c899e6489d1df6a2925c005 + pristine_git_object: 2a8c601818451549f6f2e90ae4d41a3c40ce7fe8 + docs/models/components/addressreturn.md: + id: e95a7f77ac8d + last_write_checksum: sha1:b3f14ef389c5f74d37d38e9652167cf07f25aee2 + pristine_git_object: 37047d9c66a8abf8f5ab07d5dd8d84bb7791ed1a + docs/models/components/addressvalidationresults.md: + id: 1262b7b46f5c + last_write_checksum: sha1:9d8bbacb05e6f07580366fb4cffc93d05bd17352 + pristine_git_object: 2b19fc8ebfeae7000db1072d4a37e66feb45976e + docs/models/components/addressvalidationresultsmessage.md: + id: 89a3c3081aa7 + last_write_checksum: sha1:4c16b1686a48e67a0d5f71d59eb470868382765e + pristine_git_object: 75cceec613ad8b534393186bdd6abf2e5b52788f + docs/models/components/addressvalidationresultsmessagecodeenum.md: + id: da55e07c7dc0 + last_write_checksum: sha1:8e41ffa5329c8525fefc087b1c808194dd619b94 + pristine_git_object: 1aa56196c824c0e14c49689443ed2bc9971e2eb4 + docs/models/components/addressvalidationresultsmessagesourceenum.md: + id: aea63c2c0fb6 + last_write_checksum: sha1:91a2426c11a91314859bb6388d874e411f34ca20 + pristine_git_object: a4223ceea8fa00cda6f5d755608772ff2f15cc3a + docs/models/components/alcohol.md: + id: 15ed7579c9cc + last_write_checksum: sha1:a3eec3362dbd633e7bc800c3c275672e8c900471 + pristine_git_object: b3f1af4883326d00abaedcfbd59fc1c0c6292eec + docs/models/components/ancillaryendorsement.md: + id: 22c52882d09e + last_write_checksum: sha1:f95279c58993cfb78a22f3cddfd47e7b73df48a1 + pristine_git_object: a56fec6021d499c6631c0882e3a8288ea4f83761 + docs/models/components/attribute.md: + id: 73bdfcc990f2 + last_write_checksum: sha1:398f6a0799da3ff265bb546636c13d9ed9b69614 + pristine_git_object: d8ecadf9034a081881a80db9ffb628ae9c0e33e6 + docs/models/components/authentication.md: + id: 880c5a2c4a09 + last_write_checksum: sha1:aa0516ae05a9ed32cdcf1e682149a3741d562b91 + pristine_git_object: 0cf931296a81fc3b76f5456cf3ef258fdce1956f + docs/models/components/batch.md: + id: 5ab0270aaad8 + last_write_checksum: sha1:d355530f4622e64030597c13dbb185e01f19ce32 + pristine_git_object: 5ba7091e7f1a606c4ebc2cf387b78ad3096413ad + docs/models/components/batchcreaterequest.md: + id: a693b99aab97 + last_write_checksum: sha1:0dbc130c76792d19ba4acdd140808a03f926d3e2 + pristine_git_object: b3f529edb5a43f8056dfb3f97540180b12ea973d + docs/models/components/batchshipment.md: + id: 0d6eefd7d078 + last_write_checksum: sha1:2822149dd5f0d6232d991255cf63f0ce942fdaeb + pristine_git_object: 4df816f5237ea8d06622db30f54a64e57d20a271 + docs/models/components/batchshipmentcreaterequest.md: + id: 0a768639ed18 + last_write_checksum: sha1:24882d29ce87718929ef69847195f9f4462dad63 + pristine_git_object: 5814ce7dc8e82993109461496db4794e09284d86 + docs/models/components/batchshipmentpaginatedlist.md: + id: f2e4ad249c45 + last_write_checksum: sha1:f2831809ef344324ecbacc8020eadb713bbd7897 + pristine_git_object: 097e2ef9426b037337cdd0096154414721cd5e43 + docs/models/components/batchshipmentstatus.md: + id: 226423c6f41c + last_write_checksum: sha1:001f35c35e6d99bf6ac67777e782dc4392556cca + pristine_git_object: 098beb05adf2ec17809f1966b07533792fb3ebf3 + docs/models/components/batchstatus.md: + id: d727379a7089 + last_write_checksum: sha1:04cb9c3241779f9ba904eb28f94968f695066ac1 + pristine_git_object: 4490f6e9fdc5df1ea57882768830694ffce35b38 + docs/models/components/billing.md: + id: 3a990442758e + last_write_checksum: sha1:ff631a62d6d643f234aa403c52faf2105251ac20 + pristine_git_object: 2393daa8d422225fecdfb24cdc87d74bc12fd30d + docs/models/components/billingtype.md: + id: 106b0fdf9cdb + last_write_checksum: sha1:9df85f5ada73273a79139606ebf2363666491f6d + pristine_git_object: f884fdf7913a7acbdf126d9af983d093dc472e29 + docs/models/components/buildinglocationtype.md: + id: 8da6c36c5b2d + last_write_checksum: sha1:b5918af5a53da5586365d2e6002bb74b4e423ac2 + pristine_git_object: f59b26ff3fac6deac5344729ee79d1f111878792 + docs/models/components/buildingtype.md: + id: 2aba7812546d + last_write_checksum: sha1:26e58e710e6f356f36724540c1b30d3680e56c28 + pristine_git_object: e96596242504d282c6935c80769e55fb6d6a7c5d + docs/models/components/carrieraccount.md: + id: 15c3f9f9348b + last_write_checksum: sha1:206f4bb2b4b32c1c62e356729a778967aa4b05da + pristine_git_object: caf77dc00347835290050563252cdd5d9fa5b6e0 + docs/models/components/carrieraccountbase.md: + id: 20658b3fec9b + last_write_checksum: sha1:10be8f09c07b48c1c090755c0019b2ce19fec349 + pristine_git_object: 576de4152353daa9aa8b06fce1d92c61e6f489d4 + docs/models/components/carrieraccountbaseparameters.md: + id: dcb6fe5756e4 + last_write_checksum: sha1:0b470560149988d1326230e23c29f55c9b906ea7 + pristine_git_object: 6d9dfa867c1d93e8b6c7d08da0f62a5927bd66a6 + docs/models/components/carrieraccountcanadapostcreateparameters.md: + id: 1c3cfb8c9152 + last_write_checksum: sha1:d70f7446f21b2ec0bfc460def985bb860a055cef + pristine_git_object: bd895a74d5f95ba24d35723ed325685be4cf9c0b + docs/models/components/carrieraccountcanadapostcreaterequest.md: + id: 39dd1d41c1cb + last_write_checksum: sha1:e013e2b96eaf5446da05cba231d2fc0ca28e0053 + pristine_git_object: 7becfc5ab5154fa7cfc87df07cda0c802ca64f1c + docs/models/components/carrieraccountchronopostcreaterequest.md: + id: a790b4f16f5c + last_write_checksum: sha1:cf5c065d05608df9f884cd1896f58005b24a012d + pristine_git_object: 761ed8e81c917051bf0eff6525188347091cd666 + docs/models/components/carrieraccountchronopostcreaterequestparameters.md: + id: 274c53c31c11 + last_write_checksum: sha1:f9d5fb8f6b87e3271e76ad6d85f97281d95c0bb3 + pristine_git_object: 6935838ca18b4ffb45333814acd744acfe856d4e + docs/models/components/carrieraccountcolissimocreaterequest.md: + id: b513a679d2d7 + last_write_checksum: sha1:f9b890017aca81f0553cd81f99c86dc4a79e4b6d + pristine_git_object: a34b2d5eb5b08b2a7eb8d3151eed068d6df54d6a + docs/models/components/carrieraccountcolissimocreaterequestparameters.md: + id: 300647a07142 + last_write_checksum: sha1:b2726ff96729aa5be8689bf4c8a67d6d92a55f71 + pristine_git_object: 52e78bc5d0326ba4b91c1a35aab32527a0854e59 + docs/models/components/carrieraccountcorreoscreaterequest.md: + id: 856b87734ec9 + last_write_checksum: sha1:df78d2eca27b0f2a69ebddf1b4ad92a2588903c4 + pristine_git_object: a731f9b5265a7008dc13d3de1dd6ce0eb527daf0 + docs/models/components/carrieraccountcorreoscreaterequestparameters.md: + id: c6bfb09ec39b + last_write_checksum: sha1:a6470baec920c3ceb4bedc0bf5de4c6d5e0054a0 + pristine_git_object: 13a0aae6fddd814a591a339657253114fe03bc4c + docs/models/components/carrieraccountdeutschepostcreaterequest.md: + id: 45e856bf9267 + last_write_checksum: sha1:3f327703201ff930da486febc6005243ebf61cd1 + pristine_git_object: 4ece805e200ee49b9f4d3257524af39fabbbe984 + docs/models/components/carrieraccountdeutschepostcreaterequestparameters.md: + id: 89de3c814410 + last_write_checksum: sha1:a35114c50a08aae73e6bda5faee5227bf09cb79e + pristine_git_object: 829d052bba16bba2369f703aeff7c6a9d0b48597 + docs/models/components/carrieraccountdhlexpresscreaterequest.md: + id: 5c611a7b131b + last_write_checksum: sha1:32a6c3d545274e8e068cccdfe7bce0e7dff5067b + pristine_git_object: 5545b3f187a00e8049243b2c271379408bfde5a3 + docs/models/components/carrieraccountdhlexpresscreaterequestparameters.md: + id: 21d803e35209 + last_write_checksum: sha1:1be88695b78c9a9a6e8d5522143edfe4682c7b4c + pristine_git_object: e1827687a290f6bea1e76acbee6ed71c837f86ec + docs/models/components/carrieraccountdpddecreaterequest.md: + id: 8dbf7603f4c1 + last_write_checksum: sha1:4680acbf2a70e19dcf289a7fea0ddb6fc621c44f + pristine_git_object: a04151dde9f9adc8a8844894084b5f3bafe67a69 + docs/models/components/carrieraccountdpddecreaterequestparameters.md: + id: b7b9b477e38d + last_write_checksum: sha1:bd9dc66a1a4cccc2f0df3f4ffd69e1ea127efd1e + pristine_git_object: 4a84103ae529385df36f0bfbc235a04a0e7f260b + docs/models/components/carrieraccountdpdukcreaterequest.md: + id: 39987e924e81 + last_write_checksum: sha1:fd7e201ea561027912284808e8e2678f4a6870c0 + pristine_git_object: c1068369112710ad381e76c13ee2de79fc6881cb + docs/models/components/carrieraccountdpdukcreaterequestparameters.md: + id: ebc289735c2c + last_write_checksum: sha1:cacbdd804e18adf4900b213499da421cd24a8a12 + pristine_git_object: 6c4e1fabe8f05cff22b14217fd927c6b4edca53e + docs/models/components/carrieraccountfedexcreaterequest.md: + id: 3401f83ed000 + last_write_checksum: sha1:9fd397e5c80656dfb2ed84553fe8f9c2d7e5b73d + pristine_git_object: 904c203d79353f0f8b1be690f9e89d107d3bba3d + docs/models/components/carrieraccountfedexcreaterequestparameters.md: + id: a01bf5e628e7 + last_write_checksum: sha1:0e40ff80cfcbcda8b21ef7bab6e6752435b29c7b + pristine_git_object: 761e76afd77d6342c395ad442243cea683021ebd + docs/models/components/carrieraccounthermesukcreaterequest.md: + id: 1e77687c46ad + last_write_checksum: sha1:9e947aa0b4024d0efa5211b97ab27226603a9ce5 + pristine_git_object: ed0bbb26811bc6f39567633b41a6704d14085977 + docs/models/components/carrieraccounthermesukcreaterequestparameters.md: + id: ac5c4d1a0f8c + last_write_checksum: sha1:4c9e7c227e844d2290679396501ecd1901e5a2f6 + pristine_git_object: a6992c0a27a1d2e3b6c61cb69352345951672d82 + docs/models/components/carrieraccountmondialrelaycreaterequest.md: + id: 7610e96f1c18 + last_write_checksum: sha1:f131cb5d519e31a3dce687ef41eaf84f7c11a9ee + pristine_git_object: 637c7c86a64ce6bc44a5177153585f626cd35c26 + docs/models/components/carrieraccountmondialrelaycreaterequestparameters.md: + id: a91db02b2144 + last_write_checksum: sha1:14c7df79c1a9ca0427677e32a3455955b447ccda + pristine_git_object: 2980d14327703d4201679380e921751c67794225 + docs/models/components/carrieraccountpaginatedlist.md: + id: 45d484e18841 + last_write_checksum: sha1:3959216071532ca6552205d9139924ce068f9583 + pristine_git_object: 330bf8e80dfde94806114f25f9c754452f87829a + docs/models/components/carrieraccountparameters.md: + id: 5536ce015a3f + last_write_checksum: sha1:be9e00643df173a38b71479df61c0bcf7937ad15 + pristine_git_object: ed888faec7aac6584ca9b1a8f495e0bec6e8a07a + docs/models/components/carrieraccountposteitalianecreaterequest.md: + id: d6b6d97f9ce9 + last_write_checksum: sha1:d4f33260456957c7a73a7f3e121ad2870d41d989 + pristine_git_object: b47ae6ce516e3483d6d4a75efe412728c5e69413 + docs/models/components/carrieraccountposteitalianecreaterequestparameters.md: + id: 6531b31a2477 + last_write_checksum: sha1:323e4ad68108a01c78340c7d702ee9f32d74fe1f + pristine_git_object: b429bd77505646133ee31664a4474c23d19736d2 + docs/models/components/carrieraccountregistrationstatus.md: + id: fc8c21616bbb + last_write_checksum: sha1:b837f7268a069460cbb55ee58e9f66ec6b81104c + pristine_git_object: 059832f67bb9229bffcf6b6e01ed3378ebbfe057 + docs/models/components/carrieraccountroyalmailcreaterequest.md: + id: 39581bf5cdc4 + last_write_checksum: sha1:b0ecb373d7bd2eb6925c00d205ce70a651dc25ca + pristine_git_object: 11f0bf103c3c230e2e74bc267fb48d8c693e5f80 + docs/models/components/carrieraccountroyalmailcreaterequestparameters.md: + id: bcf44b5f1cd3 + last_write_checksum: sha1:223251ea410fed662800e1c8ad54ae15d069d8ef + pristine_git_object: 43ca7a53e588a5ac7fdc1d9f43212fc650a977c7 + docs/models/components/carrieraccountroyalmailsfcreaterequest.md: + id: 6a199bacfc5d + last_write_checksum: sha1:d8057006d006954cdc66c9b4a7aeb05ee2dd30dc + pristine_git_object: 207f8fc081684ed916a1acb6f6ca5a9d9f1cc00d + docs/models/components/carrieraccountroyalmailsfcreaterequestparameters.md: + id: 866f22dc1743 + last_write_checksum: sha1:87d1eb6922a78f84a12a7ee29af57445822bb4d1 + pristine_git_object: 8dba89548ffdff688d7b6feb4d5a694dd55f5168 + docs/models/components/carrieraccountservicelevel.md: + id: 758e1b1a5c70 + last_write_checksum: sha1:320ced2287429b972b5aac0046821aee9acf9de0 + pristine_git_object: 4c5bb1a718fb74cd5a0a8a1c0f6a490406ffdc85 + docs/models/components/carrieraccountupscreaterequest.md: + id: d9ef467ab779 + last_write_checksum: sha1:f6853ad0c024a14aa2c8f2e296dfb250684fa003 + pristine_git_object: cf80dfc8dff9793e26b92bcd811be9311981abf5 + docs/models/components/carrieraccountupscreaterequestparameters.md: + id: 1fdffd5a37c8 + last_write_checksum: sha1:456a0978d9c46880d76aa8a5cba854919a396eb2 + pristine_git_object: 794c8e3a033b8ba586c28a1443a8bdde6640a924 + docs/models/components/carrieraccountuspscreaterequest.md: + id: 163d2367824e + last_write_checksum: sha1:2b7dad70400b5c89f7b326cac83a0dc3c049df4d + pristine_git_object: 83c38f85f121f46a7b20a8eb10f7e7cca5bc1b30 + docs/models/components/carrieraccountuspscreaterequestparameters.md: + id: 273a85cc3dd9 + last_write_checksum: sha1:76e7a6e5c45b6f70d5737492d1b36d370e584ae8 + pristine_git_object: 392e69209f970edf36dc8f70421036ff4fb58a85 + docs/models/components/carrieraccountwithextrainfo.md: + id: 0b5945e54319 + last_write_checksum: sha1:6670678c70c5af9143fd323dd4f0f756481b715d + pristine_git_object: d4530d3228336605009f2f6c22454721fbdc5bdf + docs/models/components/carrieraccountwithextrainfoparameters.md: + id: 19c3bae6cc17 + last_write_checksum: sha1:94d44f7041afaa8758a122e39eccff8ebd4c27d2 + pristine_git_object: 90c4fc83461e3d87e5c021c120e465a86be296b4 + docs/models/components/carrieraccountwithextrainfostatus.md: + id: e3b09842b53e + last_write_checksum: sha1:59c371c8335be84742eca6cc41a881d5fc791e4b + pristine_git_object: da6a00dcd6213be6f9fd072e6a9a90f64869af97 + docs/models/components/carrieraccountwithextrainfotype.md: + id: ea099692a969 + last_write_checksum: sha1:3b99968fe397929a43a6a385f664a185d9f44186 + pristine_git_object: 632f2ede24044180b349c4e2b62fb5d4560689d0 + docs/models/components/carrierparceltemplate.md: + id: 7de46a17c839 + last_write_checksum: sha1:fdde8f4920e2928a9f060d5abc192367805eb674 + pristine_git_object: 3284fcdc92e8da0837c043de7cefb8fb65c86e63 + docs/models/components/carrierparceltemplatelist.md: + id: 14ae9918361f + last_write_checksum: sha1:cc1a14833061bc598f3ef4272beed1f09003f815 + pristine_git_object: 1121142bfe95441c81064d6079af2114a591a752 + docs/models/components/carriersenum.md: + id: 6f0c9c0cef8e + last_write_checksum: sha1:77425240c7d78fbb54e70351c8b68f72fc057b23 + pristine_git_object: 7f1caa71a5f07757b947365f5c928f2c675044e2 + docs/models/components/cod.md: + id: 90681657f5ba + last_write_checksum: sha1:d369abc721cadde2c04daa981cce19ee832794f2 + pristine_git_object: efe45ad03d5dba0ac006ade9207d7e2f4d35f095 + docs/models/components/connectexistingownaccountrequest.md: + id: fd0d6bedfa49 + last_write_checksum: sha1:56b1bf9fa0f11836be8f5ab0c0de52da7ff74cd6 + pristine_git_object: 045330ff6bbd9accf82049c9e0c5876c4e5edbd3 + docs/models/components/connectexistingownaccountrequestparameters.md: + id: b8dd8f629f6a + last_write_checksum: sha1:7b5bf51652f552ad93ac6885ab22f66a701910c4 + pristine_git_object: 0c8c3f386a937288a9f00596db8f2e42d44af94b + docs/models/components/corerate.md: + id: f6fe48943943 + last_write_checksum: sha1:a0fa7103fb980bd515216eda036588cec9e4ca1d + pristine_git_object: f64f673e12dd2eb2ee89d29ea7e13f232a801ffa + docs/models/components/createdby.md: + id: de1dc57eaf53 + last_write_checksum: sha1:c14e5e3e4c98b45c86970df9775606b4568f831b + pristine_git_object: 8f2ecb7319fd8b322d84da7eb66c65daccf0e59b + docs/models/components/customerreference.md: + id: 26ba564e1316 + last_write_checksum: sha1:2ffd20e2411b091b2731cdf223913fff72d06b09 + pristine_git_object: 85adc6b2783e5c2bb1e1d44ff2b18b0451a82439 + docs/models/components/customsdeclaration.md: + id: 92b099d30bc3 + last_write_checksum: sha1:a6428b2aa6c5b9b21eb03aa7b55494e6f7698c76 + pristine_git_object: b671246b6b0f7e8ad0c82fde4dfd6354a02e10e4 + docs/models/components/customsdeclarationaddress.md: + id: 13fdc7359119 + last_write_checksum: sha1:36698b87cbea7c8e5152bd821357155ad53cbb9a + pristine_git_object: 656093983c2b642eb4c66a1f0aad554f2860766f + docs/models/components/customsdeclarationb13afilingoptionenum.md: + id: e988ac476c62 + last_write_checksum: sha1:43cc75926ee1f85c5603a95b45c2721236800f8c + pristine_git_object: f7c0f5e5c8a7f666ab7f498504a3330b9531231a + docs/models/components/customsdeclarationcontentstypeenum.md: + id: 9e4d2f250e7c + last_write_checksum: sha1:7392058802886fed8c1c2d11b84b640ccb1502b0 + pristine_git_object: fb276d5f77ff49f33e4ee3dd475d1d9b9cf99e4b + docs/models/components/customsdeclarationcreaterequest.md: + id: 045c137b533a + last_write_checksum: sha1:58f66d31242e615c5700c1dfb63500377b60b45d + pristine_git_object: 15f448d74c7358a610a23b23facb3bbbd939ee4e + docs/models/components/customsdeclarationcreaterequestaddress.md: + id: e810a6b6e44d + last_write_checksum: sha1:630fec071a7115e0f5b9ead0755b0f070c93b648 + pristine_git_object: d0f54a828a85e9d79ef4cef6d0685535e480e782 + docs/models/components/customsdeclarationcreaterequestdutiespayor.md: + id: b463a4839347 + last_write_checksum: sha1:7e186154ac5104fa50489d3b877780f48cd81b08 + pristine_git_object: 299651cfd4afd56671207f05047d1acdb471bae9 + docs/models/components/customsdeclarationcreaterequesttype.md: + id: 33fab0242659 + last_write_checksum: sha1:c4ea42817f467f1616c93ec597c80fae7405f17e + pristine_git_object: e773871b1983cb617e138ad689a86d8b5ffabd6a + docs/models/components/customsdeclarationdutiespayor.md: + id: 8240562672b6 + last_write_checksum: sha1:97a30b3b36d55bb992ae594746c04b1b51f53766 + pristine_git_object: e6594efcd36cd5396efd387f6d93e43f48a0f7a5 + docs/models/components/customsdeclarationeelpfcenum.md: + id: 217df7dd260e + last_write_checksum: sha1:312f6a43236405db21b09ba66fc4be7e897fb48e + pristine_git_object: 67db4495d2e4ae3fcb3458d3f394adb12842f8cc + docs/models/components/customsdeclarationincotermenum.md: + id: f5cda6184124 + last_write_checksum: sha1:ff8b673485adb5f3189dd9fb1a56422e025f4f55 + pristine_git_object: 1877adfb95746ad9dacb07f372812f14430d6355 + docs/models/components/customsdeclarationnondeliveryoptionenum.md: + id: 815f4598fec5 + last_write_checksum: sha1:d51b235a593a0c1fe70213f3ea466d613baa07d5 + pristine_git_object: 29bb8f0bc98b84a792420d62af368f7cbc1fe22e + docs/models/components/customsdeclarationpaginatedlist.md: + id: b14cbf8df00d + last_write_checksum: sha1:85159ca61c1007416471911867eb6248e7fcec1d + pristine_git_object: 073e810acc0c08cb49fd165b6bdf171959b46c07 + docs/models/components/customsdeclarationtype.md: + id: 503948ac7254 + last_write_checksum: sha1:2a8eb4729662e3101d11feb39a9240cf56f9ff63 + pristine_git_object: 814fc8ad0d842ab8e8df04074a6689f247de6aaf + docs/models/components/customsdeclarationunion.md: + id: 0ef7d7e08ff8 + last_write_checksum: sha1:71e0d7dc193f0be3df1b0fc520f29df8b0814fbb + pristine_git_object: fdfe2a53dda9725a1757ff186a52be8b6331a2c9 + docs/models/components/customsexporteridentification.md: + id: eaa4c187cca8 + last_write_checksum: sha1:975cb88ebd12b2275f499a4c5f88ed013d41b030 + pristine_git_object: 63e1c4d9fe32aaa219b640a4d29a86196b3f05aa + docs/models/components/customsinvoicedcharges.md: + id: 43d7b54ef624 + last_write_checksum: sha1:14a0c4b5685b08aeb3b380f32e5f27d96521c11b + pristine_git_object: 0738de28707240b8c4bee9e7125223e4ce20ffaa + docs/models/components/customsitem.md: + id: 2abf9302db65 + last_write_checksum: sha1:764a3f1bbb1ea54227840a2667e8b2839ab6f095 + pristine_git_object: 82328491f2af1cad8e118f7e39cc6d64c556a59a + docs/models/components/customsitemcreaterequest.md: + id: 67c137d6c607 + last_write_checksum: sha1:4881897ce7317fee29fdcd7bb093b8900393dc90 + pristine_git_object: 81f9126cc10e2966da9a619cdf0adeb666d18aa4 + docs/models/components/customsitempaginatedlist.md: + id: 75319e271697 + last_write_checksum: sha1:4072a63a9715443ba9c711c95c8b0957fd31d893 + pristine_git_object: 09139c20eef67c88c2623264d1132570c2608dcd + docs/models/components/customstaxidentification.md: + id: 5639eaf4b84a + last_write_checksum: sha1:eb40468ce56c5730203bc88d62511919f684d945 + pristine_git_object: 95a9945d001b558cf1c66f418cd78ce4a341608b + docs/models/components/customstaxidentificationtype.md: + id: fd051250ba58 + last_write_checksum: sha1:c63c2b122c89130753ae2f4c201ee0f28bf2bb2f + pristine_git_object: 7821b36b26501d80c43de2e92c3e08128df517ac + docs/models/components/dangerousgoodsbiologicalmaterial.md: + id: abef411de403 + last_write_checksum: sha1:5ee975206ef64a47a4dbc7ae2a4af070e79e2e4e + pristine_git_object: 7467d120baa23c25b44079e242da6ae875192236 + docs/models/components/dangerousgoodscode.md: + id: 76899ad1dd8b + last_write_checksum: sha1:2ba3b2854d1f64bfe4839c13b676f202cdbcdef9 + pristine_git_object: e34406408135c8a971ce961bc532ba307743f94d + docs/models/components/dangerousgoodslithiumbatteries.md: + id: 6c5d4eea8c61 + last_write_checksum: sha1:d8d30067d06fc1a451728fa263c22d4dae3e4f2f + pristine_git_object: d9208145b3e0300102d4944e6b57f26610faa82a + docs/models/components/dangerousgoodsobject.md: + id: 276082f08169 + last_write_checksum: sha1:3dc992c9f4e564296d204041f2a64ba6695616c6 + pristine_git_object: 95d5e6ad9e06ca1927a25a1522e092b0797444c3 + docs/models/components/defaultparceltemplate.md: + id: ff184671bcac + last_write_checksum: sha1:cbf71cdcaee01adb9b1b290517886b8a98cd5377 + pristine_git_object: 70219e5dd6d3d3cc5f53ea020cffed64781a7873 + docs/models/components/defaultparceltemplateupdaterequest.md: + id: 2c44261adea7 + last_write_checksum: sha1:6700a478005b4275945f521949993d57929d7494 + pristine_git_object: 314415ad40ec4e9bc460173552171f7488af4cc7 + docs/models/components/departmentnumber.md: + id: 08501ae2a9ed + last_write_checksum: sha1:ad64f7063364d43f4edd00ebd6263901bdf4f528 + pristine_git_object: 71e1060adb528730b1d652c43e66796e47892ecb + docs/models/components/distanceunitenum.md: + id: 39a14d6640f4 + last_write_checksum: sha1:cf3da2703781a3ad2e4695b3e51526249f5f18a8 + pristine_git_object: a2fad86e048d2f9c91c017899f56ad2ef28b9e24 + docs/models/components/dryice.md: + id: 2ec99e2db00e + last_write_checksum: sha1:9d5c3091c6af7d12c98e8a1cf658ef1c55b142c1 + pristine_git_object: 95d11051a3522382b6583c80fdae6f11db8703e9 + docs/models/components/fedexconnectexistingownaccountparameters.md: + id: 9121ff311085 + last_write_checksum: sha1:48dac91c82d63da63d3d02fb53ad21ea807f7b6d + pristine_git_object: eaaeaf62a904b6fe9fd00072b1e056b087431c63 + docs/models/components/instanttransactioncreaterequest.md: + id: 5b3f06fccb9b + last_write_checksum: sha1:c72f32914d98e765c65acb242523687cd321a5d4 + pristine_git_object: 1549ccc6032f449cabfa2e0633a6cab73d970fdd + docs/models/components/insurance.md: + id: e1e986c65354 + last_write_checksum: sha1:b1c925e81f153c6c299d8e2482a2a9751ae2835e + pristine_git_object: 77c3dae9504054cb087c76032d31ae1ad46b857c + docs/models/components/insuranceprovider.md: + id: 651d2aee234b + last_write_checksum: sha1:aa110b4d996d6cc549d8e519793b928623c1fd19 + pristine_git_object: 7d9586ee433a1bb2f5b3a95fede3c0da70eaf7e6 + docs/models/components/invoicenumber.md: + id: cc2978b4cc38 + last_write_checksum: sha1:2b5dd4cfbe30876e2ab1ed8ceaa6c22f1b17cad7 + pristine_git_object: 9673d4fc7d112acf17084e539e091f1243ae8b6c + docs/models/components/labelfiletype.md: + id: 59854af7f4a0 + last_write_checksum: sha1:b7ac0015e6d8121d1a29c61f16e064df3ed680f9 + pristine_git_object: 5becea5b1fe744ed462838f4c9672396d196c2b7 + docs/models/components/labelfiletypeenum.md: + id: aaf78a5a2b12 + last_write_checksum: sha1:1a3b124e555b709c2bb4811aa6531804ff45cfcd + pristine_git_object: a547de29f1dcd8ec66a416111b953dfb0062c6d9 + docs/models/components/latitude.md: + id: e8ad33d0f49e + last_write_checksum: sha1:d489c231168a38c14545945742bda74d44768c6e + pristine_git_object: 7560a2a9f2d834e47c01d14156ca9037d230b228 + docs/models/components/lineitem.md: + id: 97e125223c72 + last_write_checksum: sha1:9535da0f46150ca6f2ed0408f703504b56b5f2ed + pristine_git_object: 3dc3f4d08c41da67dc3ab05f2346c8db19b3df25 + docs/models/components/lineitembase.md: + id: 109d8d336fa5 + last_write_checksum: sha1:6c0123fc40e147418f5d8bea1738f5b76c431f24 + pristine_git_object: f88c930322dfaeddf84310cc49bef110ee7e9be2 + docs/models/components/liverate.md: + id: 00236fcad6fc + last_write_checksum: sha1:e53b6fe033006511a76c04a347c94d7296bc6b85 + pristine_git_object: b0fda4b18c3ec749e907f8b1d8faefcabf87488a + docs/models/components/liveratecreaterequest.md: + id: 630238133ce7 + last_write_checksum: sha1:da5e12f91b915ca1d19d1c12a90468bcb9cc5884 + pristine_git_object: e29c14fff5cc2ad0f65f81794c2f50805b264470 + docs/models/components/liveratecreaterequestaddressfrom.md: + id: 1171d4935701 + last_write_checksum: sha1:c5d95fb797052dea834720f8a8c2d78409fbdc19 + pristine_git_object: e4c3011014cb9823ec34996141eac47bddabe242 + docs/models/components/liveratecreaterequestaddressto.md: + id: b5c0a191fdd2 + last_write_checksum: sha1:644037f2aded69cfb08b0ae1378f0926013d3e40 + pristine_git_object: c5f4909d01d92c0d6ce17a2ae51d73cd5f2f8823 + docs/models/components/liveratecreaterequestparcel.md: + id: 6d4f831ed967 + last_write_checksum: sha1:1269d4076e4f15cd8e8065f94f3ea86da120f23c + pristine_git_object: fa14079b7197713e9bfd69cd6bab68d22da3b2d6 + docs/models/components/liveratepaginatedlist.md: + id: d5a95de8252a + last_write_checksum: sha1:5154ed9da0f4c4b41eca2589a3fae0b2439e35e3 + pristine_git_object: 7c98fc3afd8544943e71658bef653b1501b13829 + docs/models/components/location.md: + id: 6ac85d9d83d3 + last_write_checksum: sha1:efb395e63f7d6327935755f5f39419a40566b573 + pristine_git_object: ae9d387b69ea5b43c6861c143093f20887a62281 + docs/models/components/longitude.md: + id: ed0719abee5b + last_write_checksum: sha1:7e84b98476b3ba53bce0a73c893c79990a9d0d48 + pristine_git_object: 051eca204da8b77501f2a3b67c9dec9494a6ce68 + docs/models/components/manifest.md: + id: ab82543dfdb2 + last_write_checksum: sha1:da2e255face3b5e6d6081eb59f69b216656e81f8 + pristine_git_object: 2744cc9b1dcf388784c54b79aeb94c5fb0102aa0 + docs/models/components/manifestcreaterequest.md: + id: 6a64df639306 + last_write_checksum: sha1:a64fba2c4f71d4ff1f10d0c33c65879f84dfd779 + pristine_git_object: a237835786290e82ec236cdf58e143a550f1ae49 + docs/models/components/manifestcreaterequestaddressfrom.md: + id: 3789e66c1c03 + last_write_checksum: sha1:78f0ff4204f35514261297746d833a6b1c13d79e + pristine_git_object: e576bdab23b995e29454a23ec43e0b6a4643a8c8 + docs/models/components/manifestpaginatedlist.md: + id: ca50dcdde792 + last_write_checksum: sha1:a7988a594dfc1bfac4f0ab692120f18af783601a + pristine_git_object: 927165c811b0a1b151098a6455f579e62f27ebfe + docs/models/components/manifeststatus.md: + id: 2c3422849697 + last_write_checksum: sha1:93f445002f7274a6341d49ca5bbce0e77f1b980f + pristine_git_object: 45485f5b53a37b20713104cd36d941aa7cdaa76f + docs/models/components/objectinfo.md: + id: 419831aba495 + last_write_checksum: sha1:39a193f1e5851d61be54ecfa41038512bd2273cf + pristine_git_object: 93847f0ca74b3e27fd9b1acf8c8093fa9943dc6d + docs/models/components/objectresults.md: + id: ef5fbb5c219a + last_write_checksum: sha1:6f03a2c14d6d30044c74fad94fe3b67d5797c08f + pristine_git_object: 0d7ae9fb6c2394ee873b9ceeb697e7d0d5535e08 + docs/models/components/objectstate.md: + id: 6730ee5f5e46 + last_write_checksum: sha1:ee18d42217f1a5fafe1f4129b39c219917324099 + pristine_git_object: f0d411acf54a9b2cd947f966f10d02494dd8fb07 + docs/models/components/objectstateenum.md: + id: 74150b82f6da + last_write_checksum: sha1:9f5f0b2adadf8121952dc2178dac4d4665b8b551 + pristine_git_object: ca5ca96613c8de1c515cd041dee0e9e020ed98fb + docs/models/components/order.md: + id: 6e3d74da5756 + last_write_checksum: sha1:ec48b2904ec6144b811ab2cedc25a94e263881d6 + pristine_git_object: 9bb6c76995bd8d9e655cad5f2889f8e2663c24d2 + docs/models/components/ordercreaterequest.md: + id: ae4718443a04 + last_write_checksum: sha1:7bcadaf079b254e829dab843bce15a0240758dd6 + pristine_git_object: 3a6a6fb7ae7e4297023fa69d24144f27c94e4379 + docs/models/components/orderpaginatedlist.md: + id: f75c18eb1b0a + last_write_checksum: sha1:493a186e52e82f03b38cb3b2200c0abd0f0af315 + pristine_git_object: d6619215f0b515b02cf623c14d961d183fa563c2 + docs/models/components/ordershopappenum.md: + id: 58fd50c7bf1f + last_write_checksum: sha1:87eeae5c82cc7870d5f5f8de6911ba91572035df + pristine_git_object: cfdce2185102ee106befcec88940f150c8db6d22 + docs/models/components/orderstatusenum.md: + id: 20e496625846 + last_write_checksum: sha1:be67304a5e189a41612d0a335c6d4de699ab20e4 + pristine_git_object: 325f0c73fa40f00cf3776df5d6e0dad6f3826286 + docs/models/components/ordertransaction.md: + id: a998a89b98e1 + last_write_checksum: sha1:51841a9209f17a135ddf99d5732cf75645b4d810 + pristine_git_object: 5df80802afdf7146208993cf6d6928c3c81f0086 + docs/models/components/parcel.md: + id: 7759af633813 + last_write_checksum: sha1:00e5bc47cc9786f40eceea83907bff7185acb57f + pristine_git_object: a504e109d5ab25454beed693c7e4cf300ab7581f + docs/models/components/parcelcreatefromtemplaterequest.md: + id: d3b3d939b4f0 + last_write_checksum: sha1:98828ff18d5e5922755fcf710136cf1d62d22fab + pristine_git_object: 351a212577dabdf223b560c6f2e5fd1832957142 + docs/models/components/parcelcreaterequest.md: + id: 56ac54f082cb + last_write_checksum: sha1:0ebb130a6e16f02899f4e1945fb92ef1d4bfcb55 + pristine_git_object: 95e734784f9a970048de821df0b31591a4ee75f7 + docs/models/components/parcelextra.md: + id: e8dc84c7e033 + last_write_checksum: sha1:54de707e4f640e1a6afd7d98892fbeb390283c84 + pristine_git_object: 80332daab0d0036e3b6b053873d6b880ca7e354c + docs/models/components/parcelinsurance.md: + id: de09f57b2ac2 + last_write_checksum: sha1:e339ff8d6fc34dee654556adefcb3d76136b6c83 + pristine_git_object: 67f48dbef6adf00b86070a42747f0e7c53e78022 + docs/models/components/parcelinsuranceprovider.md: + id: 534943ea0a20 + last_write_checksum: sha1:a46192acca49c07bafacf9ff5d14a42bbb7fbc06 + pristine_git_object: 2864678b43cca645670a71271b366c3e8c57027a + docs/models/components/parcelpaginatedlist.md: + id: 867e12305484 + last_write_checksum: sha1:d6325403bb72264d6243f1ceb8a72a52ebd26e82 + pristine_git_object: 26f71ae954cee75d922f603c440bb0d367d6e08c + docs/models/components/parceltemplatearamexaustraliaenum.md: + id: a5c455a84a26 + last_write_checksum: sha1:743cfbc7a6c189325b3610ce4082bcd7131b1f6f + pristine_git_object: 38374de66b6b2052346f53df9771c016baeee937 + docs/models/components/parceltemplatedhlecommerceenum.md: + id: 9f0e77e66676 + last_write_checksum: sha1:b57076c57549004acfe067e2c2f559fcdaccc7d5 + pristine_git_object: 45dc0604c4d75e555e6e71270bfd1cb4059a13f9 + docs/models/components/parceltemplatedpdukenum.md: + id: 1aaffdf9d666 + last_write_checksum: sha1:d9d3238b5bd63ce63c5a48705442ffe46e5a0417 + pristine_git_object: 3af6a699e86e110b4ba8b5a6e856250e8d693e1a + docs/models/components/parceltemplateenumset.md: + id: b5d1028ccefb + last_write_checksum: sha1:2f1edaffb10d7ac26b4d05cd89cf5319329981c4 + pristine_git_object: 3dd8f1a517cca665b02ab2afb049f98861e3af10 + docs/models/components/parceltemplatefedexenum.md: + id: 29f456d4ca03 + last_write_checksum: sha1:b464cf1cc8a42351ae698268a662531e171de9d6 + pristine_git_object: fac632571075d526a07995de317408d25bd036cd + docs/models/components/parceltemplateupsenum.md: + id: eb6e11d851b2 + last_write_checksum: sha1:114a86aae9e488f6b8551f8a4a2706bf5472046f + pristine_git_object: e3ebbcfdf41130b57327bb2408f935778a85347a + docs/models/components/parceltemplateuspsenum.md: + id: 5f41e0020a05 + last_write_checksum: sha1:9016d3e7c3adf204dfe14e499beb648a0cd16e3b + pristine_git_object: 186d0e4bd759fdc2b36d91ac5a02f9392bb0a1d4 + docs/models/components/paymentmethod.md: + id: 722f86eed889 + last_write_checksum: sha1:f7e9bcd165b3698b7cfe02ee1b7f6045ac943d52 + pristine_git_object: 4da1f472beff26731b84a8101179f6ddb1f73cbc + docs/models/components/pickup.md: + id: 982ef529fc21 + last_write_checksum: sha1:ff3584fe403b082859336cf9eb764c73f3cfc673 + pristine_git_object: ab8f2b0336ebdaca71eac8580f17b091167ec60a + docs/models/components/pickupbase.md: + id: cfa4f2323bb9 + last_write_checksum: sha1:4c3fa42bc5d5aa3b3c20a9afb6ab51c00f2e7481 + pristine_git_object: aba581c6565bfdcefb9fa757938f3d29cf838b5a + docs/models/components/pickupstatus.md: + id: 02dfc01ddc1f + last_write_checksum: sha1:07e05597ccff8a59533cde7d6c94fd12c5edc2d0 + pristine_git_object: f9af6c65d94d49635838533502434c29cb1a03ea + docs/models/components/policy.md: + id: 66c097e1389b + last_write_checksum: sha1:9c47e910c484ecf06007fdd1408ab2d8c4df2f38 + pristine_git_object: 8875e66bb44ffd67e4b7c31650d9025e557f6121 + docs/models/components/ponumber.md: + id: d5d1b5c9ab7b + last_write_checksum: sha1:8d351f316a130da1ab30dc22ebd9d3d9e1a7d2ac + pristine_git_object: 7bbafb0e013b21d7d52725f203347ca2f2483e24 + docs/models/components/preferreddeliverytimeframe.md: + id: e5959e679827 + last_write_checksum: sha1:535726894bc23a7488a190fb68866162a4b846e8 + pristine_git_object: 1316e208b99a860672b0dadca8382a28dc5125b3 + docs/models/components/rate.md: + id: 2b4408495589 + last_write_checksum: sha1:772e4e3fb55dbbcb88c015d926b53fdefbb1f705 + pristine_git_object: 5aef3213494e457718f34cebf1f0d14b914fbc6f + docs/models/components/ratepaginatedlist.md: + id: 53c20a3a16f5 + last_write_checksum: sha1:0cd4dcb8a6809cde58e9cbbf5088d17560b033d3 + pristine_git_object: b2f1f4a15327aa93f94eb4a7261e86c839b20411 + docs/models/components/rateunion.md: + id: a5ac2d60b464 + last_write_checksum: sha1:de4d0c8da4e9dd7ec84cb91ed0d52f59b0b5e45e + pristine_git_object: b29bfb75208ec6203cedb6242403619742e9c3b0 + docs/models/components/recipienttype.md: + id: 3fa30425ae78 + last_write_checksum: sha1:5b49a897eec3684e28e0a0526fe8fc6113cc654c + pristine_git_object: 6f355138b1ab701f9f1cab1df745d1ee474c0306 + docs/models/components/refund.md: + id: a9ba6686865f + last_write_checksum: sha1:70cc0b9573f61a0970c88ab6c3d18473e98a667d + pristine_git_object: 95b239d13fa32254efcd16841d399d09cd6182f5 + docs/models/components/refundpaginatedlist.md: + id: a000995628a1 + last_write_checksum: sha1:3834746eeee91e352d2b5fb120272034ab430535 + pristine_git_object: 533f644f97ccf5492aaf316968a6c6704b6ffc0c + docs/models/components/refundrequestbody.md: + id: 21b90379146b + last_write_checksum: sha1:5f22ccb60039315b449c5e963e1ddf8f9f69d226 + pristine_git_object: 1c678f745bcdb9ef0fc91f6c771ecdb839ac5b3a + docs/models/components/refundstatus.md: + id: ccd8379bb890 + last_write_checksum: sha1:c3bdfa390febace9621989d3d73724f7a1894ba1 + pristine_git_object: 0c1816eee8fce83474938966490fb3df58970924 + docs/models/components/responsemessage.md: + id: 509bb3192e74 + last_write_checksum: sha1:6b78bc6b540789ae36a8bf07ea87f9acc8edd489 + pristine_git_object: 649c38b79269e3da20858c88cecc80a25b02e3c7 + docs/models/components/returnservicetype.md: + id: 5881ad00f810 + last_write_checksum: sha1:d51e892e13bfedfb84f27944b86b7d1bfd04534f + pristine_git_object: 423f71d6e4665eadd5faa37b19378af7ed6572b0 + docs/models/components/rmanumber.md: + id: 9e495fc0bd54 + last_write_checksum: sha1:fe5b261bc1f4489065f29ece10bd9a17602fcced + pristine_git_object: eabeb57c0f09208c6186bafdc80532605951b751 + docs/models/components/security.md: + id: 54906b49ea28 + last_write_checksum: sha1:983a06ece33422e2b1b9037f7a786f67529bd0bc + pristine_git_object: 4a121d348fbd55b88f90d81baa5a91e383eff390 + docs/models/components/servicegroup.md: + id: 71a8011ec204 + last_write_checksum: sha1:42d4efca05777a88d57ac06fc04e5f8ba1d8ac37 + pristine_git_object: 0d19d7df51012b8f6701bf01e1222f4abb5c4011 + docs/models/components/servicegroupaccountandservicelevel.md: + id: 25d5072c5738 + last_write_checksum: sha1:944b689d75ed84f1131cdfcbcde07ebbacd8dcc3 + pristine_git_object: 1e04bc9a0544460bab322c1934aeb208d42e90e0 + docs/models/components/servicegroupcreaterequest.md: + id: 56de82c63e46 + last_write_checksum: sha1:ec93a6383bf387d51ef9666918cee267cc4d8b3e + pristine_git_object: 1428029a2dd39d04d0aed9573e8c7213ba0a6d2f + docs/models/components/servicegrouptypeenum.md: + id: 6314550ce650 + last_write_checksum: sha1:76d5150f1a62eeedd728a1bbffa6c6b12ef98172 + pristine_git_object: fae876a7939f941e4026308cae5826c0c92e2636 + docs/models/components/servicegroupupdaterequest.md: + id: 049aa5d6c4f7 + last_write_checksum: sha1:917e5afe8148ed5d482f46f90e001e1e892666e3 + pristine_git_object: 1a13818d51d10bd995046887bf9c0187bc7858f2 + docs/models/components/servicelevel.md: + id: eca5285495cf + last_write_checksum: sha1:956c8f4528b647eb697964f5494314eb586d0772 + pristine_git_object: 8eea1add8b27d9bd76d0be53dd6b9ca85b922614 + docs/models/components/servicelevelairterraenum.md: + id: 251f97c884a7 + last_write_checksum: sha1:70eeb8d8e7f40fbed8bb970dafe861cc82779efc + pristine_git_object: de5957f11f817322da973e332fbc8f51c19d58ba + docs/models/components/servicelevelapcpostalenum.md: + id: df06df33ebaf + last_write_checksum: sha1:1404e3c956ad6ba376ce5722a3c5b271e7a04dc8 + pristine_git_object: b57d2da17f63e91ccabd820501c4963c48b96f57 + docs/models/components/servicelevelapgenum.md: + id: c9e2fa4c0c4e + last_write_checksum: sha1:3542f3f76bcfa15e338a4154bda7a30fad4543c2 + pristine_git_object: 40e87d2ebae33c7aca09d290c987ba7c5b94a095 + docs/models/components/servicelevelaramexaustraliaenum.md: + id: f9a0fffc21cc + last_write_checksum: sha1:7c34942649e987d0d6d2cda5d769e47403e4797d + pristine_git_object: 300c91dc6d2718fce5393f307682c75c5ac2d0be + docs/models/components/servicelevelasendiaenum.md: + id: 6140c52f8467 + last_write_checksum: sha1:69d2ac020c7ab2e95421cbc8ed089c539c088c6f + pristine_git_object: 0cf56246baae377c1e0942f3146bdca4183ad968 + docs/models/components/servicelevelaustraliapostenum.md: + id: 3a9bcc83b406 + last_write_checksum: sha1:908d6b91ed63566108f2b5aad343df00bc7c69ba + pristine_git_object: 46d48ef4e7f34adafe7196d50716c41e40f37da0 + docs/models/components/servicelevelbettertrucksenum.md: + id: 08eeee6eccf0 + last_write_checksum: sha1:e7934fefd91fa5adf81bac84fbcf644e59800c16 + pristine_git_object: 7cd6700405690f63712387a302657a3dc2210d36 + docs/models/components/servicelevelcanadapostenum.md: + id: 77b4f9644c8c + last_write_checksum: sha1:7adbe431f93c5123ecc62cbe27021994785631e9 + pristine_git_object: 3e50cfedecdbee067b4e58a14ec7a263c4d10cb5 + docs/models/components/servicelevelcdlenum.md: + id: 4450c87d2cc3 + last_write_checksum: sha1:88ecb59463d08d8cb52a9f353259feb453059273 + pristine_git_object: 9b9123ee240d69b4d7829d6b13b773188c556fa1 + docs/models/components/servicelevelchronopostenum.md: + id: a1336083ab3b + last_write_checksum: sha1:d41f6d15be5c4b5ecd9190e4b6ebbe4bde7063fd + pristine_git_object: a9da42ae1ee9f295f6800379ca9036f180501df7 + docs/models/components/servicelevelcolissimoenum.md: + id: 659ebef98f45 + last_write_checksum: sha1:b1df1e9a0911fd46d690116f4729c1a88a3e2fb6 + pristine_git_object: fbc9a940dc102ed237293b3efdb78cd10f8701dd + docs/models/components/servicelevelcorreosespanaenum.md: + id: 4b7674c1279c + last_write_checksum: sha1:2c7659ffe043705a87a2a1fe9f64420f5704aa12 + pristine_git_object: d35716bd65de151b91ca8b23cf96260daa8cf90d + docs/models/components/serviceleveldeutschepostenum.md: + id: 4a92ccd39c5f + last_write_checksum: sha1:bcae3ad3ca63036b8490d2e3a106a1637604a981 + pristine_git_object: d1205f0310b07507eb60c398065faa85173067f3 + docs/models/components/serviceleveldhlecommerceenum.md: + id: 53cdcc448070 + last_write_checksum: sha1:d893ba7e38896ad7720a5ea44bae825a2b0b1dd2 + pristine_git_object: 377148c160f207521de8dc7d6f4f0e7f213dffd0 + docs/models/components/serviceleveldhlexpressenum.md: + id: b213600bee17 + last_write_checksum: sha1:6ab826a2e2d2fc62e383e486086e77a5ac30afce + pristine_git_object: 567ca9c6aa063c41ffae43f011c87fb3377cb52e + docs/models/components/serviceleveldhlgermanyenum.md: + id: 62d88960f7c7 + last_write_checksum: sha1:9c2a356f2990fd6458cbf223d4b92800aa1f0436 + pristine_git_object: 1bc32c6fc0bd49a18ae60151e764f2c07ed4ba99 + docs/models/components/serviceleveldpddeenum.md: + id: 9f14f9f2ae59 + last_write_checksum: sha1:83488707b6cc2009a11f549f88070283c511faf8 + pristine_git_object: 84a7f5cbe93ea9628bee933aeddce50017b9b3ca + docs/models/components/serviceleveldpdukenum.md: + id: e7ddbf42d3c8 + last_write_checksum: sha1:9e1f936209535e75bfeb24094ce351e3fbfd6638 + pristine_git_object: 0aee15f3e64bc2dd9109d928357172d20454fc65 + docs/models/components/servicelevelenumset.md: + id: 986f78996c2a + last_write_checksum: sha1:68c47430dd55f4de0a034b873ea5f47575114d50 + pristine_git_object: 0d13fc2a5e32857f905d956b347e1e12144c72e3 + docs/models/components/servicelevelepostglobalenum.md: + id: 32f3130168a0 + last_write_checksum: sha1:06e6d731c5a9f7a297ad401b6e15d5b071c006ed + pristine_git_object: 461a3d57a83c6def303d7da2cfaeb8089ca86b9e + docs/models/components/servicelevelevriukenum.md: + id: 2c98701d9d8b + last_write_checksum: sha1:00eef48ad837679498d54408200f776815cdcc89 + pristine_git_object: 3fbc80d5f0f3d6ed89fdd0c4da59dfbf867fd4e7 + docs/models/components/servicelevelfedexenum.md: + id: 3137a2bed09b + last_write_checksum: sha1:83c9f643f177956de69be83a4fb1deb5777a1755 + pristine_git_object: 021ddc16f462dcc69218bfa5639ca19f46a4a8a9 + docs/models/components/servicelevelglobegisticsenum.md: + id: 64522ee09ce7 + last_write_checksum: sha1:54eb018a9d56007cec613631ff9aae8f20013532 + pristine_git_object: 6e7c5d0adb22e3c5a9c1bceb50effc0d7d35131b + docs/models/components/servicelevelglsusenum.md: + id: 7494c6a0b32c + last_write_checksum: sha1:ad494d425e5886c265a2cf7d08de031c4de5371e + pristine_git_object: 9d2bb3726df6aa25bdd80d8df9e6dba71898f8b7 + docs/models/components/serviceleveljitsuenum.md: + id: 6011bc11e29b + last_write_checksum: sha1:fe603e3ec433c7d400640617d74548712382280f + pristine_git_object: 93e6d243ffa74c1d20f202cc5cfdc1b624f6d80b + docs/models/components/servicelevellasershipenum.md: + id: e86149739c9c + last_write_checksum: sha1:34d514b81324c3efedc4b64859ce60d2328f3ad0 + pristine_git_object: 74f41e757e04d1683fb08eb40b22b11a21cbc60a + docs/models/components/servicelevellsoenum.md: + id: 0bb22cb90d9d + last_write_checksum: sha1:0ebeea1ab550df168b5acf964e4de2892ab45dec + pristine_git_object: 1df358226b1607ba2b9b7036f4055cf961312bdd + docs/models/components/servicelevelmondialrelayenum.md: + id: 2a1bcf1871e0 + last_write_checksum: sha1:e9d7521ba96c954efefe533f7aed723f37ae8216 + pristine_git_object: 679c6c2a8e07f795d7976e91b70e7da32e1a90ba + docs/models/components/servicelevelontracenum.md: + id: 0e6f7fb68594 + last_write_checksum: sha1:6b6506160cb68c5eb7a05ddb8e2a9d721b8fd5bd + pristine_git_object: 40aec950e670767bc04a10efc0a42582c66db1d2 + docs/models/components/servicelevelparcelforceenum.md: + id: 66048a6a634a + last_write_checksum: sha1:e740cbc37862722b0352f0ec6a83354bebd24886 + pristine_git_object: b0e8fb7812a55fd883a0270f257e8d3e80920df0 + docs/models/components/servicelevelpostitalianeenum.md: + id: c27baf7fde75 + last_write_checksum: sha1:a9ca256d5bb61d58ba7afe8bd3a0267eaba5db5d + pristine_git_object: 6dfa2b57608a522746bd358a47a9bcd8425401e2 + docs/models/components/servicelevelpurolatorenum.md: + id: d6a520bf0c42 + last_write_checksum: sha1:f83cb7a4ed0f893335a4acee6013963cbefcda20 + pristine_git_object: 4bd5a6371d15718b3efad834fccd18cd2534074f + docs/models/components/servicelevelroyalmailenum.md: + id: 142b1989278f + last_write_checksum: sha1:2844f7202226d6904152e35a18b3b7b6532c768f + pristine_git_object: 539a07b1a5f6539818e3b6052a6a425cc379a6e3 + docs/models/components/servicelevelroyalmailsfenum.md: + id: 5270cdc0cb38 + last_write_checksum: sha1:6ef4f43eb1d40bb75ec251fbcd3e918d1cf9033a + pristine_git_object: cc15ac3a5ef931b67262e8043bd71f1752e4fb2a + docs/models/components/servicelevelswyftenum.md: + id: e65740490017 + last_write_checksum: sha1:2cb528cd6d5a283fe5e5e816d187519c5a688274 + pristine_git_object: ce1a366a3d161903104573cf86642aa7b665b63e + docs/models/components/serviceleveludsenum.md: + id: 21663295a971 + last_write_checksum: sha1:7dfb9f2528e0910adf8fd1d56a9d3c921fe30db0 + pristine_git_object: cd31586f63826d4ab632fb17955feb7108b6b7a8 + docs/models/components/servicelevelupsenum.md: + id: 0a2f93a85533 + last_write_checksum: sha1:32fbf93edd921bbc7d93770575388267bbf4872c + pristine_git_object: d2f2a4f85394f7d7ea10af79807e911b6524d879 + docs/models/components/serviceleveluspsenum.md: + id: 793fdde8aa42 + last_write_checksum: sha1:aa5bf23f9b14c12a8f7c158e4b619c889df40312 + pristine_git_object: e79e7ac6862d32141640a62850470fc47c1b3c1f + docs/models/components/servicelevelvehoenum.md: + id: c8312200ce93 + last_write_checksum: sha1:4db12497f4d7413eb0da7dfec03d34c49142a876 + pristine_git_object: 35fee41d7ebd342e197c827f4e379b1c6e5b9a86 + docs/models/components/servicelevelwithparent.md: + id: b4d3cab352a7 + last_write_checksum: sha1:bb03cb26cc60fadadc129d1d826fc232814dc93d + pristine_git_object: de8cd302b76456f2923617d0c11043faf3740d2c + docs/models/components/shipment.md: + id: 1dc3da506187 + last_write_checksum: sha1:771fdad333666f7125b65e70c359aea569c3c581 + pristine_git_object: 963357ad39ce72c706f997452dd3cc53e74983e1 + docs/models/components/shipmentcreaterequest.md: + id: 4760e6e5f647 + last_write_checksum: sha1:5ae7002dcb137f0996819c09497353b00bdde098 + pristine_git_object: 07058cb66d61c62fe0679a9bff4a2c389dbef858 + docs/models/components/shipmentcreaterequestaddressfrom.md: + id: d1afd984d42d + last_write_checksum: sha1:a65bba68484693630b469645ad4c174b5e7872c8 + pristine_git_object: 4e53a7f81c90478cb6c35067e8e4f6f4a54b5fc2 + docs/models/components/shipmentcreaterequestaddressto.md: + id: 808baae2d96c + last_write_checksum: sha1:01dea097163d28d6f34ce495d408840099799f60 + pristine_git_object: 1ccad9fba18d7d7666dcf5be7b7519762a82cbac + docs/models/components/shipmentcreaterequestparcel.md: + id: 2d0922fdce5b + last_write_checksum: sha1:bd507d9525e6a06067f649083c08ad9dee3afd5f + pristine_git_object: 758ecb759b953b568da1862fe9f55d3992239098 + docs/models/components/shipmentextra.md: + id: 33f4b769d22e + last_write_checksum: sha1:50826b7b3d57d6260c7c5108a1d11005729b0aac + pristine_git_object: 856a14cb8eb5f89c6eadba29b2d9629b052debea + docs/models/components/shipmentextralasershipattributesenum.md: + id: 197a5833eca9 + last_write_checksum: sha1:54dbd51e068156e1d83612d3a58eb503ece544fb + pristine_git_object: 3a959fbfe3480573333e8029b2e2632e25f0284e + docs/models/components/shipmentextrareturnservicetypelasershipenum.md: + id: 9bcf0c6450ff + last_write_checksum: sha1:07357380def3bc02d8fe65128d8cc137d9142c13 + pristine_git_object: 032b73a750219941653c6e0d99bbfe03dbc958d0 + docs/models/components/shipmentextrareturnservicetypeupsenum.md: + id: 0f2c255bb050 + last_write_checksum: sha1:5979912d2f9da1671a335a027ac0fcc6eaa9737e + pristine_git_object: 3c9398651117d07c4e60b5894d65ab789ab8b5ec + docs/models/components/shipmentpaginatedlist.md: + id: 0ed0ac1d14ac + last_write_checksum: sha1:dd42c59a151a6032c9e2c0ddd08cd5846acc27d6 + pristine_git_object: a6d1fe2f6e6f5a6d07d9c07cdaa8c7a68cb10830 + docs/models/components/shipmentstatus.md: + id: de84f079db11 + last_write_checksum: sha1:513eaa64a4b48f9d91b2f5f76a961df4fa71a082 + pristine_git_object: d0cf8f7a560efa72bae388b795adb1e94a72c30e + docs/models/components/shippoaccount.md: + id: 38b4eb7996f6 + last_write_checksum: sha1:eff162b7dac980c9edec803f9dd174f68b7b0428 + pristine_git_object: 4dbdb27edd693ba5c55b29af50eb2b2cffda23a4 + docs/models/components/shippoaccountpaginatedlist.md: + id: b90015866b63 + last_write_checksum: sha1:6015fcc3f6c868c0f432d4f631328b7b89cfed98 + pristine_git_object: 916ad68ed244d172085d868d6b3a71dd6998596c + docs/models/components/shippoaccountupdaterequest.md: + id: 6e26e9d2036f + last_write_checksum: sha1:cbd9c18cabaad069f6580ad74010ba2c2da64df5 + pristine_git_object: d628b14a04efe783814308750f4b748d7d200b2d + docs/models/components/signatureconfirmation.md: + id: b493f0d16d10 + last_write_checksum: sha1:051e555d3aa965db5ef876f7a8b1cd8900a7fcdc + pristine_git_object: 1edfa741e058e5465646877ab892b50ee6560934 + docs/models/components/track.md: + id: bfbbd1ee6cd5 + last_write_checksum: sha1:f97cf7060bdc3ba4de28be283ce3b4988f9b654a + pristine_git_object: e18d37f1d7c05450e0f922c001c5b28496eca6cc + docs/models/components/trackingstatus.md: + id: 554a533b5c90 + last_write_checksum: sha1:9deca2dad891ff4c45969345e53dd86b1df4c9c9 + pristine_git_object: 06433ae44778bb9cb34ff95f4ff8dcefbb842d47 + docs/models/components/trackingstatusenum.md: + id: 8279d5751107 + last_write_checksum: sha1:5f719550d04de1ed0dbc949695bb758a565fafba + pristine_git_object: ac7e4fc14398b746a2bb9f09b5168fd2d1ffa659 + docs/models/components/trackingstatuslocationbase.md: + id: 8439cd135c88 + last_write_checksum: sha1:77059581fd3f8236c73765c08d75daeed538b0af + pristine_git_object: ed6e6a4cd4dcd202d815588c15fa08b64c2aff94 + docs/models/components/trackingstatussubstatus.md: + id: 1a0a3dec42f5 + last_write_checksum: sha1:25636cbe9ef7073c2c0694ba7be176c28e4fbf31 + pristine_git_object: 35378e40b3c0fe77f59549be275882aa2a215db2 + docs/models/components/tracksrequest.md: + id: 2cd8c9868b0b + last_write_checksum: sha1:5303620aa74f443d36fe651410729f5366ef67b7 + pristine_git_object: 9ec35314940013956985c88b4a7595e90baba32b + docs/models/components/transaction.md: + id: 8c92ca082bdd + last_write_checksum: sha1:0edbbccff01afc4d5d9706c49f645bf2ac1bea9f + pristine_git_object: 8a7dc36beadcdd697cd42f517de804e653594004 + docs/models/components/transactioncreaterequest.md: + id: a1bc733e4858 + last_write_checksum: sha1:07ac5d014c6df738a1ed4e7d1207b8f61b093be6 + pristine_git_object: fd637324ab7974ca0c9a5b082b3e3df5f9280d27 + docs/models/components/transactionpaginatedlist.md: + id: a4db79aef813 + last_write_checksum: sha1:d84ad31d9faf3f48b5f9a6b9139f5cac1bc61a20 + pristine_git_object: 9c1bb62f69f96a24745f697e8f1904c3b755d9df + docs/models/components/transactionstatusenum.md: + id: 8fdeba81fc56 + last_write_checksum: sha1:1cea7bb9d9b4b9fc7eab01fdc74f2e829956d202 + pristine_git_object: dc2d59998bb71e7f5bad43dd74b0db8169de42b1 + docs/models/components/upsconnectexistingownaccountparameters.md: + id: fed2bc5d9219 + last_write_checksum: sha1:5b5826b8937b85f6dd908c6ce7f4da2187724692 + pristine_git_object: bdc7f25bf0b1b30ce8d5dd874003133d9c744403 + docs/models/components/upsreferencefields.md: + id: 2a08d1040b64 + last_write_checksum: sha1:c47f2bf15de6ea579ea189140686975b84ea47eb + pristine_git_object: c1578f521de48b8521ac0370b93812971e770d46 + docs/models/components/userparceltemplate.md: + id: 59a6f9023541 + last_write_checksum: sha1:c9be89d01e7029c963c2ab4e261c5a9719679c10 + pristine_git_object: 75f2f5aa03c4719d426c0457c6c7c41db2cbaf44 + docs/models/components/userparceltemplatecreaterequest.md: + id: df4bc24ed646 + last_write_checksum: sha1:6daf6b9512082d8ede08b84782612a22e70b0030 + pristine_git_object: ba6d19ba1845190cf9f723a966161e38e85d860f + docs/models/components/userparceltemplatelist.md: + id: 146c27db45f0 + last_write_checksum: sha1:e805e3026cfc79ce4fc72dfdfe3f2204a7b51884 + pristine_git_object: d0b79f725052d590fe77b99ea038644afce32f47 + docs/models/components/userparceltemplateupdaterequest.md: + id: e3f993dad3ca + last_write_checksum: sha1:11743b700aeb2537abd5575a11c6862a4a229145 + pristine_git_object: e8d9e85133c5fc0acc20259df2e346f7e2bf4064 + docs/models/components/userparceltemplatewithcarriertemplatecreaterequest.md: + id: dd161b83541b + last_write_checksum: sha1:b89669143777e2c239a3ebad5f476a77aa0e4ace + pristine_git_object: c17744597aab8f561f7ca37e0b64398457c0cad9 + docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md: + id: 2c719b6b168d + last_write_checksum: sha1:26d4fa2935756d77be69c82c95dd846edcaf55ff + pristine_git_object: 9826f7b73f586b811a783419be47315d36b99d88 + docs/models/components/verification.md: + id: 51948992ab6d + last_write_checksum: sha1:9845eaecaddb66b3479dabb5a2953c7dbd46902f + pristine_git_object: d4697e322abfea8c1efa28b0b5c528316cf11eff + docs/models/components/verificationoption.md: + id: b4a49f26c872 + last_write_checksum: sha1:4caf9dd29fd4ddfd707ac5596ba72fefc34da34c + pristine_git_object: 5bb6aae07c8db530f59d40d7222c38f62e3fb8e6 + docs/models/components/webhook.md: + id: a698fffd6586 + last_write_checksum: sha1:2d5663514461ac531c21b16fffa55e3a7bd71888 + pristine_git_object: 6ec76ae3d5d5134601f9f65302b4efbf0a105609 + docs/models/components/webhookeventtypeenum.md: + id: 94f9edbef911 + last_write_checksum: sha1:10d0eaa7ae8adc789157fcb1b4098cacf2521e8e + pristine_git_object: 14886c7cd836afdd8361d2b794677d2224a54112 + docs/models/components/webhookpaginatedlist.md: + id: 1e2d4a3d3f4b + last_write_checksum: sha1:a79bcdbdf3e7ce65dc60e3aaa0a5f2a7c5ee84c0 + pristine_git_object: 0d814a6b3019535a198f67a114032eb04f889848 + docs/models/components/webhookpayload.md: + id: 6ecd2cbb6ed4 + last_write_checksum: sha1:5106fe7443513f9c6092e3823156c051a8a13174 + pristine_git_object: 68ad329f3f2e9e2264e4809b251da5c490d6af56 + docs/models/components/webhookpayloadbatch.md: + id: 5697829a397b + last_write_checksum: sha1:dc336300bbc91f4ce6b448e1f290b6a9ac0e9b9b + pristine_git_object: aa8ebd74c283f017921969f3eaaaa5b0d85e8879 + docs/models/components/webhookpayloadtrack.md: + id: 7ee3b047a2dc + last_write_checksum: sha1:85b550d9ddee31e923648ab7f3cedd8cdc1c378c + pristine_git_object: 0c7ee296250b912ccbb65b0ab6229760fbe8504c + docs/models/components/webhookpayloadtransaction.md: + id: 71803d9d3c27 + last_write_checksum: sha1:5f0fac7b39d14800d23226e0b2fb75e72205abab + pristine_git_object: 492b179e50e5d0aadb8d18d40781746363d2eec1 + docs/models/components/webhookupdaterequest.md: + id: e76a752701dc + last_write_checksum: sha1:ff181a5678b0ad8921c20bcab023317169e7f195 + pristine_git_object: 6bd70cf9283a0bf70472242bfa0f5d9605719502 + docs/models/components/weightunitenum.md: + id: 7f5322f644e2 + last_write_checksum: sha1:aab829fa4ccfbafe8df43d9281f1ea304fcaa2cd + pristine_git_object: 662cd383a6c65d70604ce50d68e7992276244685 + docs/models/errors/badrequesterror.md: + id: e455aebb4452 + last_write_checksum: sha1:884a3207a573f1d36d9dc59f55d559cd2161c873 + pristine_git_object: 9dc0f4741c42229d3f8407a39de0e8541d15dd23 + docs/models/errors/notfounderror.md: + id: e6e9f31b7b5e + last_write_checksum: sha1:e6282f6bf39db7b494c3e3dae541448717d1c4ce + pristine_git_object: 893be68216c8aac7ebf9cf276786334d7bfd517b + docs/models/errors/unauthorizederror.md: + id: 391e1ff1a10f + last_write_checksum: sha1:f070778932442dcdd325e6f23413f95d9579d5c5 + pristine_git_object: f0ba14ca5f16fb03913621d38d0715f33313c696 + docs/models/internal/globals.md: + id: 9c173b87f41f + last_write_checksum: sha1:f794e7d7d8158788d4d86e5081f67a97788bdfc5 + pristine_git_object: d988657411ef270f4f34d1fda2ee0cf9691f0068 + docs/models/operations/addshipmentstobatchglobals.md: + id: e92699d754a9 + last_write_checksum: sha1:9e4e9aa1fb939bff9047df789af528d8255cac3e + pristine_git_object: 716b47143ff2b673c1074526a33f35f4a0209f73 + docs/models/operations/addshipmentstobatchrequest.md: + id: f54fe67b6615 + last_write_checksum: sha1:8a958c7077dde44ed251eb26e93792377204c1aa + pristine_git_object: d2206ec06800bed5c7dc0cac3a7567f1a7f27e5f + docs/models/operations/carrier.md: + id: 840f028e3a22 + last_write_checksum: sha1:7f9ae6edc31f33431e659d83bd5736aa3f0bc97e + pristine_git_object: 050ff2770d4f1001b7cf53e6068d04b89667d914 + docs/models/operations/createaddressglobals.md: + id: 3f444af26f71 + last_write_checksum: sha1:f6deb6a9512424f1ad49a02141c2bee97ca93c11 + pristine_git_object: 6f21965352d71eb73dd52d931bd9e97827f6b4d4 + docs/models/operations/createbatchglobals.md: + id: 9ff773e467b1 + last_write_checksum: sha1:4381cf5805da9fb0861e65cdaedb3513d9cdeee3 + pristine_git_object: 1f9d5b415ac9cbea32f4367d9929ce983d9357e6 + docs/models/operations/createcarrieraccountglobals.md: + id: d4c3bf0baeda + last_write_checksum: sha1:5aadb34b54eb239a7cc1faa4585fcebed1b96cf9 + pristine_git_object: 6a1843786315dbb03e3132ad603de99b6d21b190 + docs/models/operations/createcustomsdeclarationglobals.md: + id: 039b4927df5b + last_write_checksum: sha1:b281f84a9adb6873d4aa34dd85232844f54bc347 + pristine_git_object: c553e295b5ccea88967e5d358c150e4e46444741 + docs/models/operations/createcustomsitemglobals.md: + id: d5dda69181c9 + last_write_checksum: sha1:b1fd2d2d1f0ae8af6b80a65c4b17be8b61326eeb + pristine_git_object: a57ecac05404f6c11e3273c811ad6da011264747 + docs/models/operations/createliverateglobals.md: + id: e32a67abcac5 + last_write_checksum: sha1:49817536c915e8da2d9f9e4adb7fd6108d2cf647 + pristine_git_object: 6e05940c366dbaac22830b62f4bee027ce6331b8 + docs/models/operations/createmanifestglobals.md: + id: aa7a1b41b1d6 + last_write_checksum: sha1:ed45b044ca6fe365ea1db04c2d0f5b56c6e8a726 + pristine_git_object: dd896e009ee51ebddfc67750842856425f24fe8b + docs/models/operations/createorderglobals.md: + id: 94845f440921 + last_write_checksum: sha1:2b710ce80350ab220a6cb0b3915aa352cf1b7830 + pristine_git_object: 8073d5585d7623153871c3e3479f8d22bbb363f6 + docs/models/operations/createparcelglobals.md: + id: c40a39872ce5 + last_write_checksum: sha1:d9e0ad888d29f8d7fd1f9072d473daca09ce9944 + pristine_git_object: 9a2f6d7992252774c35eed80f1cb4168cdd42af9 + docs/models/operations/createparcelrequest.md: + id: 0a6db0662b06 + last_write_checksum: sha1:c9f796ed7341039738bd71cab8de6551c81dbdca + pristine_git_object: fea5ed33e5931db8f166af62bc0633ffe6007a5b + docs/models/operations/createpickupglobals.md: + id: 3da107c74ab3 + last_write_checksum: sha1:68042cd83579deec6149085ed95b2d3e4baeb7ee + pristine_git_object: a787299d551548da7e7af152d0a8dbcd4a7cb705 + docs/models/operations/createrefundglobals.md: + id: d4e165efcc3f + last_write_checksum: sha1:60d79fc2376b0a960391013eb552fb003c6ffb40 + pristine_git_object: e6696f19b5e88244d14956458a22b5741eb03070 + docs/models/operations/createservicegroupglobals.md: + id: 1e9a3bf88e84 + last_write_checksum: sha1:4e8500f73b47eabf6db6acad75d390a924116422 + pristine_git_object: 769933c9973753005b966d9a4092b14df6757921 + docs/models/operations/createshipmentglobals.md: + id: 29daeeeddfd3 + last_write_checksum: sha1:9b1d046199d3466e71634e14e5ac63841fc86b08 + pristine_git_object: ac929f5adf79b9e0335b82d5eba4da6e4fd14fae + docs/models/operations/createshippoaccountglobals.md: + id: 1ec6d7eb5fb4 + last_write_checksum: sha1:b66c8a98a652d1375f520e57f98ba99e8c2a9b77 + pristine_git_object: 09990bb63f312858e2a2c1f41b33c309cbab63fb + docs/models/operations/createtrackglobals.md: + id: 4c4f461b1053 + last_write_checksum: sha1:47cdc9dc0da45f095ccbc192f3d83582f97f0eb7 + pristine_git_object: a0c92a2dabeeab65f0aaa8b792eef4c41a0f6b02 + docs/models/operations/createtransactionglobals.md: + id: e94fa0dfb3b5 + last_write_checksum: sha1:f84d714d795f63a9c5354b0f8745c88c4ea9318a + pristine_git_object: 9fa94631894b6047df17796d89741a627545e2df + docs/models/operations/createtransactionrequest.md: + id: cbbd329e3cc5 + last_write_checksum: sha1:6cb7cca3ba3d20e2c1ac504a3d73c84c921173bb + pristine_git_object: de3f490dbc81110e701c1ff506d816edbf80eeda + docs/models/operations/createuserparceltemplateglobals.md: + id: 2f773d836c90 + last_write_checksum: sha1:6cf51144c0d9c9eed48502f0636fec6314840b58 + pristine_git_object: 8aec1dfd0d1cfecbe276b6e716510d36d77d6330 + docs/models/operations/deletedefaultparceltemplateglobals.md: + id: c850d67138bf + last_write_checksum: sha1:c9874253e35821ca0da9268fc30275df210f03f2 + pristine_git_object: ce917f8dcd4f4189f5812e7a71b1578db630e6a1 + docs/models/operations/deletedefaultparceltemplaterequest.md: + id: 2bc7726fe943 + last_write_checksum: sha1:f71dca6201c5869d338c518fb17e916d87330a4a + pristine_git_object: c181ce2ee6c186ffc47efb6ad3c4506d8289d784 + docs/models/operations/deleteservicegroupglobals.md: + id: ec18e0a21f93 + last_write_checksum: sha1:f7687010a3eb8b65bb40848a3c7a4beaea9ebe81 + pristine_git_object: 0838045d7c3ee01a0e79bde9d69963234ab364f5 + docs/models/operations/deleteservicegrouprequest.md: + id: 04959fc973f7 + last_write_checksum: sha1:79bb01126c86e1c97cf9e88c094fdaee51fb84de + pristine_git_object: a8e9081a46d900aceb7dd0261cd910f693bfc3c5 + docs/models/operations/deleteuserparceltemplateglobals.md: + id: fcc2bf84b7b6 + last_write_checksum: sha1:0a15ec069ee4cf274b570850cc74f13bb743c8d0 + pristine_git_object: 7ea46ad4a4abb9a32446d7870ccd805d580a33dc + docs/models/operations/deleteuserparceltemplaterequest.md: + id: a4ac0f13304e + last_write_checksum: sha1:7201dfda5ba46310bc79892b3cbe771f244ec397 + pristine_git_object: 7301f36edbba104b88d852f4579965aeec916bc3 + docs/models/operations/deletewebhookrequest.md: + id: 8f68f0041128 + last_write_checksum: sha1:a920b92407d5e5b6f002cabb5f5628eb7ea947e4 + pristine_git_object: 2d2fa2fbb1dfe96baa587b424e0bd753db6d809a + docs/models/operations/getaddressglobals.md: + id: 2f1bc2670ada + last_write_checksum: sha1:fbd6984e109756c6e8ca4d444e9922d342678f59 + pristine_git_object: 386979a012bfc1cd650e58b2fadcb8541fd3ec57 + docs/models/operations/getaddressrequest.md: + id: 06998eecca14 + last_write_checksum: sha1:68b0d8d4552e8f4bc8b76355a244f602bc7dd693 + pristine_git_object: 650e9be578b5ce13cf7a35a5f0a359d4db1f65d1 + docs/models/operations/getbatchglobals.md: + id: dfc44c0e951b + last_write_checksum: sha1:6d41b9fa4ffca8b809a0b07c54f3469c62dffabc + pristine_git_object: 2fd1921fe1e0d9256144999bd272207d896aedc4 + docs/models/operations/getbatchrequest.md: + id: c58dacda6336 + last_write_checksum: sha1:1a2a43e1db81c7543c406ded2d6f89e8340e3525 + pristine_git_object: 935c7ace9179be7d3b1aab3c9ec7f5fefffc39b7 + docs/models/operations/getcarrieraccountglobals.md: + id: be4f423b71e3 + last_write_checksum: sha1:e61d3fc7401182e3b78cba943f88dc774495f841 + pristine_git_object: 30c685369cb0f3148a8f392894756dfcd993600c + docs/models/operations/getcarrieraccountrequest.md: + id: 82ef1442903f + last_write_checksum: sha1:454e2e38de5b5bbdd9cbaf30623fdc44c1194543 + pristine_git_object: 3f32262a52580f4837f45a3e0fdec96e9f68b34a + docs/models/operations/getcarrierparceltemplateglobals.md: + id: 155c520b896c + last_write_checksum: sha1:0404ed01b601344bd1bb3b74ecd764b4d6606e8f + pristine_git_object: 91c4362258282ea73405b1c76cafa0024a216870 + docs/models/operations/getcarrierparceltemplaterequest.md: + id: 3809c04ec581 + last_write_checksum: sha1:a97427566d26b0304f376e694665eb6626633300 + pristine_git_object: ae1226b868b8fd85dd2daafa9bc96073eba1aa96 + docs/models/operations/getcarrierregistrationstatusglobals.md: + id: 16c1c1c82844 + last_write_checksum: sha1:e08f1f9c0332065ed5fbc3f33a986b47e452581f + pristine_git_object: 1593e20d93e985a454b8c4182c2c7f478e7b5c36 + docs/models/operations/getcarrierregistrationstatusrequest.md: + id: e0ea6cb52011 + last_write_checksum: sha1:c728fd1f7b236c71f82c3f9f412270e286ef52c2 + pristine_git_object: 0ee114351eab78f4377fc6b39adced0ea51346ff + docs/models/operations/getcustomsdeclarationglobals.md: + id: 926a64f24da6 + last_write_checksum: sha1:a4f7d44f583cb3e51cbffb44cf76f9ef251e259d + pristine_git_object: f50fbdd32bfcff961d4f20830143e4e0297af12e + docs/models/operations/getcustomsdeclarationrequest.md: + id: 0e2ccebf67c6 + last_write_checksum: sha1:a90871ef77db25ac93f003247c81861fef34e95d + pristine_git_object: 9759bbc128b3aa0075a17b0e356beb09fca95a8a + docs/models/operations/getcustomsitemglobals.md: + id: f55c699f3083 + last_write_checksum: sha1:257f4dac8c161ea5a5239ddc81198ae402c3aa2d + pristine_git_object: f4251186c33fd873bdfddfbee12f3a87ecfca3cf + docs/models/operations/getcustomsitemrequest.md: + id: 1caabf2188bf + last_write_checksum: sha1:db7bd877cbd7336970f9f9e3b80274a09a872fe4 + pristine_git_object: ec21c08423f3747745e094b9ff292fac9132bba0 + docs/models/operations/getdefaultparceltemplateglobals.md: + id: 36f717c85b9f + last_write_checksum: sha1:9ba9b4497eed80ab86b14dd1a0b5278e023151a2 + pristine_git_object: 104c8fae1aa40e8998b10c3da6787b78b342d9e2 + docs/models/operations/getdefaultparceltemplaterequest.md: + id: 4e75baadfa7b + last_write_checksum: sha1:571848c76f165ee5998d9691fa35343fcdcb6743 + pristine_git_object: c6fe74df192e15f3f590cce2944d25e054058800 + docs/models/operations/getmanifestglobals.md: + id: 5d87c541f84e + last_write_checksum: sha1:482413ba59fcd01b7d5ba017da68236e9de7ff99 + pristine_git_object: ba2810f46462e74b433b94c2d9a2380e45f1ff9d + docs/models/operations/getmanifestrequest.md: + id: 6f35d1916041 + last_write_checksum: sha1:9c4f77f2e5da4d249bff8b3ffde931ef486717ed + pristine_git_object: 88117c08213de126c8a6120a461d5040ab8e76ad + docs/models/operations/getorderglobals.md: + id: 3d8738d64724 + last_write_checksum: sha1:be1b85dc63ce8623c1822f94ffc0fcc865fd0b48 + pristine_git_object: 61b06d74af60130cbccee8d9024f13bcf3672bbd + docs/models/operations/getorderrequest.md: + id: 27923df83f19 + last_write_checksum: sha1:ab2efbfa8a144586a6c646967433001d981d2846 + pristine_git_object: c8060377da1fe0a0e0e6c813c042c49b460c8ae3 + docs/models/operations/getparcelglobals.md: + id: 949a01130065 + last_write_checksum: sha1:3b127431c5d589d243abbd6e77890ff43f4624e6 + pristine_git_object: 0e29f5f5ce5d6db8c2c95f70456accb69f8322f5 + docs/models/operations/getparcelrequest.md: + id: b50b8c884105 + last_write_checksum: sha1:706fa108a0045f5d4285743a61f7609cefd85260 + pristine_git_object: f29685069c5ea8a1fbc42404183b0d079fa86a81 + docs/models/operations/getrateglobals.md: + id: 7d09e57be2df + last_write_checksum: sha1:af0ca03389c706ace42fd44e7b572f499da2ae26 + pristine_git_object: bfb1a13bf3b710fde582e9afd130d5efec2add8e + docs/models/operations/getraterequest.md: + id: 971ef187098a + last_write_checksum: sha1:8d528f8996654859b06db6ee3b97b5957b0bcb50 + pristine_git_object: 9a3e6c12c67aa1c362c8860cf2c2a3bf06a959a0 + docs/models/operations/getrefundglobals.md: + id: 66c4c0811ee7 + last_write_checksum: sha1:a4d1597494d54b93c7490fa769ab4a014d2039b7 + pristine_git_object: b1f2afe6ec3b2ba325bc4fce6376faf49e847a77 + docs/models/operations/getrefundrequest.md: + id: 536f52edc567 + last_write_checksum: sha1:79d1737a6bac569aa2d176ec19217142ba4fee36 + pristine_git_object: 2ded85ebb9b8c2cdcd73a0adcc88f45fee546b31 + docs/models/operations/getshipmentglobals.md: + id: 34d08004b585 + last_write_checksum: sha1:86f935a25fce84daf2150ae0869369e4cd671e14 + pristine_git_object: b3b9937aecea0f00317d08ccd56e5d030ae3423b + docs/models/operations/getshipmentrequest.md: + id: be2b0aae7e18 + last_write_checksum: sha1:7867f8492fa717ba68ae1ff75c8cf76a043e2956 + pristine_git_object: 6e48c99b4aa3981f1f54bec16cfb45b93e6f222e + docs/models/operations/getshippoaccountglobals.md: + id: 765f738dc9bf + last_write_checksum: sha1:6439b1da70ad6212912b6b48fff7fe297492dee7 + pristine_git_object: d591ffaa0ed5894669e7520c398940ac8884e8ad + docs/models/operations/getshippoaccountrequest.md: + id: abe3dc7dde8e + last_write_checksum: sha1:150d803a115e53c8010bcfccee84376c0676c196 + pristine_git_object: 48aae5dc8204acc7fae11b4ed628075ca1ae02a9 + docs/models/operations/gettrackglobals.md: + id: 7d1d766c8ec4 + last_write_checksum: sha1:869a498b098f8eae9c3ce54a964b2c2c3436a8e5 + pristine_git_object: ac866acafd3bcd64c3be0739e360e598bc7e1d55 + docs/models/operations/gettrackrequest.md: + id: f70448343087 + last_write_checksum: sha1:a40ccea4e6805e015cfee70b332580545b20d1d8 + pristine_git_object: a57a50072b0ad290c6192bf3704749e9d9c9a18e + docs/models/operations/gettransactionglobals.md: + id: 07a8ec0d58e0 + last_write_checksum: sha1:232307a31e7de20a98b892913ace0461549891ed + pristine_git_object: d138a4ea1c567024e0c178c553b98e2f8a1f096b + docs/models/operations/gettransactionrequest.md: + id: c794795b5f55 + last_write_checksum: sha1:107f6959d0fb75ab1b8ddd81003c5717fb836ff7 + pristine_git_object: a31d36d9235718f79fd50d55ba14586a1830e1d3 + docs/models/operations/getuserparceltemplateglobals.md: + id: fcd58b988899 + last_write_checksum: sha1:38050a472a005f932681ad2d3843ab4cf2a6fa0f + pristine_git_object: 3c0b515deba3af9fbaa85264f78b0660c7839a8b + docs/models/operations/getuserparceltemplaterequest.md: + id: 1dc552b94c19 + last_write_checksum: sha1:706b77f6ce769edf1feaaaad4552a79c446a3b34 + pristine_git_object: 8ee11b0952000b1a056b22b624888f68d7735249 + docs/models/operations/getwebhookrequest.md: + id: e6e2eeebdfea + last_write_checksum: sha1:60f42432bb2102b28113cde7f5a463aa4ffe0635 + pristine_git_object: 709bf9a1a238c7b44446dd5b4ccfb0a440bcc518 + docs/models/operations/include.md: + id: c5fad3f54823 + last_write_checksum: sha1:b841964151a2885f43ac620785220064b220d657 + pristine_git_object: e416c71a5a27741d414440c054fce4469e198975 + docs/models/operations/initiateoauth2signinglobals.md: + id: db934c91c49e + last_write_checksum: sha1:e2b8b8bbbfb7d08c909ed3f4c9ceb015dc9e4c3e + pristine_git_object: d58187751c9f3a1a3e164f4e17f59a97bc9be695 + docs/models/operations/initiateoauth2signinrequest.md: + id: d92734e25ec3 + last_write_checksum: sha1:0e344ea8cf347c85ef98b581715be29f822a90cc + pristine_git_object: fe549f6c9015fe090a840b18c0bacf2a9c123bd2 + docs/models/operations/initiateoauth2signinresponse.md: + id: bc83f0cc1b4a + last_write_checksum: sha1:c0c2eaee4160c0a9fdfaea27dfc7269bb9bb5068 + pristine_git_object: ea41d000b59990d0f829adf564958ff2bf782974 + docs/models/operations/listaddressesglobals.md: + id: da7f1d46ede1 + last_write_checksum: sha1:2a43ca0e42f0766788af95cc229ee253f44a487c + pristine_git_object: 40d7dfae7a9bd9fbf79dddc2d22d2dbfc0ff9002 + docs/models/operations/listaddressesrequest.md: + id: c9f7a2707ad5 + last_write_checksum: sha1:837005c84251d17147ea96d4cc7adefbbd80f37c + pristine_git_object: e2cd6508da11d421e3b6ccc20847e799c35567e0 + docs/models/operations/listcarrieraccountsglobals.md: + id: 9c1f0d480e59 + last_write_checksum: sha1:ccbb8803f05e4cb45ea9c85e5cf223090c2ece8a + pristine_git_object: 71e58a3f1640d0da13531275224f067860038a0d + docs/models/operations/listcarrieraccountsrequest.md: + id: 6a8cf7f3ab78 + last_write_checksum: sha1:2ab5fcd463841acf2f4f6e699caeeb1e1593ab46 + pristine_git_object: d391b70c799a30059b6cb13f84dd1c3a3ebbbc9f + docs/models/operations/listcarrierparceltemplatesglobals.md: + id: 5d433073c8ee + last_write_checksum: sha1:5464a1c776694940970122ce56c5fabeee1e5ba7 + pristine_git_object: ab5d1e1557d5f966d7696790b2436770ade118e9 + docs/models/operations/listcarrierparceltemplatesrequest.md: + id: 3f4cfc273670 + last_write_checksum: sha1:9723841f2f85a53c47622385d9fe4d417fa0298e + pristine_git_object: 9258a671fdb3ade7709d0db593aa444abed068e5 + docs/models/operations/listcustomsdeclarationsglobals.md: + id: 5c2dc5c50d59 + last_write_checksum: sha1:5209cc13129cb7db2f51816fe0cf1b5b9436f092 + pristine_git_object: 0b8b57d1ab9532c4e93b760dde4517b7ae7d9de5 + docs/models/operations/listcustomsdeclarationsrequest.md: + id: 48b9d17809f8 + last_write_checksum: sha1:fbda4900a85ab08472b97c84b5b35dcf31e056aa + pristine_git_object: 08b30989c3c71044ce3ae27783a482c8d94716d9 + docs/models/operations/listcustomsitemsglobals.md: + id: 7ae259172bb4 + last_write_checksum: sha1:65e7e39866809f60f01ba1b41ba66dc100831e1e + pristine_git_object: 77bdb83be5206a404deba116cf58a1afc12ddf08 + docs/models/operations/listcustomsitemsrequest.md: + id: c75fff153678 + last_write_checksum: sha1:f330284c37dc7633a6a4a664cc3f11ea3f42cc8b + pristine_git_object: 99249c6f38a3ee41ce962edb97b303acc06b924c + docs/models/operations/listmanifestsglobals.md: + id: 51357fdf8fb1 + last_write_checksum: sha1:79dc08384422bb74b778ad5ccec212bc10a3cd48 + pristine_git_object: b150485e1458b11d1c6f991ef44783a76689f628 + docs/models/operations/listmanifestsrequest.md: + id: 62d8ae59d357 + last_write_checksum: sha1:a9d4e0195af8d87ce71d42d284623e4340f47aa1 + pristine_git_object: 87501009291d33f5b44bfda315c7a5d902238cd2 + docs/models/operations/listordersglobals.md: + id: 859e0ec8f85f + last_write_checksum: sha1:e770bf21e08dc720b11974bcd2334347d6f04d40 + pristine_git_object: b8f4b5cc3c14352f7993cdfc20c5eae5fefe1cce + docs/models/operations/listordersrequest.md: + id: fbc8f6407a92 + last_write_checksum: sha1:34a7b33dc4652b65c223eab1ef4ddfe1c754632b + pristine_git_object: c7e85e62a6a97f6f2772e03fa79292f9adae9079 + docs/models/operations/listparcelsglobals.md: + id: ee1d634ec284 + last_write_checksum: sha1:64b02c2b442b68a8c64b985829451c40077f6984 + pristine_git_object: 46e0e11fd68d57473ffce7e74354d4c323dc67fc + docs/models/operations/listparcelsrequest.md: + id: c89a603c60f4 + last_write_checksum: sha1:016ca590b8911f6a752ab09a834a907fe3253450 + pristine_git_object: c00fdc6bc5ac9f41134ac52e7f4cc4bd684b4f5c + docs/models/operations/listrefundsglobals.md: + id: 7d610e8228e6 + last_write_checksum: sha1:099850d0fd7a2a6ca4aeae8ed85599b67d9b97bf + pristine_git_object: 21ff3f3b26e5410a979973c2fa3b74dfb16aac34 + docs/models/operations/listrefundsrequest.md: + id: 132a478284f5 + last_write_checksum: sha1:d651a9a759fa912186dc5f75a5ae5038f63fa4e4 + pristine_git_object: 327262b976a50116c70f1a201423b6e11d91214c + docs/models/operations/listservicegroupsglobals.md: + id: fe9fcfd5ea1b + last_write_checksum: sha1:24ccc4f7201c8b676b511f41b6bb3523222b4b81 + pristine_git_object: 3f76a78fc05f109aa69220b537b6ee9a19c950d1 + docs/models/operations/listservicegroupsrequest.md: + id: 7cb0f87f531b + last_write_checksum: sha1:9326265b7d677520c5c324536f1da1ffe91b54eb + pristine_git_object: 0c54c69ef068a3e4cf6ee63b8fb02362331f4562 + docs/models/operations/listshipmentratesbycurrencycodeglobals.md: + id: 42de11f1055a + last_write_checksum: sha1:bf8c2d5ad753591142fca3201d1be76466ebbf75 + pristine_git_object: 5184b8cb9356ace626a5986a4f324ab0da890fad + docs/models/operations/listshipmentratesbycurrencycoderequest.md: + id: 44709cb8ba57 + last_write_checksum: sha1:72b630ac2ec1c73a45b46ca8312a7f6ae7415439 + pristine_git_object: 8aa870b1ce63d7682cd5a84e1318ece3f49d85e5 + docs/models/operations/listshipmentratesglobals.md: + id: 5625e36d3cb8 + last_write_checksum: sha1:016ee6d64a5a9a816f372e102e0d7e3b82808c74 + pristine_git_object: cd054cb17fdc7ee2e0a75c1cc0368de98cf4fbd9 + docs/models/operations/listshipmentratesrequest.md: + id: b710ae8838cf + last_write_checksum: sha1:0aaabe3c15356df73eb0684d7ba9a3a6a381383c + pristine_git_object: 0cbe1c712dac4d36a982bbfb552378d14d1ca6ae + docs/models/operations/listshipmentsglobals.md: + id: c89f10292e27 + last_write_checksum: sha1:39153c28a8e69a68e458a44fcdcf6a35aec0dbd2 + pristine_git_object: 201a32e83af71fe88964a055b7b18757490f4478 + docs/models/operations/listshipmentsrequest.md: + id: 0ca463f50352 + last_write_checksum: sha1:4e8b3fff7d6e4cf3d1f932bb4b72770aac8f1b6e + pristine_git_object: 4d9a1fa7b89db224a19d065459cef579aff256b5 + docs/models/operations/listshippoaccountsglobals.md: + id: 5f73aa3b51d3 + last_write_checksum: sha1:d96fcb0dcbd23fe80c1a1626f572e00d68745e6f + pristine_git_object: a8816d03a9f127cbebe296c81ae891cc8a3c3249 + docs/models/operations/listshippoaccountsrequest.md: + id: abbbf7ebc507 + last_write_checksum: sha1:6165211043ffe5fbdc087a564eac451d1eacecb1 + pristine_git_object: 566a9e5b5785aacbb5ef968d5924b210afaeb406 + docs/models/operations/listtransactionsglobals.md: + id: 3899af497e1c + last_write_checksum: sha1:7ec69e38f771e2f70d0374efbb4d7ea09c90cd37 + pristine_git_object: 3fc9ae8a95061d27d46ee58059e44ee23b7c031c + docs/models/operations/listtransactionsrequest.md: + id: fff2b83cdbd0 + last_write_checksum: sha1:2635f2d6da5d582e7bc13fdbd12d9ff9646b1ac3 + pristine_git_object: 0593f0e5e2e20ca18a8e83c56803c364e9270977 + docs/models/operations/listuserparceltemplatesglobals.md: + id: 8f28f085a249 + last_write_checksum: sha1:8011fe0433c282894edd1bb63e00be1459a92386 + pristine_git_object: 0625a67189ff48a25e7b84279d372b17c070c05e + docs/models/operations/listuserparceltemplatesrequest.md: + id: c7781ec39420 + last_write_checksum: sha1:e124bae64b13267af44c7795ceda4a07fbf76513 + pristine_git_object: 6b65e91d3f8b2b591a27600802ef7a4e046a61c5 + docs/models/operations/purchasebatchglobals.md: + id: 53e1dc777362 + last_write_checksum: sha1:2d3274698512a1fd18079765400bdc098238cbb2 + pristine_git_object: b4414ba1712ef27c4a2182f39b8f08b8e11e9746 + docs/models/operations/purchasebatchrequest.md: + id: bcff1778b6fe + last_write_checksum: sha1:e8f601300aed929fcfd7a8749b0ea0c869dae05e + pristine_git_object: df38b68e56c619cb4899cb6fe4d6a007a67c4963 + docs/models/operations/registercarrieraccountglobals.md: + id: 6de9e1e51760 + last_write_checksum: sha1:5adb80bf14166263bba08e48880b02594406eee6 + pristine_git_object: 93100f3fa360d637778d3e8cb61b71661520273c + docs/models/operations/registercarrieraccountrequest.md: + id: 27ede985e5ce + last_write_checksum: sha1:89209a11d804cb194b46729049a92ab04a369a1b + pristine_git_object: 0c284ac4428b93dbbd8b3f960705464bc94d9e5b + docs/models/operations/removeshipmentsfrombatchglobals.md: + id: 09d4dc381ba3 + last_write_checksum: sha1:df4029bc0940249c5dc198d0804be05bf20301ed + pristine_git_object: 60f199b1660822dbbe1e5d5c21019891f96e3452 + docs/models/operations/removeshipmentsfrombatchrequest.md: + id: 4f0deed56ad2 + last_write_checksum: sha1:b94773837125ff273a13a6c541916439b4f6165b + pristine_git_object: 5ee0be4a20a1578bdc2a2c3ce8714fee18144720 + docs/models/operations/updatecarrieraccountglobals.md: + id: e383c77cca9e + last_write_checksum: sha1:4036c5af5f60af4164713fe37ab1c7f5fef3645d + pristine_git_object: 92ae375cbfd66498bd066ec8ffb37a881f5f0c00 + docs/models/operations/updatecarrieraccountrequest.md: + id: 9a194bffa9e0 + last_write_checksum: sha1:ef49ea3f8bfd65850cf262e563c77d51f4052e06 + pristine_git_object: 4fb63c0e86256b806ab28e37e4892c567da91ee1 + docs/models/operations/updatedefaultparceltemplateglobals.md: + id: 9a4ba5873163 + last_write_checksum: sha1:5360073d0b46ac3f91ecf1195327500765811e03 + pristine_git_object: f88a60b8742eefe347bbea1be8721eb9aaf3d1ea + docs/models/operations/updateservicegroupglobals.md: + id: 5e243b960d38 + last_write_checksum: sha1:0b0af9ec93af9cc3e6ff024bea4756b12e8c7b77 + pristine_git_object: a416d8aabeb628b2c2d15a616557426d82754640 + docs/models/operations/updateshippoaccountglobals.md: + id: 6feae34f12a1 + last_write_checksum: sha1:8d23f9a0297314b872a30264b96d035d3957526a + pristine_git_object: 3358b977241a4b7ced0befd5b6b7ef7a4fbe03a5 + docs/models/operations/updateshippoaccountrequest.md: + id: 1488b3ed89a7 + last_write_checksum: sha1:1333a9dca9eba7cd112cb77e5e97b089d299b684 + pristine_git_object: 93d461feec27c8d14df172866b08c5a27503d284 + docs/models/operations/updateuserparceltemplateglobals.md: + id: 179263eb612e + last_write_checksum: sha1:2f484b003802dec9d105845ac3b953b0cc55037d + pristine_git_object: eb01d5769164596c12223f9267f3f00f2ead90e9 + docs/models/operations/updateuserparceltemplaterequest.md: + id: 35ad6942a61b + last_write_checksum: sha1:547e788238408a9fc1a3c663fa2be837202c252f + pristine_git_object: 4845fb015cfc2752c222f3da2408c962d4a5473e + docs/models/operations/updatewebhookrequest.md: + id: b50a4ad64339 + last_write_checksum: sha1:2e32e38bb8fbe790903fda1cf23d413a8595e074 + pristine_git_object: 64da1e9d8460c48dd127464ae465a24238c734d2 + docs/models/operations/validateaddressglobals.md: + id: 8d66553e290e + last_write_checksum: sha1:38c4c21422c38fb98a8db2ddca795f559bebaedd + pristine_git_object: d79d74f17304f880955bbfb23034d312a4f4339a + docs/models/operations/validateaddressrequest.md: + id: 43566b2b1bc2 + last_write_checksum: sha1:c9cc09c202a308137052c063f0257cab2921706a + pristine_git_object: e4e9e49c6be2ff88dfca0fb13d454b2c95c6947a + docs/models/utils/retryconfig.md: + id: 4343ac43161c + last_write_checksum: sha1:562c0f21e308ad10c27f85f75704c15592c6929d + pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf + docs/sdks/addresses/README.md: + id: 53b1d5208b6b + last_write_checksum: sha1:67c30ee1db480eba46e73cb8b23d753cee8a67ba + pristine_git_object: 9e2912aa954ace09a2779bb22141de93c31186bb + docs/sdks/batches/README.md: + id: affccbddb9a8 + last_write_checksum: sha1:afef0cee4b5246432b4e37b5b7d2297197f7697d + pristine_git_object: 1335bfa4d30fcdd67ff1c268368e849a705ec0c2 + docs/sdks/carrieraccounts/README.md: + id: 86ff0a6311c9 + last_write_checksum: sha1:3e8b9e99456f244fea888bde1fdb89823289a815 + pristine_git_object: f18e62b0a1b1588a31c66c79121a71f6396c826b + docs/sdks/carrierparceltemplates/README.md: + id: 35205d7570c3 + last_write_checksum: sha1:8a68748b626a415f318f68816281a221b7252179 + pristine_git_object: 9039a8dc240781fc72748f452ea700b4af3bc214 + docs/sdks/customsdeclarations/README.md: + id: 3f8371fc6cd7 + last_write_checksum: sha1:67eb7daeada654591552fa2be27bd549f45a6478 + pristine_git_object: 2d01c28cb807ee844cbd6749856004856ac1416c + docs/sdks/customsitems/README.md: + id: 34c1a7feb061 + last_write_checksum: sha1:e55bb0e7409af8977758be4575a27b612ddcd789 + pristine_git_object: 746fdb764fba2da46f53356daaa7a852b4c1ff74 + docs/sdks/manifests/README.md: + id: 67507e6342c9 + last_write_checksum: sha1:c4ec7fb6d01d216e0d8e70bf8c6b78d828a2956d + pristine_git_object: 7b8a20f466c5cb737fd3626e2cd3221266f7c1e9 + docs/sdks/orders/README.md: + id: fc5b2caf3cb2 + last_write_checksum: sha1:2185c91252583e515c9f6367c31c18bc7b6b4f44 + pristine_git_object: 5605cd9622f14d0bb23a9877fc304f74d1626cc4 + docs/sdks/parcels/README.md: + id: 3dc200505f10 + last_write_checksum: sha1:d8224f2b60fc7897c927def7314681127a91dcd9 + pristine_git_object: 52fdd681632af2c8d7987c690c272ed25e6ae35d + docs/sdks/pickups/README.md: + id: 044f6c3f35d0 + last_write_checksum: sha1:70226c3c6455c34bf7eb3d709ebef4e7bdc5fd74 + pristine_git_object: 216a2e4c51df50378aca1c1eb84f7913a74bb315 + docs/sdks/rates/README.md: + id: efd8bbdefec3 + last_write_checksum: sha1:bfa1168a6ea7147b450c2ae0b6dc311100b7eea7 + pristine_git_object: d40dd856cd6c36f575499fc4bf4460397cc6c6e4 + docs/sdks/ratesatcheckout/README.md: + id: 6f953e850bbb + last_write_checksum: sha1:de4ca0f7e320e029b56763c7f1bb99ef027f5596 + pristine_git_object: 3c5a6db64d1bd3ee29b2f357532631129741fe49 + docs/sdks/refunds/README.md: + id: 451a9838a921 + last_write_checksum: sha1:3cfc41e0e35cbfa4e5778f430178581813cd5813 + pristine_git_object: df739ffbc9ead32aa994fc3197cf927bb6f8398e + docs/sdks/servicegroups/README.md: + id: 05f68cecaeb9 + last_write_checksum: sha1:9756d3c7c32731663cd38dbf2fd37c3691067c22 + pristine_git_object: 7d719f6b6db3d28fe5e1d7d2417a230ec36ac216 + docs/sdks/shipments/README.md: + id: e36b52aa4738 + last_write_checksum: sha1:4e5798cff7f61da8f0b1ca5781b1231aef5ae0af + pristine_git_object: 65243b4177e0f09c384e0ab8678d7ac6608190d2 + docs/sdks/shippoaccounts/README.md: + id: 182840ec5035 + last_write_checksum: sha1:5c847225529470c5930d32c539d1ba29d2706dea + pristine_git_object: d9974f7fdb90e6ada643687b92dcefc192d4c3bc + docs/sdks/trackingstatus/README.md: + id: 0f18c61cead0 + last_write_checksum: sha1:186b0793874d4e26fa7929e8b9f0b64dd50dc653 + pristine_git_object: edf0afaec3db81bd9ef3cf5b50280aa8241375b3 + docs/sdks/transactions/README.md: + id: 85592abe3c6b + last_write_checksum: sha1:1e0726a55942036b5fb5b25878397d1427eceda1 + pristine_git_object: a45755ec2ab1cd18783086b94f3cf4beaa9d104b + docs/sdks/userparceltemplates/README.md: + id: d4e35d65825a + last_write_checksum: sha1:04ab9b692ac06a8b6bb9eaec007cfd4efcfe4ca8 + pristine_git_object: 5cb79ed5eec323ef94a07166b586131f4604a2f9 + docs/sdks/webhooks/README.md: + id: e21b32d786a4 + last_write_checksum: sha1:bde035c8a14d187d571a64de005932030af52aea + pristine_git_object: 3eaa829daa1b118b9e3e688cc768483ca75f4b71 + poetry.toml: + id: a81ade82122a + last_write_checksum: sha1:2242305e29dc6921bdf5b200aea5d4bf67830230 + pristine_git_object: cd3492ac9dc870fdcf23dbd94fd1d40cc753cc8e + py.typed: + id: 258c3ed47ae4 + last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 + pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + pylintrc: + id: 7ce8b9f946e6 + last_write_checksum: sha1:efb10fa86b8a053964153923776de49acf135da0 + pristine_git_object: 18f8c357a2206431626265d3943f66c4c1aa663f + pyproject.toml: + id: 5d07e7d72637 + last_write_checksum: sha1:8d504b3a77c90ae716170b8688c6786e290c288a + pristine_git_object: 394b2898c711d7a08b7bd5643b41e2063d595206 + scripts/prepare_readme.py: + id: e0c5957a6035 + last_write_checksum: sha1:e00374f5f50ebf41cd4fd2e5f3b4e54cc63e354f + pristine_git_object: 38b9b0c06a57cd1a4a320214d0e40d2b008d204e + scripts/publish.sh: + id: fe273b08f514 + last_write_checksum: sha1:b31bafc19c15ab5ea925fdf8d5d4adce2b115a63 + pristine_git_object: 2a3ead70ccc6228cbae1c5c8a319b1399f3804ea + src/shippo/__init__.py: + id: 03c8ab79e490 + last_write_checksum: sha1:da077c0bdfcef64a4a5aea91a17292f72fa2b088 + pristine_git_object: 833c68cd526fe34aab2b7e7c45f974f7f4b9e120 + src/shippo/_hooks/__init__.py: + id: dd1c716793ac + last_write_checksum: sha1:e3111289afd28ad557c21d9e2f918caabfb7037d + pristine_git_object: 2ee66cdd592fe41731c24ddd407c8ca31c50aec1 + src/shippo/_hooks/sdkhooks.py: + id: aaf9a2845f64 + last_write_checksum: sha1:b2408ce491109f3b8c3a9a1e0997de0c17a7adc7 + pristine_git_object: 6f90720817609430a494b7ffb11d28916c9de985 + src/shippo/_hooks/types.py: + id: 9e8ff6ca99c1 + last_write_checksum: sha1:c3845c14af69d789640ab97a37d867434599df52 + pristine_git_object: fa9462d49b00ecd4231286eed6b21dcbf31b0967 + src/shippo/_version.py: + id: b71c1af6ca9d + last_write_checksum: sha1:8311bc3bc221e97f95233ba5f688fdbbe90f56d4 + pristine_git_object: 8a57094604c6d842b30a5f5926b7545400628013 + src/shippo/addresses.py: + id: c011488252c1 + last_write_checksum: sha1:97c28fa850fb7e7978674786e6c1e932c7d1ca34 + pristine_git_object: a35c9b1f237867b0d417979c0e5f2cf435406772 + src/shippo/basesdk.py: + id: b5fe6936ac52 + last_write_checksum: sha1:29649508d272b80b3c5cf09eb230f6de2e2fecf5 + pristine_git_object: 8ebb5667935288e5e7d96680a0c7e81dcb91c159 + src/shippo/batches.py: + id: 55578039dc0e + last_write_checksum: sha1:814eaa615d6244d1dd74e157957fdf0ad3d0f0fd + pristine_git_object: 13ad50925ce290651fad3b4a4d78d6e716f925e7 + src/shippo/carrier_accounts.py: + id: 7dc7c62a9fcd + last_write_checksum: sha1:b97d736b0ef0b3e4a4a6e88ff5d8274cacd7c102 + pristine_git_object: 10f203cb9fb5a02c683b63d4e6f8753c0e9211f7 + src/shippo/carrier_parcel_templates.py: + id: 33beabc95904 + last_write_checksum: sha1:ae7c74fc11aeeca920d84784515c388eb1ec0895 + pristine_git_object: b01948563fcb0564cb1737a1983ccf0494e139bb + src/shippo/customs_declarations.py: + id: afb609f7b6a2 + last_write_checksum: sha1:57dbfd2974fc9a825d5660558c1dec5de63f3ee8 + pristine_git_object: e3d7d760cee1fa297779ee77b2c1a7301d8fc3a7 + src/shippo/customs_items.py: + id: 9e850454ea9a + last_write_checksum: sha1:3991682f65aeb29164f85ff2144928295bbf4199 + pristine_git_object: d650fde49d1a6db0c55e5925ee53ef5bac401b0d + src/shippo/httpclient.py: + id: b9f88e548bcb + last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 + pristine_git_object: 89560b566073785535643e694c112bedbd3db13d + src/shippo/manifests.py: + id: 1896b9dce97a + last_write_checksum: sha1:18f80af8b73aade319e392b69235312c25cffa88 + pristine_git_object: 29c419c3422b37fc5ddac872423664b643b285ae + src/shippo/models/__init__.py: + id: bef9e693dcb1 + last_write_checksum: sha1:8ae2707dad0f981513e522abcbde16dab78939af + pristine_git_object: 1a349122673e9dde5e63f86e406a44910b584d13 + src/shippo/models/components/__init__.py: + id: a77d06773815 + last_write_checksum: sha1:758ec2fe52de189d31e983f78eef53c6994c462f + pristine_git_object: 9dee061174ec2b576dec124c8a5062f21d4079f1 + src/shippo/models/components/address.py: + id: 2819a4aea92c + last_write_checksum: sha1:4db04278781ee91277090cc56dd27331efad7d60 + pristine_git_object: 446856e50ff397d3d448633484750a0798b6be31 + src/shippo/models/components/addresscompletecreaterequest.py: + id: 72154a6ca78f + last_write_checksum: sha1:0048f83eefe2dd6c33e0fc034d557fe947c8f9e9 + pristine_git_object: 81c9d267111b09549432b7996d1c084fc14baca6 + src/shippo/models/components/addresscreaterequest.py: + id: 2eb649af08c9 + last_write_checksum: sha1:f66992349e9fd37c12b9183bd07357b4e2493965 + pristine_git_object: 11112a87b758aa6774e1f4d2777acb4dc7b7b8df + src/shippo/models/components/addressimporter.py: + id: ddb17610012c + last_write_checksum: sha1:c93008229244d7617727d90e8f91524c4383125f + pristine_git_object: 40f5ee7eaa4481d5ba5c5f4d4d5938fa3123808c + src/shippo/models/components/addresspaginatedlist.py: + id: 9ceadbcde42c + last_write_checksum: sha1:e3a9aa401a96227daa030f837c76f308c702862b + pristine_git_object: e51c6d73fe20723941df2e1f5bf76feacb771db8 + src/shippo/models/components/addressvalidationresults.py: + id: 3a5739a12444 + last_write_checksum: sha1:a2ac8afe46a46ad7f587e26920711d2e9e3aa1f7 + pristine_git_object: 458b230f136ff67f0e087f7cba492c2056d84a89 + src/shippo/models/components/addressvalidationresultsmessage.py: + id: 1e0a8b4a1126 + last_write_checksum: sha1:13184852800a194c85bfc21987d567e8f8d24918 + pristine_git_object: 205b46d3ab7a53e977c98bd8eed62b1f3ae7a808 + src/shippo/models/components/addressvalidationresultsmessagecodeenum.py: + id: 5c3b1f0daf65 + last_write_checksum: sha1:83998b08c5424073ecf823c494a2dfa762121e09 + pristine_git_object: ae85ba99925cb844280a8d1b2544e95de519e014 + src/shippo/models/components/addressvalidationresultsmessagesourceenum.py: + id: 928efe52c885 + last_write_checksum: sha1:99d58e01198975e295900b9e0c5f969eb73ab0fc + pristine_git_object: 05b1b8152b7452560a76f3ed176397f48c8f7456 + src/shippo/models/components/alcohol.py: + id: 58ae8b64616c + last_write_checksum: sha1:0c3c4e4216c80a01939c48497b38478e04b205bc + pristine_git_object: b591dadc5fd99917bd104b87c4dbaba615206a95 + src/shippo/models/components/batch.py: + id: d6ad94d53c1a + last_write_checksum: sha1:9d79c779246cf20dd691c4698733f0af07e5718c + pristine_git_object: 59904e3bd449d5c782c5325443a0923a0cba2838 + src/shippo/models/components/batchcreaterequest.py: + id: a7e97c37bf07 + last_write_checksum: sha1:4aaa612c6d610c10063b43afb1c0c70f2e6373fa + pristine_git_object: c0aa689d69a435afb842180440b68f3ec9251f83 + src/shippo/models/components/batchshipment.py: + id: 87d403b0b769 + last_write_checksum: sha1:cd8fae8949c8f0f4a564ca951222a8154e6c490d + pristine_git_object: 498dbe8c1b1af924fd556a396645d21d8e07281f + src/shippo/models/components/batchshipmentcreaterequest.py: + id: 0fa2ef983c17 + last_write_checksum: sha1:fdc5fb96ef7915bc02dfd0576714ebed6bd00da4 + pristine_git_object: 3332c3c2bf5de0c25d811dfbaad460228f35626c + src/shippo/models/components/batchshipmentpaginatedlist.py: + id: bcede244307e + last_write_checksum: sha1:3724ef205285cc61dc549d6d23faf81d6cc6d257 + pristine_git_object: 847a8ba8b99f146120dc3690466813b051cdee72 + src/shippo/models/components/billing.py: + id: ada433c85975 + last_write_checksum: sha1:8ee1a413502cc88909e33babe35c05e115f0d533 + pristine_git_object: b771da771c10640e1b4df9d80e6a7e85c78422ae + src/shippo/models/components/carrieraccount.py: + id: 8c0eda21dedc + last_write_checksum: sha1:1070b209bbc585d9bc83ee094b3f88cf7db7b928 + pristine_git_object: 98c470cce5283c3bc86c4c7bf3b2a9a3712c9b2d + src/shippo/models/components/carrieraccountbase.py: + id: fa3fe479fab8 + last_write_checksum: sha1:90a977935a53efd93ad9a8a680b91b68a5b82443 + pristine_git_object: b86bb1b34866902dfdd426fcb37fbde92d5aa2db + src/shippo/models/components/carrieraccountcanadapostcreateparameters.py: + id: 31370d381941 + last_write_checksum: sha1:246fe46edc65e667b6de234e77e452677c8b2534 + pristine_git_object: 990662eca7d971949b941a73956478eb8ddddb8d + src/shippo/models/components/carrieraccountcanadapostcreaterequest.py: + id: 7248bd86bf5f + last_write_checksum: sha1:3a52d5288978eb9d06e0a3a9b703e75736b509ec + pristine_git_object: e8a81754ffa9dea0151c2d4e341cf2dc570f11ca + src/shippo/models/components/carrieraccountchronopostcreaterequest.py: + id: 928d5b88b2c1 + last_write_checksum: sha1:e9d3f730158a2c6ede63732295c07eacf16cc723 + pristine_git_object: c33985ef983b926a8064811df41dfc9a3c5f6efb + src/shippo/models/components/carrieraccountcolissimocreaterequest.py: + id: 589957c9bd2e + last_write_checksum: sha1:fb78e38db197a54dbeb7d4cacae8fa195d52fcb2 + pristine_git_object: d7f9d9428fb554654fdcc4ce19b413c5317b7578 + src/shippo/models/components/carrieraccountcorreoscreaterequest.py: + id: b67ae3addf0b + last_write_checksum: sha1:54e4468bf44f8e0ef7e813da049a0b78d17a3723 + pristine_git_object: cd5f649aab810b346725a5e7ac61fab24a84a781 + src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py: + id: eade6370ce5f + last_write_checksum: sha1:2ffc1af45bf5c4f22d3df11bd17782ef6680e796 + pristine_git_object: 244c6a974ba7024ed897cf925b237d16ef141326 + src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py: + id: 28b0c0925e95 + last_write_checksum: sha1:ee0575ab893b836d3168150d3249a5a7627e2ec8 + pristine_git_object: f4c7fc9e9cf8307478ee187383e95c6be2e6ee74 + src/shippo/models/components/carrieraccountdhlexpresscreaterequestparameters.py: + id: 6f53c75d0716 + last_write_checksum: sha1:b7d089e8aed4f57089e76a18eb1d2382664652b9 + pristine_git_object: 4d134acd1c9cb2244c8d8a72526a372d9f551cc4 + src/shippo/models/components/carrieraccountdpddecreaterequest.py: + id: 8535b9dd6b8d + last_write_checksum: sha1:74eb926997fa95fad218f7eda2ac5c0d1ccd2c05 + pristine_git_object: de2c5d7bbf30533263960d5899f319a9c566888a + src/shippo/models/components/carrieraccountdpdukcreaterequest.py: + id: 0e9b40179ced + last_write_checksum: sha1:2f69de4bb8e4c16f492f12ab03431560b5e78491 + pristine_git_object: d638859654ebc50cd4085455c1363823b0448153 + src/shippo/models/components/carrieraccountfedexcreaterequest.py: + id: b8219ef5c7cc + last_write_checksum: sha1:d3aee537c3d62edfd5da1f7d52e40de9dc8ea268 + pristine_git_object: 1f404290960117da1e555e5e9270b3ce9723eac5 + src/shippo/models/components/carrieraccounthermesukcreaterequest.py: + id: d8ca25c98bd7 + last_write_checksum: sha1:5ae40ff7fab1ca80d3786a63ea440c9eea5f7445 + pristine_git_object: 30fd0fbd6371863437e3f4dfce1d89d049fcfbaf + src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py: + id: ccd221abe6c4 + last_write_checksum: sha1:17e0f608c58d4544a387935c6de2304330d86ede + pristine_git_object: 800dabfa11d83efc2f2f0ec67f0cf06179778294 + src/shippo/models/components/carrieraccountpaginatedlist.py: + id: 748e929b22cc + last_write_checksum: sha1:55c78e2d9f7b495da0102930b8d24f1eb13c2544 + pristine_git_object: 294607cec6314b021e52e77f3e38706cc510c62d + src/shippo/models/components/carrieraccountposteitalianecreaterequest.py: + id: 7c6949786490 + last_write_checksum: sha1:24b28381c54ed51ad232272030c600ce343dfedb + pristine_git_object: eefa9b3d727f5e8d9d37be10e1a5e14e6a9e87f8 + src/shippo/models/components/carrieraccountregistrationstatus.py: + id: 703226fed8ad + last_write_checksum: sha1:8c0704af56585267dff3fd1138adaf8e3bc0b256 + pristine_git_object: f9f9d32e83a7c077dc82728bb5b1dfdcb8e41b44 + src/shippo/models/components/carrieraccountroyalmailcreaterequest.py: + id: a90aab9bc1a7 + last_write_checksum: sha1:e3436dff72512cbfcc94afe05f150d40b00f0190 + pristine_git_object: 1987f9013a8d813bf709c641c9d5737f8c68ff31 + src/shippo/models/components/carrieraccountroyalmailcreaterequestparameters.py: + id: 65cd8dd23e64 + last_write_checksum: sha1:b361bf1e4811d60ae3328d4024b8c022e19589f8 + pristine_git_object: bf956c021ac45fc5b02ed5d9d016089f74467959 + src/shippo/models/components/carrieraccountroyalmailsfcreaterequest.py: + id: ccbf9ad1c546 + last_write_checksum: sha1:e2e50719e178e7fc0a7ca9f54019812f591f15dd + pristine_git_object: 03615ac823906ca53077a2295c92d87ada7b6539 + src/shippo/models/components/carrieraccountroyalmailsfcreaterequestparameters.py: + id: 8b21cf468398 + last_write_checksum: sha1:e11bf50641eb55d9705672385945e59a8395d8eb + pristine_git_object: 1f740b4458a566aba9eaef0ccef1142c600b6221 + src/shippo/models/components/carrieraccountservicelevel.py: + id: 6bd1e641a2b1 + last_write_checksum: sha1:10cd408e6c839fc459a3d67a5924f524697ef6fc + pristine_git_object: ec3b9c0f146956fd7cd2c81561694d86181ab3e6 + src/shippo/models/components/carrieraccountupscreaterequest.py: + id: fcda5d6baa5a + last_write_checksum: sha1:e5013b52a200c667606b469e9f56579619d596cc + pristine_git_object: 6416da06ac731ed701c0cfdbeef088503d5d930e + src/shippo/models/components/carrieraccountupscreaterequestparameters.py: + id: da93d77564f7 + last_write_checksum: sha1:6b2bcb569825370ceba970344b07ee3e8976cf20 + pristine_git_object: ac4e51b8bbf5b5d2476aafe0f6ae044535499536 + src/shippo/models/components/carrieraccountuspscreaterequest.py: + id: 79479930e8e0 + last_write_checksum: sha1:7fd30535545dc4a41453389c66865fd9b076a242 + pristine_git_object: 4d7fca9a2c7f06006a185ca1e32daf789b33e624 + src/shippo/models/components/carrieraccountwithextrainfo.py: + id: 4151e93af507 + last_write_checksum: sha1:23b5552bb4dca700a165620c5feeb433a81ddb85 + pristine_git_object: c8e8bcad1ac043ffac14b9036649f60e333b6881 + src/shippo/models/components/carrierparceltemplate.py: + id: 87c022ef28ca + last_write_checksum: sha1:ab0295cbca0d9c26081d605034dcb635ac25052a + pristine_git_object: 209f8cd90f137c34c070dbfa2bad8927e933d2bb + src/shippo/models/components/carrierparceltemplatelist.py: + id: f1996dbd7695 + last_write_checksum: sha1:0c7ff555a6dbf8373cab4ccdf42a0be99b3734e8 + pristine_git_object: 204d3200c3f39e81c597a55b8b5fe8ae563fe203 + src/shippo/models/components/carriersenum.py: + id: 5a317b0301ec + last_write_checksum: sha1:c7e4a66fb73eaa49daf82d26bbfe4d024761b45d + pristine_git_object: 94a9cb51174c059770c0a65656afc58c0793c39e + src/shippo/models/components/cod.py: + id: 8de38f4bf475 + last_write_checksum: sha1:9ec86dfd887d3b21a6554b6399dd5a8661ef3b47 + pristine_git_object: bee67cd8914b48ca13398da90d13a4b48bb8bd1a + src/shippo/models/components/connectexistingownaccountrequest.py: + id: 8249dfed9cd0 + last_write_checksum: sha1:e1889efd4a25dc1ebe3fb19bd60bc25a20179442 + pristine_git_object: 9e1592b4ff6bf68d6a3d747f7cb3f10f1dcffee0 + src/shippo/models/components/corerate.py: + id: d26a1ff395ea + last_write_checksum: sha1:2e2fddc0c0f54796af1f442a0834c5458c57e322 + pristine_git_object: 1fd425cc985a545cf4e9eff97e24a7a6c2e3561e + src/shippo/models/components/customerreference.py: + id: ba731393b4cd + last_write_checksum: sha1:4899cc42fb92caa9fdc7f093778d45a8bc1b28cb + pristine_git_object: 6f423e2e353b41925e2e218436b2849d04a98099 + src/shippo/models/components/customsdeclaration.py: + id: 7737ece6fcd0 + last_write_checksum: sha1:b234a52a36676f60ad947dc25f974922f845f35f + pristine_git_object: 3531b0703774cabfdb1f06b762fb7af9ab80e34b + src/shippo/models/components/customsdeclarationb13afilingoptionenum.py: + id: 9f6677bb6161 + last_write_checksum: sha1:2524218cddf3dc6ae02991607905268fd5304b13 + pristine_git_object: 9068557c5f1dcbc830058f2520bb44e760053899 + src/shippo/models/components/customsdeclarationcontentstypeenum.py: + id: b42b0455e23a + last_write_checksum: sha1:b50bd06190451ed2d60e1d922c1c89ff671832b0 + pristine_git_object: bebca60bf00bcb5ab1369f8933ebf8637d7d3267 + src/shippo/models/components/customsdeclarationcreaterequest.py: + id: 6fef411b878f + last_write_checksum: sha1:00a5e2e7e49d08938461b9edb0fa912087894e80 + pristine_git_object: e8eca192329a2738f20deb500660123cceeadbe7 + src/shippo/models/components/customsdeclarationeelpfcenum.py: + id: bd2bba6c0fcb + last_write_checksum: sha1:00192b688f068deaf4499aaf68670ca9255897e1 + pristine_git_object: 93492623c8dfe1a95c984cb485cd6756b1a78a8d + src/shippo/models/components/customsdeclarationincotermenum.py: + id: c16c9d305d1a + last_write_checksum: sha1:8b163b73bda073fc70b78ea23b9c01353d5e3fa2 + pristine_git_object: 62453d3439b4c6697f0d6890408f758187c67643 + src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py: + id: 5bd27658d881 + last_write_checksum: sha1:7c5874c1d3034b219dec515e1ce159de80061d72 + pristine_git_object: ccb37bb1566229a1e732d7263c0057054c528792 + src/shippo/models/components/customsdeclarationpaginatedlist.py: + id: b8a8b8804f0e + last_write_checksum: sha1:808c03ecb1d4247a745695edbcd45aac9559f29e + pristine_git_object: cb5ee009ae3ba62e041aea4de6f4df6b1d0a5fee + src/shippo/models/components/customsexporteridentification.py: + id: a6383370e43e + last_write_checksum: sha1:bf0a76736d5e8df5d76ebaaa0cd045203eb26665 + pristine_git_object: 4dfcc7847a56fab1beeeff6a7b61b6c9c621eaf0 + src/shippo/models/components/customsinvoicedcharges.py: + id: 5354b33475e5 + last_write_checksum: sha1:bc69115cb1702fa7b4d7e6b4ed688f0e7b1496c1 + pristine_git_object: 2d65ce37d49028771dca88f29a7818f62c685668 + src/shippo/models/components/customsitem.py: + id: 5c44d597eaa0 + last_write_checksum: sha1:525c746f42ff43647e2da58b62d70df8eae504d9 + pristine_git_object: 05b7f6452cc502c125c8186bb29e414539d5cf62 + src/shippo/models/components/customsitemcreaterequest.py: + id: 4afe1cd1fba8 + last_write_checksum: sha1:d58dc22f387ff5c9b59aa9a1c150d79de61559d1 + pristine_git_object: e330e499b167780d97a45f145f74cccf0499e5ae + src/shippo/models/components/customsitempaginatedlist.py: + id: c26b47d41b7f + last_write_checksum: sha1:25793816d5425ec9f99370017eead60d52bb818c + pristine_git_object: 83cdbb93d67991c4728e8b04aee087feafda0923 + src/shippo/models/components/customstaxidentification.py: + id: ec100be9d7c7 + last_write_checksum: sha1:c5cc655a6d8cf982a08ab9f3ae905cb9539b4096 + pristine_git_object: 64734cd574af68635ed1bc6d56f7c8ca64a4a479 + src/shippo/models/components/dangerousgoodsbiologicalmaterial.py: + id: 5f56d499432e + last_write_checksum: sha1:81caef1145ffe3c3ee6a872bde0658360d0a3455 + pristine_git_object: c153b9a594fd100ad741919fad0ec0c8fcb6a0e0 + src/shippo/models/components/dangerousgoodslithiumbatteries.py: + id: 4ae35ae521d2 + last_write_checksum: sha1:11dce375def493dd53f961a3f60674574bc651c2 + pristine_git_object: 5222df398c9154ee0950ddc6a3786edbef38cae4 + src/shippo/models/components/dangerousgoodsobject.py: + id: 0988995cd55b + last_write_checksum: sha1:4ab02e289b4f000a1caef925e1925b43ec5b7987 + pristine_git_object: c663e2bc43be79fd90ffe90c580f7f131667e150 + src/shippo/models/components/defaultparceltemplate.py: + id: e4f4c73c5db2 + last_write_checksum: sha1:120f915c46a24464d1d66a880b00d9aa10786a04 + pristine_git_object: f132db3e660874454babeed3cfa517480a4ee598 + src/shippo/models/components/defaultparceltemplateupdaterequest.py: + id: 436f6db83a1a + last_write_checksum: sha1:55e4c84df89ecd63132b311ac965da0949363912 + pristine_git_object: 166f1b0ba71ef213817ab337c0ed8528ff232f1e + src/shippo/models/components/departmentnumber.py: + id: 8878652df981 + last_write_checksum: sha1:46d91254c8f1955bb6fed79c0aafa916ab62df87 + pristine_git_object: e3e4cf017c37535b27741eb57cbd4a75eb024c9e + src/shippo/models/components/distanceunitenum.py: + id: 77b39cfa6ec6 + last_write_checksum: sha1:933cebb525fe9852fcc6523b9033b6dc8cbd56b6 + pristine_git_object: b382ce886b1eb1276bbd8deea90322c4f062d6c2 + src/shippo/models/components/dryice.py: + id: e83e274adaa7 + last_write_checksum: sha1:cbdf7d6f069a6be2035ca747d84678ff945e66c2 + pristine_git_object: 5a88bb23f6f9b7fa5e50605f5537506f772539a2 + src/shippo/models/components/fedexconnectexistingownaccountparameters.py: + id: 0af30fd3b0d8 + last_write_checksum: sha1:aa385b71209759b99b50de86a2e12be619643d74 + pristine_git_object: 18fc50dfc5e18f4117f927a622c03f5197760604 + src/shippo/models/components/instanttransactioncreaterequest.py: + id: 7df05b59f2e7 + last_write_checksum: sha1:b7841442433cff34435e8a53f61d33f50ab48f0b + pristine_git_object: 4f8afbc76c80d5a74fe9cc6d8e81afbeb5bd145d + src/shippo/models/components/insurance.py: + id: c4224b9920ef + last_write_checksum: sha1:1b73f8e95147221a97e1c97346271cdd0cbab1c4 + pristine_git_object: 1a76bbd3ab449535250532ce1e96ce933179a497 + src/shippo/models/components/invoicenumber.py: + id: c2f089db67fc + last_write_checksum: sha1:09f90eef5364b1df0db3e2079330668128c45d5b + pristine_git_object: a6d425cb56ecbe6163c8dcc867851b95e9ecff8c + src/shippo/models/components/labelfiletypeenum.py: + id: ef2114ba3422 + last_write_checksum: sha1:12e42cfd05a177b970bf3f90888fe113fe7b235a + pristine_git_object: 955facb5008efba860388b4d0eb1596272bc9b24 + src/shippo/models/components/lineitem.py: + id: 7589a4aec042 + last_write_checksum: sha1:1418e9b96443ff5f8d3023db50a526af3af4109e + pristine_git_object: 34d75c4d571ce31ec32a5e6334eac53dc32cb975 + src/shippo/models/components/lineitembase.py: + id: 20fa605854ef + last_write_checksum: sha1:079a45d14c2be5bd18f490e5bf01a531214b9824 + pristine_git_object: 005643478ad1aec32b6231f16bf94842b3a5c5a7 + src/shippo/models/components/liverate.py: + id: 1785bcf135fe + last_write_checksum: sha1:3202b56ccfeb2d9bb873b0850f55889569534400 + pristine_git_object: 33767ab673298a77c98234f10864c99a7fef3e50 + src/shippo/models/components/liveratecreaterequest.py: + id: e9601ea74882 + last_write_checksum: sha1:6a690b20a02d6f616dc157d498b1122fb653046a + pristine_git_object: 9c5a3eea49936f03b37f6507f06ee0b2d4909004 + src/shippo/models/components/liveratepaginatedlist.py: + id: c7b606bcaf0c + last_write_checksum: sha1:48f215521b1a7ab945089426872c60d876c9bc03 + pristine_git_object: 8e8b113366453adb4d43ddd7668f2cf80efa1a9c + src/shippo/models/components/location.py: + id: ab77d9f3795b + last_write_checksum: sha1:affe2d22bd3c9ac74b23dc311cc27cc1f2af097b + pristine_git_object: f8a0f2926d12492799978316509ef48ac5d1dff2 + src/shippo/models/components/manifest.py: + id: 4aee54f6794b + last_write_checksum: sha1:d8f5e2f4c3458d9fa654fef834f05f0422795d76 + pristine_git_object: 84972107633a9ddbc97ccd6ed3c3da0bb8f59baa + src/shippo/models/components/manifestcreaterequest.py: + id: 6dca7c7ce9fa + last_write_checksum: sha1:db4feaf484afde6aff86dd6a3b35bf0399e4f1a0 + pristine_git_object: 7ba9a587747ec35053ae1418e3f353d5488bdae0 + src/shippo/models/components/manifestpaginatedlist.py: + id: de3d7e93e547 + last_write_checksum: sha1:4a1e863c0a6570c1bf1036797fe717d95d08390b + pristine_git_object: 9a67a634f76acdcfe4a844efa29c326debc53896 + src/shippo/models/components/objectstateenum.py: + id: c529425c94ce + last_write_checksum: sha1:0a4b3f1eec67dc6b9936ec580c1b867db5d1b0f9 + pristine_git_object: 89b5dee75ffad3e9e139c81f89ff5977667ab6fd + src/shippo/models/components/order.py: + id: 0d06ee815607 + last_write_checksum: sha1:fde0e1463f4c88f9cafe6402807022f21dfb933c + pristine_git_object: 4fff607d78dba9a2ec6f8e00da72fb8f78479351 + src/shippo/models/components/ordercreaterequest.py: + id: 2024e5afa926 + last_write_checksum: sha1:fc54048acbfd48cca51ffb169cbaa6dd910b89c0 + pristine_git_object: f09a8461d69b0051858ba04b50d3c07c8801e84d + src/shippo/models/components/orderpaginatedlist.py: + id: c975292daaf1 + last_write_checksum: sha1:646fcd070433430bffc2039e5da8f283d23b9856 + pristine_git_object: 45f5c1c306e0d4e9a1807005ecfae8e71b6e23b3 + src/shippo/models/components/ordershopappenum.py: + id: e9af4e90e420 + last_write_checksum: sha1:108333b09537ea5dc443c722653b77a3cea5b730 + pristine_git_object: 62733b2c4f3f11a46b8671a60b1e8e640598789f + src/shippo/models/components/orderstatusenum.py: + id: f5b67f538412 + last_write_checksum: sha1:b650d07c1289d0331fa71aaea181b88aed195e84 + pristine_git_object: 4595b730bf618cec307172350e882e904aa1c1b6 + src/shippo/models/components/parcel.py: + id: 01be0d7e5c3f + last_write_checksum: sha1:f120fc4f8da841324c8ea2b1fd15707f62958852 + pristine_git_object: 66330e8628f7ef11efeb858ce66167b7f4719e75 + src/shippo/models/components/parcelcreatefromtemplaterequest.py: + id: 0c5cdb9dd58b + last_write_checksum: sha1:48000b9b1f6b0cefba5a3b3c0decf74abaab5e60 + pristine_git_object: 7424595ee159417147cf1f78b27bf4c7535f3982 + src/shippo/models/components/parcelcreaterequest.py: + id: 647278057f0a + last_write_checksum: sha1:2c83870aaad93b3e21d0a0c80f7307d51ae59444 + pristine_git_object: 6365bf4a15dd6e2eecbaa7c5bf673cbce8e1c198 + src/shippo/models/components/parcelextra.py: + id: 1766b480a0da + last_write_checksum: sha1:e364f318d9c192cd91abc7cea86fbd1e73cc886a + pristine_git_object: 09f2fd70d9dcf78ba8a8af9fbf57a131b79c832e + src/shippo/models/components/parcelinsurance.py: + id: 3d5b58a3ad65 + last_write_checksum: sha1:38577193e9210ba929fc1be861fa84e2e15be69c + pristine_git_object: e27d585b64a85de4295e0d1b51275ec85814bdb0 + src/shippo/models/components/parcelpaginatedlist.py: + id: 2dec8073fa10 + last_write_checksum: sha1:d3a2ad0bf813104f4918c07de55ec39c70b40517 + pristine_git_object: 7d223a1223ec6c6fbc2489c0a504619bf3148c4f + src/shippo/models/components/parceltemplatearamexaustraliaenum.py: + id: 880954dd921d + last_write_checksum: sha1:3b78bb0379227acb64e512fc0f52186302cf91fc + pristine_git_object: b0e755660841d7ff0a2c5aba81d78b35be8a23b6 + src/shippo/models/components/parceltemplatedhlecommerceenum.py: + id: 0ee29a2f0cf0 + last_write_checksum: sha1:615329cf510c608b85cc91c2ef5e2f5a92ccf620 + pristine_git_object: 71c8d6fae8abfd388c4c31f206e1cc7d075b4ad7 + src/shippo/models/components/parceltemplatedpdukenum.py: + id: e63cdddd2060 + last_write_checksum: sha1:b82f1780195ba820b091b9b88cccef2e9097c257 + pristine_git_object: 963e428596fc9bd03c5da4b1cc4c9fdb2a27777c + src/shippo/models/components/parceltemplateenumset.py: + id: 224943d37c6b + last_write_checksum: sha1:e61bc306ef5f1e40cc672978ee5fb7b7ff867d22 + pristine_git_object: 923043d9017f3eb2a9c5d50dc23b5a15a2ac3c4b + src/shippo/models/components/parceltemplatefedexenum.py: + id: ded8f1e869cd + last_write_checksum: sha1:46ff0528bb9174ef141b964696962378ba92b9e7 + pristine_git_object: 1cad07c9663f18d7e385332d59de350a5ffc2b33 + src/shippo/models/components/parceltemplateupsenum.py: + id: a9c583d9adcc + last_write_checksum: sha1:d3178e322b6a07eb6ff25d4456b77aa6b87e1a2c + pristine_git_object: 3d0e0663f24493130dd0c374df6c496c5f7237ce + src/shippo/models/components/parceltemplateuspsenum.py: + id: 19a64b67b642 + last_write_checksum: sha1:72641283482b889fa1358d20f7f2e98dad2011f3 + pristine_git_object: 89c0eaaefe07ba3eb4a1d912a2a1428aa1246482 + src/shippo/models/components/pickup.py: + id: 915ffa79f3ee + last_write_checksum: sha1:592bb8f4b4df9938eefb14a90340da06966374a1 + pristine_git_object: 929adbfe797c9a1b300cae921bc9065df712ea10 + src/shippo/models/components/pickupbase.py: + id: 04e7d15875b3 + last_write_checksum: sha1:ee8c15378dadf10d4f00ab0c419750d572a675a5 + pristine_git_object: 323961b2052dadedd922647a976429c1433d2a41 + src/shippo/models/components/ponumber.py: + id: 2fad79998933 + last_write_checksum: sha1:98eb767b679f3164304d3d1c6351d32f800d27c7 + pristine_git_object: a2da5b21876519f52aed09205abcd670ae2b7234 + src/shippo/models/components/rate.py: + id: e95e64baf152 + last_write_checksum: sha1:117a8aade8243e9efdd159149f67db7d7a06b29c + pristine_git_object: 4e40dc7d3e61b393b0272b616b08648c21423abb + src/shippo/models/components/ratepaginatedlist.py: + id: 47caf52dacae + last_write_checksum: sha1:b794cfd5eceb62a949dd9a9077fea9a255c53dbe + pristine_git_object: 4f87810c99ae237526264655d494f09354478dc4 + src/shippo/models/components/refund.py: + id: 82faea85bff7 + last_write_checksum: sha1:8805bc39ed9b55509754154b529b87db34ddc883 + pristine_git_object: a0858aa0cea05f15fff0f9f1ce90935f0d6aa7a1 + src/shippo/models/components/refundpaginatedlist.py: + id: e3ce7cad62e9 + last_write_checksum: sha1:8d73b04bd6f0d505dc014743b3694a34b3d3c583 + pristine_git_object: 27e9b1486e1a2c832a6c631f4566ab7d1e7a2fe5 + src/shippo/models/components/refundrequestbody.py: + id: b1e699f948c3 + last_write_checksum: sha1:aaee4da9257e71ee4f5ad66191f7caa12d82a67d + pristine_git_object: 5357da95742d53ff7e78e4c2376ae81377d63e84 + src/shippo/models/components/responsemessage.py: + id: 2265163a97e8 + last_write_checksum: sha1:61d9cd2e4d0126938036829ed1154eb10b23abee + pristine_git_object: 45e36b5cae873b1f4be2a21b3ac7651c58abaed6 + src/shippo/models/components/rmanumber.py: + id: a0bb93cd2560 + last_write_checksum: sha1:257b64c12493f880f7c6ed363165856a560b1b05 + pristine_git_object: d67e0dd2d9364ef72c775038454ad29d3d713735 + src/shippo/models/components/security.py: + id: 80a6522ebbd2 + last_write_checksum: sha1:82590520796ceb39d41a54511a23a6a542f8869c + pristine_git_object: b8ccfc5aaa3dad0251bd8651f0376ad12c1042db + src/shippo/models/components/servicegroup.py: + id: 493c11b38b19 + last_write_checksum: sha1:3c0fca800795fce62eba5aae487aa58910fb19cc + pristine_git_object: 0dc310cf2835bef02fd0b126962af26bec6f3e14 + src/shippo/models/components/servicegroupaccountandservicelevel.py: + id: 9475aa968c57 + last_write_checksum: sha1:ed1b3060730ff55ca75d1230bec91f6738ef1da7 + pristine_git_object: eab269f90695038f3be32c9e54fd23d50e9a5bae + src/shippo/models/components/servicegroupcreaterequest.py: + id: 3189ad9d2c55 + last_write_checksum: sha1:eed517944fe9fa96baa7a7fbfb9b26d82d2d6cf3 + pristine_git_object: b273dfa340eb43c21a8de2f159f40ab4f0c46184 + src/shippo/models/components/servicegrouptypeenum.py: + id: 7533b3554c67 + last_write_checksum: sha1:63f46d27c332c4974e15267bece0742c1d96a44e + pristine_git_object: 784c00733b6843d91863c7f0f2ee079de54adafa + src/shippo/models/components/servicegroupupdaterequest.py: + id: 0d2f5f0ce6a2 + last_write_checksum: sha1:8c1dd014520b029fc1775f9d7835f6a72b4625c0 + pristine_git_object: 5361e78d259128db1454754df886050c304fcfe9 + src/shippo/models/components/servicelevel.py: + id: 9a840b9e3759 + last_write_checksum: sha1:28c4c657b88aafe8c610160c50a5268f7c53f67e + pristine_git_object: 525c47891ea8a6a6667aa77a569154079845cd5d + src/shippo/models/components/servicelevelairterraenum.py: + id: 2af15f868750 + last_write_checksum: sha1:40e42ee91f86b07a18745ebec3d03c02167b0e6f + pristine_git_object: 6a8279312e074d97047e3754e6f0ef3b082989f8 + src/shippo/models/components/servicelevelapcpostalenum.py: + id: 4c160ad82d18 + last_write_checksum: sha1:3a1c266718a492fb12597f4b4bdea42334eb265a + pristine_git_object: e5f7bcb8010b9b37cc759156eb3f40aa90250005 + src/shippo/models/components/servicelevelapgenum.py: + id: 43a5e3628fed + last_write_checksum: sha1:d90cf074fdb5bc157ca32e267f66a93885e37046 + pristine_git_object: e45f0d5400e4b7789b9c731e1b4121da0cb57682 + src/shippo/models/components/servicelevelaramexaustraliaenum.py: + id: 2ce8e873a1fd + last_write_checksum: sha1:9b678f3e339645a9263db1954c0ddccf5dc485b9 + pristine_git_object: d7c7f623ad012a71e3fae3d8957e951769f4310d + src/shippo/models/components/servicelevelasendiaenum.py: + id: 36d42fdb11f4 + last_write_checksum: sha1:8ce172268b107f9ee20cfaecd917a427684bcfae + pristine_git_object: 32debee07197b10fc5edb68b7f0c851ff382894f + src/shippo/models/components/servicelevelaustraliapostenum.py: + id: 442eb0298e57 + last_write_checksum: sha1:ec95782989c8c49847121d0aa54f1442eb784f51 + pristine_git_object: 9f26fcafa64df6d5c9ab7e2eb47e42cae106b0ee + src/shippo/models/components/servicelevelbettertrucksenum.py: + id: e6a8fa99f192 + last_write_checksum: sha1:c0ea6dae5b68bf292d84381bfe630a25f202702e + pristine_git_object: aa0b3de2d263a2c762f71dce4eb19ce31b01c1ba + src/shippo/models/components/servicelevelcanadapostenum.py: + id: 27cc64e2d7fc + last_write_checksum: sha1:a5b09a3972867e2161181a53897bbc63987cce41 + pristine_git_object: 41431366d0a132b475f9a47a73dcb8095cc98c1f + src/shippo/models/components/servicelevelcdlenum.py: + id: 1ffb3b881e2d + last_write_checksum: sha1:217b4e65338c0c89e75b87240288eb324ee0fe6a + pristine_git_object: 2c33dfb3412bb7be67ac9e0e8b486b01dd0e06f3 + src/shippo/models/components/servicelevelchronopostenum.py: + id: 23c9dc5233e5 + last_write_checksum: sha1:9bd1a8c751ab6ba8caa876a2ab5007730c78240f + pristine_git_object: 0c59257790ef3a42082108df38f9d427e25ace09 + src/shippo/models/components/servicelevelcolissimoenum.py: + id: cf1fd7e29dfd + last_write_checksum: sha1:0d9fc122fc4bf12700c179714d29f7a29995c2da + pristine_git_object: e73c50e643897c0e55537cbd4bd43477d5c853f0 + src/shippo/models/components/servicelevelcorreosespanaenum.py: + id: b87aed89c6f8 + last_write_checksum: sha1:73f4fdddf57b93f6a00c67b9b476678470bfa323 + pristine_git_object: f65ab7e964759e5fd0b65367a04dd8bcc10af687 + src/shippo/models/components/serviceleveldeutschepostenum.py: + id: 3d6c49e49fb5 + last_write_checksum: sha1:8452f5d48ffbccc0b0a52882afe16516be3887ee + pristine_git_object: 8bcf375b89405917b2eeb6513db1940228ba7ec5 + src/shippo/models/components/serviceleveldhlecommerceenum.py: + id: 5a2393d1b400 + last_write_checksum: sha1:e438346f564b281205f365676172100174cca1ac + pristine_git_object: 0515c09286065350a066ad0aaaec024c5ca79d2f + src/shippo/models/components/serviceleveldhlexpressenum.py: + id: dc1065bd1d41 + last_write_checksum: sha1:c70cf393b83be631b4e39ab384874f9667656416 + pristine_git_object: e706de499c4114ad6ffdc39f0d4ec5c15ef3c3f3 + src/shippo/models/components/serviceleveldhlgermanyenum.py: + id: 67a63e6cdfac + last_write_checksum: sha1:05db261beee7171288a6d67293dacd70648d4d7c + pristine_git_object: 5cb7d6624c3c004bf99ceabec5521baaf4c17509 + src/shippo/models/components/serviceleveldpddeenum.py: + id: 7219506cc0bf + last_write_checksum: sha1:ef1a779e31bcc6f483da65b294753a23a088a5e4 + pristine_git_object: df97cbfeca62e03d3acd9750d7ba364b8c6f9e9d + src/shippo/models/components/serviceleveldpdukenum.py: + id: 2dfe61b2b15b + last_write_checksum: sha1:0d911ba994ad7f8417516af3e4b92d5569866e6e + pristine_git_object: 6740a14dd4d4f788e4d95a0d58b1c63aaaed3eba + src/shippo/models/components/servicelevelenumset.py: + id: 378274eb84de + last_write_checksum: sha1:386a71036a593574a57bb991c8d92f7ffc395bec + pristine_git_object: 3985f0a4592715a1312ff2cafc0f28fba48c2322 + src/shippo/models/components/servicelevelepostglobalenum.py: + id: be44b5b0adcb + last_write_checksum: sha1:9a0864d2a188997dae8df06084d1fc30b8083444 + pristine_git_object: 763b569c704013a9f61cbea4e45ecd7cbae2546a + src/shippo/models/components/servicelevelevriukenum.py: + id: 6799db825b38 + last_write_checksum: sha1:b0317f65a47e67aae0d6ba4dcf31de79daf95d50 + pristine_git_object: 569c5f2cd1d09a8735ab530617b25f2d950f81d0 + src/shippo/models/components/servicelevelfedexenum.py: + id: 292d37e7e952 + last_write_checksum: sha1:ea1bd2d1378b07a1661a702b992a0aa129cda8e1 + pristine_git_object: 5d16e24cb431239072c5f0470c339b56f5dec147 + src/shippo/models/components/servicelevelglobegisticsenum.py: + id: 375c95746f55 + last_write_checksum: sha1:11aa04f24bcf091791daaf45110e1b2fe2e6601a + pristine_git_object: e15998ca18c2f0de7c049dfcd8e54c04bcf13ed5 + src/shippo/models/components/servicelevelglsusenum.py: + id: 1fb85c88ac95 + last_write_checksum: sha1:9269f1c94a50d87e7a05f3fb7bdf8c9d948dbac8 + pristine_git_object: 7f20b007535119974d591fbbc437a3733750301c + src/shippo/models/components/serviceleveljitsuenum.py: + id: c52a868ea20c + last_write_checksum: sha1:5bae2ed4069b2dd34e79ecd63f0cea02cf37f755 + pristine_git_object: 3b25d964a948300eb6741707db61f2d7ed796721 + src/shippo/models/components/servicelevellasershipenum.py: + id: c710a5c59bad + last_write_checksum: sha1:75708801e3b761ca82dc7f0690d41f47f6997d96 + pristine_git_object: f1815c8e1c19923038a44324a1b31cf60948f604 + src/shippo/models/components/servicelevellsoenum.py: + id: f225d899db22 + last_write_checksum: sha1:6bae618cfdd9f24045f4969be0a94e67d2f96359 + pristine_git_object: 8d9031c1595e87263913f40a8afe81336d944413 + src/shippo/models/components/servicelevelmondialrelayenum.py: + id: 7be4da56b961 + last_write_checksum: sha1:a9eb3a10edab1c98a449a795fec67d011f1ab1a1 + pristine_git_object: 115aaa178f01c3b0557ee841760671116da025a9 + src/shippo/models/components/servicelevelontracenum.py: + id: 2f0d80f15130 + last_write_checksum: sha1:9b632207fda0421ee25f1e82036322450d4231de + pristine_git_object: 7c32c888d3cc1734a2a3676e4551ac2cbf5c9556 + src/shippo/models/components/servicelevelparcelforceenum.py: + id: b4400afdb2e8 + last_write_checksum: sha1:17e1e466800a5232572ffc76fd1c14a9f737aae4 + pristine_git_object: 73a13cf287fb6f02140c4ab528ea0b9e04acc09f + src/shippo/models/components/servicelevelpostitalianeenum.py: + id: b36a33d0f1ff + last_write_checksum: sha1:d51b67fefb774f34c7fac9b832919e85d3bbc131 + pristine_git_object: ce542feb9e100549eef9bfbf685aca9eecf30917 + src/shippo/models/components/servicelevelpurolatorenum.py: + id: 5bc0e65cd83b + last_write_checksum: sha1:00aea07dc7935a53e154a0ba05f8279d3beb75be + pristine_git_object: cdaca168fe23eac97230bd06785d838eed5a24e2 + src/shippo/models/components/servicelevelroyalmailenum.py: + id: 0ed5a2a1a0d4 + last_write_checksum: sha1:852f3e49be3877736f5c59826776c75d84efd9e5 + pristine_git_object: ebfa30e60f467701501d1c58aae032bdb6c27e0f + src/shippo/models/components/servicelevelroyalmailsfenum.py: + id: 7db0383423bd + last_write_checksum: sha1:fe26a28a11b6a5e614eab35f2d6ee3c0281a4743 + pristine_git_object: e5608a2d9713bda1a5e9939d4d35183136d7b502 + src/shippo/models/components/servicelevelswyftenum.py: + id: deebbdd592db + last_write_checksum: sha1:3f8fe5e6c0b63fdcb65811ce0c3b255759896854 + pristine_git_object: 2f1fc611a5a3f788c94c0fa9af5fc6e2ae8f529d + src/shippo/models/components/serviceleveludsenum.py: + id: d531f98ed5c2 + last_write_checksum: sha1:f8cd1ea4ff7e19d762fe84e4fc59de2307ab0c03 + pristine_git_object: becfa510df5d2ed923a0f1c4172977c9c3827a79 + src/shippo/models/components/servicelevelupsenum.py: + id: 684e7602103c + last_write_checksum: sha1:132f8c897ab25d9f7aff9036ce669f95197ae8a5 + pristine_git_object: 22316d581f8188266cfe265782396ea5d5701437 + src/shippo/models/components/serviceleveluspsenum.py: + id: 13cfe698946d + last_write_checksum: sha1:788f4bd3ff97370efdfce8255acf045d4de5060b + pristine_git_object: bad1c906d39f735ce6279c16bb59c55a1019b80c + src/shippo/models/components/servicelevelvehoenum.py: + id: b114b405858d + last_write_checksum: sha1:f5088ee9e7bcceca030540c4fe9d344b9df75913 + pristine_git_object: 53e81b21ad9536ac3c3837f00bed8079094fe8d6 + src/shippo/models/components/servicelevelwithparent.py: + id: f9a74449f159 + last_write_checksum: sha1:f7be6cfff93618be66ba5db64d13a94eb6cba031 + pristine_git_object: e61be84168645b15b74e7e02148a7f66283b5648 + src/shippo/models/components/shipment.py: + id: 5d923bfe1eb3 + last_write_checksum: sha1:6cf49d439b565bbdd70e863d66dee5d8150f460d + pristine_git_object: c0e2819dc516eea485fb8b5bb44fed9a58521790 + src/shippo/models/components/shipmentcreaterequest.py: + id: fc1ae3e13d3e + last_write_checksum: sha1:358878cb665f5e9141c9bbbd883263c4d7d8eb02 + pristine_git_object: c63cc2df24e380778ef76609816fd851b56c2148 + src/shippo/models/components/shipmentextra.py: + id: 93b556f33c4f + last_write_checksum: sha1:8b08525476b0a2106ca0827d3dae02846311f462 + pristine_git_object: 8ec5c6338bd52cc983c252f514df24b9bc9e64b5 + src/shippo/models/components/shipmentextralasershipattributesenum.py: + id: c6262d85e31b + last_write_checksum: sha1:9ce6ca85a4ba524f3ead25b0d6bdb2c5c0ffa957 + pristine_git_object: 23e9a7d662eab189429ba43f51db30249620915b + src/shippo/models/components/shipmentextrareturnservicetypelasershipenum.py: + id: eb57d36d67bc + last_write_checksum: sha1:905c2773f33687a6341e1163b655af4052d4d0a2 + pristine_git_object: 83caf65faadece0b69d24cf095386aad72eeb28a + src/shippo/models/components/shipmentextrareturnservicetypeupsenum.py: + id: 0089348ac188 + last_write_checksum: sha1:9b5624542e1de722a9e070921faa3e1c415fed76 + pristine_git_object: 2190ca4f24ea58d5f00462c7982b7190ed0015fb + src/shippo/models/components/shipmentpaginatedlist.py: + id: c06bc305abb5 + last_write_checksum: sha1:6b89d1d5c89be5e22cf70892386175d47a441560 + pristine_git_object: b2d272887275ef749489c78d5352ac09eb7c6bb1 + src/shippo/models/components/shippoaccount.py: + id: 9debbe412afa + last_write_checksum: sha1:100b8ee1a2759c02862f2fb88e7fd00e156e8264 + pristine_git_object: 47e90da0a577497ddb9cb01f282c441bcd459cc7 + src/shippo/models/components/shippoaccountpaginatedlist.py: + id: c2ce01b88581 + last_write_checksum: sha1:a8fd50d6750a8efb096de437d702f04a6e3e8cd5 + pristine_git_object: f545f8dbf0a7317774f9b0b03a4552e46962124e + src/shippo/models/components/shippoaccountupdaterequest.py: + id: fce0ea1e0957 + last_write_checksum: sha1:5f9b2e78ef07d0ca6ea49c673ebb25587f6f5d7a + pristine_git_object: 986aa1824b85ea9cfc00e1e322c35485d379491b + src/shippo/models/components/track.py: + id: fe3039c384b3 + last_write_checksum: sha1:a1cc2f83d49af3f7e467a68b96b482a43e55637d + pristine_git_object: 688927d2450597274a4a9102d455dc927ab5088d + src/shippo/models/components/trackingstatus.py: + id: acbed1c195ca + last_write_checksum: sha1:a846d46673448b9def1cfebe60f00c4e0c927fa6 + pristine_git_object: d075a1c7da9bdf2bd308818c56c6f6b587eec8fd + src/shippo/models/components/trackingstatusenum.py: + id: 7cf6c64926ed + last_write_checksum: sha1:233ebbb503d8e8052a69fe68cca6ea745883ed1d + pristine_git_object: f5176d6ec9cb35b4e2855972cca2a32505ff01d7 + src/shippo/models/components/trackingstatuslocationbase.py: + id: ca599830d983 + last_write_checksum: sha1:4c136fa959a5876a7a009f9440f7119928695a5c + pristine_git_object: ba3007d3b62b3cf9982a472c163480569877b966 + src/shippo/models/components/trackingstatussubstatus.py: + id: c6c734acd9b0 + last_write_checksum: sha1:5e5ca207a851f23a08122abdd8994859b06ca46e + pristine_git_object: b3f2a08bbb5201b14b254398fc37e88614a5a8c2 + src/shippo/models/components/tracksrequest.py: + id: 5d720ce7e453 + last_write_checksum: sha1:2737b88d5943c08fb014ef8df85cb8c2c7ae97d9 + pristine_git_object: dbe86fadb410bae1e8ecea4f1077c6780f996b50 + src/shippo/models/components/transaction.py: + id: b1407dcae038 + last_write_checksum: sha1:b598bb10a1f1904f96d69213d31c00174bcb84f6 + pristine_git_object: 6e0c8d614a1178b2e205c570d99e67cb20a50a01 + src/shippo/models/components/transactioncreaterequest.py: + id: 449a422f79ea + last_write_checksum: sha1:2adca580a20b80859c24ea735423c789e37ccfdf + pristine_git_object: 38f8bd0c5886af524fa4b79fe6542bf58e513b3c + src/shippo/models/components/transactionpaginatedlist.py: + id: 29caa1441b28 + last_write_checksum: sha1:96a6766f8dbe84cdce718fb2077b980b66091934 + pristine_git_object: f4b70fbeb88ded8ab593b78dd4a4072f26e08744 + src/shippo/models/components/transactionstatusenum.py: + id: 1dc97cc743d1 + last_write_checksum: sha1:b7b87e9bb615041ff31922e7f59d329da29e07b1 + pristine_git_object: 2ca085a23d01f2e9836db3242a4b6505cafd6cde + src/shippo/models/components/upsconnectexistingownaccountparameters.py: + id: 9de4c5d6e390 + last_write_checksum: sha1:eb7fcf986ddf438cf10c23df1bbe55381f09e749 + pristine_git_object: 7a6a7cb29976f32e7511bfc67c8bbe7d7f5035b9 + src/shippo/models/components/upsreferencefields.py: + id: 9d385e2fd629 + last_write_checksum: sha1:0a73bc19788b2ae7c1f0348036f813307e135ffa + pristine_git_object: 9b078b0f89da09dd64d5d9af01e96c4086af3eb2 + src/shippo/models/components/userparceltemplate.py: + id: c0778cffb74f + last_write_checksum: sha1:f8e02078679f06ffd1b6d352666544960aba210f + pristine_git_object: c14b7eb806e83762677bb8baf5c9b6ee38d03cb5 + src/shippo/models/components/userparceltemplatecreaterequest.py: + id: 95d6948d1296 + last_write_checksum: sha1:0e89495b21f101da78467382888fb4732912a174 + pristine_git_object: 8070989150f5e10bb559f9179363d84959313663 + src/shippo/models/components/userparceltemplatelist.py: + id: 2d3261cb4abd + last_write_checksum: sha1:25ca970d8aaac5ba059f2046a70fce23b6000b6a + pristine_git_object: abc6808364a57c6e964ce34bf688de871c163d24 + src/shippo/models/components/userparceltemplateupdaterequest.py: + id: 88396e7ba06d + last_write_checksum: sha1:79a8169ca1a08a3a57795fc7a243d16010707f7b + pristine_git_object: c3054ace0b6bf627fedbb1a63a5f9c52b72801ee + src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py: + id: 0a93a8231920 + last_write_checksum: sha1:826d7a7e1e82962b32a38bf540b62fcba7c0d3b8 + pristine_git_object: e515edb61ed94ed3429a686199734374903587f5 + src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py: + id: 8eb180f1c9a8 + last_write_checksum: sha1:30d09322fb9af7dd707ef1e6270ef82e50f28ab6 + pristine_git_object: 3a43b03114dc15ec11a408e2aff40fe3523cd874 + src/shippo/models/components/webhook.py: + id: 96add022e408 + last_write_checksum: sha1:4d48fd450f20921e9448a69274b862eccd736afa + pristine_git_object: 7d8efc5c574b6dca6b066d9bce7d7cfaab71e9f2 + src/shippo/models/components/webhookeventtypeenum.py: + id: cd5e97702e37 + last_write_checksum: sha1:a87eccd31e74216ac6977e637a861d66cddcdb0b + pristine_git_object: f1a923a1aaa739c3f7954457a4bfa5c1b335bd3b + src/shippo/models/components/webhookpaginatedlist.py: + id: ce832efa53b0 + last_write_checksum: sha1:3a3e7a2e1d3bb7193b6d6c7e18adcad252ff2282 + pristine_git_object: e8748764e88a9ba40effe02d57e04927c9d448fc + src/shippo/models/components/webhookpayload.py: + id: fb4c34252450 + last_write_checksum: sha1:f7a17b4b784f14359873fa9e66e1b99736d599de + pristine_git_object: 7bcbf15b07299246ea9fab79b092e88e154ef7c7 + src/shippo/models/components/webhookpayloadbatch.py: + id: 46dc7351e5ed + last_write_checksum: sha1:f0ba5cc3dffa5d2634c58d81a9f715a5b9c453b7 + pristine_git_object: e87de328b41431c0be481974c9da47ddc2bfb1c1 + src/shippo/models/components/webhookpayloadtrack.py: + id: 0fc02ec3e85b + last_write_checksum: sha1:b56cccd9a7c94b2bedd52b0ad42d631aaeec3253 + pristine_git_object: c514ebf4befab939b70c70079be8b251c2f7d35d + src/shippo/models/components/webhookpayloadtransaction.py: + id: 65c819a7a7e8 + last_write_checksum: sha1:875ab01f7b8730efc148ad37dfaefcccb4e517db + pristine_git_object: 4fca88eefdcba94f3ba0f101c8298b34b71bb076 + src/shippo/models/components/webhookupdaterequest.py: + id: 64c14e19f143 + last_write_checksum: sha1:03c2ad2193e36adf8380601786dc79765e9294f8 + pristine_git_object: fb30f05119fba604619873d6eb8f3b37c40c4e55 + src/shippo/models/components/weightunitenum.py: + id: a0c65a950bb5 + last_write_checksum: sha1:d61ec1da63fc4a8da41560e856c0f3228fe2ab0a + pristine_git_object: c758e21c66de9790849bb78c8d5810629c52cec1 + src/shippo/models/errors/__init__.py: + id: ae27daa57563 + last_write_checksum: sha1:3efea5d41ef40f3b1d0d8f6f52097b164ab3305a + pristine_git_object: d942d6fad7759c6c47a246804b7434b9ccf15f42 + src/shippo/models/errors/initiateoauth2signin.py: + id: 04476df88784 + last_write_checksum: sha1:64d46b0a0f605bed605b730c78420714df1f6d63 + pristine_git_object: f62216028cc458f4d0c53bf4939fffef0c365457 + src/shippo/models/errors/no_response_error.py: + id: c0b473c05322 + last_write_checksum: sha1:7f326424a7d5ae1bcd5c89a0d6b3dbda9138942f + pristine_git_object: 1deab64bc43e1e65bf3c412d326a4032ce342366 + src/shippo/models/errors/responsevalidationerror.py: + id: af184d6288fb + last_write_checksum: sha1:ff3a7e8815c3a4128b25eac7761c61d24661715b + pristine_git_object: 405687f4a188398a0bb5412e4e50ba4af4a40cfc + src/shippo/models/errors/sdkerror.py: + id: ef6eb68767c2 + last_write_checksum: sha1:9fa11768756b5746d877d7fc91d32ce27c614031 + pristine_git_object: 37cff16b79cc210b59b7191932b5217b39a718ec + src/shippo/models/errors/shippoerror.py: + id: 446a55a7e6fa + last_write_checksum: sha1:bcfdc50e16acc179506237e10ef37e48777a0568 + pristine_git_object: 54e480291685766de3619b067a4e3c47b1c97438 + src/shippo/models/internal/__init__.py: + id: f46bda4dcdb1 + last_write_checksum: sha1:e72d6c2dcd917d6b063abd81bfdd696f413d690d + pristine_git_object: 7aa1e9371694e160f8ebece2d6fc7a9aac8eb977 + src/shippo/models/internal/globals.py: + id: 5431fccdc1d5 + last_write_checksum: sha1:744e1da42be44c2c4bec024c0e8bf6ebc6307614 + pristine_git_object: 98652ec501c3c699855a7b42b4fd165b06cce9a4 + src/shippo/models/operations/__init__.py: + id: 0d2dff4d2539 + last_write_checksum: sha1:64c8dee508219f23001b70e6922398f3756f937c + pristine_git_object: 4df6313e8c9b5db6c1c06bf7feda79f696d27d33 + src/shippo/models/operations/addshipmentstobatch.py: + id: a99294fa3621 + last_write_checksum: sha1:cb8a10ca128f6e045a9bffbc79e98567a2ebca46 + pristine_git_object: 21669c8be8987c48b8bfed78ff1e6004532c5a86 + src/shippo/models/operations/createaddress.py: + id: e91d909eaa18 + last_write_checksum: sha1:89b61eeb0ef9ce578a5310c69f819df41bc6f320 + pristine_git_object: 84100a409ceb7c166941e74ab1d685c8c942b7f8 + src/shippo/models/operations/createbatch.py: + id: 6449ed6540b7 + last_write_checksum: sha1:6a3ce9c3d8024f3829fa22b3cb2ea367eb521502 + pristine_git_object: 269de731af6de4d556e3f720464cb22aae1476f7 + src/shippo/models/operations/createcarrieraccount.py: + id: 80666204b14d + last_write_checksum: sha1:c4f344d4d673e11cdcf60dbc7457c3d7d482776d + pristine_git_object: 4302f6c820a35e6771f9bc73d111ae4c0457b796 + src/shippo/models/operations/createcustomsdeclaration.py: + id: c40258743d83 + last_write_checksum: sha1:2d33af9eecd714990b51fa0a96983909890bc10f + pristine_git_object: 28caaa6f50ca5dcd8bcf579b71999ad0ab2ecc7a + src/shippo/models/operations/createcustomsitem.py: + id: 039f8c12d3e8 + last_write_checksum: sha1:8b1f33b670d51197927959a81c7f45a4036cbd1c + pristine_git_object: 4d1c266c4270dc2222b59d73a3daa8ee5d042ad8 + src/shippo/models/operations/createliverate.py: + id: 2cf59678827a + last_write_checksum: sha1:98c693db50973f14a34694a77184b277bce454e0 + pristine_git_object: f46f3905264f92c4726b68952ae8aa8e7f537314 + src/shippo/models/operations/createmanifest.py: + id: 7127dbea8550 + last_write_checksum: sha1:c4ba5fc70ba446997e2e60588a7dab7e33a83860 + pristine_git_object: 7b4ff07d73a94e9c461b00d05b437ed51a6d89fa + src/shippo/models/operations/createorder.py: + id: 2dacb3c799b4 + last_write_checksum: sha1:9e803f3bdee8b5cdf2219e2fd28b42829040cc0f + pristine_git_object: 68787327b0d033a2ac5e21efdf9ad88f3b52d418 + src/shippo/models/operations/createparcel.py: + id: 32e01dc7e538 + last_write_checksum: sha1:7dcde50fba646ca159139752d84544f75e25642e + pristine_git_object: 36fc0b5b2d61dfcb7df1bbb5a3b34ecdd9b0b412 + src/shippo/models/operations/createpickup.py: + id: 8938952b3759 + last_write_checksum: sha1:02eb15bf43baedb955f8b979428788dac6bc9562 + pristine_git_object: 0a997af90c062e2de287d07a307dfd508ffed666 + src/shippo/models/operations/createrefund.py: + id: 7ab2a133adb8 + last_write_checksum: sha1:4d945b8049eeb97a4b56cb405bdda260599fda2d + pristine_git_object: 7f76457a8352b6a7c9afe7a1b302139ae0cc81cd + src/shippo/models/operations/createservicegroup.py: + id: 8fd693875f79 + last_write_checksum: sha1:b196ff42fd7455cee20246d23783ec9d45e710a8 + pristine_git_object: 69545d28fc038c4cf5a573243623e97dbea6bbaf + src/shippo/models/operations/createshipment.py: + id: 0e915fd6856d + last_write_checksum: sha1:b14374dd20532cdf148a7c732fc4a8f9449fef75 + pristine_git_object: c7dfab76c87a25a9a2b74797aa3af5f198cfc7d8 + src/shippo/models/operations/createshippoaccount.py: + id: 95869c00ec8d + last_write_checksum: sha1:63d9686bdbdb7051dabe5e6e10a947a18b603abb + pristine_git_object: 8e34a95e4dfb2e24b4a6c1700863bcaaef60adc7 + src/shippo/models/operations/createtrack.py: + id: 7c542c9a7645 + last_write_checksum: sha1:2ae8ee48eca8bb726d58839e20915aa6c688282a + pristine_git_object: 85827d7ff40e3863ce8f631f6776babaaaabc989 + src/shippo/models/operations/createtransaction.py: + id: 2a7f367439be + last_write_checksum: sha1:48befc225dce3712dad6c2d91b0254304077dce9 + pristine_git_object: ba77f37c62eb15c743f8b2044652e27f162b08ed + src/shippo/models/operations/createuserparceltemplate.py: + id: 7189d6d37c26 + last_write_checksum: sha1:acb8349741fbe991c8abb65db7edb3424e23cf6d + pristine_git_object: fcf3d8baadd25483b4eb39134d41b26d1c53e9fb + src/shippo/models/operations/deletedefaultparceltemplate.py: + id: fa890052887e + last_write_checksum: sha1:aafdb5ae65ae285e461830b47ae00e03e5dbab3c + pristine_git_object: 63bd48844615a3a6e4c4dde2b4bb3f4701af4f0e + src/shippo/models/operations/deleteservicegroup.py: + id: f55699fc6bb8 + last_write_checksum: sha1:cdfc2177647256dd89dbbdbead6591f5485e8299 + pristine_git_object: d0f20e6a42d8a1b6a8efb209d69a3a99616c0e35 + src/shippo/models/operations/deleteuserparceltemplate.py: + id: d3cccae31779 + last_write_checksum: sha1:e1d84be13bc2b056bf360e9bf7ae2ff90652a258 + pristine_git_object: e59ca8d219d3e8c1eed86b722e10b2cdddbef117 + src/shippo/models/operations/deletewebhook.py: + id: 882383a10b52 + last_write_checksum: sha1:94724e876f09a521370163c732a80f000cf059d2 + pristine_git_object: 27541480b5f1b56fe61d140060a3c1cc19ab3cf6 + src/shippo/models/operations/getaddress.py: + id: ff244ff3e1f1 + last_write_checksum: sha1:7aced9d1461b68e8073c5fda932faebd42fd0e5a + pristine_git_object: 571ac3601806bc13f7a98bb3bb1c69f001853873 + src/shippo/models/operations/getbatch.py: + id: 0750bc397a06 + last_write_checksum: sha1:db68228059e553ca6c49bf43ee1864fdc1611f72 + pristine_git_object: cef8164ac5dfe4f8ac603c76256ff468c995b803 + src/shippo/models/operations/getcarrieraccount.py: + id: bb088d62b6a9 + last_write_checksum: sha1:b1e1d7ff3e43f70b0a401d7d0938c42c806dda5a + pristine_git_object: 3a4d82400cb045f6454702ac7016e0d68e0b49c9 + src/shippo/models/operations/getcarrierparceltemplate.py: + id: 89677c64235c + last_write_checksum: sha1:9934aabc16920f0a179b5ea221fc18498dfbe1ce + pristine_git_object: 5b86214e2e953aaf36d62fef8bd35da6339a6671 + src/shippo/models/operations/getcarrierregistrationstatus.py: + id: 90744ae90548 + last_write_checksum: sha1:f3e0a3d21ba5a29abb2c7cc3f60fa486dd811090 + pristine_git_object: d82b59da3ff5558f7f5e828571a2f7c17db190e1 + src/shippo/models/operations/getcustomsdeclaration.py: + id: 42750ccb28ce + last_write_checksum: sha1:865de4bca220b439060dce3503ce3743a9af10d1 + pristine_git_object: 2ff6da8a850070a17579ab3644b2f0b84fa9949f + src/shippo/models/operations/getcustomsitem.py: + id: af1e49e773aa + last_write_checksum: sha1:01830182809f6ed5ec749fe4e6287e942d932b18 + pristine_git_object: bc5232a8e5f96e903ba37103af3a98b0a76cea00 + src/shippo/models/operations/getdefaultparceltemplate.py: + id: 1384d50cc91f + last_write_checksum: sha1:53f83581514c17f0a09117de66044d5d51508dac + pristine_git_object: ba69dd9aa233e18c88be7f49a014ed65a1b91596 + src/shippo/models/operations/getmanifest.py: + id: 4eb9bb002d11 + last_write_checksum: sha1:032ae6d2f48850b05f9766d316bd0f65b18f2ba8 + pristine_git_object: 196ed14b9778989ea2e5497f18cc16f3268b59c4 + src/shippo/models/operations/getorder.py: + id: af2324f1b1fb + last_write_checksum: sha1:e7124b950014f3f84cfdfec8b5c35f19ca9fca23 + pristine_git_object: 68875a17c7c898afa2e1be72b348452c0c73b678 + src/shippo/models/operations/getparcel.py: + id: 7c9ee34d40c6 + last_write_checksum: sha1:330f9b949f8cc0a0a032d65edf865281adb8d072 + pristine_git_object: a76038ce2cc25f83d5a6a5bb6453f33f254010e1 + src/shippo/models/operations/getrate.py: + id: 54faa5bfb13e + last_write_checksum: sha1:15af6a9f85e5aa43980383577080c7a7d02aef42 + pristine_git_object: 5ad713d7e31e56c75228a3dadac489f2a97590f8 + src/shippo/models/operations/getrefund.py: + id: a567cb2da588 + last_write_checksum: sha1:159c06a2978b2dabb6912ea0b86c769e8ed35762 + pristine_git_object: 6ee226f544cf51b8c4977c1c706c8a2163145d02 + src/shippo/models/operations/getshipment.py: + id: 0a1cf8da5cbf + last_write_checksum: sha1:8b22d94e1f4fdc98a88e8cff6804328cee69bbd8 + pristine_git_object: 638ba7a3762646d205e4ac8df7820acd726955ee + src/shippo/models/operations/getshippoaccount.py: + id: 121965f7ec36 + last_write_checksum: sha1:ba74fe31d1292731a89f7bcbc838a4604f3d9dae + pristine_git_object: de58306f46280059382982a89fa2a264b7741053 + src/shippo/models/operations/gettrack.py: + id: 7e08bcbbf6e4 + last_write_checksum: sha1:6faf6d9b12e9a9c7bbd58b6cee20166c781632bb + pristine_git_object: 54126eb996650155026316025353c7fcdd6d40ab + src/shippo/models/operations/gettransaction.py: + id: a46aebc8e1f2 + last_write_checksum: sha1:ce0efb920e534dc0ce39350a2a322277ebd0d93f + pristine_git_object: 0def76dc93cfeb759572fc3833b030471f060f67 + src/shippo/models/operations/getuserparceltemplate.py: + id: 578f5e903dd5 + last_write_checksum: sha1:0d518b0825808fb96035455a0874e9c605d399e2 + pristine_git_object: fa6a1f95e7d568ce8b787d2fba350dcf87d397ec + src/shippo/models/operations/getwebhook.py: + id: b557ac56567c + last_write_checksum: sha1:20d994f15146a0bcc808b2d52f83b1dc3ed82f3a + pristine_git_object: a896f4e8132b6f50e07fd1f1655ab7c5cb6e0c11 + src/shippo/models/operations/initiateoauth2signin.py: + id: dd6daaaad438 + last_write_checksum: sha1:0cc6f2be8ef417ebf0a9942bef2c6eb180457753 + pristine_git_object: 08b118ebdc6a38e170b6b78b84e85aa6d8e1f880 + src/shippo/models/operations/listaddresses.py: + id: 897f49002c16 + last_write_checksum: sha1:e158935607183ca813343c83196c41eb433f66c0 + pristine_git_object: f7c169bd873c59957e6723a83e9947ff4b8308a7 + src/shippo/models/operations/listcarrieraccounts.py: + id: bf9fc632cf8c + last_write_checksum: sha1:fb3ec676e950109114ad2fb5e6b81851d891745f + pristine_git_object: f7c3eed8c51b3c763195d91c8dc618c7e001052b + src/shippo/models/operations/listcarrierparceltemplates.py: + id: f3ff1a74b9c6 + last_write_checksum: sha1:438fff3925c3bf9e62ccc759af3ffadac1128cb9 + pristine_git_object: 631e39cd3195a5f254cacd907d41189a84a1e3c8 + src/shippo/models/operations/listcustomsdeclarations.py: + id: e64c00c67ddf + last_write_checksum: sha1:7ba7c082bf88a8d63a06271ca0eb05c81ae6d6fb + pristine_git_object: 8916ece4683060ec09579318d3976e79bc5e1520 + src/shippo/models/operations/listcustomsitems.py: + id: 3cad18eaf3fd + last_write_checksum: sha1:5904a0cf033441e3cc5121cd9fe11fac4baca2ad + pristine_git_object: 328cff282e6b93fba714ac68cfc6e015e29d8e80 + src/shippo/models/operations/listmanifests.py: + id: b1979f2e8064 + last_write_checksum: sha1:646e3d254843cf0b1db79d0568b2ece6aaa979fc + pristine_git_object: 1d52ea9d7e14e12f17ac93a2edbdc0612042460d + src/shippo/models/operations/listorders.py: + id: 19de2ede8470 + last_write_checksum: sha1:0b5dc5b7deb379790fb3d968df0bfff5256f3cb6 + pristine_git_object: a571032a48c1ef88295c144501d1653034c72598 + src/shippo/models/operations/listparcels.py: + id: ec9c8f60b082 + last_write_checksum: sha1:a03723b573d46ebd7da63318ac6a68a4e1932239 + pristine_git_object: 32b0878ddaaf8493ceef05ce4572b7287ef4acfc + src/shippo/models/operations/listrefunds.py: + id: 75e68e8788e0 + last_write_checksum: sha1:6e075f516205b060293d8e85089b5b6f074aa3d8 + pristine_git_object: e00e7db1639118e659c64717ab00514888ca5908 + src/shippo/models/operations/listservicegroups.py: + id: 9444a89a3682 + last_write_checksum: sha1:b875f604ed1410d727d804cb4a68bb85c46bdaaa + pristine_git_object: 32e2bd6175978cc594ad9730dc6596cb0c264bfc + src/shippo/models/operations/listshipmentrates.py: + id: d8836dd78e68 + last_write_checksum: sha1:b733fd1da2097a98ea4713ca2c35d88a35003245 + pristine_git_object: 9023fc6f0c45924d221346b1100a8dc087c3857d + src/shippo/models/operations/listshipmentratesbycurrencycode.py: + id: 00bf4b424487 + last_write_checksum: sha1:e37159368a20ad44d3a0aaffe8dc80f2cdb6dede + pristine_git_object: 5f80a3b96f4d842cc82acd044955a167e753f2ec + src/shippo/models/operations/listshipments.py: + id: f057a72b5fdc + last_write_checksum: sha1:14e5e5a51994bf20acd6af5052a6b768740143b6 + pristine_git_object: b01b05dc361444b3451d3b1dcbe1385af3bda69b + src/shippo/models/operations/listshippoaccounts.py: + id: d5d3bcd0e1af + last_write_checksum: sha1:15a446277762f98ed90a8b3e31ece844ae3b3c09 + pristine_git_object: 8f39bf1bd4e8c57deddeb0a6d01c32ee2f4a1282 + src/shippo/models/operations/listtransactions.py: + id: d56d78e02cd0 + last_write_checksum: sha1:c3e25a29493205fa45832b3a0a039874e77863f1 + pristine_git_object: 767293e41b10638bd5171116f7bd6b1fb12e914a + src/shippo/models/operations/listuserparceltemplates.py: + id: f25db7b5f2ed + last_write_checksum: sha1:5251ff7fc11e270ad5272f6bea180d984a8b9bb6 + pristine_git_object: b9ba3b08ced90de9039feab20da7f2d2249fa8d5 + src/shippo/models/operations/purchasebatch.py: + id: 3a526a576b89 + last_write_checksum: sha1:485a81f0aa97a1d3e6267d2f0caa800eb052decc + pristine_git_object: b1cc2f09614cc796385b169af3f33b3e47dfa3b6 + src/shippo/models/operations/registercarrieraccount.py: + id: 3490e96d802c + last_write_checksum: sha1:042a278bf9a9a6342988483b73a20ea9d0d07a10 + pristine_git_object: c1c0bb218e0eb7ec0f2cf9624338f27b345c0c06 + src/shippo/models/operations/removeshipmentsfrombatch.py: + id: 639e45ac1f9d + last_write_checksum: sha1:a1fff5f33ff75a79a1b92b4b4dc800564b6581b1 + pristine_git_object: d381e79877f945d80c6307e3ea2d1f94e0e8b1ae + src/shippo/models/operations/updatecarrieraccount.py: + id: 62d4092741b5 + last_write_checksum: sha1:bbade4b5285a22ca8b4db3c81dfa21573123063b + pristine_git_object: 79276ced182eeee6383acbbbbb40f66548669649 + src/shippo/models/operations/updatedefaultparceltemplate.py: + id: c61c9140cbe6 + last_write_checksum: sha1:0b4207a581b53a4761a07a4f93aa9d2cd44c03cb + pristine_git_object: 81c87b83239bbdc8d9fd9859381f577a2b1a1561 + src/shippo/models/operations/updateservicegroup.py: + id: 6fa7ea4a0ed5 + last_write_checksum: sha1:d3748f7d0729d6f13a9663a45b5b5ad85cb793d9 + pristine_git_object: 68aef9a4a51da12c1cdc224182fbf5cd12e7c390 + src/shippo/models/operations/updateshippoaccount.py: + id: b5add4597164 + last_write_checksum: sha1:e472df0ab2747c0846b2321ddb4223085da6819a + pristine_git_object: c383a0b4bc3703a079d689b37dda38aed3884ac7 + src/shippo/models/operations/updateuserparceltemplate.py: + id: 3ccbaaeda2db + last_write_checksum: sha1:e23893f267331206ef94d69c329d20a6cf29ad39 + pristine_git_object: 1f586dc2627dc841a892982128e61fe2b6fa264a + src/shippo/models/operations/updatewebhook.py: + id: 6d3e4bd8fe84 + last_write_checksum: sha1:47e789b60fb457bad17d279e0932011359c9865b + pristine_git_object: 0891ece7e638bec66e2a6cfb2ee1a8ae821a6f96 + src/shippo/models/operations/validateaddress.py: + id: ba3da0c84cb5 + last_write_checksum: sha1:c9e984325daa2c90b2653e550f4757e7b0164947 + pristine_git_object: 3b289d5f06f43b0dbd096c356b513ecc05c43300 + src/shippo/orders.py: + id: f2ab72083240 + last_write_checksum: sha1:f12f5bdae497345adc5e29cba7bfd6ecfd9e38be + pristine_git_object: 0b87fb159e5bbe0bf8f195bbb3e17a454ebcbb24 + src/shippo/parcels.py: + id: 1cb4abf4fad9 + last_write_checksum: sha1:25b4ec167bc76a78098f27c1d3687746695dc1d0 + pristine_git_object: 460eea3cb49469cc2bb3e71135125d04a02ab6c8 + src/shippo/pickups.py: + id: f744d32c3ade + last_write_checksum: sha1:a82faf791468d30eb6d05e5f4edcbb4f46fe6a1c + pristine_git_object: d77cc55e4203a50e14cf6ca1873a3803e1969000 + src/shippo/py.typed: + id: 08ca44096098 + last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 + pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/shippo/rates.py: + id: 3d3fb1523994 + last_write_checksum: sha1:8ae445c3556b8be5ce2683f1cb276d1515e99ec9 + pristine_git_object: ced912e35a381b2cf5574b089dc0d042e0d007eb + src/shippo/rates_at_checkout.py: + id: 48bc9370b669 + last_write_checksum: sha1:b922bd2c1198ce78cd8ce2fe9926f7ec3a639033 + pristine_git_object: 0b33eb27fc88237d040bc2f042258a163bcbf14a + src/shippo/refunds.py: + id: 3deb6bfd9b83 + last_write_checksum: sha1:e498ae6796d7e28d28cdd9bffbd75df031eefb69 + pristine_git_object: a0496ae1cef2f1505efa0fa1e06b46d16d2b1f41 + src/shippo/sdk.py: + id: 5c4bf69e3b5d + last_write_checksum: sha1:6162b02db13438315efd57cf99adb3909ceaa87e + pristine_git_object: 32c342c676701daad9a18ee7c3ae14f69403c52b + src/shippo/sdkconfiguration.py: + id: cf3823ec37ed + last_write_checksum: sha1:6ce8cd49981cf5091015e7fd186d806d19caa0fc + pristine_git_object: a8bca3489822d0aad951c57aedb9f29e0c98fef4 + src/shippo/service_groups.py: + id: 0a250a93b61b + last_write_checksum: sha1:a0518cfe8e610b8fde4d231297798fabe8d36d12 + pristine_git_object: 3a46cc7df41eb16c7c1c49e4f38872a897d19a2b + src/shippo/shipments.py: + id: 0f702fe06118 + last_write_checksum: sha1:6c66f7ac37f1bec03a38fdb11bef17326aafa584 + pristine_git_object: f1f3a7e6686eae46990b96a943db5f86c7cd04c1 + src/shippo/shippo_accounts.py: + id: 898f9b1fb28c + last_write_checksum: sha1:8fc48b376854469704b8c52b7ce6bd9347db832b + pristine_git_object: b91f96180b16a06fae6bde0c9a58cb108b872210 + src/shippo/tracking_status.py: + id: a7f5706669f9 + last_write_checksum: sha1:0a5544374a87c3e694c069ee75c8a0fc4769d810 + pristine_git_object: d1f05001911809330762e363b9251dd3353c82d4 + src/shippo/transactions.py: + id: 772f5e30ab7c + last_write_checksum: sha1:4e5e1e73624d34a76bda24a82a5d0a43e06449ac + pristine_git_object: 0d6ebf1c7045e06802c3e27671749cd4c5caab05 + src/shippo/types/__init__.py: + id: 8703fe533b07 + last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed + pristine_git_object: fc76fe0c5505e29859b5d2bb707d48fd27661b8c + src/shippo/types/basemodel.py: + id: 5c67db658da0 + last_write_checksum: sha1:10d84aedeb9d35edfdadf2c3020caa1d24d8b584 + pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee + src/shippo/user_parcel_templates.py: + id: 8008b384080a + last_write_checksum: sha1:3ba582530b9c2c595839eaa8eb98f6665fd6238a + pristine_git_object: 9417c130b34917a5e0275f001e9b48d9be73a80e + src/shippo/utils/__init__.py: + id: 93a2b103d18b + last_write_checksum: sha1:1970816f2234ecb8785798240b0edced961de971 + pristine_git_object: 0498cb8dabf249b39609f81fb10cddc30f1b78b5 + src/shippo/utils/annotations.py: + id: a86ca92e47f8 + last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc + pristine_git_object: 12e0aa4f1151bb52474cc02e88397329b90703f6 + src/shippo/utils/datetimes.py: + id: dd409d211532 + last_write_checksum: sha1:c721e4123000e7dc61ec52b28a739439d9e17341 + pristine_git_object: a6c52cd61bbe2d459046c940ce5e8c469f2f0664 + src/shippo/utils/dynamic_imports.py: + id: 273b3b4dd93f + last_write_checksum: sha1:a1940c63feb8eddfd8026de53384baf5056d5dcc + pristine_git_object: 673edf82a97d0fea7295625d3e092ea369a36b79 + src/shippo/utils/enums.py: + id: be6dac4d263a + last_write_checksum: sha1:bc8c3c1285ae09ba8a094ee5c3d9c7f41fa1284d + pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 + src/shippo/utils/eventstreaming.py: + id: ac99137cb1a1 + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 + src/shippo/utils/forms.py: + id: d94fa8f9990d + last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 + pristine_git_object: f961e76beaf0a8b1fe0dda44754a74eebd3608e7 + src/shippo/utils/headers.py: + id: 7538331ffd0a + last_write_checksum: sha1:7c6df233ee006332b566a8afa9ce9a245941d935 + pristine_git_object: 37864cbbbc40d1a47112bbfdd3ba79568fc8818a + src/shippo/utils/logger.py: + id: 54bee764e58a + last_write_checksum: sha1:f3fdb154a3f09b8cc43d74c7e9c02f899f8086e4 + pristine_git_object: b661aff65d38b77d035149699aea09b2785d2fc6 + src/shippo/utils/metadata.py: + id: 3956fb505342 + last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 + pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + src/shippo/utils/queryparams.py: + id: d29319c2e567 + last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 + pristine_git_object: c04e0db82b68eca041f2cb2614d748fbac80fd41 + src/shippo/utils/requestbodies.py: + id: b4c10e9f9387 + last_write_checksum: sha1:41e2d2d2d3ecc394c8122ca4d4b85e1c3e03f054 + pristine_git_object: 1de32b6d26f46590232f398fdba6ce0072f1659c + src/shippo/utils/retries.py: + id: 5cc3885f175d + last_write_checksum: sha1:471372f5c5d1dd5583239c9cf3c75f1b636e5d87 + pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e + src/shippo/utils/security.py: + id: e353887864d1 + last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 + pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed + src/shippo/utils/serializers.py: + id: f5c7a31e254f + last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 + pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 + src/shippo/utils/unmarshal_json_response.py: + id: 55d93d5db8c1 + last_write_checksum: sha1:e799c86140002e69c7262547d515175869d46b63 + pristine_git_object: b1891105bc52e2c46a3eb87cca5dd654cf02f1b0 + src/shippo/utils/url.py: + id: fa7e11adff58 + last_write_checksum: sha1:6479961baa90432ca25626f8e40a7bbc32e73b41 + pristine_git_object: c78ccbae426ce6d385709d97ce0b1c2813ea2418 + src/shippo/utils/values.py: + id: c6ff1a50bf8f + last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553 + pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 + src/shippo/webhooks.py: + id: ad20fbf5685a + last_write_checksum: sha1:55f4b2b4037f28c482ee306c30259dfe6d2e2550 + pristine_git_object: 7d3d797e13ab3735af94219f470be8625ad46a9c examples: - batch: - speakeasy-default-batch: - requestBody: - application/json: {} - track: - speakeasy-default-track: - requestBody: - application/json: {"data": {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": [""], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [{"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-07-24T17:47:12.180Z", "object_id": "", "object_updated": "2024-02-21T22:35:19.645Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2025-05-20T11:37:56.914Z", "object_id": "", "object_updated": "2024-06-06T16:48:30.895Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}}} - transaction: - speakeasy-default-transaction: - requestBody: - application/json: {"data": {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "provider": "USPS", "carrier_account": "078870331023437cb917f5187429b093", "servicelevel_name": "Priority Mail", "servicelevel_token": "fedex_ground"}, "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}} ListAddresses: speakeasy-default-list-addresses: parameters: @@ -790,7 +3030,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}]} CreateAddress: speakeasy-default-create-address: parameters: @@ -800,7 +3040,7 @@ examples: application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true} responses: "201": - application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} + application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} GetAddress: speakeasy-default-get-address: parameters: @@ -810,7 +3050,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} + application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} ValidateAddress: speakeasy-default-validate-address: parameters: @@ -820,17 +3060,17 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} + application/json: {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false} CreateBatch: speakeasy-default-create-batch: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": [{"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}, {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}, {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}]}}]} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": []} responses: "201": - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://sleepy-vein.info", "https://agile-defendant.biz/", "https://glorious-convection.com/"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://white-glider.info", "https://near-abacus.org", "https://square-comestible.name/"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} GetBatch: speakeasy-default-get-batch: parameters: @@ -843,7 +3083,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://misguided-violin.info", "https://fatal-custom.org/"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://upright-gloom.net", "https://muddy-finger.net"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} AddShipmentsToBatch: speakeasy-default-add-shipments-to-batch: parameters: @@ -852,10 +3092,10 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", "", {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "USPS_SmallFlatRateEnvelope"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": [{"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "DPD_UK_Express_Pak"}, {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "template": "DHLeC_Irregular"}]}}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": "d799c2679e644279b59fe661ac8fa488", "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": []}}] + application/json: [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "shipment": {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": "d799c2679e644279b59fe661ac8fa488", "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": [""]}}] responses: "200": - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://sad-submitter.com", "https://gracious-perp.net", "https://far-off-integer.org"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": [], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} PurchaseBatch: speakeasy-default-purchase-batch: parameters: @@ -865,7 +3105,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "202": - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": [], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://hungry-precedent.info", "https://lavish-verve.name", "https://splendid-challenge.info/"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} RemoveShipmentsFromBatch: speakeasy-default-remove-shipments-from-batch: parameters: @@ -874,10 +3114,10 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: ["", "", ""] + application/json: [""] responses: "200": - application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}, {"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": [], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} + application/json: {"default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", "label_filetype": "PDF_4x6", "metadata": "BATCH #1", "batch_shipments": {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3", "metadata": "SHIPMENT #1", "servicelevel_token": "fedex_ground", "object_id": "e11c95a6788d4ddcaa22f03175838740", "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "status": "INVALID", "transaction": "4c33736a67e2450da88b38c42deef6b7"}]}, "label_url": ["https://vast-baritone.net/", "https://unique-slide.org/", "https://unlucky-reach.biz"], "object_created": "2016-01-04T00:15:44.394Z", "object_id": "5ef63c54f5bf45d3b1f8fb37dcb1c5f4", "object_owner": "shippo@shippo.com", "object_results": {"creation_failed": 3, "creation_succeeded": 5, "purchase_failed": 0, "purchase_succeeded": 0}, "object_updated": "2016-01-04T00:48:13.841Z", "status": "VALID", "test": false} ListCarrierAccounts: speakeasy-default-list-carrier-accounts: parameters: @@ -888,17 +3128,17 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Marie", "last_name": "Fay", "phone_number": "1-760-700-6560", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false}, {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Jeanette", "last_name": "Waters", "phone_number": "(940) 480-8491 x0814", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false}, {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Jayde", "last_name": "Ledner", "phone_number": "(583) 511-9069 x90658", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Vivienne", "last_name": "Harvey", "phone_number": "718.551.9097 x17758", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "INVOICE", "verification_invoice_amount": "340", "verification_invoice_date": "2024-03-09", "verification_invoice_currency": "USD"}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false}]} CreateCarrierAccount: speakeasy-default-create-carrier-account: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"account_id": "321123", "carrier": "fedex", "metadata": "FEDEX Account", "parameters": {"first_name": "Loyal", "last_name": "Collier", "phone_number": "(890) 307-8579", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "test": false} + application/json: {"account_id": "321123", "carrier": "fedex", "metadata": "FEDEX Account", "parameters": {"first_name": "Abdullah", "last_name": "Ward", "phone_number": "915-577-4415 x207", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "INVOICE", "verification_invoice_amount": "340", "verification_invoice_date": "2024-03-09", "verification_invoice_currency": "USD"}, "test": false} responses: "201": - application/json: {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Destiny", "last_name": "Fay", "phone_number": "231.216.3066", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} + application/json: {"account_id": "****", "carrier": "usps", "parameters": {}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} GetCarrierAccount: speakeasy-default-get-carrier-account: parameters: @@ -908,7 +3148,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"account_id": "****", "carrier": "usps", "parameters": {"account_number": "94567e", "aia_country_iso2": "US", "billing_address_city": "San Francisco", "billing_address_country_iso2": "US", "billing_address_state": "CA", "billing_address_street1": "731 Market St", "billing_address_street2": "STE 200", "billing_address_zip": "94103", "collec_country_iso2": "US", "collec_zip": "94103", "company": "Shippo", "currency_code": "USD", "email": "hippo@shippo.com", "full_name": "Shippo Meister", "has_invoice": false, "invoice_controlid": "1234", "invoice_date": "20210529", "invoice_number": "1112234", "invoice_value": "11.23", "phone": "1112223333", "title": "Manager", "ups_agreements": false}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} + application/json: {"account_id": "****", "carrier": "usps", "parameters": {}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} UpdateCarrierAccount: speakeasy-default-update-carrier-account: parameters: @@ -917,17 +3157,17 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"account_id": "****", "carrier": "usps", "parameters": {"account_number": "94567e", "aia_country_iso2": "US", "billing_address_city": "San Francisco", "billing_address_country_iso2": "US", "billing_address_state": "CA", "billing_address_street1": "731 Market St", "billing_address_street2": "STE 200", "billing_address_zip": "94103", "collec_country_iso2": "US", "collec_zip": "94103", "company": "Shippo", "currency_code": "USD", "email": "hippo@shippo.com", "full_name": "Shippo Meister", "has_invoice": false, "invoice_controlid": "1234", "invoice_date": "20210529", "invoice_number": "1112234", "invoice_value": "11.23", "phone": "1112223333", "title": "Manager", "ups_agreements": true}} + application/json: {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Eldora", "last_name": "Weber", "phone_number": "1-505-428-6798", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "CALL", "verification_invoice_amount": "340", "verification_invoice_date": "2024-03-09", "verification_invoice_currency": "USD"}} responses: "200": - application/json: {"account_id": "****", "carrier": "usps", "parameters": {"account_number": "94567e", "aia_country_iso2": "US", "billing_address_city": "San Francisco", "billing_address_country_iso2": "US", "billing_address_state": "CA", "billing_address_street1": "731 Market St", "billing_address_street2": "STE 200", "billing_address_zip": "94103", "collec_country_iso2": "US", "collec_zip": "94103", "company": "Shippo", "currency_code": "USD", "email": "hippo@shippo.com", "full_name": "Shippo Meister", "has_invoice": false, "invoice_controlid": "1234", "invoice_date": "20210529", "invoice_number": "1112234", "invoice_value": "11.23", "phone": "1112223333", "title": "Manager", "ups_agreements": true}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} + application/json: {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Eldora", "last_name": "Weber", "phone_number": "1-505-428-6798", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "CALL", "verification_invoice_amount": "340", "verification_invoice_date": "2024-03-09", "verification_invoice_currency": "USD"}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} InitiateOauth2Signin: speakeasy-default-initiate-oauth2-signin: parameters: path: CarrierAccountObjectId: "" query: - redirect_uri: "https://enlightened-mortise.com/" + redirect_uri: "https://ashamed-reporter.biz" header: SHIPPO-API-VERSION: "2018-02-08" responses: @@ -943,15 +3183,15 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"parameters": {}} + application/json: {"carrier": "deutsche_post", "parameters": {}} responses: "201": - application/json: {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Marlene", "last_name": "Kilback", "phone_number": "(569) 519-5316", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": ""}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}, {"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} + application/json: {"account_id": "****", "carrier": "usps", "parameters": {"first_name": "Laverna", "last_name": "Lebsack", "phone_number": "1-873-422-6031", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "EMAIL", "verification_invoice_amount": "340", "verification_invoice_date": "2024-03-09", "verification_invoice_currency": "USD"}, "carrier_name": "USPS", "is_shippo_account": false, "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob+22@gmail.com", "service_levels": [{"name": "Priority Mail Express", "token": "usps_priority_express", "supports_return_labels": true}], "test": false} GetCarrierRegistrationStatus: speakeasy-default-get-carrier-registration-status: parameters: query: - carrier: "usps" + carrier: "ups" header: SHIPPO-API-VERSION: "2018-02-08" responses: @@ -967,14 +3207,14 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}]} CreateCustomsDeclaration: speakeasy-default-create-customs-declaration: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD"}], "non_delivery_option": "RETURN", "test": true} + application/json: {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [], "non_delivery_option": "RETURN", "test": true} responses: "201": application/json: {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true} @@ -1000,7 +3240,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD", "object_created": "2014-07-17T00:49:20.631Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T00:49:20.631Z"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD", "object_created": "2014-07-17T00:49:20.631Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T00:49:20.631Z"}, {"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD", "object_created": "2014-07-17T00:49:20.631Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T00:49:20.631Z"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"description": "T-Shirt", "mass_unit": "lb", "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, "sku_code": "HM-123", "hs_code": "0901.21", "value_amount": "200", "value_currency": "USD", "object_created": "2014-07-17T00:49:20.631Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T00:49:20.631Z"}]} CreateCustomsItem: speakeasy-default-create-customs-item: parameters: @@ -1029,7 +3269,7 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"address_from": "", "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "parcel": "5df144dca289442cv7a06"} + application/json: {"address_from": "", "address_to": "", "line_items": [], "parcel": "5df144dca289442cv7a06"} responses: "200": application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "count": 123, "results": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "estimated_days": 2, "title": "Shipping Option 1"}]} @@ -1066,17 +3306,17 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2024-08-22T19:26:20.850Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2025-01-13T10:26:00.433Z", "status": "SUCCESS"}, {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2023-07-14T18:23:27.528Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2023-09-09T18:28:08.953Z", "status": "SUCCESS"}, {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2023-06-17T12:14:27.999Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2024-11-27T13:02:27.296Z", "status": "SUCCESS"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2024-06-08T13:55:26.540Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2024-10-26T03:00:59.383Z", "status": "SUCCESS"}]} CreateManifest: speakeasy-default-create-manifest: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}} + application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": ""} responses: "201": - application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2024-11-30T17:06:07.804Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2024-04-02T12:48:32.253Z", "status": "SUCCESS"} + application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2024-01-01T15:06:37.067Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2026-05-28T08:05:13.707Z", "status": "SUCCESS"} GetManifest: speakeasy-default-get-manifest: parameters: @@ -1086,7 +3326,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2025-02-06T13:54:48.821Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2024-09-04T11:33:52.011Z", "status": "SUCCESS"} + application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "address_from": "d799c2679e644279b59fe661ac8fa488", "documents": ["https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"], "object_created": "2024-08-18T07:10:36.776Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_updated": "2025-08-19T02:52:11.196Z", "status": "SUCCESS"} ListOrders: speakeasy-default-list-orders: parameters: @@ -1099,17 +3339,17 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"}, {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}, {"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"}, {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}, {"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}, {"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"}]} CreateOrder: speakeasy-default-create-order: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb"}, {"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb"}]} + application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb"}]} responses: "201": - application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"} + application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"} GetOrder: speakeasy-default-get-order: parameters: @@ -1119,9 +3359,9 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}, {"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"} + application/json: {"currency": "USD", "notes": "This customer is a VIP", "order_number": "#1068", "order_status": "PAID", "placed_at": "2016-09-23T01:28:12Z", "shipping_cost": "12.83", "shipping_cost_currency": "USD", "shipping_method": "USPS First Class Package", "subtotal_price": "12.1", "total_price": "24.93", "total_tax": "0.0", "weight": "0.4", "weight_unit": "lb", "from_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "to_address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "line_items": [{"currency": "USD", "manufacture_country": "US", "max_delivery_time": "2016-07-23T00:00:00Z", "max_ship_time": "2016-07-23T00:00:00Z", "quantity": 20, "sku": "HM-123", "title": "Hippo Magazines", "total_price": "12.1", "variant_title": "June Edition", "weight": "0.4", "weight_unit": "lb", "object_id": "abf7d5675d744b6ea9fdb6f796b28f28"}], "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "shop_app": "Shippo"} ListCarrierParcelTemplates: - "": + speakeasy-default-list-carrier-parcel-templates: parameters: query: carrier: "fedex" @@ -1129,7 +3369,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"results": [{"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}, {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}, {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}]} + application/json: {"results": [{"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}]} GetCarrierParcelTemplate: speakeasy-default-get-carrier-parcel-template: parameters: @@ -1150,7 +3390,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1", "object_created": "2014-07-09T02:19:13.174Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_state": "VALID", "object_updated": "2014-07-09T02:19:13.174Z"}]} CreateParcel: speakeasy-default-create-parcel: parameters: @@ -1177,10 +3417,10 @@ examples: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "location": {"address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "building_location_type": "Front Door", "building_type": "apartment", "instructions": "Behind screen door"}, "requested_end_time": "2024-06-17T07:14:55.338Z", "requested_start_time": "2024-11-30T17:06:07.804Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"]} + application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "location": {"address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "building_location_type": "Front Door", "building_type": "apartment", "instructions": "Behind screen door"}, "requested_end_time": "2025-03-28T03:12:16.314Z", "requested_start_time": "2024-05-20T03:35:43.192Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"]} responses: "201": - application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "location": {"address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "building_location_type": "Front Door", "building_type": "apartment", "instructions": "Behind screen door"}, "requested_end_time": "2024-04-02T12:48:32.253Z", "requested_start_time": "2023-05-28T06:20:22.766Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "confirmed_start_time": "2020-05-09T12:00:00Z", "confirmed_end_time": "2020-05-09T23:59:59.999Z", "cancel_by_time": "2020-05-09T08:00:00Z", "status": "CONFIRMED", "confirmation_code": "WTC310058750", "timezone": "US/Pacific", "messages": []} + application/json: {"carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "location": {"address": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "building_location_type": "Front Door", "building_type": "apartment", "instructions": "Behind screen door"}, "requested_end_time": "2024-07-09T14:59:13.804Z", "requested_start_time": "2024-02-17T02:16:38.954Z", "transactions": ["adcfdddf8ec64b84ad22772bce3ea37a"], "confirmed_start_time": "2020-05-09T12:00:00Z", "confirmed_end_time": "2020-05-09T23:59:59.999Z", "cancel_by_time": "2020-05-09T08:00:00Z", "status": "CONFIRMED", "confirmation_code": "WTC310058750", "timezone": "US/Pacific", "messages": []} GetRate: speakeasy-default-get-rate: parameters: @@ -1190,7 +3430,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": ["CHEAPEST", "CHEAPEST"], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2025-11-29T01:50:48.954Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"} + application/json: {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": ["CHEAPEST"], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-10-06T19:40:47.688Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"} ListShipmentRates: speakeasy-default-list-shipment-rates: parameters: @@ -1203,7 +3443,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": ["FASTEST"], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2023-10-17T00:25:08.850Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": ["FASTEST"], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-12-11T18:16:32.755Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}]} ListShipmentRatesByCurrencyCode: speakeasy-default-list-shipment-rates-by-currency-code: parameters: @@ -1217,7 +3457,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": ["BESTVALUE", "BESTVALUE", "BESTVALUE"], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2023-10-02T15:07:56.573Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": [], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-08-01T00:35:59.670Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}]} CreateRefund: speakeasy-default-create-refund: parameters: @@ -1235,7 +3475,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "status": "SUCCESS", "transaction": "915d94940ea54c3a80cbfa328722f5a1"}, {"object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "status": "SUCCESS", "transaction": "915d94940ea54c3a80cbfa328722f5a1"}, {"object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "status": "SUCCESS", "transaction": "915d94940ea54c3a80cbfa328722f5a1"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "status": "SUCCESS", "transaction": "915d94940ea54c3a80cbfa328722f5a1"}]} GetRefund: speakeasy-default-get-refund: parameters: @@ -1253,27 +3493,27 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: [{"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]}, {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]}, {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": []}] + application/json: [{"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": []}] CreateServiceGroup: speakeasy-default-create-service-group: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} + application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "service_levels": []} responses: "201": - application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} + application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} UpdateServiceGroup: speakeasy-default-update-service-group: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} + application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} responses: "200": - application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}, {"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} + application/json: {"description": "USPS shipping options", "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", "name": "USPS Shipping", "rate_adjustment": 15, "type": "FLAT_RATE", "object_id": "80feb1633d4a43c898f005850", "is_active": true, "service_levels": [{"account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver"}]} DeleteServiceGroup: speakeasy-default-delete-service-group: parameters: @@ -1291,17 +3531,17 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": [], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [], "object_created": "2024-11-27T13:02:27.296Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-12-01T18:25:37.169Z", "parcels": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}], "rates": [], "status": "QUEUED"}, {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": ["", ""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-11-25T18:23:24.264Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2023-01-09T04:26:27.312Z", "parcels": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}], "rates": [], "status": "QUEUED"}, {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": ["", "", ""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2025-08-18T13:00:42.665Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-06-21T03:00:04.393Z", "parcels": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}], "rates": [], "status": "QUEUED"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": [], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2025-06-07T12:26:21.783Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-10-02T01:37:02.726Z", "parcels": [], "rates": [], "status": "QUEUED"}]} CreateShipment: speakeasy-default-create-shipment: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "address_return": "d799c2679e644279b59fe661ac8fa488", "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "validate": true}, "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "Blumenstraße", "street3": "", "street_no": "22", "city": "München", "state": "CA", "zip": "80331", "country": "DE", "phone": "80331", "email": "shippotle@shippo.com", "is_residential": true}, "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": [], "non_delivery_option": "RETURN", "test": true}, "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": ["", {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}, {"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}]} + application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": "d799c2679e644279b59fe661ac8fa488", "address_return": "d799c2679e644279b59fe661ac8fa488", "address_to": "d799c2679e644279b59fe661ac8fa489", "customs_declaration": "adcfdddf8ec64b84ad22772bce3ea37a", "carrier_accounts": ["065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0"], "parcels": [""]} responses: "201": - application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": ["", ""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2025-11-15T07:40:19.243Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-01-27T07:05:06.005Z", "parcels": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}], "rates": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": [], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2023-08-20T15:01:30.899Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}], "status": "QUEUED"} + application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": ["", ""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [], "object_created": "2025-03-28T07:51:30.524Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-02-29T17:21:09.844Z", "parcels": [{"extra": {"COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "insurance": {"amount": "5.5", "content": "Laptop", "currency": "USD", "provider": "UPS"}}, "metadata": "Customer ID 123456", "mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1", "object_created": "2014-07-09T02:19:13.174Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "shippotle@shippo.com", "object_state": "VALID", "object_updated": "2014-07-09T02:19:13.174Z"}], "rates": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": [], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2025-06-06T16:09:41.876Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}], "status": "QUEUED"} GetShipment: speakeasy-default-get-shipment: parameters: @@ -1311,7 +3551,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}, {"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": ["", ""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-05-17T00:32:02.244Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2024-05-09T02:28:23.533Z", "parcels": [{"mass_unit": "lb", "weight": "1", "distance_unit": "in", "height": "1", "length": "1", "width": "1"}], "rates": [{"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "arrives_by": "08:30:00", "attributes": [], "carrier_account": "078870331023437cb917f5187429b093", "duration_terms": "Delivery in 1 to 3 business days", "estimated_days": 2, "included_insurance_price": "1.05", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2024-04-25T04:53:50.189Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "provider": "USPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/USPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/USPS.png", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "shipment": "adcfdddf8ec64b84ad22772bce3ea37a", "zone": "1"}], "status": "QUEUED"} + application/json: {"extra": {"accounts_receivable_customer_account": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "appropriation_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "bill_of_lading_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "COD": {"amount": "5.5", "currency": "USD", "payment_method": "CASH"}, "cod_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "customer_reference": {"ref_sort": 1}, "dealer_order_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "dept_number": {"ref_sort": 3}, "fda_product_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "insurance": {"amount": "5.5", "currency": "USD"}, "invoice_number": {"ref_sort": 2}, "manifest_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "model_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "part_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "po_number": {"ref_sort": 2}, "production_code": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "purchase_request_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "rma_number": {"ref_sort": 1}, "salesperson_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "serial_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "store_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}, "transaction_reference_number": {"prefix": "ABC", "value": "value", "ref_sort": 1}}, "metadata": "Customer ID 123456", "shipment_date": "2021-03-22T12:00:00Z", "address_from": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_return": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "address_to": {"name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", "street3": "", "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": true, "metadata": "Customer ID 123456", "is_complete": true, "object_created": "2014-07-09T02:19:13.174Z", "object_id": "d799c2679e644279b59fe661ac8fa488", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-09T02:19:13.174Z", "validation_results": {"is_valid": false, "messages": [{"code": "Unknown Street", "source": "Shippo Address Validator", "text": "City, State and ZIP Code are valid, but street address is not a match.", "type": "address_warning"}]}, "test": false}, "carrier_accounts": [""], "customs_declaration": {"b13a_filing_option": "FILED_ELECTRONICALLY", "certify": true, "certify_signer": "Shawn Ippotle", "contents_explanation": "T-Shirt purchase", "duties_payor": {"account": "2323434543", "type": "THIRD_PARTY", "address": {"name": "Patrick Kavanagh", "zip": "80331", "country": "DE"}}, "exporter_identification": {"eori_number": "PL123456790ABCDE", "tax_id": {"number": "123456789", "type": "EIN"}}, "invoice": "#123123", "metadata": "Order ID #123123", "address_importer": "257ba08436604d2aaf069caafe7acb2a", "contents_type": "MERCHANDISE", "eel_pfc": "NOEEI_30_37_a", "incoterm": "DDP", "items": ["5087f181d1dc4b14b73fdbf636498886"], "non_delivery_option": "RETURN", "object_created": "2014-07-17T01:01:08.306Z", "object_id": "e2197a54da9d470480f4f8796cc419cb", "object_owner": "shippotle@shippo.com", "object_updated": "2014-07-17T01:01:08.306Z", "test": true}, "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_created": "2026-05-24T14:50:33.573Z", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "object_owner": "pp@gmail.com", "object_updated": "2025-12-19T12:32:02.285Z", "parcels": [], "rates": [], "status": "QUEUED"} CreateTrack: speakeasy-default-create-track: parameters: @@ -1321,7 +3561,7 @@ examples: application/json: {"carrier": "usps", "metadata": "Order 000123", "tracking_number": "9205590164917312751089"} responses: "200": - application/json: {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": [""], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [{"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-04-02T12:48:32.253Z", "object_id": "", "object_updated": "2023-05-28T06:20:22.766Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}, {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2025-05-22T22:27:14.379Z", "object_id": "", "object_updated": "2025-11-08T08:43:39.394Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2023-07-06T00:30:20.403Z", "object_id": "", "object_updated": "2023-04-09T14:25:29.356Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": false}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}} + application/json: {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": ["", "", ""], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [{"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2026-05-21T09:37:59.537Z", "object_id": "", "object_updated": "2024-01-19T01:10:51.013Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2025-11-20T02:51:18.273Z", "object_id": "", "object_updated": "2024-02-18T21:39:54.423Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}} GetTrack: speakeasy-default-get-track: parameters: @@ -1332,7 +3572,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": ["", ""], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [{"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-08-19T11:11:04.610Z", "object_id": "", "object_updated": "2024-07-25T06:33:15.810Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": false}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}, {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-05-17T00:32:02.244Z", "object_id": "", "object_updated": "2024-05-09T02:28:23.533Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2023-08-22T22:47:10.166Z", "object_id": "", "object_updated": "2025-10-24T02:41:21.259Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}} + application/json: {"address_from": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "address_to": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "carrier": "usps", "messages": [], "metadata": "Order 000123", "original_eta": "2021-07-23T00:00:00Z", "servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express", "parent_servicelevel": {"name": "Priority Mail Express", "token": "usps_priority_express"}}, "tracking_history": [], "tracking_number": "9205590164917312751089", "tracking_status": {"location": {"city": "Las Vegas", "country": "US", "state": "NV", "zip": "89101"}, "object_created": "2024-10-20T01:17:17.651Z", "object_id": "", "object_updated": "2025-06-23T22:22:29.066Z", "status": "DELIVERED", "substatus": {"code": "information_received", "text": "Information about the package received.", "action_required": true}, "status_date": "2016-07-23T00:00:00Z", "status_details": "Your shipment has been delivered at the destination mailbox."}} ListTransactions: speakeasy-default-list-transactions: parameters: @@ -1345,7 +3585,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}, {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "provider": "USPS", "carrier_account": "078870331023437cb917f5187429b093", "servicelevel_name": "Priority Mail", "servicelevel_token": "fedex_ground"}, "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}, {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"}]} CreateTransaction: speakeasy-default-create-transaction: parameters: @@ -1355,7 +3595,7 @@ examples: application/json: {"async": false, "label_file_type": "PDF_4x6", "metadata": "Order ID #12345", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "order": "adcfdddf8ec64b84ad22772bce3ea37a"} responses: "201": - application/json: {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": {"amount": "5.5", "amount_local": "5.5", "currency": "USD", "currency_local": "USD", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a", "provider": "USPS", "carrier_account": "078870331023437cb917f5187429b093", "servicelevel_name": "Priority Mail", "servicelevel_token": "fedex_ground"}, "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"} + application/json: {"created_by": null, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"} GetTransaction: speakeasy-default-get-transaction: parameters: @@ -1365,7 +3605,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}, {"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"} + application/json: {"created_by": {"first_name": "Shwan", "last_name": "Ippotle", "username": "shippotle@shippo.com"}, "label_file_type": "PDF_4x6", "label_url": "https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "messages": [{"source": "UPS", "code": "carrier_timeout", "text": "UPS API did not respond. Please try again in a few minutes."}], "object_id": "915d94940ea54c3a80cbfa328722f5a1", "object_owner": "shippotle@shippo.com", "parcel": "e94c7fdfdc7b495dbb390a28d929d90a", "qr_code_url": "https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "rate": "ec9f0d3adc9441449c85d315f0997fd5", "status": "SUCCESS", "tracking_number": "9499907123456123456781", "tracking_status": "DELIVERED", "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781"} ListUserParcelTemplates: speakeasy-default-list-user-parcel-templates: parameters: @@ -1373,14 +3613,14 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"results": [{"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8", "object_created": "2013-12-11T19:38:09.729Z", "object_id": "b958d3690bb04bb8b2986724872750f5", "object_owner": "shippotle@shippo.com", "object_updated": "2013-12-12T19:38:09.729Z", "template": {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}}, {"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8", "object_created": "2013-12-11T19:38:09.729Z", "object_id": "b958d3690bb04bb8b2986724872750f5", "object_owner": "shippotle@shippo.com", "object_updated": "2013-12-12T19:38:09.729Z", "template": {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}}, {"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8", "object_created": "2013-12-11T19:38:09.729Z", "object_id": "b958d3690bb04bb8b2986724872750f5", "object_owner": "shippotle@shippo.com", "object_updated": "2013-12-12T19:38:09.729Z", "template": {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}}]} + application/json: {"results": [{"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8", "object_created": "2013-12-11T19:38:09.729Z", "object_id": "b958d3690bb04bb8b2986724872750f5", "object_owner": "shippotle@shippo.com", "object_updated": "2013-12-12T19:38:09.729Z", "template": {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}}]} CreateUserParcelTemplate: speakeasy-default-create-user-parcel-template: parameters: header: SHIPPO-API-VERSION: "2018-02-08" requestBody: - application/json: {"weight": "12", "weight_unit": "lb"} + application/json: {"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8"} responses: "200": application/json: {"distance_unit": "in", "height": "6", "length": "10", "name": "My Custom Template", "weight": "12", "weight_unit": "lb", "width": "8", "object_created": "2013-12-11T19:38:09.729Z", "object_id": "b958d3690bb04bb8b2986724872750f5", "object_owner": "shippotle@shippo.com", "object_updated": "2013-12-12T19:38:09.729Z", "template": {"carrier": "FedEx", "distance_unit": "in", "height": "1.5", "is_variable_dimensions": false, "length": "12.375", "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "width": "10.875"}} @@ -1423,7 +3663,7 @@ examples: SHIPPO-API-VERSION: "2018-02-08" responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"email": "hippo@shippo.com", "first_name": "Shippo", "last_name": "Meister", "company_name": "Acme", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a"}, {"email": "hippo@shippo.com", "first_name": "Shippo", "last_name": "Meister", "company_name": "Acme", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a"}, {"email": "hippo@shippo.com", "first_name": "Shippo", "last_name": "Meister", "company_name": "Acme", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a"}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"email": "hippo@shippo.com", "first_name": "Shippo", "last_name": "Meister", "company_name": "Acme", "object_id": "adcfdddf8ec64b84ad22772bce3ea37a"}]} CreateShippoAccount: speakeasy-default-create-shippo-account: parameters: @@ -1459,7 +3699,7 @@ examples: createWebhook: speakeasy-default-create-webhook: requestBody: - application/json: {"event": "batch_created", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} + application/json: {"event": "transaction_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} responses: "201": application/json: {"event": "track_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} @@ -1467,7 +3707,7 @@ examples: speakeasy-default-list-webhooks: responses: "200": - application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"event": "track_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false}, {"event": "track_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false}]} + application/json: {"next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [{"event": "track_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false}]} getWebhook: speakeasy-default-get-webhook: parameters: @@ -1482,7 +3722,7 @@ examples: path: webhookId: "" requestBody: - application/json: {"event": "batch_created", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} + application/json: {"event": "all", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} responses: "200": application/json: {"event": "track_updated", "url": "https://example.com/shippo-webhook", "active": true, "is_test": false} @@ -1491,5 +3731,739 @@ examples: parameters: path: webhookId: "" -examplesVersion: 1.0.0 +examplesVersion: 1.0.2 generatedTests: {} +generatedFiles: + - .gitattributes + - .python-version + - .vscode/settings.json + - USAGE.md + - docs/models/components/address.md + - docs/models/components/addresscompletecreaterequest.md + - docs/models/components/addresscreaterequest.md + - docs/models/components/addressimporter.md + - docs/models/components/addresspaginatedlist.md + - docs/models/components/addressreturn.md + - docs/models/components/addressvalidationresults.md + - docs/models/components/addressvalidationresultsmessage.md + - docs/models/components/addressvalidationresultsmessagecodeenum.md + - docs/models/components/addressvalidationresultsmessagesourceenum.md + - docs/models/components/alcohol.md + - docs/models/components/ancillaryendorsement.md + - docs/models/components/attribute.md + - docs/models/components/authentication.md + - docs/models/components/batch.md + - docs/models/components/batchcreaterequest.md + - docs/models/components/batchshipment.md + - docs/models/components/batchshipmentcreaterequest.md + - docs/models/components/batchshipmentpaginatedlist.md + - docs/models/components/batchshipmentstatus.md + - docs/models/components/batchstatus.md + - docs/models/components/billing.md + - docs/models/components/billingtype.md + - docs/models/components/buildinglocationtype.md + - docs/models/components/buildingtype.md + - docs/models/components/carrieraccount.md + - docs/models/components/carrieraccountbase.md + - docs/models/components/carrieraccountbaseparameters.md + - docs/models/components/carrieraccountcanadapostcreateparameters.md + - docs/models/components/carrieraccountcanadapostcreaterequest.md + - docs/models/components/carrieraccountchronopostcreaterequest.md + - docs/models/components/carrieraccountchronopostcreaterequestparameters.md + - docs/models/components/carrieraccountcolissimocreaterequest.md + - docs/models/components/carrieraccountcolissimocreaterequestparameters.md + - docs/models/components/carrieraccountcorreoscreaterequest.md + - docs/models/components/carrieraccountcorreoscreaterequestparameters.md + - docs/models/components/carrieraccountdeutschepostcreaterequest.md + - docs/models/components/carrieraccountdeutschepostcreaterequestparameters.md + - docs/models/components/carrieraccountdhlexpresscreaterequest.md + - docs/models/components/carrieraccountdhlexpresscreaterequestparameters.md + - docs/models/components/carrieraccountdpddecreaterequest.md + - docs/models/components/carrieraccountdpddecreaterequestparameters.md + - docs/models/components/carrieraccountdpdukcreaterequest.md + - docs/models/components/carrieraccountdpdukcreaterequestparameters.md + - docs/models/components/carrieraccountfedexcreaterequest.md + - docs/models/components/carrieraccountfedexcreaterequestparameters.md + - docs/models/components/carrieraccounthermesukcreaterequest.md + - docs/models/components/carrieraccounthermesukcreaterequestparameters.md + - docs/models/components/carrieraccountmondialrelaycreaterequest.md + - docs/models/components/carrieraccountmondialrelaycreaterequestparameters.md + - docs/models/components/carrieraccountpaginatedlist.md + - docs/models/components/carrieraccountparameters.md + - docs/models/components/carrieraccountposteitalianecreaterequest.md + - docs/models/components/carrieraccountposteitalianecreaterequestparameters.md + - docs/models/components/carrieraccountregistrationstatus.md + - docs/models/components/carrieraccountsendlecreaterequest.md + - docs/models/components/carrieraccountsendlecreaterequestparameters.md + - docs/models/components/carrieraccountservicelevel.md + - docs/models/components/carrieraccountupscreaterequest.md + - docs/models/components/carrieraccountupscreaterequestparameters.md + - docs/models/components/carrieraccountuspscreaterequest.md + - docs/models/components/carrieraccountuspscreaterequestparameters.md + - docs/models/components/carrieraccountwithextrainfo.md + - docs/models/components/carrieraccountwithextrainfoparameters.md + - docs/models/components/carrieraccountwithextrainfostatus.md + - docs/models/components/carrieraccountwithextrainfotype.md + - docs/models/components/carrierparceltemplate.md + - docs/models/components/carrierparceltemplatelist.md + - docs/models/components/carriersenum.md + - docs/models/components/cod.md + - docs/models/components/connectexistingownaccountrequest.md + - docs/models/components/connectexistingownaccountrequestparameters.md + - docs/models/components/corerate.md + - docs/models/components/createdby.md + - docs/models/components/customerreference.md + - docs/models/components/customsdeclaration.md + - docs/models/components/customsdeclarationaddress.md + - docs/models/components/customsdeclarationb13afilingoptionenum.md + - docs/models/components/customsdeclarationcontentstypeenum.md + - docs/models/components/customsdeclarationcreaterequest.md + - docs/models/components/customsdeclarationcreaterequestaddress.md + - docs/models/components/customsdeclarationcreaterequestdutiespayor.md + - docs/models/components/customsdeclarationcreaterequesttype.md + - docs/models/components/customsdeclarationdutiespayor.md + - docs/models/components/customsdeclarationeelpfcenum.md + - docs/models/components/customsdeclarationincotermenum.md + - docs/models/components/customsdeclarationnondeliveryoptionenum.md + - docs/models/components/customsdeclarationpaginatedlist.md + - docs/models/components/customsdeclarationtype.md + - docs/models/components/customsdeclarationunion.md + - docs/models/components/customsexporteridentification.md + - docs/models/components/customsinvoicedcharges.md + - docs/models/components/customsitem.md + - docs/models/components/customsitemcreaterequest.md + - docs/models/components/customsitempaginatedlist.md + - docs/models/components/customstaxidentification.md + - docs/models/components/customstaxidentificationtype.md + - docs/models/components/dangerousgoodsbiologicalmaterial.md + - docs/models/components/dangerousgoodscode.md + - docs/models/components/dangerousgoodslithiumbatteries.md + - docs/models/components/dangerousgoodsobject.md + - docs/models/components/defaultparceltemplate.md + - docs/models/components/defaultparceltemplateupdaterequest.md + - docs/models/components/departmentnumber.md + - docs/models/components/distanceunitenum.md + - docs/models/components/dryice.md + - docs/models/components/fedexconnectexistingownaccountparameters.md + - docs/models/components/instanttransactioncreaterequest.md + - docs/models/components/insurance.md + - docs/models/components/insuranceprovider.md + - docs/models/components/invoicenumber.md + - docs/models/components/labelfiletype.md + - docs/models/components/labelfiletypeenum.md + - docs/models/components/latitude.md + - docs/models/components/lineitem.md + - docs/models/components/lineitembase.md + - docs/models/components/liverate.md + - docs/models/components/liveratecreaterequest.md + - docs/models/components/liveratecreaterequestaddressfrom.md + - docs/models/components/liveratecreaterequestaddressto.md + - docs/models/components/liveratecreaterequestparcel.md + - docs/models/components/liveratepaginatedlist.md + - docs/models/components/location.md + - docs/models/components/longitude.md + - docs/models/components/manifest.md + - docs/models/components/manifestcreaterequest.md + - docs/models/components/manifestcreaterequestaddressfrom.md + - docs/models/components/manifestpaginatedlist.md + - docs/models/components/manifeststatus.md + - docs/models/components/objectinfo.md + - docs/models/components/objectresults.md + - docs/models/components/objectstate.md + - docs/models/components/objectstateenum.md + - docs/models/components/order.md + - docs/models/components/ordercreaterequest.md + - docs/models/components/orderpaginatedlist.md + - docs/models/components/ordershopappenum.md + - docs/models/components/orderstatusenum.md + - docs/models/components/ordertransaction.md + - docs/models/components/parcel.md + - docs/models/components/parcelcreatefromtemplaterequest.md + - docs/models/components/parcelcreaterequest.md + - docs/models/components/parcelextra.md + - docs/models/components/parcelinsurance.md + - docs/models/components/parcelinsuranceprovider.md + - docs/models/components/parcelpaginatedlist.md + - docs/models/components/parceltemplatearamexaustraliaenum.md + - docs/models/components/parceltemplatedhlecommerceenum.md + - docs/models/components/parceltemplatedpdukenum.md + - docs/models/components/parceltemplateenumset.md + - docs/models/components/parceltemplatefedexenum.md + - docs/models/components/parceltemplateupsenum.md + - docs/models/components/parceltemplateuspsenum.md + - docs/models/components/paymentmethod.md + - docs/models/components/pickup.md + - docs/models/components/pickupbase.md + - docs/models/components/pickupstatus.md + - docs/models/components/ponumber.md + - docs/models/components/preferreddeliverytimeframe.md + - docs/models/components/rate.md + - docs/models/components/ratepaginatedlist.md + - docs/models/components/rateunion.md + - docs/models/components/recipienttype.md + - docs/models/components/refund.md + - docs/models/components/refundpaginatedlist.md + - docs/models/components/refundrequestbody.md + - docs/models/components/refundstatus.md + - docs/models/components/responsemessage.md + - docs/models/components/returnservicetype.md + - docs/models/components/rmanumber.md + - docs/models/components/security.md + - docs/models/components/servicegroup.md + - docs/models/components/servicegroupaccountandservicelevel.md + - docs/models/components/servicegroupcreaterequest.md + - docs/models/components/servicegrouptypeenum.md + - docs/models/components/servicegroupupdaterequest.md + - docs/models/components/servicelevel.md + - docs/models/components/servicelevelairterraenum.md + - docs/models/components/servicelevelapcpostalenum.md + - docs/models/components/servicelevelapgenum.md + - docs/models/components/servicelevelaramexaustraliaenum.md + - docs/models/components/servicelevelasendiaenum.md + - docs/models/components/servicelevelaustraliapostenum.md + - docs/models/components/servicelevelbettertrucksenum.md + - docs/models/components/servicelevelcanadapostenum.md + - docs/models/components/servicelevelcdlenum.md + - docs/models/components/servicelevelchronopostenum.md + - docs/models/components/servicelevelcolissimoenum.md + - docs/models/components/servicelevelcorreosespanaenum.md + - docs/models/components/serviceleveldeutschepostenum.md + - docs/models/components/serviceleveldhlecommerceenum.md + - docs/models/components/serviceleveldhlexpressenum.md + - docs/models/components/serviceleveldhlgermanyenum.md + - docs/models/components/serviceleveldpddeenum.md + - docs/models/components/serviceleveldpdukenum.md + - docs/models/components/servicelevelenumset.md + - docs/models/components/servicelevelepostglobalenum.md + - docs/models/components/servicelevelevriukenum.md + - docs/models/components/servicelevelfedexenum.md + - docs/models/components/servicelevelglobegisticsenum.md + - docs/models/components/servicelevelglsusenum.md + - docs/models/components/serviceleveljitsuenum.md + - docs/models/components/servicelevellasershipenum.md + - docs/models/components/servicelevellsoenum.md + - docs/models/components/servicelevelmondialrelayenum.md + - docs/models/components/servicelevelontracenum.md + - docs/models/components/servicelevelparcelforceenum.md + - docs/models/components/servicelevelpostitalianeenum.md + - docs/models/components/servicelevelpurolatorenum.md + - docs/models/components/servicelevelroyalmailenum.md + - docs/models/components/servicelevelsendleenum.md + - docs/models/components/servicelevelswyftenum.md + - docs/models/components/serviceleveludsenum.md + - docs/models/components/servicelevelupsenum.md + - docs/models/components/serviceleveluspsenum.md + - docs/models/components/servicelevelvehoenum.md + - docs/models/components/servicelevelwithparent.md + - docs/models/components/shipment.md + - docs/models/components/shipmentcreaterequest.md + - docs/models/components/shipmentcreaterequestaddressfrom.md + - docs/models/components/shipmentcreaterequestaddressto.md + - docs/models/components/shipmentcreaterequestparcel.md + - docs/models/components/shipmentextra.md + - docs/models/components/shipmentextralasershipattributesenum.md + - docs/models/components/shipmentextrareturnservicetypelasershipenum.md + - docs/models/components/shipmentextrareturnservicetypeupsenum.md + - docs/models/components/shipmentpaginatedlist.md + - docs/models/components/shipmentstatus.md + - docs/models/components/shippoaccount.md + - docs/models/components/shippoaccountpaginatedlist.md + - docs/models/components/shippoaccountupdaterequest.md + - docs/models/components/signatureconfirmation.md + - docs/models/components/track.md + - docs/models/components/trackingstatus.md + - docs/models/components/trackingstatusenum.md + - docs/models/components/trackingstatuslocationbase.md + - docs/models/components/trackingstatussubstatus.md + - docs/models/components/tracksrequest.md + - docs/models/components/transaction.md + - docs/models/components/transactioncreaterequest.md + - docs/models/components/transactionpaginatedlist.md + - docs/models/components/transactionstatusenum.md + - docs/models/components/upsconnectexistingownaccountparameters.md + - docs/models/components/upsreferencefields.md + - docs/models/components/userparceltemplate.md + - docs/models/components/userparceltemplatecreaterequest.md + - docs/models/components/userparceltemplatelist.md + - docs/models/components/userparceltemplateupdaterequest.md + - docs/models/components/userparceltemplatewithcarriertemplatecreaterequest.md + - docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md + - docs/models/components/webhook.md + - docs/models/components/webhookeventtypeenum.md + - docs/models/components/webhookpaginatedlist.md + - docs/models/components/webhookpayload.md + - docs/models/components/webhookpayloadbatch.md + - docs/models/components/webhookpayloadtrack.md + - docs/models/components/webhookpayloadtransaction.md + - docs/models/components/webhookupdaterequest.md + - docs/models/components/weightunitenum.md + - docs/models/errors/badrequesterror.md + - docs/models/errors/notfounderror.md + - docs/models/errors/unauthorizederror.md + - docs/models/internal/globals.md + - docs/models/operations/addshipmentstobatchglobals.md + - docs/models/operations/addshipmentstobatchrequest.md + - docs/models/operations/carrier.md + - docs/models/operations/createaddressglobals.md + - docs/models/operations/createbatchglobals.md + - docs/models/operations/createcarrieraccountglobals.md + - docs/models/operations/createcustomsdeclarationglobals.md + - docs/models/operations/createcustomsitemglobals.md + - docs/models/operations/createliverateglobals.md + - docs/models/operations/createmanifestglobals.md + - docs/models/operations/createorderglobals.md + - docs/models/operations/createparcelglobals.md + - docs/models/operations/createparcelrequest.md + - docs/models/operations/createpickupglobals.md + - docs/models/operations/createrefundglobals.md + - docs/models/operations/createservicegroupglobals.md + - docs/models/operations/createshipmentglobals.md + - docs/models/operations/createshippoaccountglobals.md + - docs/models/operations/createtrackglobals.md + - docs/models/operations/createtransactionglobals.md + - docs/models/operations/createtransactionrequest.md + - docs/models/operations/createuserparceltemplateglobals.md + - docs/models/operations/deletedefaultparceltemplateglobals.md + - docs/models/operations/deletedefaultparceltemplaterequest.md + - docs/models/operations/deleteservicegroupglobals.md + - docs/models/operations/deleteservicegrouprequest.md + - docs/models/operations/deleteuserparceltemplateglobals.md + - docs/models/operations/deleteuserparceltemplaterequest.md + - docs/models/operations/deletewebhookrequest.md + - docs/models/operations/getaddressglobals.md + - docs/models/operations/getaddressrequest.md + - docs/models/operations/getbatchglobals.md + - docs/models/operations/getbatchrequest.md + - docs/models/operations/getcarrieraccountglobals.md + - docs/models/operations/getcarrieraccountrequest.md + - docs/models/operations/getcarrierparceltemplateglobals.md + - docs/models/operations/getcarrierparceltemplaterequest.md + - docs/models/operations/getcarrierregistrationstatusglobals.md + - docs/models/operations/getcarrierregistrationstatusrequest.md + - docs/models/operations/getcustomsdeclarationglobals.md + - docs/models/operations/getcustomsdeclarationrequest.md + - docs/models/operations/getcustomsitemglobals.md + - docs/models/operations/getcustomsitemrequest.md + - docs/models/operations/getdefaultparceltemplateglobals.md + - docs/models/operations/getdefaultparceltemplaterequest.md + - docs/models/operations/getmanifestglobals.md + - docs/models/operations/getmanifestrequest.md + - docs/models/operations/getorderglobals.md + - docs/models/operations/getorderrequest.md + - docs/models/operations/getparcelglobals.md + - docs/models/operations/getparcelrequest.md + - docs/models/operations/getrateglobals.md + - docs/models/operations/getraterequest.md + - docs/models/operations/getrefundglobals.md + - docs/models/operations/getrefundrequest.md + - docs/models/operations/getshipmentglobals.md + - docs/models/operations/getshipmentrequest.md + - docs/models/operations/getshippoaccountglobals.md + - docs/models/operations/getshippoaccountrequest.md + - docs/models/operations/gettrackglobals.md + - docs/models/operations/gettrackrequest.md + - docs/models/operations/gettransactionglobals.md + - docs/models/operations/gettransactionrequest.md + - docs/models/operations/getuserparceltemplateglobals.md + - docs/models/operations/getuserparceltemplaterequest.md + - docs/models/operations/getwebhookrequest.md + - docs/models/operations/include.md + - docs/models/operations/initiateoauth2signinglobals.md + - docs/models/operations/initiateoauth2signinrequest.md + - docs/models/operations/initiateoauth2signinresponse.md + - docs/models/operations/listaddressesglobals.md + - docs/models/operations/listaddressesrequest.md + - docs/models/operations/listcarrieraccountsglobals.md + - docs/models/operations/listcarrieraccountsrequest.md + - docs/models/operations/listcarrierparceltemplatesglobals.md + - docs/models/operations/listcarrierparceltemplatesrequest.md + - docs/models/operations/listcustomsdeclarationsglobals.md + - docs/models/operations/listcustomsdeclarationsrequest.md + - docs/models/operations/listcustomsitemsglobals.md + - docs/models/operations/listcustomsitemsrequest.md + - docs/models/operations/listmanifestsglobals.md + - docs/models/operations/listmanifestsrequest.md + - docs/models/operations/listordersglobals.md + - docs/models/operations/listordersrequest.md + - docs/models/operations/listparcelsglobals.md + - docs/models/operations/listparcelsrequest.md + - docs/models/operations/listrefundsglobals.md + - docs/models/operations/listrefundsrequest.md + - docs/models/operations/listservicegroupsglobals.md + - docs/models/operations/listservicegroupsrequest.md + - docs/models/operations/listshipmentratesbycurrencycodeglobals.md + - docs/models/operations/listshipmentratesbycurrencycoderequest.md + - docs/models/operations/listshipmentratesglobals.md + - docs/models/operations/listshipmentratesrequest.md + - docs/models/operations/listshipmentsglobals.md + - docs/models/operations/listshipmentsrequest.md + - docs/models/operations/listshippoaccountsglobals.md + - docs/models/operations/listshippoaccountsrequest.md + - docs/models/operations/listtransactionsglobals.md + - docs/models/operations/listtransactionsrequest.md + - docs/models/operations/listuserparceltemplatesglobals.md + - docs/models/operations/listuserparceltemplatesrequest.md + - docs/models/operations/purchasebatchglobals.md + - docs/models/operations/purchasebatchrequest.md + - docs/models/operations/registercarrieraccountglobals.md + - docs/models/operations/registercarrieraccountrequest.md + - docs/models/operations/removeshipmentsfrombatchglobals.md + - docs/models/operations/removeshipmentsfrombatchrequest.md + - docs/models/operations/updatecarrieraccountglobals.md + - docs/models/operations/updatecarrieraccountrequest.md + - docs/models/operations/updatedefaultparceltemplateglobals.md + - docs/models/operations/updateservicegroupglobals.md + - docs/models/operations/updateshippoaccountglobals.md + - docs/models/operations/updateshippoaccountrequest.md + - docs/models/operations/updateuserparceltemplateglobals.md + - docs/models/operations/updateuserparceltemplaterequest.md + - docs/models/operations/updatewebhookrequest.md + - docs/models/operations/validateaddressglobals.md + - docs/models/operations/validateaddressrequest.md + - docs/models/utils/retryconfig.md + - docs/sdks/addresses/README.md + - docs/sdks/batches/README.md + - docs/sdks/carrieraccounts/README.md + - docs/sdks/carrierparceltemplates/README.md + - docs/sdks/customsdeclarations/README.md + - docs/sdks/customsitems/README.md + - docs/sdks/manifests/README.md + - docs/sdks/orders/README.md + - docs/sdks/parcels/README.md + - docs/sdks/pickups/README.md + - docs/sdks/rates/README.md + - docs/sdks/ratesatcheckout/README.md + - docs/sdks/refunds/README.md + - docs/sdks/servicegroups/README.md + - docs/sdks/shipments/README.md + - docs/sdks/shippo/README.md + - docs/sdks/shippoaccounts/README.md + - docs/sdks/trackingstatus/README.md + - docs/sdks/transactions/README.md + - docs/sdks/userparceltemplates/README.md + - docs/sdks/webhooks/README.md + - poetry.toml + - py.typed + - pylintrc + - pyproject.toml + - scripts/prepare_readme.py + - scripts/publish.sh + - src/shippo/__init__.py + - src/shippo/_hooks/__init__.py + - src/shippo/_hooks/sdkhooks.py + - src/shippo/_hooks/types.py + - src/shippo/_version.py + - src/shippo/addresses.py + - src/shippo/basesdk.py + - src/shippo/batches.py + - src/shippo/carrier_accounts.py + - src/shippo/carrier_parcel_templates.py + - src/shippo/customs_declarations.py + - src/shippo/customs_items.py + - src/shippo/httpclient.py + - src/shippo/manifests.py + - src/shippo/models/__init__.py + - src/shippo/models/components/__init__.py + - src/shippo/models/components/address.py + - src/shippo/models/components/addresscompletecreaterequest.py + - src/shippo/models/components/addresscreaterequest.py + - src/shippo/models/components/addressimporter.py + - src/shippo/models/components/addresspaginatedlist.py + - src/shippo/models/components/addressvalidationresults.py + - src/shippo/models/components/addressvalidationresultsmessage.py + - src/shippo/models/components/addressvalidationresultsmessagecodeenum.py + - src/shippo/models/components/addressvalidationresultsmessagesourceenum.py + - src/shippo/models/components/alcohol.py + - src/shippo/models/components/batch.py + - src/shippo/models/components/batchcreaterequest.py + - src/shippo/models/components/batchshipment.py + - src/shippo/models/components/batchshipmentcreaterequest.py + - src/shippo/models/components/batchshipmentpaginatedlist.py + - src/shippo/models/components/billing.py + - src/shippo/models/components/carrieraccount.py + - src/shippo/models/components/carrieraccountbase.py + - src/shippo/models/components/carrieraccountcanadapostcreateparameters.py + - src/shippo/models/components/carrieraccountcanadapostcreaterequest.py + - src/shippo/models/components/carrieraccountchronopostcreaterequest.py + - src/shippo/models/components/carrieraccountcolissimocreaterequest.py + - src/shippo/models/components/carrieraccountcorreoscreaterequest.py + - src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py + - src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py + - src/shippo/models/components/carrieraccountdhlexpresscreaterequestparameters.py + - src/shippo/models/components/carrieraccountdpddecreaterequest.py + - src/shippo/models/components/carrieraccountdpdukcreaterequest.py + - src/shippo/models/components/carrieraccountfedexcreaterequest.py + - src/shippo/models/components/carrieraccounthermesukcreaterequest.py + - src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py + - src/shippo/models/components/carrieraccountpaginatedlist.py + - src/shippo/models/components/carrieraccountposteitalianecreaterequest.py + - src/shippo/models/components/carrieraccountregistrationstatus.py + - src/shippo/models/components/carrieraccountsendlecreaterequest.py + - src/shippo/models/components/carrieraccountservicelevel.py + - src/shippo/models/components/carrieraccountupscreaterequest.py + - src/shippo/models/components/carrieraccountupscreaterequestparameters.py + - src/shippo/models/components/carrieraccountuspscreaterequest.py + - src/shippo/models/components/carrieraccountwithextrainfo.py + - src/shippo/models/components/carrierparceltemplate.py + - src/shippo/models/components/carrierparceltemplatelist.py + - src/shippo/models/components/carriersenum.py + - src/shippo/models/components/cod.py + - src/shippo/models/components/connectexistingownaccountrequest.py + - src/shippo/models/components/corerate.py + - src/shippo/models/components/customerreference.py + - src/shippo/models/components/customsdeclaration.py + - src/shippo/models/components/customsdeclarationb13afilingoptionenum.py + - src/shippo/models/components/customsdeclarationcontentstypeenum.py + - src/shippo/models/components/customsdeclarationcreaterequest.py + - src/shippo/models/components/customsdeclarationeelpfcenum.py + - src/shippo/models/components/customsdeclarationincotermenum.py + - src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py + - src/shippo/models/components/customsdeclarationpaginatedlist.py + - src/shippo/models/components/customsexporteridentification.py + - src/shippo/models/components/customsinvoicedcharges.py + - src/shippo/models/components/customsitem.py + - src/shippo/models/components/customsitemcreaterequest.py + - src/shippo/models/components/customsitempaginatedlist.py + - src/shippo/models/components/customstaxidentification.py + - src/shippo/models/components/dangerousgoodsbiologicalmaterial.py + - src/shippo/models/components/dangerousgoodslithiumbatteries.py + - src/shippo/models/components/dangerousgoodsobject.py + - src/shippo/models/components/defaultparceltemplate.py + - src/shippo/models/components/defaultparceltemplateupdaterequest.py + - src/shippo/models/components/departmentnumber.py + - src/shippo/models/components/distanceunitenum.py + - src/shippo/models/components/dryice.py + - src/shippo/models/components/fedexconnectexistingownaccountparameters.py + - src/shippo/models/components/instanttransactioncreaterequest.py + - src/shippo/models/components/insurance.py + - src/shippo/models/components/invoicenumber.py + - src/shippo/models/components/labelfiletypeenum.py + - src/shippo/models/components/lineitem.py + - src/shippo/models/components/lineitembase.py + - src/shippo/models/components/liverate.py + - src/shippo/models/components/liveratecreaterequest.py + - src/shippo/models/components/liveratepaginatedlist.py + - src/shippo/models/components/location.py + - src/shippo/models/components/manifest.py + - src/shippo/models/components/manifestcreaterequest.py + - src/shippo/models/components/manifestpaginatedlist.py + - src/shippo/models/components/objectstateenum.py + - src/shippo/models/components/order.py + - src/shippo/models/components/ordercreaterequest.py + - src/shippo/models/components/orderpaginatedlist.py + - src/shippo/models/components/ordershopappenum.py + - src/shippo/models/components/orderstatusenum.py + - src/shippo/models/components/parcel.py + - src/shippo/models/components/parcelcreatefromtemplaterequest.py + - src/shippo/models/components/parcelcreaterequest.py + - src/shippo/models/components/parcelextra.py + - src/shippo/models/components/parcelinsurance.py + - src/shippo/models/components/parcelpaginatedlist.py + - src/shippo/models/components/parceltemplatearamexaustraliaenum.py + - src/shippo/models/components/parceltemplatedhlecommerceenum.py + - src/shippo/models/components/parceltemplatedpdukenum.py + - src/shippo/models/components/parceltemplateenumset.py + - src/shippo/models/components/parceltemplatefedexenum.py + - src/shippo/models/components/parceltemplateupsenum.py + - src/shippo/models/components/parceltemplateuspsenum.py + - src/shippo/models/components/pickup.py + - src/shippo/models/components/pickupbase.py + - src/shippo/models/components/ponumber.py + - src/shippo/models/components/rate.py + - src/shippo/models/components/ratepaginatedlist.py + - src/shippo/models/components/refund.py + - src/shippo/models/components/refundpaginatedlist.py + - src/shippo/models/components/refundrequestbody.py + - src/shippo/models/components/responsemessage.py + - src/shippo/models/components/rmanumber.py + - src/shippo/models/components/security.py + - src/shippo/models/components/servicegroup.py + - src/shippo/models/components/servicegroupaccountandservicelevel.py + - src/shippo/models/components/servicegroupcreaterequest.py + - src/shippo/models/components/servicegrouptypeenum.py + - src/shippo/models/components/servicegroupupdaterequest.py + - src/shippo/models/components/servicelevel.py + - src/shippo/models/components/servicelevelairterraenum.py + - src/shippo/models/components/servicelevelapcpostalenum.py + - src/shippo/models/components/servicelevelapgenum.py + - src/shippo/models/components/servicelevelaramexaustraliaenum.py + - src/shippo/models/components/servicelevelasendiaenum.py + - src/shippo/models/components/servicelevelaustraliapostenum.py + - src/shippo/models/components/servicelevelbettertrucksenum.py + - src/shippo/models/components/servicelevelcanadapostenum.py + - src/shippo/models/components/servicelevelcdlenum.py + - src/shippo/models/components/servicelevelchronopostenum.py + - src/shippo/models/components/servicelevelcolissimoenum.py + - src/shippo/models/components/servicelevelcorreosespanaenum.py + - src/shippo/models/components/serviceleveldeutschepostenum.py + - src/shippo/models/components/serviceleveldhlecommerceenum.py + - src/shippo/models/components/serviceleveldhlexpressenum.py + - src/shippo/models/components/serviceleveldhlgermanyenum.py + - src/shippo/models/components/serviceleveldpddeenum.py + - src/shippo/models/components/serviceleveldpdukenum.py + - src/shippo/models/components/servicelevelenumset.py + - src/shippo/models/components/servicelevelepostglobalenum.py + - src/shippo/models/components/servicelevelevriukenum.py + - src/shippo/models/components/servicelevelfedexenum.py + - src/shippo/models/components/servicelevelglobegisticsenum.py + - src/shippo/models/components/servicelevelglsusenum.py + - src/shippo/models/components/serviceleveljitsuenum.py + - src/shippo/models/components/servicelevellasershipenum.py + - src/shippo/models/components/servicelevellsoenum.py + - src/shippo/models/components/servicelevelmondialrelayenum.py + - src/shippo/models/components/servicelevelontracenum.py + - src/shippo/models/components/servicelevelparcelforceenum.py + - src/shippo/models/components/servicelevelpostitalianeenum.py + - src/shippo/models/components/servicelevelpurolatorenum.py + - src/shippo/models/components/servicelevelroyalmailenum.py + - src/shippo/models/components/servicelevelsendleenum.py + - src/shippo/models/components/servicelevelswyftenum.py + - src/shippo/models/components/serviceleveludsenum.py + - src/shippo/models/components/servicelevelupsenum.py + - src/shippo/models/components/serviceleveluspsenum.py + - src/shippo/models/components/servicelevelvehoenum.py + - src/shippo/models/components/servicelevelwithparent.py + - src/shippo/models/components/shipment.py + - src/shippo/models/components/shipmentcreaterequest.py + - src/shippo/models/components/shipmentextra.py + - src/shippo/models/components/shipmentextralasershipattributesenum.py + - src/shippo/models/components/shipmentextrareturnservicetypelasershipenum.py + - src/shippo/models/components/shipmentextrareturnservicetypeupsenum.py + - src/shippo/models/components/shipmentpaginatedlist.py + - src/shippo/models/components/shippoaccount.py + - src/shippo/models/components/shippoaccountpaginatedlist.py + - src/shippo/models/components/shippoaccountupdaterequest.py + - src/shippo/models/components/track.py + - src/shippo/models/components/trackingstatus.py + - src/shippo/models/components/trackingstatusenum.py + - src/shippo/models/components/trackingstatuslocationbase.py + - src/shippo/models/components/trackingstatussubstatus.py + - src/shippo/models/components/tracksrequest.py + - src/shippo/models/components/transaction.py + - src/shippo/models/components/transactioncreaterequest.py + - src/shippo/models/components/transactionpaginatedlist.py + - src/shippo/models/components/transactionstatusenum.py + - src/shippo/models/components/upsconnectexistingownaccountparameters.py + - src/shippo/models/components/upsreferencefields.py + - src/shippo/models/components/userparceltemplate.py + - src/shippo/models/components/userparceltemplatecreaterequest.py + - src/shippo/models/components/userparceltemplatelist.py + - src/shippo/models/components/userparceltemplateupdaterequest.py + - src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py + - src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py + - src/shippo/models/components/webhook.py + - src/shippo/models/components/webhookeventtypeenum.py + - src/shippo/models/components/webhookpaginatedlist.py + - src/shippo/models/components/webhookpayload.py + - src/shippo/models/components/webhookpayloadbatch.py + - src/shippo/models/components/webhookpayloadtrack.py + - src/shippo/models/components/webhookpayloadtransaction.py + - src/shippo/models/components/webhookupdaterequest.py + - src/shippo/models/components/weightunitenum.py + - src/shippo/models/errors/__init__.py + - src/shippo/models/errors/initiateoauth2signin.py + - src/shippo/models/errors/sdkerror.py + - src/shippo/models/internal/__init__.py + - src/shippo/models/internal/globals.py + - src/shippo/models/operations/__init__.py + - src/shippo/models/operations/addshipmentstobatch.py + - src/shippo/models/operations/createaddress.py + - src/shippo/models/operations/createbatch.py + - src/shippo/models/operations/createcarrieraccount.py + - src/shippo/models/operations/createcustomsdeclaration.py + - src/shippo/models/operations/createcustomsitem.py + - src/shippo/models/operations/createliverate.py + - src/shippo/models/operations/createmanifest.py + - src/shippo/models/operations/createorder.py + - src/shippo/models/operations/createparcel.py + - src/shippo/models/operations/createpickup.py + - src/shippo/models/operations/createrefund.py + - src/shippo/models/operations/createservicegroup.py + - src/shippo/models/operations/createshipment.py + - src/shippo/models/operations/createshippoaccount.py + - src/shippo/models/operations/createtrack.py + - src/shippo/models/operations/createtransaction.py + - src/shippo/models/operations/createuserparceltemplate.py + - src/shippo/models/operations/deletedefaultparceltemplate.py + - src/shippo/models/operations/deleteservicegroup.py + - src/shippo/models/operations/deleteuserparceltemplate.py + - src/shippo/models/operations/deletewebhook.py + - src/shippo/models/operations/getaddress.py + - src/shippo/models/operations/getbatch.py + - src/shippo/models/operations/getcarrieraccount.py + - src/shippo/models/operations/getcarrierparceltemplate.py + - src/shippo/models/operations/getcarrierregistrationstatus.py + - src/shippo/models/operations/getcustomsdeclaration.py + - src/shippo/models/operations/getcustomsitem.py + - src/shippo/models/operations/getdefaultparceltemplate.py + - src/shippo/models/operations/getmanifest.py + - src/shippo/models/operations/getorder.py + - src/shippo/models/operations/getparcel.py + - src/shippo/models/operations/getrate.py + - src/shippo/models/operations/getrefund.py + - src/shippo/models/operations/getshipment.py + - src/shippo/models/operations/getshippoaccount.py + - src/shippo/models/operations/gettrack.py + - src/shippo/models/operations/gettransaction.py + - src/shippo/models/operations/getuserparceltemplate.py + - src/shippo/models/operations/getwebhook.py + - src/shippo/models/operations/initiateoauth2signin.py + - src/shippo/models/operations/listaddresses.py + - src/shippo/models/operations/listcarrieraccounts.py + - src/shippo/models/operations/listcarrierparceltemplates.py + - src/shippo/models/operations/listcustomsdeclarations.py + - src/shippo/models/operations/listcustomsitems.py + - src/shippo/models/operations/listmanifests.py + - src/shippo/models/operations/listorders.py + - src/shippo/models/operations/listparcels.py + - src/shippo/models/operations/listrefunds.py + - src/shippo/models/operations/listservicegroups.py + - src/shippo/models/operations/listshipmentrates.py + - src/shippo/models/operations/listshipmentratesbycurrencycode.py + - src/shippo/models/operations/listshipments.py + - src/shippo/models/operations/listshippoaccounts.py + - src/shippo/models/operations/listtransactions.py + - src/shippo/models/operations/listuserparceltemplates.py + - src/shippo/models/operations/purchasebatch.py + - src/shippo/models/operations/registercarrieraccount.py + - src/shippo/models/operations/removeshipmentsfrombatch.py + - src/shippo/models/operations/updatecarrieraccount.py + - src/shippo/models/operations/updatedefaultparceltemplate.py + - src/shippo/models/operations/updateservicegroup.py + - src/shippo/models/operations/updateshippoaccount.py + - src/shippo/models/operations/updateuserparceltemplate.py + - src/shippo/models/operations/updatewebhook.py + - src/shippo/models/operations/validateaddress.py + - src/shippo/orders.py + - src/shippo/parcels.py + - src/shippo/pickups.py + - src/shippo/py.typed + - src/shippo/rates.py + - src/shippo/rates_at_checkout.py + - src/shippo/refunds.py + - src/shippo/sdk.py + - src/shippo/sdkconfiguration.py + - src/shippo/service_groups.py + - src/shippo/shipments.py + - src/shippo/shippo_accounts.py + - src/shippo/tracking_status.py + - src/shippo/transactions.py + - src/shippo/types/__init__.py + - src/shippo/types/basemodel.py + - src/shippo/user_parcel_templates.py + - src/shippo/utils/__init__.py + - src/shippo/utils/annotations.py + - src/shippo/utils/enums.py + - src/shippo/utils/eventstreaming.py + - src/shippo/utils/forms.py + - src/shippo/utils/headers.py + - src/shippo/utils/logger.py + - src/shippo/utils/metadata.py + - src/shippo/utils/queryparams.py + - src/shippo/utils/requestbodies.py + - src/shippo/utils/retries.py + - src/shippo/utils/security.py + - src/shippo/utils/serializers.py + - src/shippo/utils/url.py + - src/shippo/utils/values.py + - src/shippo/webhooks.py diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8e514783..735b6312 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -4,6 +4,7 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true @@ -11,11 +12,24 @@ generation: parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true securityFeb2025: false + sharedErrorComponentsApr2025: false + sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" + versioningStrategy: automatic + persistentEdits: {} + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false python: - version: 4.0.0 + version: 5.0.0 additionalDependencies: dev: httpretty: ==1.1.4 @@ -23,18 +37,29 @@ python: pytest: ==8.3.3 pytest-asyncio: ==0.25.3 main: {} + allowedRedefinedBuiltins: + - id + - object + - dir + asyncMode: both authors: - Shippo + baseErrorName: ShippoError clientServerStatusCodesAsErrors: true + constFieldCasing: upper defaultErrorName: SDKError description: Shipping API Python library (USPS, FedEx, UPS and more) enableCustomCodeRegions: false enumFormat: enum fixFlags: + asyncPaginationSep2025: false + conflictResistantModelImportsFeb2026: false responseRequiredSep2024: false flattenGlobalSecurity: true flattenRequests: false flatteningOrder: parameters-first + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" imports: option: openapi paths: @@ -43,13 +68,21 @@ python: operations: models/operations shared: models/components webhooks: models/webhooks + inferUnionDiscriminators: true inputModelSuffix: input license: MIT License maxMethodParams: 3 methodArguments: require-security-and-request + moduleName: "" + multipartArrayFormat: legacy outputModelSuffix: output + packageManager: poetry packageName: shippo + preApplyUnionDiscriminators: false projectUrls: {} + pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: flat + sseFlatResponse: false templateVersion: v2 + useAsyncHooks: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 90aeb377..46c02a17 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,19 +1,20 @@ -speakeasyVersion: 1.521.1 +speakeasyVersion: 1.755.0 sources: openapi: sourceNamespace: openapi - sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0 - sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5 + sourceRevisionDigest: sha256:6c663764d9a66365b1d8ecfd099836651be17b509ca5b8ca802f44757ea1ac3d + sourceBlobDigest: sha256:ac0f028eee867cb0b24f4e3d35aa98c5e49635e1bfa52bca471e6bc2bfd33bcc tags: - latest - - speakeasy-sdk-regen-1732493299 - "2018-02-08" targets: first-target: source: openapi sourceNamespace: openapi - sourceRevisionDigest: sha256:e8ab98342833888dbc4dd20f683ee5fb7791107d8574b8dfabce743bc3675cd0 - sourceBlobDigest: sha256:8c66d55b10c00886e8fd1f2b6ea6b233bccf17f622fed046dcf302d5da3f91f5 + sourceRevisionDigest: sha256:6c663764d9a66365b1d8ecfd099836651be17b509ca5b8ca802f44757ea1ac3d + sourceBlobDigest: sha256:ac0f028eee867cb0b24f4e3d35aa98c5e49635e1bfa52bca471e6bc2bfd33bcc + codeSamplesNamespace: openapi-python-code-samples + codeSamplesRevisionDigest: sha256:b2c966ee3ec3fb20f555d48c118db71d13d115d94f4ffb56a45b2f88babe4f5b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -32,5 +33,5 @@ workflow: token: $pypi_token codeSamples: registry: - location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples + location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 12cc89a1..116cd575 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -15,5 +15,5 @@ targets: token: $pypi_token codeSamples: registry: - location: registry.speakeasyapi.dev/shippo/shippo/openapi-code-samples + location: registry.speakeasyapi.dev/shippo/shippo/openapi-python-code-samples blocking: false diff --git a/README-PYPI.md b/README-PYPI.md index 72fd8c61..a1f2cc06 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -47,7 +47,15 @@ Shippo external API.: Use this API to integrate with the Shippo service > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add shippo +``` ### PIP @@ -78,7 +86,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "shippo", # ] @@ -140,15 +148,13 @@ from shippo.utils import BackoffStrategy, RetryConfig with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list(, + res = s_client.addresses.list(page=1, results=5, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - assert res is not None - # Handle response print(res) @@ -162,13 +168,11 @@ from shippo.utils import BackoffStrategy, RetryConfig with Shippo( retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list() - - assert res is not None + res = s_client.addresses.list(page=1, results=5) # Handle response print(res) @@ -294,8 +298,8 @@ from shippo import Shippo def main(): with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: # Rest of application here... @@ -304,8 +308,8 @@ def main(): async def amain(): async with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: # Rest of application here... ``` @@ -344,14 +348,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
Available methods -### [addresses](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md) +### [Addresses](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md#list) - List all addresses * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md#create) - Create a new address * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md#get) - Retrieve an address * [validate](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/addresses/README.md#validate) - Validate an address -### [batches](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md) +### [Batches](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md) * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md#create) - Create a batch * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md#get) - Retrieve a batch @@ -359,7 +363,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [purchase](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md#purchase) - Purchase a batch * [remove_shipments](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/batches/README.md#remove_shipments) - Remove shipments from a batch -### [carrier_accounts](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md) +### [CarrierAccounts](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md#list) - List all carrier accounts * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md#create) - Create a new carrier account @@ -369,97 +373,96 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [register](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md#register) - Add a Shippo carrier account * [get_registration_status](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrieraccounts/README.md#get_registration_status) - Get Carrier Registration status -### [carrier_parcel_templates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrierparceltemplates/README.md) +### [CarrierParcelTemplates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrierparceltemplates/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/carrierparceltemplates/README.md#get) - Retrieve a carrier parcel templates -### [customs_declarations](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsdeclarations/README.md) +### [CustomsDeclarations](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsdeclarations/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsdeclarations/README.md#list) - List all customs declarations * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsdeclarations/README.md#create) - Create a new customs declaration * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsdeclarations/README.md#get) - Retrieve a customs declaration -### [customs_items](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsitems/README.md) +### [CustomsItems](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsitems/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsitems/README.md#list) - List all customs items * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsitems/README.md#create) - Create a new customs item * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/customsitems/README.md#get) - Retrieve a customs item -### [manifests](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/manifests/README.md) +### [Manifests](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/manifests/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/manifests/README.md#list) - List all manifests * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/manifests/README.md#create) - Create a new manifest * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/manifests/README.md#get) - Retrieve a manifest -### [orders](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/orders/README.md) +### [Orders](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/orders/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/orders/README.md#list) - List all orders * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/orders/README.md#create) - Create a new order * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/orders/README.md#get) - Retrieve an order -### [parcels](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/parcels/README.md) +### [Parcels](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/parcels/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/parcels/README.md#list) - List all parcels * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/parcels/README.md#create) - Create a new parcel * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/parcels/README.md#get) - Retrieve an existing parcel -### [pickups](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/pickups/README.md) +### [Pickups](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/pickups/README.md) * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/pickups/README.md#create) - Create a pickup -### [rates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/rates/README.md) +### [Rates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/rates/README.md) * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/rates/README.md#get) - Retrieve a rate * [list_shipment_rates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/rates/README.md#list_shipment_rates) - Retrieve shipment rates * [list_shipment_rates_by_currency_code](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/rates/README.md#list_shipment_rates_by_currency_code) - Retrieve shipment rates in currency -### [rates_at_checkout](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md) +### [RatesAtCheckout](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md) * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request * [get_default_parcel_template](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md#get_default_parcel_template) - Show current default parcel template * [update_default_parcel_template](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md#update_default_parcel_template) - Update default parcel template * [delete_default_parcel_template](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/ratesatcheckout/README.md#delete_default_parcel_template) - Clear current default parcel template -### [refunds](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/refunds/README.md) +### [Refunds](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/refunds/README.md) * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/refunds/README.md#create) - Create a refund * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/refunds/README.md#list) - List all refunds * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/refunds/README.md#get) - Retrieve a refund -### [service_groups](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md) +### [ServiceGroups](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md#list) - List all service groups * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md#create) - Create a new service group * [update](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md#update) - Update an existing service group * [delete](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/servicegroups/README.md#delete) - Delete a service group -### [shipments](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md) +### [Shipments](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md#list) - List all shipments * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md#create) - Create a new shipment * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shipments/README.md#get) - Retrieve a shipment - -### [shippo_accounts](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md) +### [ShippoAccounts](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md#create) - Create a Shippo Account * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md#get) - Retrieve a Shippo Account * [update](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account -### [tracking_status](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/trackingstatus/README.md) +### [TrackingStatus](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/trackingstatus/README.md) * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/trackingstatus/README.md#create) - Register a tracking webhook * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/trackingstatus/README.md#get) - Get a tracking status -### [transactions](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/transactions/README.md) +### [Transactions](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/transactions/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/transactions/README.md#list) - List all shipping labels * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/transactions/README.md#create) - Create a shipping label * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/transactions/README.md#get) - Retrieve a shipping label -### [user_parcel_templates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md) +### [UserParcelTemplates](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md) * [list](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md#list) - List all user parcel templates * [create](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md#create) - Create a new user parcel template @@ -467,7 +470,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [get](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md#get) - Retrieves a user parcel template * [update](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/userparceltemplates/README.md#update) - Update an existing user parcel template -### [webhooks](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/webhooks/README.md) +### [Webhooks](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/webhooks/README.md) * [create_webhook](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/webhooks/README.md#create_webhook) - Create a new webhook * [list_webhooks](https://github.com/goshippo/shippo-python-sdk/blob/master/docs/sdks/webhooks/README.md#list_webhooks) - List all webhooks diff --git a/README.md b/README.md index b7452dd7..6b15425d 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,15 @@ Shippo external API.: Use this API to integrate with the Shippo service > > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. -The SDK can be installed with either *pip* or *poetry* package managers. +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add shippo +``` ### PIP @@ -78,7 +86,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "shippo", # ] @@ -140,15 +148,13 @@ from shippo.utils import BackoffStrategy, RetryConfig with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list(, + res = s_client.addresses.list(page=1, results=5, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - assert res is not None - # Handle response print(res) @@ -162,13 +168,11 @@ from shippo.utils import BackoffStrategy, RetryConfig with Shippo( retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list() - - assert res is not None + res = s_client.addresses.list(page=1, results=5) # Handle response print(res) @@ -294,8 +298,8 @@ from shippo import Shippo def main(): with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: # Rest of application here... @@ -304,8 +308,8 @@ def main(): async def amain(): async with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: # Rest of application here... ``` @@ -344,14 +348,14 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
Available methods -### [addresses](docs/sdks/addresses/README.md) +### [Addresses](docs/sdks/addresses/README.md) * [list](docs/sdks/addresses/README.md#list) - List all addresses * [create](docs/sdks/addresses/README.md#create) - Create a new address * [get](docs/sdks/addresses/README.md#get) - Retrieve an address * [validate](docs/sdks/addresses/README.md#validate) - Validate an address -### [batches](docs/sdks/batches/README.md) +### [Batches](docs/sdks/batches/README.md) * [create](docs/sdks/batches/README.md#create) - Create a batch * [get](docs/sdks/batches/README.md#get) - Retrieve a batch @@ -359,7 +363,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [purchase](docs/sdks/batches/README.md#purchase) - Purchase a batch * [remove_shipments](docs/sdks/batches/README.md#remove_shipments) - Remove shipments from a batch -### [carrier_accounts](docs/sdks/carrieraccounts/README.md) +### [CarrierAccounts](docs/sdks/carrieraccounts/README.md) * [list](docs/sdks/carrieraccounts/README.md#list) - List all carrier accounts * [create](docs/sdks/carrieraccounts/README.md#create) - Create a new carrier account @@ -369,97 +373,96 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [register](docs/sdks/carrieraccounts/README.md#register) - Add a Shippo carrier account * [get_registration_status](docs/sdks/carrieraccounts/README.md#get_registration_status) - Get Carrier Registration status -### [carrier_parcel_templates](docs/sdks/carrierparceltemplates/README.md) +### [CarrierParcelTemplates](docs/sdks/carrierparceltemplates/README.md) * [list](docs/sdks/carrierparceltemplates/README.md#list) - List all carrier parcel templates * [get](docs/sdks/carrierparceltemplates/README.md#get) - Retrieve a carrier parcel templates -### [customs_declarations](docs/sdks/customsdeclarations/README.md) +### [CustomsDeclarations](docs/sdks/customsdeclarations/README.md) * [list](docs/sdks/customsdeclarations/README.md#list) - List all customs declarations * [create](docs/sdks/customsdeclarations/README.md#create) - Create a new customs declaration * [get](docs/sdks/customsdeclarations/README.md#get) - Retrieve a customs declaration -### [customs_items](docs/sdks/customsitems/README.md) +### [CustomsItems](docs/sdks/customsitems/README.md) * [list](docs/sdks/customsitems/README.md#list) - List all customs items * [create](docs/sdks/customsitems/README.md#create) - Create a new customs item * [get](docs/sdks/customsitems/README.md#get) - Retrieve a customs item -### [manifests](docs/sdks/manifests/README.md) +### [Manifests](docs/sdks/manifests/README.md) * [list](docs/sdks/manifests/README.md#list) - List all manifests * [create](docs/sdks/manifests/README.md#create) - Create a new manifest * [get](docs/sdks/manifests/README.md#get) - Retrieve a manifest -### [orders](docs/sdks/orders/README.md) +### [Orders](docs/sdks/orders/README.md) * [list](docs/sdks/orders/README.md#list) - List all orders * [create](docs/sdks/orders/README.md#create) - Create a new order * [get](docs/sdks/orders/README.md#get) - Retrieve an order -### [parcels](docs/sdks/parcels/README.md) +### [Parcels](docs/sdks/parcels/README.md) * [list](docs/sdks/parcels/README.md#list) - List all parcels * [create](docs/sdks/parcels/README.md#create) - Create a new parcel * [get](docs/sdks/parcels/README.md#get) - Retrieve an existing parcel -### [pickups](docs/sdks/pickups/README.md) +### [Pickups](docs/sdks/pickups/README.md) * [create](docs/sdks/pickups/README.md#create) - Create a pickup -### [rates](docs/sdks/rates/README.md) +### [Rates](docs/sdks/rates/README.md) * [get](docs/sdks/rates/README.md#get) - Retrieve a rate * [list_shipment_rates](docs/sdks/rates/README.md#list_shipment_rates) - Retrieve shipment rates * [list_shipment_rates_by_currency_code](docs/sdks/rates/README.md#list_shipment_rates_by_currency_code) - Retrieve shipment rates in currency -### [rates_at_checkout](docs/sdks/ratesatcheckout/README.md) +### [RatesAtCheckout](docs/sdks/ratesatcheckout/README.md) * [create](docs/sdks/ratesatcheckout/README.md#create) - Generate a live rates request * [get_default_parcel_template](docs/sdks/ratesatcheckout/README.md#get_default_parcel_template) - Show current default parcel template * [update_default_parcel_template](docs/sdks/ratesatcheckout/README.md#update_default_parcel_template) - Update default parcel template * [delete_default_parcel_template](docs/sdks/ratesatcheckout/README.md#delete_default_parcel_template) - Clear current default parcel template -### [refunds](docs/sdks/refunds/README.md) +### [Refunds](docs/sdks/refunds/README.md) * [create](docs/sdks/refunds/README.md#create) - Create a refund * [list](docs/sdks/refunds/README.md#list) - List all refunds * [get](docs/sdks/refunds/README.md#get) - Retrieve a refund -### [service_groups](docs/sdks/servicegroups/README.md) +### [ServiceGroups](docs/sdks/servicegroups/README.md) * [list](docs/sdks/servicegroups/README.md#list) - List all service groups * [create](docs/sdks/servicegroups/README.md#create) - Create a new service group * [update](docs/sdks/servicegroups/README.md#update) - Update an existing service group * [delete](docs/sdks/servicegroups/README.md#delete) - Delete a service group -### [shipments](docs/sdks/shipments/README.md) +### [Shipments](docs/sdks/shipments/README.md) * [list](docs/sdks/shipments/README.md#list) - List all shipments * [create](docs/sdks/shipments/README.md#create) - Create a new shipment * [get](docs/sdks/shipments/README.md#get) - Retrieve a shipment - -### [shippo_accounts](docs/sdks/shippoaccounts/README.md) +### [ShippoAccounts](docs/sdks/shippoaccounts/README.md) * [list](docs/sdks/shippoaccounts/README.md#list) - List all Shippo Accounts * [create](docs/sdks/shippoaccounts/README.md#create) - Create a Shippo Account * [get](docs/sdks/shippoaccounts/README.md#get) - Retrieve a Shippo Account * [update](docs/sdks/shippoaccounts/README.md#update) - Update a Shippo Account -### [tracking_status](docs/sdks/trackingstatus/README.md) +### [TrackingStatus](docs/sdks/trackingstatus/README.md) * [create](docs/sdks/trackingstatus/README.md#create) - Register a tracking webhook * [get](docs/sdks/trackingstatus/README.md#get) - Get a tracking status -### [transactions](docs/sdks/transactions/README.md) +### [Transactions](docs/sdks/transactions/README.md) * [list](docs/sdks/transactions/README.md#list) - List all shipping labels * [create](docs/sdks/transactions/README.md#create) - Create a shipping label * [get](docs/sdks/transactions/README.md#get) - Retrieve a shipping label -### [user_parcel_templates](docs/sdks/userparceltemplates/README.md) +### [UserParcelTemplates](docs/sdks/userparceltemplates/README.md) * [list](docs/sdks/userparceltemplates/README.md#list) - List all user parcel templates * [create](docs/sdks/userparceltemplates/README.md#create) - Create a new user parcel template @@ -467,7 +470,7 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u * [get](docs/sdks/userparceltemplates/README.md#get) - Retrieves a user parcel template * [update](docs/sdks/userparceltemplates/README.md#update) - Update an existing user parcel template -### [webhooks](docs/sdks/webhooks/README.md) +### [Webhooks](docs/sdks/webhooks/README.md) * [create_webhook](docs/sdks/webhooks/README.md#create_webhook) - Create a new webhook * [list_webhooks](docs/sdks/webhooks/README.md#list_webhooks) - List all webhooks diff --git a/RELEASES.md b/RELEASES.md index 677ad9d8..c3207be6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -398,4 +398,14 @@ Based on: ### Generated - [python v3.9.0] . ### Releases -- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - . \ No newline at end of file +- [PyPI v3.9.0] https://pypi.org/project/shippo/3.9.0 - . + +## 2026-03-16 00:15:30 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.755.0 (2.865.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v5.0.0] . +### Releases +- [PyPI v5.0.0] https://pypi.org/project/shippo/5.0.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 93c2d6f4..301aadd0 100644 --- a/USAGE.md +++ b/USAGE.md @@ -5,13 +5,11 @@ from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list() - - assert res is not None + res = s_client.addresses.list(page=1, results=5) # Handle response print(res) @@ -19,7 +17,8 @@ with Shippo(
-The same SDK client can also be used to make asychronous requests by importing asyncio. +The same SDK client can also be used to make asynchronous requests by importing asyncio. + ```python # Asynchronous Example import asyncio @@ -28,13 +27,11 @@ from shippo import Shippo async def main(): async with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = await s_client.addresses.list_async() - - assert res is not None + res = await s_client.addresses.list_async(page=1, results=5) # Handle response print(res) diff --git a/docs/models/components/address.md b/docs/models/components/address.md index 979c94fd..18836890 100644 --- a/docs/models/components/address.md +++ b/docs/models/components/address.md @@ -5,28 +5,28 @@ Address represents the address as retrieved from the database ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | -| `name` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First and Last Name of the addressee | Shwan Ippotle | -| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name | Shippo | -| `street1` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). | 215 Clayton St. | -| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line, 35 character limit. | | -| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line, 35 character limit.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments. | | -| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | -| `city` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results. | San Francisco | -| `state` | *Optional[str]* | :heavy_minus_sign: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations. | CA | -| `zip` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates. | 94117 | -| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. | +1 555 341 9393 | -| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant. | shippotle@shippo.com | -| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | -| `is_complete` | *Optional[bool]* | :heavy_minus_sign: | Complete addresses contain all required values.

Incomplete addresses have failed one or multiple
validations.
Incomplete Addresses are eligible for requesting rates but lack at least one required
value for purchasing labels. | true | -| `latitude` | [Optional[components.Latitude]](../../models/components/latitude.md) | :heavy_minus_sign: | Latitude of address | | -| `longitude` | [Optional[components.Longitude]](../../models/components/longitude.md) | :heavy_minus_sign: | Longitude of address | | -| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of Address creation. | 2014-07-09T02:19:13.174Z | -| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given Address object.
This ID is required to create a Shipment object. | d799c2679e644279b59fe661ac8fa488 | -| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the Address object. | shippotle@shippo.com | -| `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of last Address update. Since you cannot update Addresses after they were created, this time
stamp reflects the time when the Address was changed by Shippo's systems for the last time, e.g., during the
approximation of one or more values. | 2014-07-09T02:19:13.174Z | -| `validation_results` | [Optional[components.AddressValidationResults]](../../models/components/addressvalidationresults.md) | :heavy_minus_sign: | Object that contains information regarding if an address had been validated or not. Also contains any messages
generated during validation. Children keys are is_valid(boolean) and messages(array). | | -| `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | false | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First and Last Name of the addressee

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Either company or name required; No length validation (first 35 chars printed on label) \| | Shwan Ippotle | +| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 35 characters; Either company or name required \| | Shippo | +| `street1` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First street line. Usually street number and street name (except for DHL Germany, see street_no).

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | 215 Clayton St. | +| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | +| `city` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Max 35 characters \| | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required if country requires state; Max 2 characters for US, CA, PR \| | CA | +| `zip` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 10 characters \| | 94117 | +| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | +| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Min 1, max 15 characters \| | +1 555 341 9393 | +| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 80 characters \| | shippotle@shippo.com | +| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | +| `is_complete` | *Optional[bool]* | :heavy_minus_sign: | Complete addresses contain all required values.

Incomplete addresses have failed one or multiple
validations.
Incomplete Addresses are eligible for requesting rates but lack at least one required
value for purchasing labels. | true | +| `latitude` | [Optional[components.Latitude]](../../models/components/latitude.md) | :heavy_minus_sign: | Latitude of address | | +| `longitude` | [Optional[components.Longitude]](../../models/components/longitude.md) | :heavy_minus_sign: | Longitude of address | | +| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of Address creation. | 2014-07-09T02:19:13.174Z | +| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given Address object.
This ID is required to create a Shipment object. | d799c2679e644279b59fe661ac8fa488 | +| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the Address object. | shippotle@shippo.com | +| `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of last Address update. Since you cannot update Addresses after they were created, this time
stamp reflects the time when the Address was changed by Shippo's systems for the last time, e.g., during the
approximation of one or more values. | 2014-07-09T02:19:13.174Z | +| `validation_results` | [Optional[components.AddressValidationResults]](../../models/components/addressvalidationresults.md) | :heavy_minus_sign: | Object that contains information regarding if an address had been validated or not. Also contains any messages
generated during validation. Children keys are is_valid(boolean) and messages(array). | | +| `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | false | \ No newline at end of file diff --git a/docs/models/components/addresscompletecreaterequest.md b/docs/models/components/addresscompletecreaterequest.md index ba0d8c5d..152939d6 100644 --- a/docs/models/components/addresscompletecreaterequest.md +++ b/docs/models/components/addresscompletecreaterequest.md @@ -5,20 +5,20 @@ Address represents the address as retrieved from the database ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | **required for purchase**

First and Last Name of the addressee | Shwan Ippotle | -| `street1` | *str* | :heavy_check_mark: | **required for purchase**

First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). | 215 Clayton St. | -| `city` | *str* | :heavy_check_mark: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results. | San Francisco | -| `state` | *str* | :heavy_check_mark: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations. | CA | -| `zip` | *str* | :heavy_check_mark: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates. | 94117 | -| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | -| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name | Shippo | -| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line, 35 character limit. | | -| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line, 35 character limit.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments. | | -| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | -| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. | +1 555 341 9393 | -| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant. | shippotle@shippo.com | -| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | -| `validate_` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | **required for purchase**

First and Last Name of the addressee

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Either company or name required; No length validation (first 35 chars printed on label) \| | Shwan Ippotle | +| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 35 characters; Either company or name required \| | Shippo | +| `street1` | *str* | :heavy_check_mark: | **required for purchase**

First street line. Usually street number and street name (except for DHL Germany, see street_no).

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | 215 Clayton St. | +| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | +| `city` | *str* | :heavy_check_mark: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Max 35 characters \| | San Francisco | +| `state` | *str* | :heavy_check_mark: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required if country requires state; Max 2 characters for US, CA, PR \| | CA | +| `zip` | *str* | :heavy_check_mark: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 10 characters \| | 94117 | +| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | +| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Min 1, max 15 characters \| | +1 555 341 9393 | +| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 80 characters \| | shippotle@shippo.com | +| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | +| `validate_` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/components/addresscreaterequest.md b/docs/models/components/addresscreaterequest.md index 2f3d5aa9..227d4437 100644 --- a/docs/models/components/addresscreaterequest.md +++ b/docs/models/components/addresscreaterequest.md @@ -5,20 +5,20 @@ Address represents the address as retrieved from the database ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | -| `name` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First and Last Name of the addressee | Shwan Ippotle | -| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name | Shippo | -| `street1` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). | 215 Clayton St. | -| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line, 35 character limit. | | -| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line, 35 character limit.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments. | | -| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | -| `city` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results. | San Francisco | -| `state` | *Optional[str]* | :heavy_minus_sign: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations. | CA | -| `zip` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates. | 94117 | -| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. | +1 555 341 9393 | -| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant. | shippotle@shippo.com | -| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | -| `validate_` | *Optional[bool]* | :heavy_minus_sign: | Set to true to validate Address object. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First and Last Name of the addressee

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Either company or name required; No length validation (first 35 chars printed on label) \| | Shwan Ippotle | +| `company` | *Optional[str]* | :heavy_minus_sign: | Company Name

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 35 characters; Either company or name required \| | Shippo | +| `street1` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

First street line. Usually street number and street name (except for DHL Germany, see street_no).

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | 215 Clayton St. | +| `street2` | *Optional[str]* | :heavy_minus_sign: | Second street line.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street3` | *Optional[str]* | :heavy_minus_sign: | Third street line.
Only accepted for USPS international shipments, UPS domestic and UPS international shipments.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| At least one street line required; Max 35 characters per line \| | | +| `street_no` | *Optional[str]* | :heavy_minus_sign: | Street number of the addressed building.
This field can be included in street1 for all carriers except for DHL Germany. | | +| `city` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates.
Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state
or a ZIP code (see below), if known, it will yield more accurate results.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Max 35 characters \| | San Francisco | +| `state` | *Optional[str]* | :heavy_minus_sign: | **required for purchase for some countries**

State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some
countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers
only accept two or three character state abbreviations.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required if country requires state; Max 2 characters for US, CA, PR \| | CA | +| `zip` | *Optional[str]* | :heavy_minus_sign: | **required for purchase**

Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more
accurate Rates.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 10 characters \| | 94117 | +| `country` | *str* | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`.
If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes.
Refer to this guide for a list of country codes.
Sending a country is always required. | US | +| `phone` | *Optional[str]* | :heavy_minus_sign: | Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This
increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Required; Min 1, max 15 characters \| | +1 555 341 9393 | +| `email` | *Optional[str]* | :heavy_minus_sign: | E-mail address of the contact person, RFC3696/5321-compliant.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 80 characters \| | shippotle@shippo.com | +| `is_residential` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | Customer ID 123456 | +| `validate_` | *Optional[bool]* | :heavy_minus_sign: | Set to true to validate Address object. | true | \ No newline at end of file diff --git a/docs/models/components/addressvalidationresultsmessage.md b/docs/models/components/addressvalidationresultsmessage.md index d4dbef5f..75cceec6 100644 --- a/docs/models/components/addressvalidationresultsmessage.md +++ b/docs/models/components/addressvalidationresultsmessage.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `code` | *Optional[str]* | :heavy_minus_sign: | See Address Validation Codes | Unknown Street | -| `source` | *Optional[str]* | :heavy_minus_sign: | See Address Validation Source | Shippo Address Validator | -| `text` | *Optional[str]* | :heavy_minus_sign: | N/A | City, State and ZIP Code are valid, but street address is not a match. | -| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | address_warning | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `code` | *Optional[str]* | :heavy_minus_sign: | See Address Validation Codes | Unknown Street | +| `source` | *Optional[str]* | :heavy_minus_sign: | See Address Validation Source | Shippo Address Validator | +| `text` | *Optional[str]* | :heavy_minus_sign: | N/A | City, State and ZIP Code are valid, but street address is not a match. | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | address_warning | \ No newline at end of file diff --git a/docs/models/components/addressvalidationresultsmessagecodeenum.md b/docs/models/components/addressvalidationresultsmessagecodeenum.md index e0211c4f..1aa56196 100644 --- a/docs/models/components/addressvalidationresultsmessagecodeenum.md +++ b/docs/models/components/addressvalidationresultsmessagecodeenum.md @@ -1,5 +1,13 @@ # AddressValidationResultsMessageCodeEnum +## Example Usage + +```python +from shippo.models.components import AddressValidationResultsMessageCodeEnum + +value = AddressValidationResultsMessageCodeEnum.VERIFICATION_ERROR +``` + ## Values diff --git a/docs/models/components/addressvalidationresultsmessagesourceenum.md b/docs/models/components/addressvalidationresultsmessagesourceenum.md index df831acd..a4223cee 100644 --- a/docs/models/components/addressvalidationresultsmessagesourceenum.md +++ b/docs/models/components/addressvalidationresultsmessagesourceenum.md @@ -1,5 +1,13 @@ # AddressValidationResultsMessageSourceEnum +## Example Usage + +```python +from shippo.models.components import AddressValidationResultsMessageSourceEnum + +value = AddressValidationResultsMessageSourceEnum.SHIPPO_ADDRESS_VALIDATOR +``` + ## Values diff --git a/docs/models/components/ancillaryendorsement.md b/docs/models/components/ancillaryendorsement.md index 0171c0b6..a56fec60 100644 --- a/docs/models/components/ancillaryendorsement.md +++ b/docs/models/components/ancillaryendorsement.md @@ -2,6 +2,14 @@ Specify an ancillary service endorsement to provide the USPS with instructions on how to handle undeliverable-as-addressed pieces (DHL eCommerce only). +## Example Usage + +```python +from shippo.models.components import AncillaryEndorsement + +value = AncillaryEndorsement.FORWARDING_SERVICE_REQUESTED +``` + ## Values diff --git a/docs/models/components/attribute.md b/docs/models/components/attribute.md index d7f1ad3c..d8ecadf9 100644 --- a/docs/models/components/attribute.md +++ b/docs/models/components/attribute.md @@ -1,5 +1,13 @@ # Attribute +## Example Usage + +```python +from shippo.models.components import Attribute + +value = Attribute.BESTVALUE +``` + ## Values diff --git a/docs/models/components/batch.md b/docs/models/components/batch.md index 75d714e9..5ba7091e 100644 --- a/docs/models/components/batch.md +++ b/docs/models/components/batch.md @@ -3,18 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `default_carrier_account` | *str* | :heavy_check_mark: | ID of the Carrier Account object to use as the default for all shipments in this Batch.
The carrier account can be changed on a per-shipment basis by changing the carrier_account in the
corresponding BatchShipment object. | 078870331023437cb917f5187429b093 | -| `default_servicelevel_token` | *str* | :heavy_check_mark: | Token of the service level to use as the default for all shipments in this Batch.
The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the
corresponding BatchShipment object. Servicelevel tokens can be found here. | usps_priority | -| `batch_shipments` | [components.BatchShipmentPaginatedList](../../models/components/batchshipmentpaginatedlist.md) | :heavy_check_mark: | N/A | | -| `label_url` | List[*str*] | :heavy_check_mark: | An array of URLs each pointing to a merged file of 100 labels each | | -| `object_created` | *str* | :heavy_check_mark: | Date and time of Batch creation | 2016-01-04T00:15:44.394Z | -| `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given Batch object | 5ef63c54f5bf45d3b1f8fb37dcb1c5f4 | -| `object_owner` | *str* | :heavy_check_mark: | Username of the user who created the Address object. | shippo@shippo.com | -| `object_results` | [components.ObjectResults](../../models/components/objectresults.md) | :heavy_check_mark: | An object containing the following counts:
`creation_succeeded`
`creation_failed`
`purchase_succeeded`
`purchase_failed` | | -| `object_updated` | *str* | :heavy_check_mark: | Date and time of last update to the Batch | 2016-01-04T00:48:13.841Z | -| `status` | [components.BatchStatus](../../models/components/batchstatus.md) | :heavy_check_mark: | Batches that are `VALIDATING` are being created and validated

`VALID` batches can be purchased

`INVALID` batches cannot be purchased, `INVALID` BatchShipments must be removed

Batches that are in the `PURCHASING` state are being purchased

`PURCHASED` batches are finished purchasing. | VALID | -| `label_filetype` | [Optional[components.LabelFileTypeEnum]](../../models/components/labelfiletypeenum.md) | :heavy_minus_sign: | Print format of the label. If empty, will use the default format set from
the Shippo dashboard. | PDF_4x6 | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | BATCH #1 | -| `test` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `default_carrier_account` | *str* | :heavy_check_mark: | ID of the Carrier Account object to use as the default for all shipments in this Batch.
The carrier account can be changed on a per-shipment basis by changing the carrier_account in the
corresponding BatchShipment object. | 078870331023437cb917f5187429b093 | +| `default_servicelevel_token` | *str* | :heavy_check_mark: | Token of the service level to use as the default for all shipments in this Batch.
The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the
corresponding BatchShipment object. Servicelevel tokens can be found here. | usps_priority | +| `label_filetype` | [Optional[components.LabelFileTypeEnum]](../../models/components/labelfiletypeenum.md) | :heavy_minus_sign: | Print format of the label. If empty, will use the default format set from
the Shippo dashboard. | PDF_4x6 | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | BATCH #1 | +| `batch_shipments` | [components.BatchShipmentPaginatedList](../../models/components/batchshipmentpaginatedlist.md) | :heavy_check_mark: | N/A | | +| `label_url` | List[*str*] | :heavy_check_mark: | An array of URLs each pointing to a merged file of 100 labels each | | +| `object_created` | *str* | :heavy_check_mark: | Date and time of Batch creation | 2016-01-04T00:15:44.394Z | +| `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given Batch object | 5ef63c54f5bf45d3b1f8fb37dcb1c5f4 | +| `object_owner` | *str* | :heavy_check_mark: | Username of the user who created the Batch object. | shippo@shippo.com | +| `object_results` | [components.ObjectResults](../../models/components/objectresults.md) | :heavy_check_mark: | An object containing the following counts:
`creation_succeeded`
`creation_failed`
`purchase_succeeded`
`purchase_failed` | | +| `object_updated` | *str* | :heavy_check_mark: | Date and time of last update to the Batch | 2016-01-04T00:48:13.841Z | +| `status` | [components.BatchStatus](../../models/components/batchstatus.md) | :heavy_check_mark: | Batches that are `VALIDATING` are being created and validated

`VALID` batches can be purchased

`INVALID` batches cannot be purchased, `INVALID` BatchShipments must be removed

Batches that are in the `PURCHASING` state are being purchased

`PURCHASED` batches are finished purchasing. | VALID | +| `test` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | \ No newline at end of file diff --git a/docs/models/components/batchcreaterequest.md b/docs/models/components/batchcreaterequest.md index d8bb4139..b3f529ed 100644 --- a/docs/models/components/batchcreaterequest.md +++ b/docs/models/components/batchcreaterequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `default_carrier_account` | *str* | :heavy_check_mark: | ID of the Carrier Account object to use as the default for all shipments in this Batch.
The carrier account can be changed on a per-shipment basis by changing the carrier_account in the
corresponding BatchShipment object. | 078870331023437cb917f5187429b093 | -| `default_servicelevel_token` | *str* | :heavy_check_mark: | Token of the service level to use as the default for all shipments in this Batch.
The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the
corresponding BatchShipment object. Servicelevel tokens can be found here. | usps_priority | -| `batch_shipments` | List[[components.BatchShipmentCreateRequest](../../models/components/batchshipmentcreaterequest.md)] | :heavy_check_mark: | Array of BatchShipment objects. The response keeps the same order as in the request array. | | -| `label_filetype` | [Optional[components.LabelFileTypeEnum]](../../models/components/labelfiletypeenum.md) | :heavy_minus_sign: | Print format of the label. If empty, will use the default format set from
the Shippo dashboard. | PDF_4x6 | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | BATCH #1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `default_carrier_account` | *str* | :heavy_check_mark: | ID of the Carrier Account object to use as the default for all shipments in this Batch.
The carrier account can be changed on a per-shipment basis by changing the carrier_account in the
corresponding BatchShipment object. | 078870331023437cb917f5187429b093 | +| `default_servicelevel_token` | *str* | :heavy_check_mark: | Token of the service level to use as the default for all shipments in this Batch.
The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the
corresponding BatchShipment object. Servicelevel tokens can be found here. | usps_priority | +| `label_filetype` | [Optional[components.LabelFileTypeEnum]](../../models/components/labelfiletypeenum.md) | :heavy_minus_sign: | Print format of the label. If empty, will use the default format set from
the Shippo dashboard. | PDF_4x6 | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | BATCH #1 | +| `batch_shipments` | List[[components.BatchShipmentCreateRequest](../../models/components/batchshipmentcreaterequest.md)] | :heavy_check_mark: | Array of BatchShipment objects. The response keeps the same order as in the request array. | | \ No newline at end of file diff --git a/docs/models/components/batchshipment.md b/docs/models/components/batchshipment.md index d13622e4..4df816f5 100644 --- a/docs/models/components/batchshipment.md +++ b/docs/models/components/batchshipment.md @@ -1,15 +1,21 @@ # BatchShipment +The batch shipment object is a wrapper around a shipment object, which include shipment-specific information +for batch processing. + +Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through +the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint + ## Fields | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `object_id` | *str* | :heavy_check_mark: | Object ID of this batch shipment. Can be used in the remove_shipments endpoint. | e11c95a6788d4ddcaa22f03175838740 | -| `shipment` | *str* | :heavy_check_mark: | Object ID of the shipment object created for this batch shipment. | adcfdddf8ec64b84ad22772bce3ea37a | -| `status` | [components.BatchShipmentStatus](../../models/components/batchshipmentstatus.md) | :heavy_check_mark: | `INVALID` batch shipments cannot be purchased and will have to be removed, fixed, and added to the batch again.

`VALID` batch shipments can be purchased.

Batch shipments with the status `TRANSACTION_FAILED` were not able to be purchased and the error will be displayed on the message field

`INCOMPLETE` batch shipments have an issue with the Address and will need to be removed, fixed, and added to the batch again. | INVALID | | `carrier_account` | *Optional[str]* | :heavy_minus_sign: | Object ID of the carrier account to be used for this shipment (will override batch default) | a4391cd4ab974f478f55dc08b5c8e3b3 | | `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | SHIPMENT #1 | -| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | A token that sets the shipping method for the batch, overriding the batch default.
Servicelevel tokens can be found in this list
or at this endpoint. | fedex_ground | +| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | A token that sets the shipping method for the batch, overriding the batch default.
Servicelevel tokens can be found in this list
or at this endpoint. | fedex_ground | | `messages` | List[*Any*] | :heavy_minus_sign: | List of Shipment and Transaction error messages. | | +| `object_id` | *str* | :heavy_check_mark: | Object ID of this batch shipment. Can be used in the remove_shipments endpoint. | e11c95a6788d4ddcaa22f03175838740 | +| `shipment` | *str* | :heavy_check_mark: | Object ID of the shipment object created for this batch shipment. | adcfdddf8ec64b84ad22772bce3ea37a | +| `status` | [components.BatchShipmentStatus](../../models/components/batchshipmentstatus.md) | :heavy_check_mark: | `INVALID` batch shipments cannot be purchased and will have to be removed, fixed, and added to the batch again.

`VALID` batch shipments can be purchased.

Batch shipments with the status `TRANSACTION_FAILED` were not able to be purchased and the error will be displayed on the message field

`INCOMPLETE` batch shipments have an issue with the Address and will need to be removed, fixed, and added to the batch again. | INVALID | | `transaction` | *Optional[str]* | :heavy_minus_sign: | Object ID of the transaction object created for this batch shipment. | 4c33736a67e2450da88b38c42deef6b7 | \ No newline at end of file diff --git a/docs/models/components/batchshipmentcreaterequest.md b/docs/models/components/batchshipmentcreaterequest.md index 4f4c9112..5814ce7d 100644 --- a/docs/models/components/batchshipmentcreaterequest.md +++ b/docs/models/components/batchshipmentcreaterequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `shipment` | [components.ShipmentCreateRequest](../../models/components/shipmentcreaterequest.md) | :heavy_check_mark: | N/A | | -| `carrier_account` | *Optional[str]* | :heavy_minus_sign: | Object ID of the carrier account to be used for this shipment (will override batch default) | a4391cd4ab974f478f55dc08b5c8e3b3 | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | SHIPMENT #1 | -| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | A token that sets the shipping method for the batch, overriding the batch default.
Servicelevel tokens can be found in this list
or at this endpoint. | fedex_ground | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `carrier_account` | *Optional[str]* | :heavy_minus_sign: | Object ID of the carrier account to be used for this shipment (will override batch default) | a4391cd4ab974f478f55dc08b5c8e3b3 | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want
to attach to the object. | SHIPMENT #1 | +| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | A token that sets the shipping method for the batch, overriding the batch default.
Servicelevel tokens can be found in this list
or at this endpoint. | fedex_ground | +| `shipment` | [components.ShipmentCreateRequest](../../models/components/shipmentcreaterequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/batchshipmentpaginatedlist.md b/docs/models/components/batchshipmentpaginatedlist.md index 2c6a0b72..097e2ef9 100644 --- a/docs/models/components/batchshipmentpaginatedlist.md +++ b/docs/models/components/batchshipmentpaginatedlist.md @@ -1,6 +1,6 @@ # BatchShipmentPaginatedList -Array of BatchShipment objects. +Array of BatchShipment objects. The response keeps the same order as in the request array. diff --git a/docs/models/components/batchshipmentstatus.md b/docs/models/components/batchshipmentstatus.md index c7873122..098beb05 100644 --- a/docs/models/components/batchshipmentstatus.md +++ b/docs/models/components/batchshipmentstatus.md @@ -5,6 +5,14 @@ Batch shipments with the status `TRANSACTION_FAILED` were not able to be purchased and the error will be displayed on the message field
`INCOMPLETE` batch shipments have an issue with the Address and will need to be removed, fixed, and added to the batch again. +## Example Usage + +```python +from shippo.models.components import BatchShipmentStatus + +value = BatchShipmentStatus.INVALID +``` + ## Values diff --git a/docs/models/components/batchstatus.md b/docs/models/components/batchstatus.md index 05ee104a..4490f6e9 100644 --- a/docs/models/components/batchstatus.md +++ b/docs/models/components/batchstatus.md @@ -6,6 +6,14 @@ Batches that are `VALIDATING` are being created and validated
Batches that are in the `PURCHASING` state are being purchased
`PURCHASED` batches are finished purchasing. +## Example Usage + +```python +from shippo.models.components import BatchStatus + +value = BatchStatus.VALIDATING +``` + ## Values diff --git a/docs/models/components/billingtype.md b/docs/models/components/billingtype.md index 2f93c657..f884fdf7 100644 --- a/docs/models/components/billingtype.md +++ b/docs/models/components/billingtype.md @@ -2,6 +2,14 @@ Party to be billed. (Leave blank for DHL Germany.) +## Example Usage + +```python +from shippo.models.components import BillingType + +value = BillingType.SENDER +``` + ## Values diff --git a/docs/models/components/buildinglocationtype.md b/docs/models/components/buildinglocationtype.md index f6a477be..f59b26ff 100644 --- a/docs/models/components/buildinglocationtype.md +++ b/docs/models/components/buildinglocationtype.md @@ -3,6 +3,14 @@ Where your parcels will be available for pickup. "Security Deck" and "Shipping Dock" are only supported for DHL Express. +## Example Usage + +```python +from shippo.models.components import BuildingLocationType + +value = BuildingLocationType.BACK_DOOR +``` + ## Values diff --git a/docs/models/components/buildingtype.md b/docs/models/components/buildingtype.md index e3ecb4ee..e9659624 100644 --- a/docs/models/components/buildingtype.md +++ b/docs/models/components/buildingtype.md @@ -2,6 +2,14 @@ The type of building where the pickup is located. +## Example Usage + +```python +from shippo.models.components import BuildingType + +value = BuildingType.APARTMENT +``` + ## Values diff --git a/docs/models/components/carrieraccount.md b/docs/models/components/carrieraccount.md index 8ac80f3c..caf77dc0 100644 --- a/docs/models/components/carrieraccount.md +++ b/docs/models/components/carrieraccount.md @@ -6,10 +6,10 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_id` | *str* | :heavy_check_mark: | Unique identifier of the account. Please check the carrier accounts tutorial
page for the `account_id` per carrier.

To protect account information, this field will be masked in any API response. | **** | -| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `active` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the account is active. When creating a shipment, if no `carrier_accounts` are explicitly
passed Shippo will query all carrier accounts that have this field set. By default, this is set to True. | | +| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `parameters` | [Optional[components.CarrierAccountParameters]](../../models/components/carrieraccountparameters.md) | :heavy_minus_sign: | N/A | | -| `carrier_name` | *Optional[Any]* | :heavy_minus_sign: | Carrier name, see Carriers
| USPS | +| `carrier_name` | *Optional[Any]* | :heavy_minus_sign: | Carrier name, see Carriers
| USPS | | `is_shippo_account` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | | `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the carrier account object. | 6aa34d5f6865448fbb1ee93636e98999 | diff --git a/docs/models/components/carrieraccountbase.md b/docs/models/components/carrieraccountbase.md index 6ef60274..576de415 100644 --- a/docs/models/components/carrieraccountbase.md +++ b/docs/models/components/carrieraccountbase.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_id` | *str* | :heavy_check_mark: | Unique identifier of the account. Please check the carrier accounts tutorial
page for the `account_id` per carrier.

To protect account information, this field will be masked in any API response. | **** | -| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `active` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the account is active. When creating a shipment, if no `carrier_accounts` are explicitly
passed Shippo will query all carrier accounts that have this field set. By default, this is set to True. | | +| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `parameters` | [Optional[components.CarrierAccountBaseParameters]](../../models/components/carrieraccountbaseparameters.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/carrieraccountcanadapostcreaterequest.md b/docs/models/components/carrieraccountcanadapostcreaterequest.md index 7f3a897d..7becfc5a 100644 --- a/docs/models/components/carrieraccountcanadapostcreaterequest.md +++ b/docs/models/components/carrieraccountcanadapostcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountCanadaPostCreateParameters](../../models/components/carrieraccountcanadapostcreateparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["canada_post"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["canada_post"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountCanadaPostCreateParameters](../../models/components/carrieraccountcanadapostcreateparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountchronopostcreaterequest.md b/docs/models/components/carrieraccountchronopostcreaterequest.md index 4c251136..761ed8e8 100644 --- a/docs/models/components/carrieraccountchronopostcreaterequest.md +++ b/docs/models/components/carrieraccountchronopostcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountChronopostCreateRequestParameters](../../models/components/carrieraccountchronopostcreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["chronopost"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["chronopost"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountChronopostCreateRequestParameters](../../models/components/carrieraccountchronopostcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountcolissimocreaterequest.md b/docs/models/components/carrieraccountcolissimocreaterequest.md index 5ee0f007..a34b2d5e 100644 --- a/docs/models/components/carrieraccountcolissimocreaterequest.md +++ b/docs/models/components/carrieraccountcolissimocreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountColissimoCreateRequestParameters](../../models/components/carrieraccountcolissimocreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["colissimo"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["colissimo"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountColissimoCreateRequestParameters](../../models/components/carrieraccountcolissimocreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountcorreoscreaterequest.md b/docs/models/components/carrieraccountcorreoscreaterequest.md index b48580f0..a731f9b5 100644 --- a/docs/models/components/carrieraccountcorreoscreaterequest.md +++ b/docs/models/components/carrieraccountcorreoscreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountCorreosCreateRequestParameters](../../models/components/carrieraccountcorreoscreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["correos"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["correos"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountCorreosCreateRequestParameters](../../models/components/carrieraccountcorreoscreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountdeutschepostcreaterequest.md b/docs/models/components/carrieraccountdeutschepostcreaterequest.md index e017135c..4ece805e 100644 --- a/docs/models/components/carrieraccountdeutschepostcreaterequest.md +++ b/docs/models/components/carrieraccountdeutschepostcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountDeutschePostCreateRequestParameters](../../models/components/carrieraccountdeutschepostcreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["deutsche_post"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["deutsche_post"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountDeutschePostCreateRequestParameters](../../models/components/carrieraccountdeutschepostcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountdhlexpresscreaterequest.md b/docs/models/components/carrieraccountdhlexpresscreaterequest.md index 38182e56..5545b3f1 100644 --- a/docs/models/components/carrieraccountdhlexpresscreaterequest.md +++ b/docs/models/components/carrieraccountdhlexpresscreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountDHLExpressCreateRequestParameters](../../models/components/carrieraccountdhlexpresscreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["dhl_express"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["dhl_express"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountDHLExpressCreateRequestParameters](../../models/components/carrieraccountdhlexpresscreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountdpddecreaterequest.md b/docs/models/components/carrieraccountdpddecreaterequest.md index 5d993b36..a04151dd 100644 --- a/docs/models/components/carrieraccountdpddecreaterequest.md +++ b/docs/models/components/carrieraccountdpddecreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `parameters` | [components.CarrierAccountDpdDeCreateRequestParameters](../../models/components/carrieraccountdpddecreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["dpd_de"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["dpd_de"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountDpdDeCreateRequestParameters](../../models/components/carrieraccountdpddecreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountdpdukcreaterequest.md b/docs/models/components/carrieraccountdpdukcreaterequest.md index 49c9b1fa..c1068369 100644 --- a/docs/models/components/carrieraccountdpdukcreaterequest.md +++ b/docs/models/components/carrieraccountdpdukcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `parameters` | [components.CarrierAccountDPDUKCreateRequestParameters](../../models/components/carrieraccountdpdukcreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["dpd_uk"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["dpd_uk"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountDPDUKCreateRequestParameters](../../models/components/carrieraccountdpdukcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountfedexcreaterequest.md b/docs/models/components/carrieraccountfedexcreaterequest.md index 403d4aec..904c203d 100644 --- a/docs/models/components/carrieraccountfedexcreaterequest.md +++ b/docs/models/components/carrieraccountfedexcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `parameters` | [components.CarrierAccountFedExCreateRequestParameters](../../models/components/carrieraccountfedexcreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["fedex"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["fedex"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountFedExCreateRequestParameters](../../models/components/carrieraccountfedexcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccounthermesukcreaterequest.md b/docs/models/components/carrieraccounthermesukcreaterequest.md index 2860283e..ed0bbb26 100644 --- a/docs/models/components/carrieraccounthermesukcreaterequest.md +++ b/docs/models/components/carrieraccounthermesukcreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `parameters` | [components.CarrierAccountHermesUKCreateRequestParameters](../../models/components/carrieraccounthermesukcreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["hermes_uk"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["hermes_uk"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountHermesUKCreateRequestParameters](../../models/components/carrieraccounthermesukcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountmondialrelaycreaterequest.md b/docs/models/components/carrieraccountmondialrelaycreaterequest.md index f428984a..637c7c86 100644 --- a/docs/models/components/carrieraccountmondialrelaycreaterequest.md +++ b/docs/models/components/carrieraccountmondialrelaycreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountMondialRelayCreateRequestParameters](../../models/components/carrieraccountmondialrelaycreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["mondial_relay"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["mondial_relay"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountMondialRelayCreateRequestParameters](../../models/components/carrieraccountmondialrelaycreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountposteitalianecreaterequest.md b/docs/models/components/carrieraccountposteitalianecreaterequest.md index 50694a9a..b47ae6ce 100644 --- a/docs/models/components/carrieraccountposteitalianecreaterequest.md +++ b/docs/models/components/carrieraccountposteitalianecreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountPosteItalianeCreateRequestParameters](../../models/components/carrieraccountposteitalianecreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["poste_italiane"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["poste_italiane"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountPosteItalianeCreateRequestParameters](../../models/components/carrieraccountposteitalianecreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountsendlecreaterequest.md b/docs/models/components/carrieraccountroyalmailcreaterequest.md similarity index 57% rename from docs/models/components/carrieraccountsendlecreaterequest.md rename to docs/models/components/carrieraccountroyalmailcreaterequest.md index 4b416f66..11f0bf10 100644 --- a/docs/models/components/carrieraccountsendlecreaterequest.md +++ b/docs/models/components/carrieraccountroyalmailcreaterequest.md @@ -1,9 +1,9 @@ -# CarrierAccountSendleCreateRequest +# CarrierAccountRoyalMailCreateRequest ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountSendleCreateRequestParameters](../../models/components/carrieraccountsendlecreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["sendle"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `carrier` | *Literal["royal_mail"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountRoyalMailCreateRequestParameters](../../models/components/carrieraccountroyalmailcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountroyalmailcreaterequestparameters.md b/docs/models/components/carrieraccountroyalmailcreaterequestparameters.md new file mode 100644 index 00000000..43ca7a53 --- /dev/null +++ b/docs/models/components/carrieraccountroyalmailcreaterequestparameters.md @@ -0,0 +1,10 @@ +# CarrierAccountRoyalMailCreateRequestParameters + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `client_id` | *str* | :heavy_check_mark: | The client ID assigned to the user | +| `client_secret` | *str* | :heavy_check_mark: | The secret that corresponds to the supplied client ID | +| `partner_token` | *str* | :heavy_check_mark: | A unique identifier for your OBA account | \ No newline at end of file diff --git a/docs/models/components/carrieraccountroyalmailsfcreaterequest.md b/docs/models/components/carrieraccountroyalmailsfcreaterequest.md new file mode 100644 index 00000000..207f8fc0 --- /dev/null +++ b/docs/models/components/carrieraccountroyalmailsfcreaterequest.md @@ -0,0 +1,9 @@ +# CarrierAccountRoyalMailSfCreateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `carrier` | *Literal["royal_mail_sf"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountRoyalMailSfCreateRequestParameters](../../models/components/carrieraccountroyalmailsfcreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountroyalmailsfcreaterequestparameters.md b/docs/models/components/carrieraccountroyalmailsfcreaterequestparameters.md new file mode 100644 index 00000000..8dba8954 --- /dev/null +++ b/docs/models/components/carrieraccountroyalmailsfcreaterequestparameters.md @@ -0,0 +1,8 @@ +# CarrierAccountRoyalMailSfCreateRequestParameters + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `royal_mail_sf_agreements` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountsendlecreaterequestparameters.md b/docs/models/components/carrieraccountsendlecreaterequestparameters.md deleted file mode 100644 index aa1e00cf..00000000 --- a/docs/models/components/carrieraccountsendlecreaterequestparameters.md +++ /dev/null @@ -1,7 +0,0 @@ -# CarrierAccountSendleCreateRequestParameters - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/carrieraccountservicelevel.md b/docs/models/components/carrieraccountservicelevel.md index 1bf46413..4c5bb1a7 100644 --- a/docs/models/components/carrieraccountservicelevel.md +++ b/docs/models/components/carrieraccountservicelevel.md @@ -5,8 +5,8 @@ Contains details regarding the service level for the carrier account. ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | Service level name, e.g. `Priority Mail` or `FedEx Ground®`.
A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties.
These names vary depending on the provider.

See Service Levels. | Priority Mail Express | -| `token` | *Optional[str]* | :heavy_minus_sign: | Service level token, e.g. `usps_priority` or `fedex_ground`.

See Service Levels. | usps_priority_express | -| `supports_return_labels` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the service level supports return labels. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | Service level name, e.g. `Priority Mail` or `FedEx Ground®`.
A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties.
These names vary depending on the provider.

See Service Levels. | Priority Mail Express | +| `token` | *Optional[str]* | :heavy_minus_sign: | Service level token, e.g. `usps_priority` or `fedex_ground`.

See Service Levels. | usps_priority_express | +| `supports_return_labels` | *Optional[bool]* | :heavy_minus_sign: | Whether or not the service level supports return labels. | true | \ No newline at end of file diff --git a/docs/models/components/carrieraccountupscreaterequestparameters.md b/docs/models/components/carrieraccountupscreaterequestparameters.md index 7f112b83..794c8e3a 100644 --- a/docs/models/components/carrieraccountupscreaterequestparameters.md +++ b/docs/models/components/carrieraccountupscreaterequestparameters.md @@ -9,17 +9,17 @@ | `billing_address_country_iso2` | *str* | :heavy_check_mark: | N/A | US | | `billing_address_state` | *str* | :heavy_check_mark: | N/A | CA | | `billing_address_street1` | *str* | :heavy_check_mark: | N/A | 731 Market St | -| `billing_address_zip` | *str* | :heavy_check_mark: | N/A | 94103 | -| `pickup_address_city` | *str* | :heavy_check_mark: | User's pickup address city. | San Francisco | -| `pickup_address_country_iso2` | *str* | :heavy_check_mark: | User's pickup street 1. | US | -| `pickup_address_state` | *str* | :heavy_check_mark: | User's pickup address state. | CA | -| `pickup_address_street1` | *str* | :heavy_check_mark: | User's pickup address street 1. | 731 Market St | -| `pickup_address_zip` | *str* | :heavy_check_mark: | User's pickup address zip code. | 94103 | -| `ups_agreements` | *bool* | :heavy_check_mark: | Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false | | | `billing_address_street2` | *Optional[str]* | :heavy_minus_sign: | Empty string acceptable for billing_address_street2 | STE 200 | +| `billing_address_zip` | *str* | :heavy_check_mark: | N/A | 94103 | | `company` | *Optional[str]* | :heavy_minus_sign: | Company name. Full name is acceptable in this field if the user has no company name | Shippo | | `email` | *Optional[str]* | :heavy_minus_sign: | N/A | hippo@shippo.com | | `full_name` | *Optional[str]* | :heavy_minus_sign: | N/A | Shippo Meister | | `phone` | *Optional[str]* | :heavy_minus_sign: | Needs to be a valid phone number and cannot be null | 1112223333 | +| `pickup_address_city` | *str* | :heavy_check_mark: | User's pickup address city. | San Francisco | +| `pickup_address_country_iso2` | *str* | :heavy_check_mark: | User's pickup street 1. | US | | `pickup_address_same_as_billing_address` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | -| `pickup_address_street2` | *Optional[str]* | :heavy_minus_sign: | User's pickup street 2. | STE 200 | \ No newline at end of file +| `pickup_address_state` | *str* | :heavy_check_mark: | User's pickup address state. | CA | +| `pickup_address_street1` | *str* | :heavy_check_mark: | User's pickup address street 1. | 731 Market St | +| `pickup_address_street2` | *Optional[str]* | :heavy_minus_sign: | User's pickup street 2. | STE 200 | +| `pickup_address_zip` | *str* | :heavy_check_mark: | User's pickup address zip code. | 94103 | +| `ups_agreements` | *bool* | :heavy_check_mark: | Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false | | \ No newline at end of file diff --git a/docs/models/components/carrieraccountuspscreaterequest.md b/docs/models/components/carrieraccountuspscreaterequest.md index 610c3ed1..83c38f85 100644 --- a/docs/models/components/carrieraccountuspscreaterequest.md +++ b/docs/models/components/carrieraccountuspscreaterequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `parameters` | [components.CarrierAccountUSPSCreateRequestParameters](../../models/components/carrieraccountuspscreaterequestparameters.md) | :heavy_check_mark: | N/A | -| `carrier` | *Literal["usps"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `carrier` | *Literal["usps"]* | :heavy_check_mark: | N/A | +| `parameters` | [components.CarrierAccountUSPSCreateRequestParameters](../../models/components/carrieraccountuspscreaterequestparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/carrieraccountwithextrainfo.md b/docs/models/components/carrieraccountwithextrainfo.md index 3588a595..d4530d32 100644 --- a/docs/models/components/carrieraccountwithextrainfo.md +++ b/docs/models/components/carrieraccountwithextrainfo.md @@ -6,10 +6,10 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_id` | *str* | :heavy_check_mark: | Unique identifier of the account. Please check the carrier accounts tutorial
page for the `account_id` per carrier.

To protect account information, this field will be masked in any API response. | **** | -| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `active` | *Optional[bool]* | :heavy_minus_sign: | Determines whether the account is active. When creating a shipment, if no `carrier_accounts` are explicitly
passed Shippo will query all carrier accounts that have this field set. By default, this is set to True. | | +| `carrier` | *str* | :heavy_check_mark: | Carrier token, see Carriers

Please check the carrier accounts tutorial page for all supported carriers. | usps | | `parameters` | [Optional[components.CarrierAccountWithExtraInfoParameters]](../../models/components/carrieraccountwithextrainfoparameters.md) | :heavy_minus_sign: | N/A | | -| `carrier_name` | *Optional[Any]* | :heavy_minus_sign: | Carrier name, see Carriers
| USPS | +| `carrier_name` | *Optional[Any]* | :heavy_minus_sign: | Carrier name, see Carriers
| USPS | | `is_shippo_account` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | | `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the carrier account object. | 6aa34d5f6865448fbb1ee93636e98999 | diff --git a/docs/models/components/carrieraccountwithextrainfostatus.md b/docs/models/components/carrieraccountwithextrainfostatus.md index 6a8a28e4..da6a00dc 100644 --- a/docs/models/components/carrieraccountwithextrainfostatus.md +++ b/docs/models/components/carrieraccountwithextrainfostatus.md @@ -2,6 +2,14 @@ Current authentication status. Possible values: 'disconnected' (authorization lost, reconnect needed), 'connected' (authorized and active), 'authorization_pending' (awaiting initial authorization flow). +## Example Usage + +```python +from shippo.models.components import CarrierAccountWithExtraInfoStatus + +value = CarrierAccountWithExtraInfoStatus.DISCONNECTED +``` + ## Values diff --git a/docs/models/components/carrieraccountwithextrainfotype.md b/docs/models/components/carrieraccountwithextrainfotype.md index b9d1a6ab..632f2ede 100644 --- a/docs/models/components/carrieraccountwithextrainfotype.md +++ b/docs/models/components/carrieraccountwithextrainfotype.md @@ -2,6 +2,14 @@ Authentication method used by this account. +## Example Usage + +```python +from shippo.models.components import CarrierAccountWithExtraInfoType + +value = CarrierAccountWithExtraInfoType.DEFAULT +``` + ## Values diff --git a/docs/models/components/carriersenum.md b/docs/models/components/carriersenum.md index 7cfb943e..7f1caa71 100644 --- a/docs/models/components/carriersenum.md +++ b/docs/models/components/carriersenum.md @@ -51,9 +51,9 @@ | posti | Posti| | purolator | Purolator| | royal_mail | Royal Mail| +| royal_mail_sf | Royal Mail Storefeeder| | rr_donnelley | ePost Global| | russian_post | Russian Post| -| sendle | Sendle| | skypostal | SkyPostal| | stuart | Stuart| | swyft | Swyft| @@ -63,6 +63,14 @@ | veho | Veho | +## Example Usage + +```python +from shippo.models.components import CarriersEnum + +value = CarriersEnum.AIRTERRA +``` + ## Values @@ -117,9 +125,9 @@ | `POSTI` | posti | | `PUROLATOR` | purolator | | `ROYAL_MAIL` | royal_mail | +| `ROYAL_MAIL_SF` | royal_mail_sf | | `RR_DONNELLEY` | rr_donnelley | | `RUSSIAN_POST` | russian_post | -| `SENDLE` | sendle | | `SKYPOSTAL` | skypostal | | `STUART` | stuart | | `SWYFT` | swyft | diff --git a/docs/models/components/connectexistingownaccountrequest.md b/docs/models/components/connectexistingownaccountrequest.md index 3f9f718a..045330ff 100644 --- a/docs/models/components/connectexistingownaccountrequest.md +++ b/docs/models/components/connectexistingownaccountrequest.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | `account_id` | *str* | :heavy_check_mark: | N/A | 321123 | -| `carrier` | *str* | :heavy_check_mark: | N/A | fedex | -| `parameters` | [components.ConnectExistingOwnAccountRequestParameters](../../models/components/connectexistingownaccountrequestparameters.md) | :heavy_check_mark: | N/A | | | `active` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `carrier` | *str* | :heavy_check_mark: | N/A | fedex | | `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | FEDEX Account | +| `parameters` | [components.ConnectExistingOwnAccountRequestParameters](../../models/components/connectexistingownaccountrequestparameters.md) | :heavy_check_mark: | N/A | | | `test` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | \ No newline at end of file diff --git a/docs/models/components/corerate.md b/docs/models/components/corerate.md index c53936b7..f64f673e 100644 --- a/docs/models/components/corerate.md +++ b/docs/models/components/corerate.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `amount` | *Optional[str]* | :heavy_minus_sign: | Final Rate price, expressed in the currency used in the sender's country. | 5.5 | -| `amount_local` | *Optional[str]* | :heavy_minus_sign: | Final Rate price, expressed in the currency used in the recipient's country. | 5.5 | -| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency used in the sender's country, refers to `amount`.
The official ISO 4217 currency codes are used, e.g. `USD` or `EUR`. | USD | -| `currency_local` | *Optional[str]* | :heavy_minus_sign: | Currency used in the recipient's country, refers to `amount_local`.
The official ISO 4217 currency codes are used, e.g. `USD` or "EUR". | USD | -| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the Rate object. | adcfdddf8ec64b84ad22772bce3ea37a | -| `provider` | *Optional[str]* | :heavy_minus_sign: | Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`. | USPS | -| `carrier_account` | *Optional[str]* | :heavy_minus_sign: | Object ID of the carrier account that has been used to retrieve the rate. | 078870331023437cb917f5187429b093 | -| `servicelevel_name` | *Optional[str]* | :heavy_minus_sign: | Service level name, e.g. `Priority Mail` or `FedEx Ground®`.
A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard),
along with other properties. These names vary depending on the provider.

See Service Levels. | Priority Mail | -| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | fedex_ground | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *Optional[str]* | :heavy_minus_sign: | Final Rate price, expressed in the currency used in the sender's country. | 5.5 | +| `amount_local` | *Optional[str]* | :heavy_minus_sign: | Final Rate price, expressed in the currency used in the recipient's country. | 5.5 | +| `currency` | *Optional[str]* | :heavy_minus_sign: | Currency used in the sender's country, refers to `amount`.
The official ISO 4217 currency codes are used, e.g. `USD` or `EUR`. | USD | +| `currency_local` | *Optional[str]* | :heavy_minus_sign: | Currency used in the recipient's country, refers to `amount_local`.
The official ISO 4217 currency codes are used, e.g. `USD` or "EUR". | USD | +| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the Rate object. | adcfdddf8ec64b84ad22772bce3ea37a | +| `provider` | *Optional[str]* | :heavy_minus_sign: | Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`. | USPS | +| `carrier_account` | *Optional[str]* | :heavy_minus_sign: | Object ID of the carrier account that has been used to retrieve the rate. | 078870331023437cb917f5187429b093 | +| `servicelevel_name` | *Optional[str]* | :heavy_minus_sign: | Service level name, e.g. `Priority Mail` or `FedEx Ground®`.
A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard),
along with other properties. These names vary depending on the provider.

See Service Levels. | Priority Mail | +| `servicelevel_token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | fedex_ground | \ No newline at end of file diff --git a/docs/models/components/customerreference.md b/docs/models/components/customerreference.md index 76720c84..85adc6b2 100644 --- a/docs/models/components/customerreference.md +++ b/docs/models/components/customerreference.md @@ -5,8 +5,8 @@ Specify the reference field on the label (FedEx and UPS only). ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for customer reference field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for customer reference. Up to 40 characters. If
this is provided, reference_1 will be ignored. | | -| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for customer reference field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for customer reference. Up to 40 characters. If
this is provided, reference_1 will be ignored.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 40 characters (Express services); Max 30 characters (Ground services) \| | | +| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 1 | \ No newline at end of file diff --git a/docs/models/components/customsdeclaration.md b/docs/models/components/customsdeclaration.md index e8513361..b671246b 100644 --- a/docs/models/components/customsdeclaration.md +++ b/docs/models/components/customsdeclaration.md @@ -3,36 +3,36 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `certify` | *bool* | :heavy_check_mark: | Expresses that the certify_signer has provided all information of this customs declaration truthfully. | true | -| `certify_signer` | *str* | :heavy_check_mark: | Name of the person who created the customs declaration and is responsible for the validity of all
information provided. | Shawn Ippotle | -| `contents_type` | *str* | :heavy_check_mark: | Type of goods of the shipment.
Allowed values available here | MERCHANDISE | -| `items` | List[*str*] | :heavy_check_mark: | Distinct Parcel content items as Customs Items object_ids. | [
"5087f181d1dc4b14b73fdbf636498886"
] | -| `non_delivery_option` | *str* | :heavy_check_mark: | Indicates how the carrier should proceed in case the shipment can't be delivered.
Allowed values available here | RETURN | -| `aes_itn` | *Optional[str]* | :heavy_minus_sign: | **required if eel_pfc is `AES_ITN`**

AES / ITN reference of the shipment. | | -| `b13a_filing_option` | *Optional[str]* | :heavy_minus_sign: | B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS).
More information on reporting commercial exports from Canada.
Allowed values available here | FILED_ELECTRONICALLY | -| `b13a_number` | *Optional[str]* | :heavy_minus_sign: | **must be provided if and only if b13a_filing_option is provided**

Represents:
the Proof of Report (POR) Number when b13a_filing_option is `FILED_ELECTRONICALLY`;

the Summary ID Number when b13a_filing_option is `SUMMARY_REPORTING`;

or the Exemption Number when b13a_filing_option is `NOT_REQUIRED`. | | -| `certificate` | *Optional[str]* | :heavy_minus_sign: | Certificate reference of the shipment. | | -| `commercial_invoice` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `contents_explanation` | *Optional[str]* | :heavy_minus_sign: | **required if contents_type is `OTHER`**

Explanation of the type of goods of the shipment. | T-Shirt purchase | -| `disclaimer` | *Optional[str]* | :heavy_minus_sign: | Disclaimer for the shipment and customs information that have been provided. | | -| `duties_payor` | [Optional[components.CustomsDeclarationDutiesPayor]](../../models/components/customsdeclarationdutiespayor.md) | :heavy_minus_sign: | Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments. | | -| `exporter_identification` | [Optional[components.CustomsExporterIdentification]](../../models/components/customsexporteridentification.md) | :heavy_minus_sign: | Additional exporter identification that may be required to ship in certain countries | | -| `exporter_reference` | *Optional[str]* | :heavy_minus_sign: | Exporter reference of an export shipment. | | -| `importer_reference` | *Optional[str]* | :heavy_minus_sign: | Importer reference of an import shipment. | | -| `is_vat_collected` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the shipment's destination VAT has been collected. May be required for some destinations. | | -| `invoice` | *Optional[str]* | :heavy_minus_sign: | Invoice reference of the shipment. | #123123 | -| `license` | *Optional[str]* | :heavy_minus_sign: | License reference of the shipment. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID #123123 | -| `notes` | *Optional[str]* | :heavy_minus_sign: | Additional notes to be included in the customs declaration. | | -| `address_importer` | *Optional[str]* | :heavy_minus_sign: | Object ID of the Importer address. | 257ba08436604d2aaf069caafe7acb2a | -| `eel_pfc` | *Optional[str]* | :heavy_minus_sign: | EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most
other shipments from the US, `NOEEI_30_37_a` is applicable.
Allowed values available here | NOEEI_30_37_a | -| `incoterm` | *Optional[str]* | :heavy_minus_sign: | The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only.
eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK.
If expecting DAP for other carriers, please use DDU.
Allowed values available here | DDP | -| `invoiced_charges` | [Optional[components.CustomsInvoicedCharges]](../../models/components/customsinvoicedcharges.md) | :heavy_minus_sign: | Additional invoiced charges to be shown on the Customs Declaration Commercial Invoice. | | -| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of object creation. | 2014-07-17T01:01:08.306Z | -| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given object. | e2197a54da9d470480f4f8796cc419cb | -| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the object. | shippotle@shippo.com | -| `object_state` | [Optional[components.ObjectStateEnum]](../../models/components/objectstateenum.md) | :heavy_minus_sign: | Indicates the validity of the enclosing object | | -| `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of last object update. | 2014-07-17T01:01:08.306Z | -| `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | true | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `aes_itn` | *Optional[str]* | :heavy_minus_sign: | **required if eel_pfc is `AES_ITN`**

AES / ITN reference of the shipment. | | +| `b13a_filing_option` | *Optional[str]* | :heavy_minus_sign: | B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS).
More information on reporting commercial exports from Canada.
Allowed values available here | FILED_ELECTRONICALLY | +| `b13a_number` | *Optional[str]* | :heavy_minus_sign: | **must be provided if and only if b13a_filing_option is provided**

Represents:
the Proof of Report (POR) Number when b13a_filing_option is `FILED_ELECTRONICALLY`;

the Summary ID Number when b13a_filing_option is `SUMMARY_REPORTING`;

or the Exemption Number when b13a_filing_option is `NOT_REQUIRED`. | | +| `certificate` | *Optional[str]* | :heavy_minus_sign: | Certificate reference of the shipment. | | +| `certify` | *bool* | :heavy_check_mark: | Expresses that the certify_signer has provided all information of this customs declaration truthfully. | true | +| `certify_signer` | *str* | :heavy_check_mark: | Name of the person who created the customs declaration and is responsible for the validity of all
information provided. | Shawn Ippotle | +| `commercial_invoice` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `contents_explanation` | *Optional[str]* | :heavy_minus_sign: | **required if contents_type is `OTHER`**

Explanation of the type of goods of the shipment. | T-Shirt purchase | +| `disclaimer` | *Optional[str]* | :heavy_minus_sign: | Disclaimer for the shipment and customs information that have been provided.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 554 characters \| | | +| `duties_payor` | [Optional[components.CustomsDeclarationDutiesPayor]](../../models/components/customsdeclarationdutiespayor.md) | :heavy_minus_sign: | Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments. | | +| `exporter_identification` | [Optional[components.CustomsExporterIdentification]](../../models/components/customsexporteridentification.md) | :heavy_minus_sign: | Additional exporter identification that may be required to ship in certain countries | | +| `exporter_reference` | *Optional[str]* | :heavy_minus_sign: | Exporter reference of an export shipment. | | +| `importer_reference` | *Optional[str]* | :heavy_minus_sign: | Importer reference of an import shipment. | | +| `is_vat_collected` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the shipment's destination VAT has been collected. May be required for some destinations. | | +| `invoice` | *Optional[str]* | :heavy_minus_sign: | Invoice reference of the shipment. | #123123 | +| `license` | *Optional[str]* | :heavy_minus_sign: | License reference of the shipment. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID #123123 | +| `notes` | *Optional[str]* | :heavy_minus_sign: | Additional notes to be included in the customs declaration. | | +| `address_importer` | *Optional[str]* | :heavy_minus_sign: | Object ID of the Importer address. | 257ba08436604d2aaf069caafe7acb2a | +| `contents_type` | *str* | :heavy_check_mark: | Type of goods of the shipment.
Allowed values available here | MERCHANDISE | +| `eel_pfc` | *Optional[str]* | :heavy_minus_sign: | EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most
other shipments from the US, `NOEEI_30_37_a` is applicable.
Allowed values available here | NOEEI_30_37_a | +| `incoterm` | *Optional[str]* | :heavy_minus_sign: | The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only.
eDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK.
If expecting DAP for other carriers, please use DDU.
Allowed values available here
Carrier-specific restrictions are in the table below.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Must be one of DDP, DDU, FCA, DAP \| | DDP | +| `invoiced_charges` | [Optional[components.CustomsInvoicedCharges]](../../models/components/customsinvoicedcharges.md) | :heavy_minus_sign: | Additional invoiced charges to be shown on the Customs Declaration Commercial Invoice. | | +| `items` | List[*str*] | :heavy_check_mark: | Distinct Parcel content items as Customs Items object_ids. | [
"5087f181d1dc4b14b73fdbf636498886"
] | +| `non_delivery_option` | *str* | :heavy_check_mark: | Indicates how the carrier should proceed in case the shipment can't be delivered.
Allowed values available here | RETURN | +| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of object creation. | 2014-07-17T01:01:08.306Z | +| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given object. | e2197a54da9d470480f4f8796cc419cb | +| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the object. | shippotle@shippo.com | +| `object_state` | [Optional[components.ObjectStateEnum]](../../models/components/objectstateenum.md) | :heavy_minus_sign: | Indicates the validity of the enclosing object | | +| `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of last object update. | 2014-07-17T01:01:08.306Z | +| `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | true | \ No newline at end of file diff --git a/docs/models/components/customsdeclarationb13afilingoptionenum.md b/docs/models/components/customsdeclarationb13afilingoptionenum.md index 34bcc9ca..f7c0f5e5 100644 --- a/docs/models/components/customsdeclarationb13afilingoptionenum.md +++ b/docs/models/components/customsdeclarationb13afilingoptionenum.md @@ -2,7 +2,15 @@ B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS). More information on reporting commercial exports from Canada. -Allowed values available here +Allowed values available here + +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationB13AFilingOptionEnum + +value = CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY +``` ## Values diff --git a/docs/models/components/customsdeclarationcontentstypeenum.md b/docs/models/components/customsdeclarationcontentstypeenum.md index 79a05b90..fb276d5f 100644 --- a/docs/models/components/customsdeclarationcontentstypeenum.md +++ b/docs/models/components/customsdeclarationcontentstypeenum.md @@ -1,7 +1,15 @@ # CustomsDeclarationContentsTypeEnum Type of goods of the shipment. -Allowed values available here +Allowed values available here + +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationContentsTypeEnum + +value = CustomsDeclarationContentsTypeEnum.DOCUMENTS +``` ## Values diff --git a/docs/models/components/customsdeclarationcreaterequest.md b/docs/models/components/customsdeclarationcreaterequest.md index a4de3955..15f448d7 100644 --- a/docs/models/components/customsdeclarationcreaterequest.md +++ b/docs/models/components/customsdeclarationcreaterequest.md @@ -5,18 +5,15 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `certify` | *bool* | :heavy_check_mark: | Expresses that the certify_signer has provided all information of this customs declaration truthfully. | true | -| `certify_signer` | *str* | :heavy_check_mark: | Name of the person who created the customs declaration and is responsible for the validity of all
information provided. | Shawn Ippotle | -| `contents_type` | [components.CustomsDeclarationContentsTypeEnum](../../models/components/customsdeclarationcontentstypeenum.md) | :heavy_check_mark: | N/A | MERCHANDISE | -| `items` | List[[components.CustomsItemCreateRequest](../../models/components/customsitemcreaterequest.md)] | :heavy_check_mark: | N/A | | -| `non_delivery_option` | [components.CustomsDeclarationNonDeliveryOptionEnum](../../models/components/customsdeclarationnondeliveryoptionenum.md) | :heavy_check_mark: | N/A | RETURN | | `aes_itn` | *Optional[str]* | :heavy_minus_sign: | **required if eel_pfc is `AES_ITN`**

AES / ITN reference of the shipment. | | | `b13a_filing_option` | [Optional[components.CustomsDeclarationB13AFilingOptionEnum]](../../models/components/customsdeclarationb13afilingoptionenum.md) | :heavy_minus_sign: | N/A | FILED_ELECTRONICALLY | | `b13a_number` | *Optional[str]* | :heavy_minus_sign: | **must be provided if and only if b13a_filing_option is provided**

Represents:
the Proof of Report (POR) Number when b13a_filing_option is `FILED_ELECTRONICALLY`;

the Summary ID Number when b13a_filing_option is `SUMMARY_REPORTING`;

or the Exemption Number when b13a_filing_option is `NOT_REQUIRED`. | | | `certificate` | *Optional[str]* | :heavy_minus_sign: | Certificate reference of the shipment. | | +| `certify` | *bool* | :heavy_check_mark: | Expresses that the certify_signer has provided all information of this customs declaration truthfully. | true | +| `certify_signer` | *str* | :heavy_check_mark: | Name of the person who created the customs declaration and is responsible for the validity of all
information provided. | Shawn Ippotle | | `commercial_invoice` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `contents_explanation` | *Optional[str]* | :heavy_minus_sign: | **required if contents_type is `OTHER`**

Explanation of the type of goods of the shipment. | T-Shirt purchase | -| `disclaimer` | *Optional[str]* | :heavy_minus_sign: | Disclaimer for the shipment and customs information that have been provided. | | +| `disclaimer` | *Optional[str]* | :heavy_minus_sign: | Disclaimer for the shipment and customs information that have been provided.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 554 characters \| | | | `duties_payor` | [Optional[components.CustomsDeclarationCreateRequestDutiesPayor]](../../models/components/customsdeclarationcreaterequestdutiespayor.md) | :heavy_minus_sign: | Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments. | | | `exporter_identification` | [Optional[components.CustomsExporterIdentification]](../../models/components/customsexporteridentification.md) | :heavy_minus_sign: | Additional exporter identification that may be required to ship in certain countries | | | `exporter_reference` | *Optional[str]* | :heavy_minus_sign: | Exporter reference of an export shipment. | | @@ -27,6 +24,9 @@ | `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID #123123 | | `notes` | *Optional[str]* | :heavy_minus_sign: | Additional notes to be included in the customs declaration. | | | `address_importer` | [Optional[components.AddressImporter]](../../models/components/addressimporter.md) | :heavy_minus_sign: | Object that represents the address of the importer | | +| `contents_type` | [components.CustomsDeclarationContentsTypeEnum](../../models/components/customsdeclarationcontentstypeenum.md) | :heavy_check_mark: | N/A | MERCHANDISE | | `eel_pfc` | [Optional[components.CustomsDeclarationEelPfcEnum]](../../models/components/customsdeclarationeelpfcenum.md) | :heavy_minus_sign: | N/A | NOEEI_30_37_a | | `incoterm` | [Optional[components.CustomsDeclarationIncotermEnum]](../../models/components/customsdeclarationincotermenum.md) | :heavy_minus_sign: | N/A | DDP | +| `items` | List[[components.CustomsItemCreateRequest](../../models/components/customsitemcreaterequest.md)] | :heavy_check_mark: | N/A | | +| `non_delivery_option` | [components.CustomsDeclarationNonDeliveryOptionEnum](../../models/components/customsdeclarationnondeliveryoptionenum.md) | :heavy_check_mark: | N/A | RETURN | | `test` | *Optional[bool]* | :heavy_minus_sign: | N/A | true | \ No newline at end of file diff --git a/docs/models/components/customsdeclarationcreaterequesttype.md b/docs/models/components/customsdeclarationcreaterequesttype.md index e21ac974..e773871b 100644 --- a/docs/models/components/customsdeclarationcreaterequesttype.md +++ b/docs/models/components/customsdeclarationcreaterequesttype.md @@ -2,6 +2,14 @@ Party to be billed for duties. +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationCreateRequestType + +value = CustomsDeclarationCreateRequestType.SENDER +``` + ## Values diff --git a/docs/models/components/customsdeclarationeelpfcenum.md b/docs/models/components/customsdeclarationeelpfcenum.md index f270968b..67db4495 100644 --- a/docs/models/components/customsdeclarationeelpfcenum.md +++ b/docs/models/components/customsdeclarationeelpfcenum.md @@ -2,7 +2,15 @@ EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most other shipments from the US, `NOEEI_30_37_a` is applicable. -Allowed values available here +Allowed values available here + +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationEelPfcEnum + +value = CustomsDeclarationEelPfcEnum.NOEEI_30_37_A +``` ## Values diff --git a/docs/models/components/customsdeclarationincotermenum.md b/docs/models/components/customsdeclarationincotermenum.md index 21cdf4cc..1877adfb 100644 --- a/docs/models/components/customsdeclarationincotermenum.md +++ b/docs/models/components/customsdeclarationincotermenum.md @@ -1,9 +1,23 @@ # CustomsDeclarationIncotermEnum -The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. -eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK. +The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. +eDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK. If expecting DAP for other carriers, please use DDU. -Allowed values available here +Allowed values available here +Carrier-specific restrictions are in the table below. + +**Carrier-Specific Constraints:** +| Carrier | Constraints | +|:---|:---| +| FedEx | Must be one of DDP, DDU, FCA, DAP | + +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationIncotermEnum + +value = CustomsDeclarationIncotermEnum.DDP +``` ## Values diff --git a/docs/models/components/customsdeclarationnondeliveryoptionenum.md b/docs/models/components/customsdeclarationnondeliveryoptionenum.md index 3e62d232..29bb8f0b 100644 --- a/docs/models/components/customsdeclarationnondeliveryoptionenum.md +++ b/docs/models/components/customsdeclarationnondeliveryoptionenum.md @@ -1,7 +1,15 @@ # CustomsDeclarationNonDeliveryOptionEnum Indicates how the carrier should proceed in case the shipment can't be delivered. -Allowed values available here +Allowed values available here + +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationNonDeliveryOptionEnum + +value = CustomsDeclarationNonDeliveryOptionEnum.ABANDON +``` ## Values diff --git a/docs/models/components/customsdeclarationtype.md b/docs/models/components/customsdeclarationtype.md index 6d9a1ce1..814fc8ad 100644 --- a/docs/models/components/customsdeclarationtype.md +++ b/docs/models/components/customsdeclarationtype.md @@ -2,6 +2,14 @@ Party to be billed for duties. +## Example Usage + +```python +from shippo.models.components import CustomsDeclarationType + +value = CustomsDeclarationType.SENDER +``` + ## Values diff --git a/docs/models/components/customsitem.md b/docs/models/components/customsitem.md index f37c8432..82328491 100644 --- a/docs/models/components/customsitem.md +++ b/docs/models/components/customsitem.md @@ -6,17 +6,17 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `description` | *str* | :heavy_check_mark: | Text description of your item. | T-Shirt | +| `eccn_ear99` | *Optional[str]* | :heavy_minus_sign: | Export Control Classification Number, required on some exports from the United States. | | | `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID "123454" | | `net_weight` | *str* | :heavy_check_mark: | Total weight of this item, i.e. quantity * weight per item. | 5 | | `origin_country` | *str* | :heavy_check_mark: | Country of origin of the item. Example: `US` or `DE`.
All accepted values can be found on the Official ISO Website. | | | `quantity` | *int* | :heavy_check_mark: | Quantity of this item in the shipment you send. Must be greater than 0. | 20 | -| `value_amount` | *str* | :heavy_check_mark: | Total value of this item, i.e. quantity * value per item. | 200 | -| `value_currency` | *str* | :heavy_check_mark: | Currency used for value_amount. The official ISO 4217
currency codes are used, e.g. `USD` or `EUR`. | USD | -| `eccn_ear99` | *Optional[str]* | :heavy_minus_sign: | Export Control Classification Number, required on some exports from the United States. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID "123454" | | `sku_code` | *Optional[str]* | :heavy_minus_sign: | SKU code of the item, which is required by some carriers. | HM-123 | | `hs_code` | *Optional[str]* | :heavy_minus_sign: | HS code of the item, which is required by some carriers. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 50 character limit. | 0901.21 | | `tariff_number` | *Optional[str]* | :heavy_minus_sign: | The tariff number of the item. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 12 character limit. | | +| `value_amount` | *str* | :heavy_check_mark: | Total value of this item, i.e. quantity * value per item. | 200 | +| `value_currency` | *str* | :heavy_check_mark: | Currency used for value_amount. The official ISO 4217
currency codes are used, e.g. `USD` or `EUR`. | USD | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of object creation. | 2014-07-17T00:49:20.631Z | | `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given object. | d799c2679e644279b59fe661ac8fa488 | | `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the object. | shippotle@shippo.com | diff --git a/docs/models/components/customsitemcreaterequest.md b/docs/models/components/customsitemcreaterequest.md index a4190837..81f9126c 100644 --- a/docs/models/components/customsitemcreaterequest.md +++ b/docs/models/components/customsitemcreaterequest.md @@ -6,14 +6,14 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `description` | *str* | :heavy_check_mark: | Text description of your item. | T-Shirt | +| `eccn_ear99` | *Optional[str]* | :heavy_minus_sign: | Export Control Classification Number, required on some exports from the United States. | | | `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID "123454" | | `net_weight` | *str* | :heavy_check_mark: | Total weight of this item, i.e. quantity * weight per item. | 5 | | `origin_country` | *str* | :heavy_check_mark: | Country of origin of the item. Example: `US` or `DE`.
All accepted values can be found on the Official ISO Website. | | | `quantity` | *int* | :heavy_check_mark: | Quantity of this item in the shipment you send. Must be greater than 0. | 20 | -| `value_amount` | *str* | :heavy_check_mark: | Total value of this item, i.e. quantity * value per item. | 200 | -| `value_currency` | *str* | :heavy_check_mark: | Currency used for value_amount. The official ISO 4217
currency codes are used, e.g. `USD` or `EUR`. | USD | -| `eccn_ear99` | *Optional[str]* | :heavy_minus_sign: | Export Control Classification Number, required on some exports from the United States. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | Order ID "123454" | | `sku_code` | *Optional[str]* | :heavy_minus_sign: | SKU code of the item, which is required by some carriers. | HM-123 | | `hs_code` | *Optional[str]* | :heavy_minus_sign: | HS code of the item, which is required by some carriers. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 50 character limit. | 0901.21 | -| `tariff_number` | *Optional[str]* | :heavy_minus_sign: | The tariff number of the item. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 12 character limit. | | \ No newline at end of file +| `tariff_number` | *Optional[str]* | :heavy_minus_sign: | The tariff number of the item. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 12 character limit. | | +| `value_amount` | *str* | :heavy_check_mark: | Total value of this item, i.e. quantity * value per item. | 200 | +| `value_currency` | *str* | :heavy_check_mark: | Currency used for value_amount. The official ISO 4217
currency codes are used, e.g. `USD` or `EUR`. | USD | \ No newline at end of file diff --git a/docs/models/components/customstaxidentificationtype.md b/docs/models/components/customstaxidentificationtype.md index daf76f93..7821b36b 100644 --- a/docs/models/components/customstaxidentificationtype.md +++ b/docs/models/components/customstaxidentificationtype.md @@ -6,6 +6,14 @@ Type of tax identification. * `IOSS` - Import One-Stop Shop * `ARN` - Australian Taxation Office Reference Number +## Example Usage + +```python +from shippo.models.components import CustomsTaxIdentificationType + +value = CustomsTaxIdentificationType.EIN +``` + ## Values diff --git a/docs/models/components/dangerousgoodscode.md b/docs/models/components/dangerousgoodscode.md index 533f4b95..e3440640 100644 --- a/docs/models/components/dangerousgoodscode.md +++ b/docs/models/components/dangerousgoodscode.md @@ -2,6 +2,14 @@ Dangerous Goods Code (DHL eCommerce only). See Category Codes +## Example Usage + +```python +from shippo.models.components import DangerousGoodsCode + +value = DangerousGoodsCode.ONE +``` + ## Values diff --git a/docs/models/components/departmentnumber.md b/docs/models/components/departmentnumber.md index b9b255ef..71e1060a 100644 --- a/docs/models/components/departmentnumber.md +++ b/docs/models/components/departmentnumber.md @@ -8,5 +8,5 @@ Specify the department number field on the label (FedEx and UPS only). | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for department number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for department number. Up to 40 characters. | | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for department number. Up to 40 characters.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 characters \| | | | `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 3 | \ No newline at end of file diff --git a/docs/models/components/distanceunitenum.md b/docs/models/components/distanceunitenum.md index b770d9b7..a2fad86e 100644 --- a/docs/models/components/distanceunitenum.md +++ b/docs/models/components/distanceunitenum.md @@ -2,6 +2,14 @@ The measure unit used for length, width and height. +## Example Usage + +```python +from shippo.models.components import DistanceUnitEnum + +value = DistanceUnitEnum.CM +``` + ## Values diff --git a/docs/models/components/fedexconnectexistingownaccountparameters.md b/docs/models/components/fedexconnectexistingownaccountparameters.md index da66ec27..eaaeaf62 100644 --- a/docs/models/components/fedexconnectexistingownaccountparameters.md +++ b/docs/models/components/fedexconnectexistingownaccountparameters.md @@ -1,15 +1,31 @@ # FedExConnectExistingOwnAccountParameters +In the case of masked fields, they should be handled carefully. + +Fields also must consider: +- Not providing a *fields* in parameters will not result in a change to any configured value +- Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value +- Providing *field* with null will clear the configured value +- Providing *field* with any other value will change the configured value and may affect the behavior of the account. + + ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `first_name` | *str* | :heavy_check_mark: | First name of the account holder | -| `last_name` | *str* | :heavy_check_mark: | Last name of the account holder | -| `phone_number` | *str* | :heavy_check_mark: | Phone number of the account holder | -| `from_address_st` | *str* | :heavy_check_mark: | Street address of the account holder | -| `from_address_city` | *str* | :heavy_check_mark: | City of the account holder | -| `from_address_state` | *str* | :heavy_check_mark: | State of the account holder | -| `from_address_zip` | *str* | :heavy_check_mark: | Zip code of the account holder | -| `from_address_country_iso2` | *str* | :heavy_check_mark: | Country of the account holder | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `first_name` | *str* | :heavy_check_mark: | First name of the account holder | | +| `last_name` | *str* | :heavy_check_mark: | Last name of the account holder | | +| `phone_number` | *str* | :heavy_check_mark: | Phone number of the account holder | | +| `from_address_st` | *str* | :heavy_check_mark: | Street address of the account holder | | +| `from_address_city` | *str* | :heavy_check_mark: | City of the account holder | | +| `from_address_state` | *str* | :heavy_check_mark: | State of the account holder | | +| `from_address_zip` | *str* | :heavy_check_mark: | Zip code of the account holder | | +| `from_address_country_iso2` | *str* | :heavy_check_mark: | Country of the account holder | | +| `use_multi_factor_registration` | *Literal[True]* | :heavy_check_mark: | Must be true. FedEx accounts are registered using the multi-factor registration workflow. | | +| `verification_option` | [components.VerificationOption](../../models/components/verificationoption.md) | :heavy_check_mark: | Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE). | | +| `verification_pin` | *Optional[str]* | :heavy_minus_sign: | (optional) The PIN to verify the account. | | +| `verification_invoice_number` | *Optional[str]* | :heavy_minus_sign: | (optional) The invoice number to verify the account. | | +| `verification_invoice_amount` | *Optional[Decimal]* | :heavy_minus_sign: | (optional) The invoice amount to verify the account. | 340 | +| `verification_invoice_date` | [datetime](https://docs.python.org/3/library/datetime.html#datetime-objects) | :heavy_minus_sign: | (optional) The invoice date to verify the account. In the format `YYYY-MM-DD`. | 2024-03-09 | +| `verification_invoice_currency` | *Optional[str]* | :heavy_minus_sign: | (optional) The invoice currency to verify the account. | USD | \ No newline at end of file diff --git a/docs/models/components/instanttransactioncreaterequest.md b/docs/models/components/instanttransactioncreaterequest.md index 56e19657..1549ccc6 100644 --- a/docs/models/components/instanttransactioncreaterequest.md +++ b/docs/models/components/instanttransactioncreaterequest.md @@ -5,10 +5,10 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `carrier_account` | *str* | :heavy_check_mark: | N/A | b741b99f95e841639b54272834bc478c | -| `servicelevel_token` | *str* | :heavy_check_mark: | N/A | usps_priority | -| `shipment` | [components.ShipmentCreateRequest](../../models/components/shipmentcreaterequest.md) | :heavy_check_mark: | N/A | | | `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `carrier_account` | *str* | :heavy_check_mark: | N/A | b741b99f95e841639b54272834bc478c | | `label_file_type` | [Optional[components.LabelFileType]](../../models/components/labelfiletype.md) | :heavy_minus_sign: | N/A | PDF | | `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Order ID #12345 | +| `servicelevel_token` | *str* | :heavy_check_mark: | N/A | usps_priority | +| `shipment` | [components.ShipmentCreateRequest](../../models/components/shipmentcreaterequest.md) | :heavy_check_mark: | N/A | | | `order` | *Optional[str]* | :heavy_minus_sign: | N/A | adcfdddf8ec64b84ad22772bce3ea37a | \ No newline at end of file diff --git a/docs/models/components/insuranceprovider.md b/docs/models/components/insuranceprovider.md index 781d182c..7d9586ee 100644 --- a/docs/models/components/insuranceprovider.md +++ b/docs/models/components/insuranceprovider.md @@ -2,6 +2,14 @@ To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set `provider` to `FEDEX`, `UPS`, or `ONTRAC`. +## Example Usage + +```python +from shippo.models.components import InsuranceProvider + +value = InsuranceProvider.FEDEX +``` + ## Values diff --git a/docs/models/components/invoicenumber.md b/docs/models/components/invoicenumber.md index 0cc57033..9673d4fc 100644 --- a/docs/models/components/invoicenumber.md +++ b/docs/models/components/invoicenumber.md @@ -5,8 +5,8 @@ Specify the invoice number field on the label (FedEx and UPS only). ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for invoice number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for invoice number. Up to 40 characters. If
provided, this will be used on the label instead of shipment.customs_declaration.invoice. | | -| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 2 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for invoice number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for invoice number. Up to 40 characters. If
provided, this will be used on the label instead of shipment.customs_declaration.invoice.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 characters \| | | +| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 2 | \ No newline at end of file diff --git a/docs/models/components/labelfiletype.md b/docs/models/components/labelfiletype.md index 24660a37..5becea5b 100644 --- a/docs/models/components/labelfiletype.md +++ b/docs/models/components/labelfiletype.md @@ -1,5 +1,13 @@ # LabelFileType +## Example Usage + +```python +from shippo.models.components import LabelFileType + +value = LabelFileType.PNG +``` + ## Values diff --git a/docs/models/components/labelfiletypeenum.md b/docs/models/components/labelfiletypeenum.md index 61950429..a547de29 100644 --- a/docs/models/components/labelfiletypeenum.md +++ b/docs/models/components/labelfiletypeenum.md @@ -3,6 +3,14 @@ Print format of the label. If empty, will use the default format set from the Shippo dashboard. +## Example Usage + +```python +from shippo.models.components import LabelFileTypeEnum + +value = LabelFileTypeEnum.PNG +``` + ## Values diff --git a/docs/models/components/latitude.md b/docs/models/components/latitude.md index eb5f81f6..7560a2a9 100644 --- a/docs/models/components/latitude.md +++ b/docs/models/components/latitude.md @@ -1,5 +1,7 @@ # Latitude +Latitude of address + ## Supported Types diff --git a/docs/models/components/lineitem.md b/docs/models/components/lineitem.md index 6a08278e..3dc3f4d0 100644 --- a/docs/models/components/lineitem.md +++ b/docs/models/components/lineitem.md @@ -1,5 +1,11 @@ # LineItem +

+
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource + in the future. Currently it's a nested object within the order resource.

+

+A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. + ## Fields diff --git a/docs/models/components/liveratecreaterequest.md b/docs/models/components/liveratecreaterequest.md index 411829ae..e29c14ff 100644 --- a/docs/models/components/liveratecreaterequest.md +++ b/docs/models/components/liveratecreaterequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `address_from` | [Optional[components.LiveRateCreateRequestAddressFrom]](../../models/components/liveratecreaterequestaddressfrom.md) | :heavy_minus_sign: | The sender address, which includes your name, company name, street address, city, state, zip code,
country, phone number, and email address (strings). Special characters should not be included in
any address element, especially name, company, and email. | | | `address_to` | [components.LiveRateCreateRequestAddressTo](../../models/components/liveratecreaterequestaddressto.md) | :heavy_check_mark: | The recipient address, which includes the recipient's name, company name, street address, city, state, zip code,
country, phone number, and email address (strings). Special characters should not be included in
any address element, especially name, company, and email. | | | `line_items` | List[[components.LineItem](../../models/components/lineitem.md)] | :heavy_check_mark: | Array of Line Item objects | | -| `address_from` | [Optional[components.LiveRateCreateRequestAddressFrom]](../../models/components/liveratecreaterequestaddressfrom.md) | :heavy_minus_sign: | The sender address, which includes your name, company name, street address, city, state, zip code,
country, phone number, and email address (strings). Special characters should not be included in
any address element, especially name, company, and email. | | | `parcel` | [Optional[components.LiveRateCreateRequestParcel]](../../models/components/liveratecreaterequestparcel.md) | :heavy_minus_sign: | Object ID for an existing User Parcel Template OR a fully formed Parcel object. | 5df144dca289442cv7a06 | \ No newline at end of file diff --git a/docs/models/components/longitude.md b/docs/models/components/longitude.md index 51c5e5c2..051eca20 100644 --- a/docs/models/components/longitude.md +++ b/docs/models/components/longitude.md @@ -1,5 +1,7 @@ # Longitude +Longitude of address + ## Supported Types diff --git a/docs/models/components/manifest.md b/docs/models/components/manifest.md index c6a615b9..2744cc9b 100644 --- a/docs/models/components/manifest.md +++ b/docs/models/components/manifest.md @@ -7,12 +7,12 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `carrier_account` | *str* | :heavy_check_mark: | ID of carrier account | adcfdddf8ec64b84ad22772bce3ea37a | | `shipment_date` | *str* | :heavy_check_mark: | All shipments to be submitted on this day will be closed out.
Must be in the format `2014-01-18T00:35:03.463Z` (ISO 8601 date). | 2014-05-16T23:59:59Z | +| `transactions` | List[*str*] | :heavy_minus_sign: | IDs transactions to use. If you set this to null or not send this parameter,
Shippo will automatically assign all applicable transactions. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | | `address_from` | *str* | :heavy_check_mark: | ID of the Address object that should be used as pickup address for the scan form.
The USPS will validate this address before creating the scan form. | d799c2679e644279b59fe661ac8fa488 | | `documents` | List[*str*] | :heavy_check_mark: | An array containing the URLs to all returned manifest documents. | [
"https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D\u0026Expires=1402803835\u0026AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA"
] | +| `errors` | List[*str*] | :heavy_minus_sign: | An array of codes and messages describing the error that occurred if any. | | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Date and time of object creation. | | | `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given object. | adcfdddf8ec64b84ad22772bce3ea37a | | `object_owner` | *str* | :heavy_check_mark: | Username of the user who created the object. | shippotle@shippo.com | | `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Date and time of last object update. | | -| `status` | [components.ManifestStatus](../../models/components/manifeststatus.md) | :heavy_check_mark: | Indicates the status of the manifest. | SUCCESS | -| `transactions` | List[*str*] | :heavy_minus_sign: | IDs transactions to use. If you set this to null or not send this parameter,
Shippo will automatically assign all applicable transactions. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | -| `errors` | List[*str*] | :heavy_minus_sign: | An array of codes and messages describing the error that occurred if any. | | \ No newline at end of file +| `status` | [components.ManifestStatus](../../models/components/manifeststatus.md) | :heavy_check_mark: | Indicates the status of the manifest. | SUCCESS | \ No newline at end of file diff --git a/docs/models/components/manifestcreaterequest.md b/docs/models/components/manifestcreaterequest.md index 8eb11a0a..a2378357 100644 --- a/docs/models/components/manifestcreaterequest.md +++ b/docs/models/components/manifestcreaterequest.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `carrier_account` | *str* | :heavy_check_mark: | ID of carrier account | adcfdddf8ec64b84ad22772bce3ea37a | | `shipment_date` | *str* | :heavy_check_mark: | All shipments to be submitted on this day will be closed out.
Must be in the format `2014-01-18T00:35:03.463Z` (ISO 8601 date). | 2014-05-16T23:59:59Z | -| `address_from` | [components.ManifestCreateRequestAddressFrom](../../models/components/manifestcreaterequestaddressfrom.md) | :heavy_check_mark: | N/A | | | `transactions` | List[*str*] | :heavy_minus_sign: | IDs transactions to use. If you set this to null or not send this parameter,
Shippo will automatically assign all applicable transactions. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | +| `address_from` | [components.ManifestCreateRequestAddressFrom](../../models/components/manifestcreaterequestaddressfrom.md) | :heavy_check_mark: | N/A | | | `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/manifeststatus.md b/docs/models/components/manifeststatus.md index c80d9323..45485f5b 100644 --- a/docs/models/components/manifeststatus.md +++ b/docs/models/components/manifeststatus.md @@ -2,6 +2,14 @@ Indicates the status of the manifest. +## Example Usage + +```python +from shippo.models.components import ManifestStatus + +value = ManifestStatus.QUEUED +``` + ## Values diff --git a/docs/models/components/objectinfo.md b/docs/models/components/objectinfo.md index e1c8b7b3..93847f0c 100644 --- a/docs/models/components/objectinfo.md +++ b/docs/models/components/objectinfo.md @@ -7,4 +7,5 @@ Holds internal state relevant to users. | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `authentication` | [Optional[components.Authentication]](../../models/components/authentication.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `authentication` | [Optional[components.Authentication]](../../models/components/authentication.md) | :heavy_minus_sign: | N/A | +| `verification` | [Optional[components.Verification]](../../models/components/verification.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/objectstate.md b/docs/models/components/objectstate.md index 67ae0c8c..f0d411ac 100644 --- a/docs/models/components/objectstate.md +++ b/docs/models/components/objectstate.md @@ -2,6 +2,14 @@ A Parcel will only be valid when all required values have been sent and validated successfully. +## Example Usage + +```python +from shippo.models.components import ObjectState + +value = ObjectState.VALID +``` + ## Values diff --git a/docs/models/components/objectstateenum.md b/docs/models/components/objectstateenum.md index 53bb57df..ca5ca966 100644 --- a/docs/models/components/objectstateenum.md +++ b/docs/models/components/objectstateenum.md @@ -2,6 +2,14 @@ Indicates the validity of the enclosing object +## Example Usage + +```python +from shippo.models.components import ObjectStateEnum + +value = ObjectStateEnum.VALID +``` + ## Values diff --git a/docs/models/components/order.md b/docs/models/components/order.md index e444dc17..9bb6c769 100644 --- a/docs/models/components/order.md +++ b/docs/models/components/order.md @@ -3,25 +3,25 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `placed_at` | *str* | :heavy_check_mark: | Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo. | 2016-09-23T01:28:12Z | -| `to_address` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | -| `currency` | *Optional[str]* | :heavy_minus_sign: | **Required if total_price is provided**

Currency of the total_price and total_tax amounts. | USD | -| `notes` | *Optional[str]* | :heavy_minus_sign: | Custom buyer- or seller-provided notes about the order. | This customer is a VIP | -| `order_number` | *Optional[str]* | :heavy_minus_sign: | An alphanumeric identifier for the order used by the seller/buyer. This identifier doesn't need to be unique. | #1068 | -| `order_status` | [Optional[components.OrderStatusEnum]](../../models/components/orderstatusenum.md) | :heavy_minus_sign: | Current state of the order. See the orders tutorial
for the logic of how the status is handled. | PAID | -| `shipping_cost` | *Optional[str]* | :heavy_minus_sign: | Amount paid by the buyer for shipping. This amount can be different from the price the seller will actually pay for shipping. | 12.83 | -| `shipping_cost_currency` | *Optional[str]* | :heavy_minus_sign: | **Required if shipping_cost is provided**

Currency of the shipping_cost amount. | USD | -| `shipping_method` | *Optional[str]* | :heavy_minus_sign: | Shipping method (carrier + service or other free text description) chosen by the buyer.
This value can be different from the shipping method the seller will actually choose. | USPS First Class Package | -| `subtotal_price` | *Optional[str]* | :heavy_minus_sign: | N/A | 12.1 | -| `total_price` | *Optional[str]* | :heavy_minus_sign: | Total amount paid by the buyer for this order. | 24.93 | -| `total_tax` | *Optional[str]* | :heavy_minus_sign: | Total tax amount paid by the buyer for this order. | 0.0 | -| `weight` | *Optional[str]* | :heavy_minus_sign: | Total weight of the order. | 0.4 | -| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | -| `from_address` | [Optional[components.Address]](../../models/components/address.md) | :heavy_minus_sign: | Address object of the sender / seller. Will be returned expanded by default. | | -| `line_items` | List[[components.LineItem](../../models/components/lineitem.md)] | :heavy_minus_sign: | Array of line item objects representing the items in this order.
All objects will be returned expanded by default. | | -| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the order object. | adcfdddf8ec64b84ad22772bce3ea37a | -| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the object. | shippotle@shippo.com | -| `shop_app` | [Optional[components.OrderShopAppEnum]](../../models/components/ordershopappenum.md) | :heavy_minus_sign: | Platform the order was created on and, if applicable, imported from.
Orders created via the Shippo API or dashboard will have the value "Shippo". | Shippo | -| `transactions` | List[[components.OrderTransaction](../../models/components/ordertransaction.md)] | :heavy_minus_sign: | Array of transaction objects representing all shipping labels purchased for this order.
All objects are returned expanded with a limited number of fields by default. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `currency` | *Optional[str]* | :heavy_minus_sign: | **Required if total_price is provided**

Currency of the total_price and total_tax amounts. | USD | +| `notes` | *Optional[str]* | :heavy_minus_sign: | Custom buyer- or seller-provided notes about the order. | This customer is a VIP | +| `order_number` | *Optional[str]* | :heavy_minus_sign: | An alphanumeric identifier for the order used by the seller/buyer. This identifier doesn't need to be unique. | #1068 | +| `order_status` | [Optional[components.OrderStatusEnum]](../../models/components/orderstatusenum.md) | :heavy_minus_sign: | Current state of the order. See the orders tutorial
for the logic of how the status is handled. | PAID | +| `placed_at` | *str* | :heavy_check_mark: | Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo. | 2016-09-23T01:28:12Z | +| `shipping_cost` | *Optional[str]* | :heavy_minus_sign: | Amount paid by the buyer for shipping. This amount can be different from the price the seller will actually pay for shipping. | 12.83 | +| `shipping_cost_currency` | *Optional[str]* | :heavy_minus_sign: | **Required if shipping_cost is provided**

Currency of the shipping_cost amount. | USD | +| `shipping_method` | *Optional[str]* | :heavy_minus_sign: | Shipping method (carrier + service or other free text description) chosen by the buyer.
This value can be different from the shipping method the seller will actually choose. | USPS First Class Package | +| `subtotal_price` | *Optional[str]* | :heavy_minus_sign: | N/A | 12.1 | +| `total_price` | *Optional[str]* | :heavy_minus_sign: | Total amount paid by the buyer for this order. | 24.93 | +| `total_tax` | *Optional[str]* | :heavy_minus_sign: | Total tax amount paid by the buyer for this order. | 0.0 | +| `weight` | *Optional[str]* | :heavy_minus_sign: | Total weight of the order. | 0.4 | +| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | +| `from_address` | [Optional[components.Address]](../../models/components/address.md) | :heavy_minus_sign: | Address object of the sender / seller. Will be returned expanded by default. | | +| `to_address` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | +| `line_items` | List[[components.LineItem](../../models/components/lineitem.md)] | :heavy_minus_sign: | Array of line item objects representing the items in this order.
All objects will be returned expanded by default. | | +| `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the order object. | adcfdddf8ec64b84ad22772bce3ea37a | +| `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the object. | shippotle@shippo.com | +| `shop_app` | [Optional[components.OrderShopAppEnum]](../../models/components/ordershopappenum.md) | :heavy_minus_sign: | Platform the order was created on and, if applicable, imported from.
Orders created via the Shippo API or dashboard will have the value "Shippo". | Shippo | +| `transactions` | List[[components.OrderTransaction](../../models/components/ordertransaction.md)] | :heavy_minus_sign: | Array of transaction objects representing all shipping labels purchased for this order.
All objects are returned expanded with a limited number of fields by default. | | \ No newline at end of file diff --git a/docs/models/components/ordercreaterequest.md b/docs/models/components/ordercreaterequest.md index 095cbdb6..3a6a6fb7 100644 --- a/docs/models/components/ordercreaterequest.md +++ b/docs/models/components/ordercreaterequest.md @@ -5,12 +5,11 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `placed_at` | *str* | :heavy_check_mark: | Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo. | 2016-09-23T01:28:12Z | -| `to_address` | [components.AddressCreateRequest](../../models/components/addresscreaterequest.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | | `currency` | *Optional[str]* | :heavy_minus_sign: | **Required if total_price is provided**

Currency of the total_price and total_tax amounts. | USD | | `notes` | *Optional[str]* | :heavy_minus_sign: | Custom buyer- or seller-provided notes about the order. | This customer is a VIP | | `order_number` | *Optional[str]* | :heavy_minus_sign: | An alphanumeric identifier for the order used by the seller/buyer. This identifier doesn't need to be unique. | #1068 | | `order_status` | [Optional[components.OrderStatusEnum]](../../models/components/orderstatusenum.md) | :heavy_minus_sign: | Current state of the order. See the orders tutorial
for the logic of how the status is handled. | PAID | +| `placed_at` | *str* | :heavy_check_mark: | Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo. | 2016-09-23T01:28:12Z | | `shipping_cost` | *Optional[str]* | :heavy_minus_sign: | Amount paid by the buyer for shipping. This amount can be different from the price the seller will actually pay for shipping. | 12.83 | | `shipping_cost_currency` | *Optional[str]* | :heavy_minus_sign: | **Required if shipping_cost is provided**

Currency of the shipping_cost amount. | USD | | `shipping_method` | *Optional[str]* | :heavy_minus_sign: | Shipping method (carrier + service or other free text description) chosen by the buyer.
This value can be different from the shipping method the seller will actually choose. | USPS First Class Package | @@ -19,5 +18,6 @@ | `total_tax` | *Optional[str]* | :heavy_minus_sign: | Total tax amount paid by the buyer for this order. | 0.0 | | `weight` | *Optional[str]* | :heavy_minus_sign: | Total weight of the order. | 0.4 | | `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | -| `from_address` | [Optional[components.AddressCreateRequest]](../../models/components/addresscreaterequest.md) | :heavy_minus_sign: | Address object of the sender / seller. Will be returned expanded by default.. | | -| `line_items` | List[[components.LineItemBase](../../models/components/lineitembase.md)] | :heavy_minus_sign: | Array of line item objects representing the items in this order.
All objects will be returned expanded by default. | | \ No newline at end of file +| `from_address` | [Optional[components.AddressCreateRequest]](../../models/components/addresscreaterequest.md) | :heavy_minus_sign: | Address object of the sender / seller. Will be returned expanded by default.. | | +| `to_address` | [components.AddressCreateRequest](../../models/components/addresscreaterequest.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | +| `line_items` | List[[components.LineItemBase](../../models/components/lineitembase.md)] | :heavy_minus_sign: | Array of line item objects representing the items in this order.
All objects will be returned expanded by default. | | \ No newline at end of file diff --git a/docs/models/components/ordershopappenum.md b/docs/models/components/ordershopappenum.md index 2c6cb1a3..cfdce218 100644 --- a/docs/models/components/ordershopappenum.md +++ b/docs/models/components/ordershopappenum.md @@ -3,6 +3,14 @@ Platform the order was created on and, if applicable, imported from. Orders created via the Shippo API or dashboard will have the value "Shippo". +## Example Usage + +```python +from shippo.models.components import OrderShopAppEnum + +value = OrderShopAppEnum.AMAZON +``` + ## Values diff --git a/docs/models/components/orderstatusenum.md b/docs/models/components/orderstatusenum.md index cd90ecf9..325f0c73 100644 --- a/docs/models/components/orderstatusenum.md +++ b/docs/models/components/orderstatusenum.md @@ -3,6 +3,14 @@ Current state of the order. See the orders tutorial for the logic of how the status is handled. +## Example Usage + +```python +from shippo.models.components import OrderStatusEnum + +value = OrderStatusEnum.UNKNOWN +``` + ## Values diff --git a/docs/models/components/parcel.md b/docs/models/components/parcel.md index e95184ea..a504e109 100644 --- a/docs/models/components/parcel.md +++ b/docs/models/components/parcel.md @@ -5,14 +5,14 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
The following values are supported for the `extra` field of the parcel object. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | | `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | | `weight` | *str* | :heavy_check_mark: | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | | `distance_unit` | [components.DistanceUnitEnum](../../models/components/distanceunitenum.md) | :heavy_check_mark: | The measure unit used for length, width and height. | in | | `height` | *str* | :heavy_check_mark: | Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | | `length` | *str* | :heavy_check_mark: | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | | `width` | *str* | :heavy_check_mark: | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
See the Parcel Extra table below for all available services. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of Parcel creation. | 2014-07-09T02:19:13.174Z | | `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given Parcel object. This ID is required to create a Shipment object. | adcfdddf8ec64b84ad22772bce3ea37a | | `object_owner` | *Optional[str]* | :heavy_minus_sign: | Username of the user who created the Parcel object. | shippotle@shippo.com | diff --git a/docs/models/components/parcelcreatefromtemplaterequest.md b/docs/models/components/parcelcreatefromtemplaterequest.md index 4b8b4926..351a2125 100644 --- a/docs/models/components/parcelcreatefromtemplaterequest.md +++ b/docs/models/components/parcelcreatefromtemplaterequest.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | -| `weight` | *str* | :heavy_check_mark: | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `template` | [components.ParcelTemplateEnumSet](../../models/components/parceltemplateenumset.md) | :heavy_check_mark: | If template is passed, `length`, `width`, `height`, and `distance_unit` are not required | | -| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
See the Parcel Extra table below for all available services. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
The following values are supported for the `extra` field of the parcel object. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | +| `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | +| `weight` | *str* | :heavy_check_mark: | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | +| `template` | [components.ParcelTemplateEnumSet](../../models/components/parceltemplateenumset.md) | :heavy_check_mark: | If template is passed, `length`, `width`, `height`, and `distance_unit` are not required | | \ No newline at end of file diff --git a/docs/models/components/parcelcreaterequest.md b/docs/models/components/parcelcreaterequest.md index da272e95..95e73478 100644 --- a/docs/models/components/parcelcreaterequest.md +++ b/docs/models/components/parcelcreaterequest.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | -| `weight` | *str* | :heavy_check_mark: | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `distance_unit` | [components.DistanceUnitEnum](../../models/components/distanceunitenum.md) | :heavy_check_mark: | The measure unit used for length, width and height. | in | -| `height` | *str* | :heavy_check_mark: | Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `length` | *str* | :heavy_check_mark: | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `width` | *str* | :heavy_check_mark: | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | -| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
See the Parcel Extra table below for all available services. | | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `extra` | [Optional[components.ParcelExtra]](../../models/components/parcelextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
The following values are supported for the `extra` field of the parcel object. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Customer ID 123456 | +| `mass_unit` | [components.WeightUnitEnum](../../models/components/weightunitenum.md) | :heavy_check_mark: | The unit used for weight. | lb | +| `weight` | *str* | :heavy_check_mark: | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | +| `distance_unit` | [components.DistanceUnitEnum](../../models/components/distanceunitenum.md) | :heavy_check_mark: | The measure unit used for length, width and height. | in | +| `height` | *str* | :heavy_check_mark: | Height of the parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | +| `length` | *str* | :heavy_check_mark: | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | +| `width` | *str* | :heavy_check_mark: | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted. | 1 | \ No newline at end of file diff --git a/docs/models/components/parcelextra.md b/docs/models/components/parcelextra.md index 2255216b..80332daa 100644 --- a/docs/models/components/parcelextra.md +++ b/docs/models/components/parcelextra.md @@ -1,14 +1,14 @@ # ParcelExtra -An object holding optional extra services to be requested for each parcel in a multi-piece shipment. -See the Parcel Extra table below for all available services. +An object holding optional extra services to be requested for each parcel in a multi-piece shipment. +The following values are supported for the `extra` field of the parcel object. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `cod` | [Optional[components.Cod]](../../models/components/cod.md) | :heavy_minus_sign: | Specify collection on delivery details (UPS only). | -| `insurance` | [Optional[components.ParcelInsurance]](../../models/components/parcelinsurance.md) | :heavy_minus_sign: | To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters. | -| `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. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cod` | [Optional[components.Cod]](../../models/components/cod.md) | :heavy_minus_sign: | Specify collection on delivery details (UPS only). | +| `insurance` | [Optional[components.ParcelInsurance]](../../models/components/parcelinsurance.md) | :heavy_minus_sign: | To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters. | +| `reference_1` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 40 characters (Express services); Max 30 characters (Ground services) \| | +| `reference_2` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 characters \| | \ No newline at end of file diff --git a/docs/models/components/parcelinsurance.md b/docs/models/components/parcelinsurance.md index be4b02c3..67f48dbe 100644 --- a/docs/models/components/parcelinsurance.md +++ b/docs/models/components/parcelinsurance.md @@ -1,6 +1,6 @@ # ParcelInsurance -To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters. +To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters. ## Fields diff --git a/docs/models/components/parcelinsuranceprovider.md b/docs/models/components/parcelinsuranceprovider.md index ea1bcef1..2864678b 100644 --- a/docs/models/components/parcelinsuranceprovider.md +++ b/docs/models/components/parcelinsuranceprovider.md @@ -2,6 +2,14 @@ To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set provider to `FEDEX`, `UPS`, or `ONTRAC`. +## Example Usage + +```python +from shippo.models.components import ParcelInsuranceProvider + +value = ParcelInsuranceProvider.FEDEX +``` + ## Values diff --git a/docs/models/components/parceltemplatearamexaustraliaenum.md b/docs/models/components/parceltemplatearamexaustraliaenum.md index f7c6b1b0..38374de6 100644 --- a/docs/models/components/parceltemplatearamexaustraliaenum.md +++ b/docs/models/components/parceltemplatearamexaustraliaenum.md @@ -8,6 +8,14 @@ | Fastway_Australia_Satchel_A5 | Satchel A5 | 210.00 x 148.00 x 64.00 mm| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateAramexAustraliaEnum + +value = ParcelTemplateAramexAustraliaEnum.FASTWAY_AUSTRALIA_SATCHEL_A2 +``` + ## Values diff --git a/docs/models/components/parceltemplatedhlecommerceenum.md b/docs/models/components/parceltemplatedhlecommerceenum.md index 904a2db8..45dc0604 100644 --- a/docs/models/components/parceltemplatedhlecommerceenum.md +++ b/docs/models/components/parceltemplatedhlecommerceenum.md @@ -6,6 +6,14 @@ | DHLeC_SM_Flats | Flats | 27.00 x 17.00 x 17.00 in| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateDHLeCommerceEnum + +value = ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR +``` + ## Values diff --git a/docs/models/components/parceltemplatedpdukenum.md b/docs/models/components/parceltemplatedpdukenum.md index 77cdf682..3af6a699 100644 --- a/docs/models/components/parceltemplatedpdukenum.md +++ b/docs/models/components/parceltemplatedpdukenum.md @@ -5,6 +5,14 @@ | DPD_UK_Express_Pak| DPD UK Express Pak | 530.00 x 400.00 x 100.00 mm| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateDPDUKEnum + +value = ParcelTemplateDPDUKEnum.DPD_UK_EXPRESS_PAK +``` + ## Values diff --git a/docs/models/components/parceltemplatefedexenum.md b/docs/models/components/parceltemplatefedexenum.md index 006f79ef..fac63257 100644 --- a/docs/models/components/parceltemplatefedexenum.md +++ b/docs/models/components/parceltemplatefedexenum.md @@ -20,6 +20,14 @@ | FedEx_XL_Pak | FedEx® Extra Large Pak | 17.50 x 20.75 x 2.00 in| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateFedExEnum + +value = ParcelTemplateFedExEnum.FED_EX_BOX_10KG +``` + ## Values diff --git a/docs/models/components/parceltemplateupsenum.md b/docs/models/components/parceltemplateupsenum.md index 390deb7e..e3ebbcfd 100644 --- a/docs/models/components/parceltemplateupsenum.md +++ b/docs/models/components/parceltemplateupsenum.md @@ -29,6 +29,14 @@ | UPS_Pallet | Pallet | 120.00 x 80.00 x 200.00 cm| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateUPSEnum + +value = ParcelTemplateUPSEnum.UPS_BOX_10KG +``` + ## Values diff --git a/docs/models/components/parceltemplateuspsenum.md b/docs/models/components/parceltemplateuspsenum.md index c252c600..186d0e4b 100644 --- a/docs/models/components/parceltemplateuspsenum.md +++ b/docs/models/components/parceltemplateuspsenum.md @@ -24,6 +24,14 @@ | USPS_SoftPack | Soft Pack Padded Envelope | Length and width defined in the Parcel| +## Example Usage + +```python +from shippo.models.components import ParcelTemplateUSPSEnum + +value = ParcelTemplateUSPSEnum.USPS_FLAT_RATE_CARDBOARD_ENVELOPE +``` + ## Values diff --git a/docs/models/components/paymentmethod.md b/docs/models/components/paymentmethod.md index b794d542..4da1f472 100644 --- a/docs/models/components/paymentmethod.md +++ b/docs/models/components/paymentmethod.md @@ -4,6 +4,14 @@ Secured funds include money orders, certified cheques and others (see UPS for details). If no payment_method inputted the value defaults to "ANY".) +## Example Usage + +```python +from shippo.models.components import PaymentMethod + +value = PaymentMethod.SECURED_FUNDS +``` + ## Values diff --git a/docs/models/components/pickup.md b/docs/models/components/pickup.md index 0dcac2ba..ab8f2b03 100644 --- a/docs/models/components/pickup.md +++ b/docs/models/components/pickup.md @@ -5,12 +5,12 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `carrier_account` | *str* | :heavy_check_mark: | The object ID of your USPS or DHL Express carrier account.
You can retrieve this from your Rate requests or our Carrier Accounts endpoint. | adcfdddf8ec64b84ad22772bce3ea37a | +| `carrier_account` | *str* | :heavy_check_mark: | The object ID of your USPS or DHL Express carrier account.
You can retrieve this from your Rate requests or our Carrier Accounts endpoint. | adcfdddf8ec64b84ad22772bce3ea37a | | `location` | [components.Location](../../models/components/location.md) | :heavy_check_mark: | Location where the parcel(s) will be picked up. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | | | `requested_end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The latest that you requested your parcels to be available for pickup.
Expressed in the timezone specified in the response. | | | `requested_start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The earliest that you requested your parcels to be ready for pickup.
Expressed in the timezone specified in the response. | | | `transactions` | List[*str*] | :heavy_check_mark: | The transaction(s) object ID(s) for the parcel(s) that need to be picked up. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of Pickup creation. | | | `object_id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier of the given Pickup object. | | | `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time of last Pickup update. | | diff --git a/docs/models/components/pickupbase.md b/docs/models/components/pickupbase.md index e3640ea8..aba581c6 100644 --- a/docs/models/components/pickupbase.md +++ b/docs/models/components/pickupbase.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `carrier_account` | *str* | :heavy_check_mark: | The object ID of your USPS or DHL Express carrier account.
You can retrieve this from your Rate requests or our Carrier Accounts endpoint. | adcfdddf8ec64b84ad22772bce3ea37a | -| `location` | [components.Location](../../models/components/location.md) | :heavy_check_mark: | Location where the parcel(s) will be picked up. | | -| `requested_end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The latest that you requested your parcels to be available for pickup.
Expressed in the timezone specified in the response. | | -| `requested_start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The earliest that you requested your parcels to be ready for pickup.
Expressed in the timezone specified in the response. | | -| `transactions` | List[*str*] | :heavy_check_mark: | The transaction(s) object ID(s) for the parcel(s) that need to be picked up. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `carrier_account` | *str* | :heavy_check_mark: | The object ID of your USPS or DHL Express carrier account.
You can retrieve this from your Rate requests or our Carrier Accounts endpoint. | adcfdddf8ec64b84ad22772bce3ea37a | +| `location` | [components.Location](../../models/components/location.md) | :heavy_check_mark: | Location where the parcel(s) will be picked up. | | +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you
want to attach to the object. | | +| `requested_end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The latest that you requested your parcels to be available for pickup.
Expressed in the timezone specified in the response. | | +| `requested_start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The earliest that you requested your parcels to be ready for pickup.
Expressed in the timezone specified in the response. | | +| `transactions` | List[*str*] | :heavy_check_mark: | The transaction(s) object ID(s) for the parcel(s) that need to be picked up. | [
"adcfdddf8ec64b84ad22772bce3ea37a"
] | \ No newline at end of file diff --git a/docs/models/components/pickupstatus.md b/docs/models/components/pickupstatus.md index 031e2ab1..f9af6c65 100644 --- a/docs/models/components/pickupstatus.md +++ b/docs/models/components/pickupstatus.md @@ -2,6 +2,14 @@ Indicates the status of the pickup. +## Example Usage + +```python +from shippo.models.components import PickupStatus + +value = PickupStatus.PENDING +``` + ## Values diff --git a/docs/models/components/policy.md b/docs/models/components/policy.md new file mode 100644 index 00000000..8875e66b --- /dev/null +++ b/docs/models/components/policy.md @@ -0,0 +1,19 @@ +# Policy + +Policy to indicate if the Account needs multi-factor verification. + +## Example Usage + +```python +from shippo.models.components import Policy + +value = Policy.REQUIRED +``` + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `REQUIRED` | required | +| `NOT_REQUIRED` | not-required | \ No newline at end of file diff --git a/docs/models/components/ponumber.md b/docs/models/components/ponumber.md index 67934f21..7bbafb0e 100644 --- a/docs/models/components/ponumber.md +++ b/docs/models/components/ponumber.md @@ -5,8 +5,8 @@ Specify the PO number field on the label (FedEx and UPS only). ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for PO number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for PO number. Up to 40 characters. If
this is provided, reference_2 will be ignored. | | -| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 2 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for PO number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for PO number. Up to 40 characters. If
this is provided, reference_2 will be ignored.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 characters \| | | +| `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 2 | \ No newline at end of file diff --git a/docs/models/components/preferreddeliverytimeframe.md b/docs/models/components/preferreddeliverytimeframe.md index 10f61b3c..1316e208 100644 --- a/docs/models/components/preferreddeliverytimeframe.md +++ b/docs/models/components/preferreddeliverytimeframe.md @@ -2,6 +2,14 @@ Required for DHL Germany Paket Sameday. Designates a desired timeframe for delivery. Format is `HHMMHHMM` +## Example Usage + +```python +from shippo.models.components import PreferredDeliveryTimeframe + +value = PreferredDeliveryTimeframe.TEN_MILLION_ONE_THOUSAND_TWO_HUNDRED +``` + ## Values diff --git a/docs/models/components/rate.md b/docs/models/components/rate.md index 2fd9eb8b..5aef3213 100644 --- a/docs/models/components/rate.md +++ b/docs/models/components/rate.md @@ -9,20 +9,20 @@ | `amount_local` | *str* | :heavy_check_mark: | Final Rate price, expressed in the currency used in the recipient's country. | 5.5 | | `currency` | *str* | :heavy_check_mark: | Currency used in the sender's country, refers to `amount`.
The official ISO 4217 currency codes are used, e.g. `USD` or `EUR`. | USD | | `currency_local` | *str* | :heavy_check_mark: | Currency used in the recipient's country, refers to `amount_local`.
The official ISO 4217 currency codes are used, e.g. `USD` or "EUR". | USD | +| `arrives_by` | *Optional[str]* | :heavy_minus_sign: | Predicted time the carrier will deliver the package in the destination's local time zone. In the format `HH:MM:SS`. | 08:30:00 | | `attributes` | List[[components.Attribute](../../models/components/attribute.md)] | :heavy_check_mark: | An array containing specific attributes of this Rate in context of the entire shipment.
Attributes can be assigned `CHEAPEST`, `FASTEST`, or `BESTVALUE`. | | | `carrier_account` | *str* | :heavy_check_mark: | Object ID of the carrier account that has been used to retrieve the rate. | 078870331023437cb917f5187429b093 | -| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Date and time of Rate creation. | | -| `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given Rate object. | adcfdddf8ec64b84ad22772bce3ea37a | -| `object_owner` | *str* | :heavy_check_mark: | Username of the user who created the rate object. | pp@gmail.com | -| `provider` | *str* | :heavy_check_mark: | Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`. | USPS | -| `servicelevel` | [components.ServiceLevelWithParent](../../models/components/servicelevelwithparent.md) | :heavy_check_mark: | N/A | | -| `shipment` | *str* | :heavy_check_mark: | N/A | adcfdddf8ec64b84ad22772bce3ea37a | -| `arrives_by` | *Optional[str]* | :heavy_minus_sign: | Predicted time the carrier will deliver the package in the destination's local time zone. In the format `HH:MM:SS`. | 08:30:00 | | `duration_terms` | *Optional[str]* | :heavy_minus_sign: | Further clarification of the transit times.
Often, this includes notes that the transit time as given in "days" is only an average, not a guaranteed time. | Delivery in 1 to 3 business days | | `estimated_days` | *Optional[int]* | :heavy_minus_sign: | Estimated transit time (duration) in days of the Parcel at the given servicelevel.
Please note that this is not binding, but only an average value as given by the provider.
Shippo is not able to guarantee any transit times. | 2 | | `included_insurance_price` | *Optional[str]* | :heavy_minus_sign: | Cost to the user to insure the Rate for the requested amount of coverage, if insurance coverage was requested.
Expressed in the currency used in the sender's country. Will be null if no insurance coverage was requested, or if insurance is requested from a non-standard insurance provider.
Please note this price is already included in the `amount` and `amount_local` fields on the Rate. Do not add this field to them. | 1.05 | | `messages` | List[[components.ResponseMessage](../../models/components/responsemessage.md)] | :heavy_minus_sign: | N/A | | +| `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Date and time of Rate creation. | | +| `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given Rate object. | adcfdddf8ec64b84ad22772bce3ea37a | +| `object_owner` | *str* | :heavy_check_mark: | Username of the user who created the rate object. | pp@gmail.com | +| `provider` | *str* | :heavy_check_mark: | Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`. | USPS | | `provider_image_75` | *Optional[str]* | :heavy_minus_sign: | URL to the provider logo with max. dimensions of 75*75px.
Please refer to the provider's Logo Usage Guidelines before using the logo. | https://cdn2.goshippo.com/providers/75/USPS.png | | `provider_image_200` | *Optional[str]* | :heavy_minus_sign: | URL to the provider logo with max. dimensions of 200*200px.
Please refer to the provider's Logo Usage Guidelines before using the logo. | https://cdn2.goshippo.com/providers/200/USPS.png | +| `servicelevel` | [components.ServiceLevelWithParent](../../models/components/servicelevelwithparent.md) | :heavy_check_mark: | N/A | | +| `shipment` | *str* | :heavy_check_mark: | N/A | adcfdddf8ec64b84ad22772bce3ea37a | | `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | | | `zone` | *Optional[str]* | :heavy_minus_sign: | The parcel's transit zone token. These tokens can vary depending on the provider. | 1 | \ No newline at end of file diff --git a/docs/models/components/recipienttype.md b/docs/models/components/recipienttype.md index 5c3a6610..6f355138 100644 --- a/docs/models/components/recipienttype.md +++ b/docs/models/components/recipienttype.md @@ -2,6 +2,14 @@ Mandatory for Fedex only. License type of the recipient of the Alcohol Package. +## Example Usage + +```python +from shippo.models.components import RecipientType + +value = RecipientType.LICENSEE +``` + ## Values diff --git a/docs/models/components/refundrequestbody.md b/docs/models/components/refundrequestbody.md index c0c5d35b..1c678f74 100644 --- a/docs/models/components/refundrequestbody.md +++ b/docs/models/components/refundrequestbody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `transaction` | *str* | :heavy_check_mark: | N/A | 915d94940ea54c3a80cbfa328722f5a1 | -| `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | \ No newline at end of file +| `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | +| `transaction` | *str* | :heavy_check_mark: | N/A | 915d94940ea54c3a80cbfa328722f5a1 | \ No newline at end of file diff --git a/docs/models/components/refundstatus.md b/docs/models/components/refundstatus.md index 6e715d9e..0c1816ee 100644 --- a/docs/models/components/refundstatus.md +++ b/docs/models/components/refundstatus.md @@ -2,6 +2,14 @@ Indicates the status of the Refund. +## Example Usage + +```python +from shippo.models.components import RefundStatus + +value = RefundStatus.QUEUED +``` + ## Values diff --git a/docs/models/components/rmanumber.md b/docs/models/components/rmanumber.md index 08feb91a..eabeb57c 100644 --- a/docs/models/components/rmanumber.md +++ b/docs/models/components/rmanumber.md @@ -8,5 +8,5 @@ Specify the RMA number field on the label (FedEx and UPS only). | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `prefix` | *Optional[str]* | :heavy_minus_sign: | Custom prefix for RMA number field (ZPL labels only). Up to 11 characters, including trailing
spaces. Empty string indicates removal of default prefix. To use the default prefix, do not include
this property. | | -| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for RMA number. Up to 40 characters. | | +| `value` | *Optional[str]* | :heavy_minus_sign: | Optional text to be printed on the shipping label for RMA number. Up to 40 characters.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 20 characters \| | | | `ref_sort` | *Optional[int]* | :heavy_minus_sign: | Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers. | 1 | \ No newline at end of file diff --git a/docs/models/components/servicegroup.md b/docs/models/components/servicegroup.md index 167d4c23..0d19d7df 100644 --- a/docs/models/components/servicegroup.md +++ b/docs/models/components/servicegroup.md @@ -6,13 +6,13 @@ | 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.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 | +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | | `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 +| `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` | *Optional[bool]* | :heavy_minus_sign: | True if the service group is enabled, false otherwise. | true | +| `service_levels` | List[[components.ServiceGroupAccountAndServiceLevel](../../models/components/servicegroupaccountandservicelevel.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/components/servicegroupaccountandservicelevel.md b/docs/models/components/servicegroupaccountandservicelevel.md index 8625bd74..1e04bc9a 100644 --- a/docs/models/components/servicegroupaccountandservicelevel.md +++ b/docs/models/components/servicegroupaccountandservicelevel.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `account_object_id` | *Optional[str]* | :heavy_minus_sign: | ID of a Carrier Account object | 80feb1633d4a43c898f0058506cfd82d | -| `service_level_token` | *Optional[str]* | :heavy_minus_sign: | Service level token, e.g. `usps_priority` or `fedex_ground`.

See Service Levels. | ups_next_day_air_saver | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `account_object_id` | *Optional[str]* | :heavy_minus_sign: | ID of a Carrier Account object | 80feb1633d4a43c898f0058506cfd82d | +| `service_level_token` | *Optional[str]* | :heavy_minus_sign: | Service level token, e.g. `usps_priority` or `fedex_ground`.

See Service Levels. | ups_next_day_air_saver | \ No newline at end of file diff --git a/docs/models/components/servicegroupcreaterequest.md b/docs/models/components/servicegroupcreaterequest.md index 2e3e062f..1428029a 100644 --- a/docs/models/components/servicegroupcreaterequest.md +++ b/docs/models/components/servicegroupcreaterequest.md @@ -6,11 +6,11 @@ | 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 +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | +| `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 | +| `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 | | \ No newline at end of file diff --git a/docs/models/components/servicegrouptypeenum.md b/docs/models/components/servicegrouptypeenum.md index 7c150b4d..fae876a7 100644 --- a/docs/models/components/servicegrouptypeenum.md +++ b/docs/models/components/servicegrouptypeenum.md @@ -5,6 +5,14 @@ The type of 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` +## Example Usage + +```python +from shippo.models.components import ServiceGroupTypeEnum + +value = ServiceGroupTypeEnum.LIVE_RATE +``` + ## Values diff --git a/docs/models/components/servicegroupupdaterequest.md b/docs/models/components/servicegroupupdaterequest.md index 42b25663..1a13818d 100644 --- a/docs/models/components/servicegroupupdaterequest.md +++ b/docs/models/components/servicegroupupdaterequest.md @@ -6,13 +6,13 @@ | 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 +| `name` | *str* | :heavy_check_mark: | Name for the service group that will be shown to customers in the response | USPS Shipping | +| `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 | +| `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 | | \ No newline at end of file diff --git a/docs/models/components/servicelevel.md b/docs/models/components/servicelevel.md index efac81cb..8eea1add 100644 --- a/docs/models/components/servicelevel.md +++ b/docs/models/components/servicelevel.md @@ -12,5 +12,5 @@ structure of the servicelevel - "name", "token", "terms", and "extended_token", | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the Rate's servicelevel, e.g. `International Priority` or `Standard Post`.
A servicelevel commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties.
These names vary depending on the provider. | Priority Mail Express | | `terms` | *Optional[str]* | :heavy_minus_sign: | Further clarification of the service. | | -| `token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | usps_priority_express | +| `token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | usps_priority_express | | `extended_token` | *Optional[str]* | :heavy_minus_sign: | Unique, extended version of the Service Level "token".
Guaranteed to be unique across all Service Levels, and may help offer insight into the specific Service Level it describes. | | \ No newline at end of file diff --git a/docs/models/components/servicelevelairterraenum.md b/docs/models/components/servicelevelairterraenum.md index eedef1d8..de5957f1 100644 --- a/docs/models/components/servicelevelairterraenum.md +++ b/docs/models/components/servicelevelairterraenum.md @@ -6,6 +6,14 @@ | airterra_postal | FastPost| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAirterraEnum + +value = ServiceLevelAirterraEnum.AIRTERRA_GROUND +``` + ## Values diff --git a/docs/models/components/servicelevelapcpostalenum.md b/docs/models/components/servicelevelapcpostalenum.md index 2a2493f4..b57d2da1 100644 --- a/docs/models/components/servicelevelapcpostalenum.md +++ b/docs/models/components/servicelevelapcpostalenum.md @@ -13,6 +13,14 @@ | apc_postal_parcelconnect_epmei | parcelConnect ePMEI| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAPCPostalEnum + +value = ServiceLevelAPCPostalEnum.APC_POSTAL_PARCELCONNECT_EXPEDITED +``` + ## Values diff --git a/docs/models/components/servicelevelapgenum.md b/docs/models/components/servicelevelapgenum.md index 0b0fea95..40e87d2e 100644 --- a/docs/models/components/servicelevelapgenum.md +++ b/docs/models/components/servicelevelapgenum.md @@ -8,6 +8,14 @@ | apg_eparcel_expedited | eParcel Expedited| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAPGEnum + +value = ServiceLevelAPGEnum.EPACKET +``` + ## Values diff --git a/docs/models/components/servicelevelaramexaustraliaenum.md b/docs/models/components/servicelevelaramexaustraliaenum.md index c18e0b6d..300c91dc 100644 --- a/docs/models/components/servicelevelaramexaustraliaenum.md +++ b/docs/models/components/servicelevelaramexaustraliaenum.md @@ -9,6 +9,14 @@ | fastway_australia_box_large | Box Large| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAramexAustraliaEnum + +value = ServiceLevelAramexAustraliaEnum.FASTWAY_AUSTRALIA_PARCEL +``` + ## Values diff --git a/docs/models/components/servicelevelasendiaenum.md b/docs/models/components/servicelevelasendiaenum.md index e613c5fd..0cf56246 100644 --- a/docs/models/components/servicelevelasendiaenum.md +++ b/docs/models/components/servicelevelasendiaenum.md @@ -12,6 +12,14 @@ | asendia_us_other | Asendia USA Other Services (custom)| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAsendiaEnum + +value = ServiceLevelAsendiaEnum.ASENDIA_US_PRIORITY_TRACKED +``` + ## Values diff --git a/docs/models/components/servicelevelaustraliapostenum.md b/docs/models/components/servicelevelaustraliapostenum.md index 4369b4a5..46d48ef4 100644 --- a/docs/models/components/servicelevelaustraliapostenum.md +++ b/docs/models/components/servicelevelaustraliapostenum.md @@ -14,6 +14,14 @@ | australia_post_parcel_post_return | Parcel Post Return| +## Example Usage + +```python +from shippo.models.components import ServiceLevelAustraliaPostEnum + +value = ServiceLevelAustraliaPostEnum.AUSTRALIA_POST_EXPRESS_POST +``` + ## Values diff --git a/docs/models/components/servicelevelbettertrucksenum.md b/docs/models/components/servicelevelbettertrucksenum.md index 65153f81..7cd67004 100644 --- a/docs/models/components/servicelevelbettertrucksenum.md +++ b/docs/models/components/servicelevelbettertrucksenum.md @@ -6,6 +6,14 @@ | better_trucks_next_day | Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelBetterTrucksEnum + +value = ServiceLevelBetterTrucksEnum.BETTER_TRUCKS_SAME_DAY +``` + ## Values diff --git a/docs/models/components/servicelevelcanadapostenum.md b/docs/models/components/servicelevelcanadapostenum.md index 2351d0b8..3e50cfed 100644 --- a/docs/models/components/servicelevelcanadapostenum.md +++ b/docs/models/components/servicelevelcanadapostenum.md @@ -18,6 +18,14 @@ | canada_post_international_parcel_air | International Parcel Air +## Example Usage + +```python +from shippo.models.components import ServiceLevelCanadaPostEnum + +value = ServiceLevelCanadaPostEnum.CANADA_POST_REGULAR_PARCEL +``` + ## Values diff --git a/docs/models/components/servicelevelcdlenum.md b/docs/models/components/servicelevelcdlenum.md index 80cd0f8e..9b9123ee 100644 --- a/docs/models/components/servicelevelcdlenum.md +++ b/docs/models/components/servicelevelcdlenum.md @@ -5,6 +5,14 @@ | cdl_next_day | Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelCDLEnum + +value = ServiceLevelCDLEnum.CDL_NEXT_DAY +``` + ## Values diff --git a/docs/models/components/servicelevelchronopostenum.md b/docs/models/components/servicelevelchronopostenum.md index 1e49a581..a9da42ae 100644 --- a/docs/models/components/servicelevelchronopostenum.md +++ b/docs/models/components/servicelevelchronopostenum.md @@ -10,6 +10,14 @@ | chronopost_express | Chrono Express International| +## Example Usage + +```python +from shippo.models.components import ServiceLevelChronopostEnum + +value = ServiceLevelChronopostEnum.CHRONOPOST_13 +``` + ## Values diff --git a/docs/models/components/servicelevelcolissimoenum.md b/docs/models/components/servicelevelcolissimoenum.md index 2d4993d5..fbc9a940 100644 --- a/docs/models/components/servicelevelcolissimoenum.md +++ b/docs/models/components/servicelevelcolissimoenum.md @@ -7,6 +7,14 @@ | colissimo_return_mainland_france | Retour France| +## Example Usage + +```python +from shippo.models.components import ServiceLevelColissimoEnum + +value = ServiceLevelColissimoEnum.COLISSIMO_HOME +``` + ## Values diff --git a/docs/models/components/servicelevelcorreosespanaenum.md b/docs/models/components/servicelevelcorreosespanaenum.md index 6c4d35f1..d35716bd 100644 --- a/docs/models/components/servicelevelcorreosespanaenum.md +++ b/docs/models/components/servicelevelcorreosespanaenum.md @@ -6,6 +6,14 @@ | correos_premium_home | Paquete Premium| +## Example Usage + +```python +from shippo.models.components import ServiceLevelCorreosEspanaEnum + +value = ServiceLevelCorreosEspanaEnum.CORREOS_STANDARD_HOME +``` + ## Values diff --git a/docs/models/components/serviceleveldeutschepostenum.md b/docs/models/components/serviceleveldeutschepostenum.md index 25c8f310..d1205f03 100644 --- a/docs/models/components/serviceleveldeutschepostenum.md +++ b/docs/models/components/serviceleveldeutschepostenum.md @@ -14,6 +14,14 @@ | deutsche_post_warenpost_international_l | Warenpost International L| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDeutschePostEnum + +value = ServiceLevelDeutschePostEnum.DEUTSCHE_POST_POSTKARTE +``` + ## Values diff --git a/docs/models/components/serviceleveldhlecommerceenum.md b/docs/models/components/serviceleveldhlecommerceenum.md index 771ec3d8..377148c1 100644 --- a/docs/models/components/serviceleveldhlecommerceenum.md +++ b/docs/models/components/serviceleveldhlecommerceenum.md @@ -32,6 +32,14 @@ | dhl_ecommerce_globalmail_packet_standard | GlobalMail Business Standard| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDHLeCommerceEnum + +value = ServiceLevelDHLeCommerceEnum.DHL_ECOMMERCE_MARKETING_PARCEL_EXPEDITED +``` + ## Values diff --git a/docs/models/components/serviceleveldhlexpressenum.md b/docs/models/components/serviceleveldhlexpressenum.md index f2eac56f..567ca9c6 100644 --- a/docs/models/components/serviceleveldhlexpressenum.md +++ b/docs/models/components/serviceleveldhlexpressenum.md @@ -26,6 +26,14 @@ | dhl_express_express_easy_nondoc | Express Easy NonDoc| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDHLExpressEnum + +value = ServiceLevelDHLExpressEnum.DHL_EXPRESS_DOMESTIC_EXPRESS_DOC +``` + ## Values diff --git a/docs/models/components/serviceleveldhlgermanyenum.md b/docs/models/components/serviceleveldhlgermanyenum.md index f3fb9de0..1bc32c6f 100644 --- a/docs/models/components/serviceleveldhlgermanyenum.md +++ b/docs/models/components/serviceleveldhlgermanyenum.md @@ -10,6 +10,14 @@ | dhl_germany_paket_sameday | DHL Germany Paket Sameday| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDHLGermanyEnum + +value = ServiceLevelDHLGermanyEnum.DHL_GERMANY_EUROPAKET +``` + ## Values diff --git a/docs/models/components/serviceleveldpddeenum.md b/docs/models/components/serviceleveldpddeenum.md index 5a0f0a24..84a7f5cb 100644 --- a/docs/models/components/serviceleveldpddeenum.md +++ b/docs/models/components/serviceleveldpddeenum.md @@ -5,6 +5,14 @@ | dpd_de_classic | DPD Classic| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDPDDEEnum + +value = ServiceLevelDPDDEEnum.DPD_DE_CLASSIC +``` + ## Values diff --git a/docs/models/components/serviceleveldpdukenum.md b/docs/models/components/serviceleveldpdukenum.md index bc5e3ac6..0aee15f3 100644 --- a/docs/models/components/serviceleveldpdukenum.md +++ b/docs/models/components/serviceleveldpdukenum.md @@ -21,6 +21,14 @@ | dpd_uk_pickup_returns | Pickup Returns| +## Example Usage + +```python +from shippo.models.components import ServiceLevelDPDUKEnum + +value = ServiceLevelDPDUKEnum.DPD_UK_SHIP_TO_SHOP +``` + ## Values diff --git a/docs/models/components/servicelevelenumset.md b/docs/models/components/servicelevelenumset.md index f8a7227b..0d13fc2a 100644 --- a/docs/models/components/servicelevelenumset.md +++ b/docs/models/components/servicelevelenumset.md @@ -183,10 +183,10 @@ value: components.ServiceLevelePostGlobalEnum = /* values here */ value: components.ServiceLevelRoyalMailEnum = /* values here */ ``` -### `components.ServiceLevelSendleEnum` +### `components.ServiceLevelRoyalMailSFEnum` ```python -value: components.ServiceLevelSendleEnum = /* values here */ +value: components.ServiceLevelRoyalMailSFEnum = /* values here */ ``` ### `components.ServiceLevelOnTracEnum` diff --git a/docs/models/components/servicelevelepostglobalenum.md b/docs/models/components/servicelevelepostglobalenum.md index b8ef0179..461a3d57 100644 --- a/docs/models/components/servicelevelepostglobalenum.md +++ b/docs/models/components/servicelevelepostglobalenum.md @@ -17,6 +17,14 @@ | rr_donnelley_emi | Express Mail International| +## Example Usage + +```python +from shippo.models.components import ServiceLevelePostGlobalEnum + +value = ServiceLevelePostGlobalEnum.RR_DONNELLEY_DOMESTIC_ECONOMY_PARCEL +``` + ## Values diff --git a/docs/models/components/servicelevelevriukenum.md b/docs/models/components/servicelevelevriukenum.md index 76ab3d0a..3fbc80d5 100644 --- a/docs/models/components/servicelevelevriukenum.md +++ b/docs/models/components/servicelevelevriukenum.md @@ -9,6 +9,14 @@ | hermes_uk_postable_nextday | Postable Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelEvriUKEnum + +value = ServiceLevelEvriUKEnum.HERMES_UK_COURIER_SERVICE +``` + ## Values diff --git a/docs/models/components/servicelevelfedexenum.md b/docs/models/components/servicelevelfedexenum.md index 33cc0080..021ddc16 100644 --- a/docs/models/components/servicelevelfedexenum.md +++ b/docs/models/components/servicelevelfedexenum.md @@ -28,6 +28,14 @@ | fedex_standard_overnight_extra_hours | Standard Overnight® EH | +## Example Usage + +```python +from shippo.models.components import ServiceLevelFedExEnum + +value = ServiceLevelFedExEnum.FEDEX_GROUND +``` + ## Values diff --git a/docs/models/components/servicelevelglobegisticsenum.md b/docs/models/components/servicelevelglobegisticsenum.md index 980a3f13..6e7c5d0a 100644 --- a/docs/models/components/servicelevelglobegisticsenum.md +++ b/docs/models/components/servicelevelglobegisticsenum.md @@ -16,6 +16,14 @@ | globegistics_ecom_international_surface_airlift | Globegistics eCom International Surface Air Lift| +## Example Usage + +```python +from shippo.models.components import ServiceLevelGlobegisticsEnum + +value = ServiceLevelGlobegisticsEnum.GLOBEGISTICS_PRIORITY_MAIL_EXPRESS_INTERNATIONAL +``` + ## Values diff --git a/docs/models/components/servicelevelglsusenum.md b/docs/models/components/servicelevelglsusenum.md index 2d929eb6..9d2bb372 100644 --- a/docs/models/components/servicelevelglsusenum.md +++ b/docs/models/components/servicelevelglsusenum.md @@ -10,6 +10,14 @@ | gls_us_sds | Saturday Delivery| +## Example Usage + +```python +from shippo.models.components import ServiceLevelGLSUSEnum + +value = ServiceLevelGLSUSEnum.GLS_US_CPS +``` + ## Values diff --git a/docs/models/components/serviceleveljitsuenum.md b/docs/models/components/serviceleveljitsuenum.md index ede468a1..93e6d243 100644 --- a/docs/models/components/serviceleveljitsuenum.md +++ b/docs/models/components/serviceleveljitsuenum.md @@ -6,6 +6,14 @@ | axlehire_next_day | Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelJitsuEnum + +value = ServiceLevelJitsuEnum.AXLEHIRE_SAME_DAY +``` + ## Values diff --git a/docs/models/components/servicelevellasershipenum.md b/docs/models/components/servicelevellasershipenum.md index f1266585..74f41e75 100644 --- a/docs/models/components/servicelevellasershipenum.md +++ b/docs/models/components/servicelevellasershipenum.md @@ -5,6 +5,14 @@ | lasership_routed_delivery | Routed Delivery| +## Example Usage + +```python +from shippo.models.components import ServiceLevelLasershipEnum + +value = ServiceLevelLasershipEnum.LASERSHIP_ROUTED_DELIVERY +``` + ## Values diff --git a/docs/models/components/servicelevellsoenum.md b/docs/models/components/servicelevellsoenum.md index bc8e46e1..1df35822 100644 --- a/docs/models/components/servicelevellsoenum.md +++ b/docs/models/components/servicelevellsoenum.md @@ -10,6 +10,14 @@ | lso_early_overnight | Early Overnight| +## Example Usage + +```python +from shippo.models.components import ServiceLevelLSOEnum + +value = ServiceLevelLSOEnum.LSO_GROUND +``` + ## Values diff --git a/docs/models/components/servicelevelmondialrelayenum.md b/docs/models/components/servicelevelmondialrelayenum.md index 565151d1..679c6c2a 100644 --- a/docs/models/components/servicelevelmondialrelayenum.md +++ b/docs/models/components/servicelevelmondialrelayenum.md @@ -5,6 +5,14 @@ | mondial_relay_pointrelais | Point Relais| +## Example Usage + +```python +from shippo.models.components import ServiceLevelMondialRelayEnum + +value = ServiceLevelMondialRelayEnum.MONDIAL_RELAY_POINTRELAIS +``` + ## Values diff --git a/docs/models/components/servicelevelontracenum.md b/docs/models/components/servicelevelontracenum.md index 5671269d..40aec950 100644 --- a/docs/models/components/servicelevelontracenum.md +++ b/docs/models/components/servicelevelontracenum.md @@ -7,6 +7,14 @@ | ontrac_sunrise | Sunrise| +## Example Usage + +```python +from shippo.models.components import ServiceLevelOnTracEnum + +value = ServiceLevelOnTracEnum.ONTRAC_GROUND +``` + ## Values diff --git a/docs/models/components/servicelevelparcelforceenum.md b/docs/models/components/servicelevelparcelforceenum.md index 2ac085f1..b0e8fb78 100644 --- a/docs/models/components/servicelevelparcelforceenum.md +++ b/docs/models/components/servicelevelparcelforceenum.md @@ -7,6 +7,14 @@ | parcelforce_expressam | Express AM| +## Example Usage + +```python +from shippo.models.components import ServiceLevelParcelforceEnum + +value = ServiceLevelParcelforceEnum.PARCELFORCE_EXPRESS48 +``` + ## Values diff --git a/docs/models/components/servicelevelpostitalianeenum.md b/docs/models/components/servicelevelpostitalianeenum.md index 002d11d8..6dfa2b57 100644 --- a/docs/models/components/servicelevelpostitalianeenum.md +++ b/docs/models/components/servicelevelpostitalianeenum.md @@ -5,6 +5,14 @@ | poste_italiane_delivery_business_express | Poste Delivery Business Express| +## Example Usage + +```python +from shippo.models.components import ServiceLevelPostItalianeEnum + +value = ServiceLevelPostItalianeEnum.POSTE_ITALIANE_DELIVERY_BUSINESS_EXPRESS +``` + ## Values diff --git a/docs/models/components/servicelevelpurolatorenum.md b/docs/models/components/servicelevelpurolatorenum.md index 59384ae2..4bd5a637 100644 --- a/docs/models/components/servicelevelpurolatorenum.md +++ b/docs/models/components/servicelevelpurolatorenum.md @@ -22,6 +22,14 @@ | purolator_express_international1200 | Express International 12pm| +## Example Usage + +```python +from shippo.models.components import ServiceLevelPurolatorEnum + +value = ServiceLevelPurolatorEnum.PUROLATOR_GROUND +``` + ## Values diff --git a/docs/models/components/servicelevelroyalmailenum.md b/docs/models/components/servicelevelroyalmailenum.md index a35c83b7..539a07b1 100644 --- a/docs/models/components/servicelevelroyalmailenum.md +++ b/docs/models/components/servicelevelroyalmailenum.md @@ -15,7 +15,7 @@ | royal_mail_standard_first_class | Standard First Class | royal_mail_standard_second_class | Standard Second Class | royal_mail_tracked_24_no_signature | Royal Mail Tracked 24 No Signature -| royal_mail_tracked_48_no_signature | Royal Mail Ttacked 48 No Signature +| royal_mail_tracked_48_no_signature | Royal Mail Tracked 48 No Signature | royal_mail_intl_bus_mail_lrg_ltr_zone_sort_pri | International Business Mail Large Letter Zone Sort Priority | royal_mail_intl_bus_parcels_tracked_zone_sort | International Business Parcels Tracked Zone Sort | royal_mail_intl_bus_parcels_tracked_country_priced | International Business Parcels Tracked Country Priced @@ -24,6 +24,14 @@ | royal_mail_48_flat_rate | Royal Mail 48 Parcel Flat Rate +## Example Usage + +```python +from shippo.models.components import ServiceLevelRoyalMailEnum + +value = ServiceLevelRoyalMailEnum.ROYAL_MAIL_TRACKED_LETTER_BOXABLE_24_NO_SIGNATURE +``` + ## Values diff --git a/docs/models/components/servicelevelroyalmailsfenum.md b/docs/models/components/servicelevelroyalmailsfenum.md new file mode 100644 index 00000000..cc15ac3a --- /dev/null +++ b/docs/models/components/servicelevelroyalmailsfenum.md @@ -0,0 +1,41 @@ +# ServiceLevelRoyalMailSFEnum + +|Token | Service name| +|:---|:---| +| royal_mail_sf_tracked_48 | Royal Mail Tracked 48| +| royal_mail_sf_tracked_48_for_post_office_drop | Royal Mail Tracked 48 for Post Office Drop| +| royal_mail_sf_international_tracked | Royal Mail International Tracked | +| royal_mail_sf_tracked_48_with_signature_confirmation | Royal Mail Tracked 48 with Signature | +| royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation | Royal Mail Tracked 48 for Post Office Drop with Signature | +| royal_mail_sf_tracked_24 | Royal Mail Tracked 24 | +| royal_mail_sf_tracked_24_for_post_office_drop | Royal Mail Tracked 24 for Post Office Drop | +| royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation | Royal Mail Tracked 24 for Post Office Drop with Signature | +| royal_mail_sf_international_tracked_for_post_office_drop | Royal Mail International Tracked for Post Office Drop | +| royal_mail_sf_international_tracked_with_signature_confirmation | Royal Mail International Tracked with Signature | +| royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation | Royal Mail International Tracked for Post Office Drop with Signature | + + +## Example Usage + +```python +from shippo.models.components import ServiceLevelRoyalMailSFEnum + +value = ServiceLevelRoyalMailSFEnum.ROYAL_MAIL_SF_TRACKED_48 +``` + + +## Values + +| Name | Value | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `ROYAL_MAIL_SF_TRACKED_48` | royal_mail_sf_tracked_48 | +| `ROYAL_MAIL_SF_TRACKED_48_FOR_POST_OFFICE_DROP` | royal_mail_sf_tracked_48_for_post_office_drop | +| `ROYAL_MAIL_SF_INTERNATIONAL_TRACKED` | royal_mail_sf_international_tracked | +| `ROYAL_MAIL_SF_TRACKED_48_WITH_SIGNATURE_CONFIRMATION` | royal_mail_sf_tracked_48_with_signature_confirmation | +| `ROYAL_MAIL_SF_TRACKED_48_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION` | royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation | +| `ROYAL_MAIL_SF_TRACKED_24` | royal_mail_sf_tracked_24 | +| `ROYAL_MAIL_SF_TRACKED_24_FOR_POST_OFFICE_DROP` | royal_mail_sf_tracked_24_for_post_office_drop | +| `ROYAL_MAIL_SF_TRACKED_24_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION` | royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation | +| `ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_FOR_POST_OFFICE_DROP` | royal_mail_sf_international_tracked_for_post_office_drop | +| `ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_WITH_SIGNATURE_CONFIRMATION` | royal_mail_sf_international_tracked_with_signature_confirmation | +| `ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION` | royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation | \ No newline at end of file diff --git a/docs/models/components/servicelevelsendleenum.md b/docs/models/components/servicelevelsendleenum.md deleted file mode 100644 index d0cc2501..00000000 --- a/docs/models/components/servicelevelsendleenum.md +++ /dev/null @@ -1,15 +0,0 @@ -# ServiceLevelSendleEnum - -|Token | Service name| -|:---|:---| -| sendle_parcel | Sendle Parcel| -| sendle_standard_dropoff | Sendle Standard Dropoff| - - - -## Values - -| Name | Value | -| ------------------------- | ------------------------- | -| `SENDLE_PARCEL` | sendle_parcel | -| `SENDLE_STANDARD_DROPOFF` | sendle_standard_dropoff | \ No newline at end of file diff --git a/docs/models/components/servicelevelswyftenum.md b/docs/models/components/servicelevelswyftenum.md index 4038ef7f..ce1a366a 100644 --- a/docs/models/components/servicelevelswyftenum.md +++ b/docs/models/components/servicelevelswyftenum.md @@ -6,6 +6,14 @@ | next_day | Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelSwyftEnum + +value = ServiceLevelSwyftEnum.SAME_DAY +``` + ## Values diff --git a/docs/models/components/serviceleveludsenum.md b/docs/models/components/serviceleveludsenum.md index d2c5fc7c..cd31586f 100644 --- a/docs/models/components/serviceleveludsenum.md +++ b/docs/models/components/serviceleveludsenum.md @@ -5,6 +5,14 @@ | uds_next_day | Next Day| +## Example Usage + +```python +from shippo.models.components import ServiceLevelUDSEnum + +value = ServiceLevelUDSEnum.UDS_NEXT_DAY +``` + ## Values diff --git a/docs/models/components/servicelevelupsenum.md b/docs/models/components/servicelevelupsenum.md index a05d2c7a..d2f2a4f8 100644 --- a/docs/models/components/servicelevelupsenum.md +++ b/docs/models/components/servicelevelupsenum.md @@ -29,6 +29,14 @@ | ups_access_point_economy | Access Point™ Economy| +## Example Usage + +```python +from shippo.models.components import ServiceLevelUPSEnum + +value = ServiceLevelUPSEnum.UPS_STANDARD +``` + ## Values diff --git a/docs/models/components/serviceleveluspsenum.md b/docs/models/components/serviceleveluspsenum.md index ca0caae1..e79e7ac6 100644 --- a/docs/models/components/serviceleveluspsenum.md +++ b/docs/models/components/serviceleveluspsenum.md @@ -11,6 +11,14 @@ | usps_ground_advantage | Ground Advantage | +## Example Usage + +```python +from shippo.models.components import ServiceLevelUSPSEnum + +value = ServiceLevelUSPSEnum.USPS_PRIORITY +``` + ## Values diff --git a/docs/models/components/servicelevelvehoenum.md b/docs/models/components/servicelevelvehoenum.md index 65c1b2da..35fee41d 100644 --- a/docs/models/components/servicelevelvehoenum.md +++ b/docs/models/components/servicelevelvehoenum.md @@ -6,6 +6,14 @@ | veho_premium_economy | Veho Premium Economy +## Example Usage + +```python +from shippo.models.components import ServiceLevelVehoEnum + +value = ServiceLevelVehoEnum.VEHO_GROUND_PLUS +``` + ## Values diff --git a/docs/models/components/servicelevelwithparent.md b/docs/models/components/servicelevelwithparent.md index 7b652c9e..de8cd302 100644 --- a/docs/models/components/servicelevelwithparent.md +++ b/docs/models/components/servicelevelwithparent.md @@ -9,6 +9,6 @@ Contains details regarding the service level for the given rate. | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *Optional[str]* | :heavy_minus_sign: | Name of the Rate's servicelevel, e.g. `International Priority` or `Standard Post`.
A servicelevel commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties.
These names vary depending on the provider. | Priority Mail Express | | `terms` | *Optional[str]* | :heavy_minus_sign: | Further clarification of the service. | | -| `token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | usps_priority_express | +| `token` | *Optional[str]* | :heavy_minus_sign: | Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
See servicelevels. | usps_priority_express | | `extended_token` | *Optional[str]* | :heavy_minus_sign: | Unique, extended version of the Service Level "token".
Guaranteed to be unique across all Service Levels, and may help offer insight into the specific Service Level it describes. | | | `parent_servicelevel` | [Optional[components.ServiceLevel]](../../models/components/servicelevel.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/shipment.md b/docs/models/components/shipment.md index 0cf43639..963357ad 100644 --- a/docs/models/components/shipment.md +++ b/docs/models/components/shipment.md @@ -7,10 +7,14 @@ Shipment represents the parcel as retrieved from the database | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `extra` | [Optional[components.ShipmentExtra]](../../models/components/shipmentextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested. | | | `metadata` | *str* | :heavy_check_mark: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Customer ID 123456 | -| `address_from` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the sender / seller. Will be returned expanded by default. | | -| `address_to` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | +| `shipment_date` | *Optional[str]* | :heavy_minus_sign: | Date the shipment will be tendered to the carrier. Must be in the format `2014-01-18T00:35:03.463Z`.
Defaults to current date and time if no value is provided. Please note that some carriers require this value to
be in the future, on a working day, or similar. | 2021-03-22T12:00:00Z | +| `address_from` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the sender / seller. Will be returned expanded by default. | | +| `address_return` | [Optional[components.Address]](../../models/components/address.md) | :heavy_minus_sign: | ID of the Address object where the shipment will be sent back to if it is not delivered
(Only available for UPS, USPS, and Fedex shipments).

If this field is not set, your shipments will be returned to the address_from. | | +| `address_to` | [components.Address](../../models/components/address.md) | :heavy_check_mark: | Address object of the recipient / buyer. Will be returned expanded by default. | | | `carrier_accounts` | List[*str*] | :heavy_check_mark: | An array of object_ids of the carrier account objects to be used for getting shipping rates for this shipment.
If no carrier account object_ids are set in this field, Shippo will attempt to generate rates using all the
carrier accounts that have the `active` field set. | | +| `customs_declaration` | [Optional[components.CustomsDeclaration]](../../models/components/customsdeclaration.md) | :heavy_minus_sign: | N/A | | | `messages` | List[[components.ResponseMessage](../../models/components/responsemessage.md)] | :heavy_check_mark: | N/A | | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Date and time of Shipment creation. | | | `object_id` | *str* | :heavy_check_mark: | Unique identifier of the given Shipment object. | adcfdddf8ec64b84ad22772bce3ea37a | @@ -19,8 +23,4 @@ Shipment represents the parcel as retrieved from the database | `parcels` | List[[components.Parcel](../../models/components/parcel.md)] | :heavy_check_mark: | List of Parcel objects to be shipped. | | | `rates` | List[[components.Rate](../../models/components/rate.md)] | :heavy_check_mark: | An array with all available rates. If async has been set to false in the request,
this will be populated with all available rates in the response. Otherwise rates will be created
asynchronously and this array will initially be empty. | | | `status` | [components.ShipmentStatus](../../models/components/shipmentstatus.md) | :heavy_check_mark: | `Waiting` shipments have been successfully submitted but not yet been processed.
`Queued` shipments are currently being processed.
`Success` shipments have been processed successfully, meaning that rate generation has concluded.
`Error` does not occur currently and is reserved for future use. | QUEUED | -| `extra` | [Optional[components.ShipmentExtra]](../../models/components/shipmentextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested. | | -| `shipment_date` | *Optional[str]* | :heavy_minus_sign: | Date the shipment will be tendered to the carrier. Must be in the format `2014-01-18T00:35:03.463Z`.
Defaults to current date and time if no value is provided. Please note that some carriers require this value to
be in the future, on a working day, or similar. | 2021-03-22T12:00:00Z | -| `address_return` | [Optional[components.Address]](../../models/components/address.md) | :heavy_minus_sign: | ID of the Address object where the shipment will be sent back to if it is not delivered
(Only available for UPS, USPS, and Fedex shipments).

If this field is not set, your shipments will be returned to the address_from. | | -| `customs_declaration` | [Optional[components.CustomsDeclaration]](../../models/components/customsdeclaration.md) | :heavy_minus_sign: | N/A | | | `test` | *Optional[bool]* | :heavy_minus_sign: | Indicates whether the object has been created in test mode. | | \ No newline at end of file diff --git a/docs/models/components/shipmentcreaterequest.md b/docs/models/components/shipmentcreaterequest.md index 88a2a0f7..07058cb6 100644 --- a/docs/models/components/shipmentcreaterequest.md +++ b/docs/models/components/shipmentcreaterequest.md @@ -5,13 +5,13 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `address_from` | [components.ShipmentCreateRequestAddressFrom](../../models/components/shipmentcreaterequestaddressfrom.md) | :heavy_check_mark: | N/A | | -| `address_to` | [components.ShipmentCreateRequestAddressTo](../../models/components/shipmentcreaterequestaddressto.md) | :heavy_check_mark: | N/A | | -| `parcels` | List[[components.ShipmentCreateRequestParcel](../../models/components/shipmentcreaterequestparcel.md)] | :heavy_check_mark: | N/A | | | `extra` | [Optional[components.ShipmentExtra]](../../models/components/shipmentextra.md) | :heavy_minus_sign: | An object holding optional extra services to be requested. | | | `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Customer ID 123456 | | `shipment_date` | *Optional[str]* | :heavy_minus_sign: | Date the shipment will be tendered to the carrier. Must be in the format `2014-01-18T00:35:03.463Z`.
Defaults to current date and time if no value is provided. Please note that some carriers require this value to
be in the future, on a working day, or similar. | 2021-03-22T12:00:00Z | +| `address_from` | [components.ShipmentCreateRequestAddressFrom](../../models/components/shipmentcreaterequestaddressfrom.md) | :heavy_check_mark: | N/A | | | `address_return` | [Optional[components.AddressReturn]](../../models/components/addressreturn.md) | :heavy_minus_sign: | N/A | | +| `address_to` | [components.ShipmentCreateRequestAddressTo](../../models/components/shipmentcreaterequestaddressto.md) | :heavy_check_mark: | N/A | | | `customs_declaration` | [Optional[components.CustomsDeclarationUnion]](../../models/components/customsdeclarationunion.md) | :heavy_minus_sign: | N/A | | | `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `carrier_accounts` | List[*str*] | :heavy_minus_sign: | List of Carrier Accounts `object_id`s used to filter
the returned rates. If set, only rates from these carriers will be returned. | [
"065a4a8c10d24a34ab932163a1b87f52",
"73f706f4bdb94b54a337563840ce52b0"
] | \ No newline at end of file +| `carrier_accounts` | List[*str*] | :heavy_minus_sign: | List of Carrier Accounts `object_id`s used to filter
the returned rates. If set, only rates from these carriers will be returned. | [
"065a4a8c10d24a34ab932163a1b87f52",
"73f706f4bdb94b54a337563840ce52b0"
] | +| `parcels` | List[[components.ShipmentCreateRequestParcel](../../models/components/shipmentcreaterequestparcel.md)] | :heavy_check_mark: | List of parcels to be shipped.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 items \| | | \ No newline at end of file diff --git a/docs/models/components/shipmentextra.md b/docs/models/components/shipmentextra.md index 735a9b5b..856a14cb 100644 --- a/docs/models/components/shipmentextra.md +++ b/docs/models/components/shipmentextra.md @@ -5,55 +5,56 @@ 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 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 +| 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.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 40 characters (Express services); Max 30 characters (Ground services) \| | +| `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.

**Carrier-Specific Constraints:**
\| Carrier \| Constraints \|
\|:---\|:---\|
\| FedEx \| Max 30 characters \| | +| `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 | +| `usmca_eligible` | *Optional[bool]* | :heavy_minus_sign: | UPS only. Request USMCA (United States-Mexico-Canada Agreement) preferential tariff treatment.
When enabled, it includes the USMCA eligibility declaration in customs documentation.

Supported routes and value limits:
- USA/Canada → Mexico: ≤ $1,000 USD
- Canada/Mexico → USA: ≤ $2,500 USD
- USA/Mexico → Canada: ≤ $3,300 CAD

Only for declaration-only shipments, full USMCA - FormType 04 (Certificate of Origin) is not supported. | \ No newline at end of file diff --git a/docs/models/components/shipmentextralasershipattributesenum.md b/docs/models/components/shipmentextralasershipattributesenum.md index 754fb379..3a959fbf 100644 --- a/docs/models/components/shipmentextralasershipattributesenum.md +++ b/docs/models/components/shipmentextralasershipattributesenum.md @@ -1,5 +1,13 @@ # ShipmentExtraLasershipAttributesEnum +## Example Usage + +```python +from shippo.models.components import ShipmentExtraLasershipAttributesEnum + +value = ShipmentExtraLasershipAttributesEnum.TWO_PERSON_DELIVERY +``` + ## Values diff --git a/docs/models/components/shipmentextrareturnservicetypelasershipenum.md b/docs/models/components/shipmentextrareturnservicetypelasershipenum.md index fd202cef..032b73a7 100644 --- a/docs/models/components/shipmentextrareturnservicetypelasershipenum.md +++ b/docs/models/components/shipmentextrareturnservicetypelasershipenum.md @@ -1,5 +1,13 @@ # ShipmentExtraReturnServiceTypeLasershipEnum +## Example Usage + +```python +from shippo.models.components import ShipmentExtraReturnServiceTypeLasershipEnum + +value = ShipmentExtraReturnServiceTypeLasershipEnum.NO_RETURN +``` + ## Values diff --git a/docs/models/components/shipmentextrareturnservicetypeupsenum.md b/docs/models/components/shipmentextrareturnservicetypeupsenum.md index 89e60cab..3c939865 100644 --- a/docs/models/components/shipmentextrareturnservicetypeupsenum.md +++ b/docs/models/components/shipmentextrareturnservicetypeupsenum.md @@ -1,5 +1,13 @@ # ShipmentExtraReturnServiceTypeUPSEnum +## Example Usage + +```python +from shippo.models.components import ShipmentExtraReturnServiceTypeUPSEnum + +value = ShipmentExtraReturnServiceTypeUPSEnum.PRINT_AND_MAIL +``` + ## Values diff --git a/docs/models/components/shipmentstatus.md b/docs/models/components/shipmentstatus.md index ccb537ba..d0cf8f7a 100644 --- a/docs/models/components/shipmentstatus.md +++ b/docs/models/components/shipmentstatus.md @@ -5,6 +5,14 @@ `Success` shipments have been processed successfully, meaning that rate generation has concluded. `Error` does not occur currently and is reserved for future use. +## Example Usage + +```python +from shippo.models.components import ShipmentStatus + +value = ShipmentStatus.ERROR +``` + ## Values diff --git a/docs/models/components/signatureconfirmation.md b/docs/models/components/signatureconfirmation.md index 1f9966bc..1edfa741 100644 --- a/docs/models/components/signatureconfirmation.md +++ b/docs/models/components/signatureconfirmation.md @@ -3,6 +3,14 @@ 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). +## Example Usage + +```python +from shippo.models.components import SignatureConfirmation + +value = SignatureConfirmation.STANDARD +``` + ## Values diff --git a/docs/models/components/track.md b/docs/models/components/track.md index 8130ef30..e18d37f1 100644 --- a/docs/models/components/track.md +++ b/docs/models/components/track.md @@ -5,15 +5,15 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `carrier` | *str* | :heavy_check_mark: | Name of the carrier of the shipment to track. See Carriers. | usps | -| `messages` | List[*str*] | :heavy_check_mark: | N/A | | -| `tracking_history` | List[[components.TrackingStatus](../../models/components/trackingstatus.md)] | :heavy_check_mark: | A list of tracking events, following the same structure as tracking_status.
It contains a full history of all tracking statuses, starting with the earlier tracking event first. | | -| `tracking_number` | *str* | :heavy_check_mark: | Tracking number to track. | 9205590164917312751089 | | `address_from` | [Optional[components.TrackingStatusLocationBase]](../../models/components/trackingstatuslocationbase.md) | :heavy_minus_sign: | The sender address with city, state, zip and country information. | | | `address_to` | [Optional[components.TrackingStatusLocationBase]](../../models/components/trackingstatuslocationbase.md) | :heavy_minus_sign: | The recipient address with city, state, zip and country information. | | +| `carrier` | *str* | :heavy_check_mark: | Name of the carrier of the shipment to track. See Carriers. | usps | | `eta` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The estimated time of arrival according to the carrier, this might be updated by carriers during the life of the shipment. | | +| `messages` | List[*str*] | :heavy_check_mark: | N/A | | | `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Order 000123 | | `original_eta` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The estimated time of arrival according to the carrier at the time the shipment first entered the system. | 2021-07-23T00:00:00Z | | `servicelevel` | [Optional[components.ServiceLevelWithParent]](../../models/components/servicelevelwithparent.md) | :heavy_minus_sign: | N/A | | +| `tracking_history` | List[[components.TrackingStatus](../../models/components/trackingstatus.md)] | :heavy_check_mark: | A list of tracking events, following the same structure as tracking_status.
It contains a full history of all tracking statuses, starting with the earlier tracking event first. | | +| `tracking_number` | *str* | :heavy_check_mark: | Tracking number to track. | 9205590164917312751089 | | `tracking_status` | [Optional[components.TrackingStatus]](../../models/components/trackingstatus.md) | :heavy_minus_sign: | The latest tracking information of this shipment. | | | `transaction` | *Optional[str]* | :heavy_minus_sign: | The object_id of the transaction associated with this tracking object.
This field is visible only to the object owner of the transaction. | | \ No newline at end of file diff --git a/docs/models/components/trackingstatus.md b/docs/models/components/trackingstatus.md index 8cf3b6b5..06433ae4 100644 --- a/docs/models/components/trackingstatus.md +++ b/docs/models/components/trackingstatus.md @@ -7,11 +7,11 @@ The latest tracking information of this shipment. | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `location` | [Optional[components.TrackingStatusLocationBase]](../../models/components/trackingstatuslocationbase.md) | :heavy_minus_sign: | An object containing zip, city, state and country information of the tracking event. | | | `object_created` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | | `object_id` | *str* | :heavy_check_mark: | N/A | | | `object_updated` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | | `status` | [components.TrackingStatusEnum](../../models/components/trackingstatusenum.md) | :heavy_check_mark: | Indicates the high level status of the shipment. | DELIVERED | -| `status_details` | *str* | :heavy_check_mark: | The human-readable description of the status. | Your shipment has been delivered at the destination mailbox. | -| `location` | [Optional[components.TrackingStatusLocationBase]](../../models/components/trackingstatuslocationbase.md) | :heavy_minus_sign: | An object containing zip, city, state and country information of the tracking event. | | | `substatus` | [Optional[components.TrackingStatusSubstatus]](../../models/components/trackingstatussubstatus.md) | :heavy_minus_sign: | A finer-grained classification of the tracking event. | | -| `status_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time when the carrier scanned this tracking event. This is displayed in UTC. | 2016-07-23T00:00:00Z | \ No newline at end of file +| `status_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Date and time when the carrier scanned this tracking event. This is displayed in UTC. | 2016-07-23T00:00:00Z | +| `status_details` | *str* | :heavy_check_mark: | The human-readable description of the status. | Your shipment has been delivered at the destination mailbox. | \ No newline at end of file diff --git a/docs/models/components/trackingstatusenum.md b/docs/models/components/trackingstatusenum.md index 335f4727..ac7e4fc1 100644 --- a/docs/models/components/trackingstatusenum.md +++ b/docs/models/components/trackingstatusenum.md @@ -2,6 +2,14 @@ Indicates the high level status of the shipment. +## Example Usage + +```python +from shippo.models.components import TrackingStatusEnum + +value = TrackingStatusEnum.UNKNOWN +``` + ## Values diff --git a/docs/models/components/tracksrequest.md b/docs/models/components/tracksrequest.md index 59c72d18..9ec35314 100644 --- a/docs/models/components/tracksrequest.md +++ b/docs/models/components/tracksrequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | `carrier` | *str* | :heavy_check_mark: | Name of the carrier of the shipment to track. | usps | -| `tracking_number` | *str* | :heavy_check_mark: | Tracking number to track. | 9205590164917312751089 | -| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Order 000123 | \ No newline at end of file +| `metadata` | *Optional[str]* | :heavy_minus_sign: | A string of up to 100 characters that can be filled with any additional information you want to attach to the object. | Order 000123 | +| `tracking_number` | *str* | :heavy_check_mark: | Tracking number to track. | 9205590164917312751089 | \ No newline at end of file diff --git a/docs/models/components/transactioncreaterequest.md b/docs/models/components/transactioncreaterequest.md index c692a868..fd637324 100644 --- a/docs/models/components/transactioncreaterequest.md +++ b/docs/models/components/transactioncreaterequest.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rate` | *str* | :heavy_check_mark: | N/A | ec9f0d3adc9441449c85d315f0997fd5 | | `async_` | *Optional[bool]* | :heavy_minus_sign: | N/A | false | | `label_file_type` | [Optional[components.LabelFileTypeEnum]](../../models/components/labelfiletypeenum.md) | :heavy_minus_sign: | Print format of the label. If empty, will use the default format set from
the Shippo dashboard. | PDF_4x6 | | `metadata` | *Optional[str]* | :heavy_minus_sign: | N/A | Order ID #12345 | +| `rate` | *str* | :heavy_check_mark: | N/A | ec9f0d3adc9441449c85d315f0997fd5 | | `order` | *Optional[str]* | :heavy_minus_sign: | N/A | adcfdddf8ec64b84ad22772bce3ea37a | \ No newline at end of file diff --git a/docs/models/components/transactionstatusenum.md b/docs/models/components/transactionstatusenum.md index 527845ce..dc2d5999 100644 --- a/docs/models/components/transactionstatusenum.md +++ b/docs/models/components/transactionstatusenum.md @@ -2,6 +2,14 @@ Indicates the status of the Transaction. +## Example Usage + +```python +from shippo.models.components import TransactionStatusEnum + +value = TransactionStatusEnum.WAITING +``` + ## Values diff --git a/docs/models/components/upsconnectexistingownaccountparameters.md b/docs/models/components/upsconnectexistingownaccountparameters.md index 7761365f..bdc7f25b 100644 --- a/docs/models/components/upsconnectexistingownaccountparameters.md +++ b/docs/models/components/upsconnectexistingownaccountparameters.md @@ -3,6 +3,13 @@ An array of additional parameters for the account, such as e.g. password or token. Please check the carrier accounts tutorial page for the parameters per carrier.
To protect account information, this field will be masked in any API response. +In the case of masked fields, they should be handled carefully. + +Fields also must consider: +- Not providing a *fields* in parameters will not result in a change to any configured value +- Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value +- Providing *field* with null will clear the configured value +- Providing *field* with any other value will change the configured value and may affect the behavior of the account. ## Fields @@ -10,24 +17,24 @@ To protect account information, this field will be masked in any API response. | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `account_number` | *str* | :heavy_check_mark: | The UPS account number | 94567e | +| `aia_country_iso2` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. Country associated with the account that issued the invoice | US | | `billing_address_city` | *str* | :heavy_check_mark: | N/A | San Francisco | | `billing_address_country_iso2` | *str* | :heavy_check_mark: | N/A | US | | `billing_address_state` | *str* | :heavy_check_mark: | N/A | CA | | `billing_address_street1` | *str* | :heavy_check_mark: | N/A | 731 Market St | +| `billing_address_street2` | *Optional[str]* | :heavy_minus_sign: | Empty string acceptable for billing_address_street2 | STE 200 | | `billing_address_zip` | *str* | :heavy_check_mark: | N/A | 94103 | | `collec_country_iso2` | *str* | :heavy_check_mark: | N/A | US | | `collec_zip` | *str* | :heavy_check_mark: | Zip code of the collection/pickup address | 94103 | | `company` | *str* | :heavy_check_mark: | Company name. Full name is acceptable in this field if the user has no company name | Shippo | +| `currency_code` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. 3-letter currency code associated with invoice_value | USD | | `email` | *str* | :heavy_check_mark: | N/A | hippo@shippo.com | | `full_name` | *str* | :heavy_check_mark: | N/A | Shippo Meister | | `has_invoice` | *bool* | :heavy_check_mark: | true if user has been issued a UPS invoice within the past 90 days for the US or Canada; and 45 days for any other countries. User can use data from any of the last 3 invoices | | -| `phone` | *str* | :heavy_check_mark: | N/A | 1112223333 | -| `title` | *str* | :heavy_check_mark: | User's title, e.g. including but not limited to Manager, Doctor, Artist, Engineer, Mr, Ms, Mrs, Mx | Manager | -| `ups_agreements` | *bool* | :heavy_check_mark: | Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false | | -| `aia_country_iso2` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. Country associated with the account that issued the invoice | US | -| `billing_address_street2` | *Optional[str]* | :heavy_minus_sign: | Empty string acceptable for billing_address_street2 | STE 200 | -| `currency_code` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. 3-letter currency code associated with invoice_value | USD | | `invoice_controlid` | *Optional[str]* | :heavy_minus_sign: | Only required if aia_country_iso2 is US and has_invoice is true. | 1234 | | `invoice_date` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. Date the invoice was issued. yyyymmdd format | 20210529 | | `invoice_number` | *Optional[str]* | :heavy_minus_sign: | N/A | 1112234 | -| `invoice_value` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. Max 16 digits before decimal and 2 digits after decimal | 11.23 | \ No newline at end of file +| `invoice_value` | *Optional[str]* | :heavy_minus_sign: | Only required if has_invoice is true. Max 16 digits before decimal and 2 digits after decimal | 11.23 | +| `phone` | *str* | :heavy_check_mark: | N/A | 1112223333 | +| `title` | *str* | :heavy_check_mark: | User's title, e.g. including but not limited to Manager, Doctor, Artist, Engineer, Mr, Ms, Mrs, Mx | Manager | +| `ups_agreements` | *bool* | :heavy_check_mark: | Whether the user agrees to the UPS terms and conditions or not. Error 400 will be returned if passed in as false | | \ No newline at end of file diff --git a/docs/models/components/userparceltemplateupdaterequest.md b/docs/models/components/userparceltemplateupdaterequest.md index 7f476901..e8d9e851 100644 --- a/docs/models/components/userparceltemplateupdaterequest.md +++ b/docs/models/components/userparceltemplateupdaterequest.md @@ -9,6 +9,6 @@ | `height` | *str* | :heavy_check_mark: | The height of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 6 | | `length` | *str* | :heavy_check_mark: | The length of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 10 | | `name` | *str* | :heavy_check_mark: | The name of the User Parcel Template | My Custom Template | -| `width` | *str* | :heavy_check_mark: | The width of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 8 | | `weight` | *Optional[str]* | :heavy_minus_sign: | The weight of the package, in units specified by the weight_unit attribute. | 12 | -| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | \ No newline at end of file +| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | +| `width` | *str* | :heavy_check_mark: | The width of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 8 | \ No newline at end of file diff --git a/docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md b/docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md index 13628788..9826f7b7 100644 --- a/docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md +++ b/docs/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.md @@ -9,6 +9,6 @@ | `height` | *str* | :heavy_check_mark: | The height of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 6 | | `length` | *str* | :heavy_check_mark: | The length of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 10 | | `name` | *str* | :heavy_check_mark: | The name of the User Parcel Template | My Custom Template | -| `width` | *str* | :heavy_check_mark: | The width of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 8 | | `weight` | *Optional[str]* | :heavy_minus_sign: | The weight of the package, in units specified by the weight_unit attribute. | 12 | -| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | \ No newline at end of file +| `weight_unit` | [Optional[components.WeightUnitEnum]](../../models/components/weightunitenum.md) | :heavy_minus_sign: | The unit used for weight. | lb | +| `width` | *str* | :heavy_check_mark: | The width of the package, in units specified by the `distance_unit` attribute. Required, but if using a preset carrier template then this field must be empty. | 8 | \ No newline at end of file diff --git a/docs/models/components/verification.md b/docs/models/components/verification.md new file mode 100644 index 00000000..d4697e32 --- /dev/null +++ b/docs/models/components/verification.md @@ -0,0 +1,8 @@ +# Verification + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `policy` | [Optional[components.Policy]](../../models/components/policy.md) | :heavy_minus_sign: | Policy to indicate if the Account needs multi-factor verification. | \ No newline at end of file diff --git a/docs/models/components/verificationoption.md b/docs/models/components/verificationoption.md new file mode 100644 index 00000000..5bb6aae0 --- /dev/null +++ b/docs/models/components/verificationoption.md @@ -0,0 +1,21 @@ +# VerificationOption + +Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE). + +## Example Usage + +```python +from shippo.models.components import VerificationOption + +value = VerificationOption.SMS +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `SMS` | SMS | +| `EMAIL` | EMAIL | +| `CALL` | CALL | +| `INVOICE` | INVOICE | \ No newline at end of file diff --git a/docs/models/components/webhookeventtypeenum.md b/docs/models/components/webhookeventtypeenum.md index f127c914..14886c7c 100644 --- a/docs/models/components/webhookeventtypeenum.md +++ b/docs/models/components/webhookeventtypeenum.md @@ -2,6 +2,14 @@ Type of event that triggered the webhook. +## Example Usage + +```python +from shippo.models.components import WebhookEventTypeEnum + +value = WebhookEventTypeEnum.TRANSACTION_CREATED +``` + ## Values diff --git a/docs/models/components/webhookpayload.md b/docs/models/components/webhookpayload.md index 8d3a9c83..68ad329f 100644 --- a/docs/models/components/webhookpayload.md +++ b/docs/models/components/webhookpayload.md @@ -1,5 +1,7 @@ # WebhookPayload +The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration. + ## Supported Types diff --git a/docs/models/components/weightunitenum.md b/docs/models/components/weightunitenum.md index 2c5ec9fb..662cd383 100644 --- a/docs/models/components/weightunitenum.md +++ b/docs/models/components/weightunitenum.md @@ -2,6 +2,14 @@ The unit used for weight. +## Example Usage + +```python +from shippo.models.components import WeightUnitEnum + +value = WeightUnitEnum.G +``` + ## Values diff --git a/docs/models/operations/carrier.md b/docs/models/operations/carrier.md index ea7c8c9a..050ff277 100644 --- a/docs/models/operations/carrier.md +++ b/docs/models/operations/carrier.md @@ -2,6 +2,14 @@ filter by specific carrier +## Example Usage + +```python +from shippo.models.operations import Carrier + +value = Carrier.UPS +``` + ## Values diff --git a/docs/models/operations/include.md b/docs/models/operations/include.md index 4ce1dc50..e416c71a 100644 --- a/docs/models/operations/include.md +++ b/docs/models/operations/include.md @@ -2,6 +2,14 @@ filter by user or enabled +## Example Usage + +```python +from shippo.models.operations import Include + +value = Include.ALL +``` + ## Values diff --git a/docs/models/operations/registercarrieraccountrequest.md b/docs/models/operations/registercarrieraccountrequest.md index f88e0b5f..0c284ac4 100644 --- a/docs/models/operations/registercarrieraccountrequest.md +++ b/docs/models/operations/registercarrieraccountrequest.md @@ -89,9 +89,15 @@ value: components.CarrierAccountUPSCreateRequest = /* values here */ value: components.CarrierAccountUSPSCreateRequest = /* values here */ ``` -### `components.CarrierAccountSendleCreateRequest` +### `components.CarrierAccountRoyalMailCreateRequest` ```python -value: components.CarrierAccountSendleCreateRequest = /* values here */ +value: components.CarrierAccountRoyalMailCreateRequest = /* values here */ +``` + +### `components.CarrierAccountRoyalMailSfCreateRequest` + +```python +value: components.CarrierAccountRoyalMailSfCreateRequest = /* values here */ ``` diff --git a/docs/sdks/addresses/README.md b/docs/sdks/addresses/README.md index fd05075f..9e2912aa 100644 --- a/docs/sdks/addresses/README.md +++ b/docs/sdks/addresses/README.md @@ -1,10 +1,8 @@ # Addresses -(*addresses*) ## Overview Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels. - ### Available Operations @@ -19,18 +17,17 @@ Returns a list of all address objects that have been created in this account. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.addresses.list() - - assert res is not None + res = s_client.addresses.list(page=1, results=5) # Handle response print(res) @@ -61,17 +58,17 @@ Creates a new address object. You can use address objects to create new shipment ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.addresses.create(request={ - "country": "US", "name": "Shwan Ippotle", "company": "Shippo", "street1": "215 Clayton St.", @@ -80,6 +77,7 @@ with Shippo( "city": "San Francisco", "state": "CA", "zip": "94117", + "country": "US", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": True, @@ -87,8 +85,6 @@ with Shippo( "validate_": True, }) - assert res is not None - # Handle response print(res) @@ -117,19 +113,18 @@ Returns an existing address using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.addresses.get(address_id="") - assert res is not None - # Handle response print(res) @@ -158,19 +153,18 @@ Validates an existing address using an object ID ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.addresses.validate(address_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/batches/README.md b/docs/sdks/batches/README.md index e885985e..1335bfa4 100644 --- a/docs/sdks/batches/README.md +++ b/docs/sdks/batches/README.md @@ -1,18 +1,8 @@ # Batches -(*batches*) ## Overview A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels. - - -# Batch Shipment -The batch shipment object is a wrapper around a shipment object, which include shipment-specific information -for batch processing. - -Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through -the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint - ### Available Operations @@ -28,323 +18,25 @@ Creates a new batch object for purchasing shipping labels for many shipments at ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.batches.create(request={ "default_carrier_account": "078870331023437cb917f5187429b093", "default_servicelevel_token": "usps_priority", - "batch_shipments": [ - components.BatchShipmentCreateRequest( - shipment=components.ShipmentCreateRequest( - address_from="d799c2679e644279b59fe661ac8fa488", - address_to=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - parcels=[ - components.ParcelCreateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - distance_unit=components.DistanceUnitEnum.IN, - height="1", - length="1", - width="1", - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - components.ParcelCreateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - distance_unit=components.DistanceUnitEnum.IN, - height="1", - length="1", - width="1", - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - components.ParcelCreateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - distance_unit=components.DistanceUnitEnum.IN, - height="1", - length="1", - width="1", - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - ], - extra=components.ShipmentExtra( - accounts_receivable_customer_account=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - appropriation_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - bill_of_lading_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - cod_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - customer_reference=components.CustomerReference( - ref_sort=1, - ), - dealer_order_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - dept_number=components.DepartmentNumber( - ref_sort=3, - ), - fda_product_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - insurance=components.Insurance( - amount="5.5", - currency="USD", - ), - invoice_number=components.InvoiceNumber( - ref_sort=2, - ), - manifest_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - model_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - part_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - po_number=components.PoNumber( - ref_sort=2, - ), - production_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - purchase_request_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - rma_number=components.RmaNumber( - ref_sort=1, - ), - salesperson_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - serial_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - store_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - transaction_reference_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - ), - metadata="Customer ID 123456", - shipment_date="2021-03-22T12:00:00Z", - address_return=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - customs_declaration=components.CustomsDeclarationCreateRequest( - certify=True, - certify_signer="Shawn Ippotle", - contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE, - items=[ - components.CustomsItemCreateRequest( - description="T-Shirt", - mass_unit=components.WeightUnitEnum.LB, - net_weight="5", - origin_country="", - quantity=20, - value_amount="200", - value_currency="USD", - metadata="Order ID \"123454\"", - sku_code="HM-123", - hs_code="0901.21", - ), - components.CustomsItemCreateRequest( - description="T-Shirt", - mass_unit=components.WeightUnitEnum.LB, - net_weight="5", - origin_country="", - quantity=20, - value_amount="200", - value_currency="USD", - metadata="Order ID \"123454\"", - sku_code="HM-123", - hs_code="0901.21", - ), - components.CustomsItemCreateRequest( - description="T-Shirt", - mass_unit=components.WeightUnitEnum.LB, - net_weight="5", - origin_country="", - quantity=20, - value_amount="200", - value_currency="USD", - metadata="Order ID \"123454\"", - sku_code="HM-123", - hs_code="0901.21", - ), - ], - non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN, - b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY, - contents_explanation="T-Shirt purchase", - duties_payor=components.CustomsDeclarationCreateRequestDutiesPayor( - account="2323434543", - type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY, - address=components.CustomsDeclarationCreateRequestAddress( - name="Patrick Kavanagh", - zip="80331", - country="DE", - ), - ), - exporter_identification=components.CustomsExporterIdentification( - eori_number="PL123456790ABCDE", - tax_id=components.CustomsTaxIdentification( - number="123456789", - type=components.CustomsTaxIdentificationType.EIN, - ), - ), - invoice="#123123", - metadata="Order ID #123123", - address_importer=components.AddressImporter( - name="Shwan Ippotle", - company="Shippo", - street1="Blumenstraße", - street3="", - street_no="22", - city="München", - state="CA", - zip="80331", - country="DE", - phone="80331", - email="shippotle@shippo.com", - is_residential=True, - ), - eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A, - incoterm=components.CustomsDeclarationIncotermEnum.DDP, - test=True, - ), - carrier_accounts=[ - "065a4a8c10d24a34ab932163a1b87f52", - "73f706f4bdb94b54a337563840ce52b0", - ], - ), - carrier_account="a4391cd4ab974f478f55dc08b5c8e3b3", - metadata="SHIPMENT #1", - servicelevel_token="fedex_ground", - ), - ], "label_filetype": components.LabelFileTypeEnum.PDF_4X6, "metadata": "BATCH #1", + "batch_shipments": [], }) - assert res is not None - # Handle response print(res) @@ -376,18 +68,17 @@ For more details on filtering results, see our guide on ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.batches.get(batch_id="") - - assert res is not None + res = s_client.batches.get(batch_id="", page=1, results=5) # Handle response print(res) @@ -419,262 +110,23 @@ Adds batch shipments to an existing batch. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.batches.add_shipments(batch_id="", request_body=[ components.BatchShipmentCreateRequest( - shipment=components.ShipmentCreateRequest( - address_from=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - address_to="d799c2679e644279b59fe661ac8fa489", - parcels=[ - "", - "", - components.ParcelCreateFromTemplateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - template=components.ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE, - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - ], - extra=components.ShipmentExtra( - accounts_receivable_customer_account=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - appropriation_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - bill_of_lading_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - cod_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - customer_reference=components.CustomerReference( - ref_sort=1, - ), - dealer_order_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - dept_number=components.DepartmentNumber( - ref_sort=3, - ), - fda_product_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - insurance=components.Insurance( - amount="5.5", - currency="USD", - ), - invoice_number=components.InvoiceNumber( - ref_sort=2, - ), - manifest_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - model_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - part_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - po_number=components.PoNumber( - ref_sort=2, - ), - production_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - purchase_request_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - rma_number=components.RmaNumber( - ref_sort=1, - ), - salesperson_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - serial_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - store_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - transaction_reference_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - ), - metadata="Customer ID 123456", - shipment_date="2021-03-22T12:00:00Z", - address_return=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - customs_declaration="adcfdddf8ec64b84ad22772bce3ea37a", - carrier_accounts=[ - "065a4a8c10d24a34ab932163a1b87f52", - "73f706f4bdb94b54a337563840ce52b0", - ], - ), carrier_account="a4391cd4ab974f478f55dc08b5c8e3b3", metadata="SHIPMENT #1", servicelevel_token="fedex_ground", - ), - components.BatchShipmentCreateRequest( shipment=components.ShipmentCreateRequest( - address_from=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - address_to=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - parcels=[ - components.ParcelCreateFromTemplateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - template=components.ParcelTemplateDPDUKEnum.DPD_UK_EXPRESS_PAK, - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - components.ParcelCreateFromTemplateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - template=components.ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR, - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - ], extra=components.ShipmentExtra( accounts_receivable_customer_account=components.UPSReferenceFields( prefix="ABC", @@ -778,217 +230,21 @@ with Shippo( ), metadata="Customer ID 123456", shipment_date="2021-03-22T12:00:00Z", - address_return=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - customs_declaration=components.CustomsDeclarationCreateRequest( - certify=True, - certify_signer="Shawn Ippotle", - contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE, - items=[ - - ], - non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN, - b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY, - contents_explanation="T-Shirt purchase", - duties_payor=components.CustomsDeclarationCreateRequestDutiesPayor( - account="2323434543", - type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY, - address=components.CustomsDeclarationCreateRequestAddress( - name="Patrick Kavanagh", - zip="80331", - country="DE", - ), - ), - exporter_identification=components.CustomsExporterIdentification( - eori_number="PL123456790ABCDE", - tax_id=components.CustomsTaxIdentification( - number="123456789", - type=components.CustomsTaxIdentificationType.EIN, - ), - ), - invoice="#123123", - metadata="Order ID #123123", - address_importer=components.AddressImporter( - name="Shwan Ippotle", - company="Shippo", - street1="Blumenstraße", - street3="", - street_no="22", - city="München", - state="CA", - zip="80331", - country="DE", - phone="80331", - email="shippotle@shippo.com", - is_residential=True, - ), - eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A, - incoterm=components.CustomsDeclarationIncotermEnum.DDP, - test=True, - ), - carrier_accounts=[ - "065a4a8c10d24a34ab932163a1b87f52", - "73f706f4bdb94b54a337563840ce52b0", - ], - ), - carrier_account="a4391cd4ab974f478f55dc08b5c8e3b3", - metadata="SHIPMENT #1", - servicelevel_token="fedex_ground", - ), - components.BatchShipmentCreateRequest( - shipment=components.ShipmentCreateRequest( address_from="d799c2679e644279b59fe661ac8fa488", - address_to=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - parcels=[ - - ], - extra=components.ShipmentExtra( - accounts_receivable_customer_account=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - appropriation_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - bill_of_lading_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - cod_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - customer_reference=components.CustomerReference( - ref_sort=1, - ), - dealer_order_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - dept_number=components.DepartmentNumber( - ref_sort=3, - ), - fda_product_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - insurance=components.Insurance( - amount="5.5", - currency="USD", - ), - invoice_number=components.InvoiceNumber( - ref_sort=2, - ), - manifest_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - model_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - part_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - po_number=components.PoNumber( - ref_sort=2, - ), - production_code=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - purchase_request_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - rma_number=components.RmaNumber( - ref_sort=1, - ), - salesperson_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - serial_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - store_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - transaction_reference_number=components.UPSReferenceFields( - prefix="ABC", - value="value", - ref_sort=1, - ), - ), - metadata="Customer ID 123456", - shipment_date="2021-03-22T12:00:00Z", address_return="d799c2679e644279b59fe661ac8fa488", + address_to="d799c2679e644279b59fe661ac8fa489", customs_declaration="adcfdddf8ec64b84ad22772bce3ea37a", carrier_accounts=[ "065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0", ], + parcels=[ + "", + ], ), - carrier_account="a4391cd4ab974f478f55dc08b5c8e3b3", - metadata="SHIPMENT #1", - servicelevel_token="fedex_ground", ), ]) - assert res is not None - # Handle response print(res) @@ -1021,19 +277,18 @@ When all the shipments are purchased, the status will change to `PURCHASED` and ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.batches.purchase(batch_id="") - assert res is not None - # Handle response print(res) @@ -1062,23 +317,20 @@ Removes shipments from an existing batch shipment. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.batches.remove_shipments(batch_id="", request_body=[ - "", - "", - "", + "", ]) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/carrieraccounts/README.md b/docs/sdks/carrieraccounts/README.md index f55d5ce2..f18e62b0 100644 --- a/docs/sdks/carrieraccounts/README.md +++ b/docs/sdks/carrieraccounts/README.md @@ -1,12 +1,9 @@ # CarrierAccounts -(*carrier_accounts*) ## Overview Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers. - - ### Available Operations * [list](#list) - List all carrier accounts @@ -27,19 +24,18 @@ By default, if the query parameter is omitted, the `service_levels` property wil ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_accounts.list(request={}) - assert res is not None - # Handle response print(res) @@ -68,34 +64,38 @@ Creates a new carrier account or connects an existing carrier account to the Shi ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_accounts.create(request={ "account_id": "321123", "carrier": "fedex", + "metadata": "FEDEX Account", "parameters": { - "first_name": "Loyal", - "last_name": "Collier", - "phone_number": "(890) 307-8579", + "first_name": "Abdullah", + "last_name": "Ward", + "phone_number": "915-577-4415 x207", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", + "use_multi_factor_registration": True, + "verification_option": "INVOICE", + "verification_invoice_amount": "340", + "verification_invoice_date": "2024-03-09", + "verification_invoice_currency": "USD", }, - "metadata": "FEDEX Account", "test": False, }) - assert res is not None - # Handle response print(res) @@ -124,19 +124,18 @@ Returns an existing carrier account using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_accounts.get(carrier_account_id="") - assert res is not None - # Handle response print(res) @@ -165,46 +164,36 @@ Updates an existing carrier account object. The account_id and carrier can't be ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_accounts.update(carrier_account_id="", carrier_account_base={ "account_id": "****", "carrier": "usps", "parameters": { - "account_number": "94567e", - "aia_country_iso2": "US", - "billing_address_city": "San Francisco", - "billing_address_country_iso2": "US", - "billing_address_state": "CA", - "billing_address_street1": "731 Market St", - "billing_address_street2": "STE 200", - "billing_address_zip": "94103", - "collec_country_iso2": "US", - "collec_zip": "94103", - "company": "Shippo", - "currency_code": "USD", - "email": "hippo@shippo.com", - "full_name": "Shippo Meister", - "has_invoice": False, - "invoice_controlid": "1234", - "invoice_date": "20210529", - "invoice_number": "1112234", - "invoice_value": "11.23", - "phone": "1112223333", - "title": "Manager", - "ups_agreements": True, + "first_name": "Eldora", + "last_name": "Weber", + "phone_number": "1-505-428-6798", + "from_address_st": "", + "from_address_city": "", + "from_address_state": "", + "from_address_zip": "", + "from_address_country_iso2": "", + "use_multi_factor_registration": True, + "verification_option": "CALL", + "verification_invoice_amount": "340", + "verification_invoice_date": "2024-03-09", + "verification_invoice_currency": "USD", }, }) - assert res is not None - # Handle response print(res) @@ -234,16 +223,17 @@ Used by client applications to setup or reconnect an existing carrier account wi ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.carrier_accounts.initiate_oauth2_signin(carrier_account_object_id="", redirect_uri="https://enlightened-mortise.com/") + res = s_client.carrier_accounts.initiate_oauth2_signin(carrier_account_object_id="", redirect_uri="https://ashamed-reporter.biz") # Handle response print(res) @@ -278,22 +268,21 @@ Adds a Shippo carrier account ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_accounts.register(request={ + "carrier": "deutsche_post", "parameters": {}, - "carrier": "correos", }) - assert res is not None - # Handle response print(res) @@ -322,19 +311,18 @@ Returns the registration status for the given account for the given carrier ### Example Usage + ```python from shippo import Shippo from shippo.models import operations with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.carrier_accounts.get_registration_status(carrier=operations.Carrier.USPS) - - assert res is not None + res = s_client.carrier_accounts.get_registration_status(carrier=operations.Carrier.UPS) # Handle response print(res) diff --git a/docs/sdks/carrierparceltemplates/README.md b/docs/sdks/carrierparceltemplates/README.md index 63f62ebf..9039a8dc 100644 --- a/docs/sdks/carrierparceltemplates/README.md +++ b/docs/sdks/carrierparceltemplates/README.md @@ -1,12 +1,9 @@ # CarrierParcelTemplates -(*carrier_parcel_templates*) ## Overview A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight. - - ### Available Operations * [list](#list) - List all carrier parcel templates @@ -24,19 +21,18 @@ List all carrier parcel template objects.
Use the following query string pa ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_parcel_templates.list(carrier="fedex") - assert res is not None - # Handle response print(res) @@ -66,19 +62,18 @@ Fetches the parcel template information for a specific carrier parcel template, ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.carrier_parcel_templates.get(carrier_parcel_template_token="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/customsdeclarations/README.md b/docs/sdks/customsdeclarations/README.md index aa6598af..2d01c28c 100644 --- a/docs/sdks/customsdeclarations/README.md +++ b/docs/sdks/customsdeclarations/README.md @@ -1,11 +1,9 @@ # CustomsDeclarations -(*customs_declarations*) ## Overview Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - ### Available Operations @@ -15,22 +13,21 @@ customs clearance for your international shipments. ## list -Returns a a list of all customs declaration objects +Returns a list of all customs declaration objects ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.customs_declarations.list() - - assert res is not None + res = s_client.customs_declarations.list(page=1, results=5) # Handle response print(res) @@ -61,36 +58,21 @@ Creates a new customs declaration object ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.customs_declarations.create(request={ + "b13a_filing_option": components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY, "certify": True, "certify_signer": "Shawn Ippotle", - "contents_type": components.CustomsDeclarationContentsTypeEnum.MERCHANDISE, - "items": [ - { - "description": "T-Shirt", - "mass_unit": components.WeightUnitEnum.LB, - "net_weight": "5", - "origin_country": "", - "quantity": 20, - "value_amount": "200", - "value_currency": "USD", - "metadata": "Order ID \"123454\"", - "sku_code": "HM-123", - "hs_code": "0901.21", - }, - ], - "non_delivery_option": components.CustomsDeclarationNonDeliveryOptionEnum.RETURN, - "b13a_filing_option": components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY, "contents_explanation": "T-Shirt purchase", "duties_payor": { "account": "2323434543", @@ -124,13 +106,14 @@ with Shippo( "email": "shippotle@shippo.com", "is_residential": True, }, + "contents_type": components.CustomsDeclarationContentsTypeEnum.MERCHANDISE, "eel_pfc": components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A, "incoterm": components.CustomsDeclarationIncotermEnum.DDP, + "items": [], + "non_delivery_option": components.CustomsDeclarationNonDeliveryOptionEnum.RETURN, "test": True, }) - assert res is not None - # Handle response print(res) @@ -159,18 +142,17 @@ Returns an existing customs declaration using an object ID ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.customs_declarations.get(customs_declaration_id="") - - assert res is not None + res = s_client.customs_declarations.get(customs_declaration_id="", page=1) # Handle response print(res) diff --git a/docs/sdks/customsitems/README.md b/docs/sdks/customsitems/README.md index 827e62d6..746fdb76 100644 --- a/docs/sdks/customsitems/README.md +++ b/docs/sdks/customsitems/README.md @@ -1,10 +1,8 @@ # CustomsItems -(*customs_items*) ## Overview Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - ### Available Operations @@ -18,18 +16,17 @@ Returns a list all customs items objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.customs_items.list() - - assert res is not None + res = s_client.customs_items.list(page=1, results=25) # Handle response print(res) @@ -60,31 +57,30 @@ Creates a new customs item object. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.customs_items.create(request={ "description": "T-Shirt", "mass_unit": components.WeightUnitEnum.LB, + "metadata": "Order ID \"123454\"", "net_weight": "5", "origin_country": "", "quantity": 20, - "value_amount": "200", - "value_currency": "USD", - "metadata": "Order ID \"123454\"", "sku_code": "HM-123", "hs_code": "0901.21", + "value_amount": "200", + "value_currency": "USD", }) - assert res is not None - # Handle response print(res) @@ -113,18 +109,17 @@ Returns an existing customs item using an object ID ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.customs_items.get(customs_item_id="") - - assert res is not None + res = s_client.customs_items.get(customs_item_id="", page=1) # Handle response print(res) diff --git a/docs/sdks/manifests/README.md b/docs/sdks/manifests/README.md index c261340c..7b8a20f4 100644 --- a/docs/sdks/manifests/README.md +++ b/docs/sdks/manifests/README.md @@ -1,17 +1,10 @@ # Manifests -(*manifests*) ## Overview -A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually. +A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually. They are close-outs of shipping labels of a certain day. Some carriers require manifests to process the shipments. - - -# Manifest Errors -The following codes and messages are the possible errors that may occur when creating Manifests. - - ### Available Operations * [list](#list) - List all manifests @@ -24,18 +17,17 @@ Returns a list of all manifest objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.manifests.list() - - assert res is not None + res = s_client.manifests.list(page=1, results=5) # Handle response print(res) @@ -66,41 +58,25 @@ Creates a new manifest object. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.manifests.create(request={ "carrier_account": "adcfdddf8ec64b84ad22772bce3ea37a", "shipment_date": "2014-05-16T23:59:59Z", - "address_from": { - "country": "US", - "name": "Shwan Ippotle", - "company": "Shippo", - "street1": "215 Clayton St.", - "street3": "", - "street_no": "", - "city": "San Francisco", - "state": "CA", - "zip": "94117", - "phone": "+1 555 341 9393", - "email": "shippotle@shippo.com", - "is_residential": True, - "metadata": "Customer ID 123456", - "validate_": True, - }, "transactions": [ "adcfdddf8ec64b84ad22772bce3ea37a", ], + "address_from": "", }) - assert res is not None - # Handle response print(res) @@ -129,19 +105,18 @@ Returns an existing manifest using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.manifests.get(manifest_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/orders/README.md b/docs/sdks/orders/README.md index d683caf9..5605cd96 100644 --- a/docs/sdks/orders/README.md +++ b/docs/sdks/orders/README.md @@ -1,21 +1,11 @@ # Orders -(*orders*) ## Overview -An order is a request from a customer to purchase goods from a merchant. +An order is a request from a customer to purchase goods from a merchant. Use the orders object to load orders from your system to the Shippo dashboard. -You can use the orders object to create, retrieve, list, and manage orders programmatically. +You can use the orders object to create, retrieve, list, and manage orders programmatically. You can also retrieve shipping rates, purchase labels, and track shipments for each order. - - -# Line Item -

-
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource - in the future. Currently it's a nested object within the order resource.

-

- A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. - ### Available Operations @@ -29,14 +19,15 @@ Returns a list of all order objects. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.orders.list(request={ @@ -46,8 +37,6 @@ with Shippo( "shop_app": components.OrderShopAppEnum.SHIPPO, }) - assert res is not None - # Handle response print(res) @@ -76,21 +65,33 @@ Creates a new order object. ### Example Usage + ```python -import dateutil.parser from shippo import Shippo from shippo.models import components +from shippo.utils import parse_datetime with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.orders.create(request=components.OrderCreateRequest( + currency="USD", + notes="This customer is a VIP", + order_number="#1068", + order_status=components.OrderStatusEnum.PAID, placed_at="2016-09-23T01:28:12Z", - to_address=components.AddressCreateRequest( - country="US", + shipping_cost="12.83", + shipping_cost_currency="USD", + shipping_method="USPS First Class Package", + subtotal_price="12.1", + total_price="24.93", + total_tax="0.0", + weight="0.4", + weight_unit=components.WeightUnitEnum.LB, + from_address=components.AddressCreateRequest( name="Shwan Ippotle", company="Shippo", street1="215 Clayton St.", @@ -99,26 +100,14 @@ with Shippo( city="San Francisco", state="CA", zip="94117", + country="US", phone="+1 555 341 9393", email="shippotle@shippo.com", is_residential=True, metadata="Customer ID 123456", validate_=True, ), - currency="USD", - notes="This customer is a VIP", - order_number="#1068", - order_status=components.OrderStatusEnum.PAID, - shipping_cost="12.83", - shipping_cost_currency="USD", - shipping_method="USPS First Class Package", - subtotal_price="12.1", - total_price="24.93", - total_tax="0.0", - weight="0.4", - weight_unit=components.WeightUnitEnum.LB, - from_address=components.AddressCreateRequest( - country="US", + to_address=components.AddressCreateRequest( name="Shwan Ippotle", company="Shippo", street1="215 Clayton St.", @@ -127,6 +116,7 @@ with Shippo( city="San Francisco", state="CA", zip="94117", + country="US", phone="+1 555 341 9393", email="shippotle@shippo.com", is_residential=True, @@ -137,21 +127,8 @@ with Shippo( components.LineItemBase( currency="USD", manufacture_country="US", - max_delivery_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), - max_ship_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), - quantity=20, - sku="HM-123", - title="Hippo Magazines", - total_price="12.1", - variant_title="June Edition", - weight="0.4", - weight_unit=components.WeightUnitEnum.LB, - ), - components.LineItemBase( - currency="USD", - manufacture_country="US", - max_delivery_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), - max_ship_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), + max_delivery_time=parse_datetime("2016-07-23T00:00:00Z"), + max_ship_time=parse_datetime("2016-07-23T00:00:00Z"), quantity=20, sku="HM-123", title="Hippo Magazines", @@ -163,8 +140,6 @@ with Shippo( ], )) - assert res is not None - # Handle response print(res) @@ -193,19 +168,18 @@ Retrieves an existing order using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.orders.get(order_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/parcels/README.md b/docs/sdks/parcels/README.md index f9115b95..52fdd681 100644 --- a/docs/sdks/parcels/README.md +++ b/docs/sdks/parcels/README.md @@ -1,14 +1,8 @@ # Parcels -(*parcels*) ## Overview -A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates. - - -# Parcel Extras -The following values are supported for the `extra` field of the parcel object. - +A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates. ### Available Operations @@ -22,18 +16,17 @@ Returns a list of all parcel objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.parcels.list() - - assert res is not None + res = s_client.parcels.list(page=1, results=25) # Handle response print(res) @@ -64,23 +57,18 @@ Creates a new parcel object. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.parcels.create(request={ - "mass_unit": components.WeightUnitEnum.LB, - "weight": "1", - "distance_unit": components.DistanceUnitEnum.IN, - "height": "1", - "length": "1", - "width": "1", "extra": { "cod": { "amount": "5.5", @@ -95,10 +83,14 @@ with Shippo( }, }, "metadata": "Customer ID 123456", + "mass_unit": components.WeightUnitEnum.LB, + "weight": "1", + "distance_unit": components.DistanceUnitEnum.IN, + "height": "1", + "length": "1", + "width": "1", }) - assert res is not None - # Handle response print(res) @@ -127,19 +119,18 @@ Returns parcel details using an existing parcel object ID (this will not return ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.parcels.get(parcel_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/pickups/README.md b/docs/sdks/pickups/README.md index d32d398d..216a2e4c 100644 --- a/docs/sdks/pickups/README.md +++ b/docs/sdks/pickups/README.md @@ -1,11 +1,9 @@ # Pickups -(*pickups*) ## Overview A pickup is when you schedule a carrier to collect a package for delivery. Use Shippo’s pickups endpoint to schedule pickups with USPS and DHL Express for eligible shipments that you have already created. - ### Available Operations @@ -17,15 +15,16 @@ Creates a pickup object. This request is for a carrier to come to a specified lo ### Example Usage + ```python -import dateutil.parser from shippo import Shippo from shippo.models import components +from shippo.utils import parse_datetime with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.pickups.create(request={ @@ -33,14 +32,14 @@ with Shippo( "location": { "address": { "name": "Shwan Ippotle", + "company": "Shippo", "street1": "215 Clayton St.", + "street3": "", + "street_no": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", - "company": "Shippo", - "street3": "", - "street_no": "", "phone": "+1 555 341 9393", "email": "shippotle@shippo.com", "is_residential": True, @@ -51,15 +50,13 @@ with Shippo( "building_type": components.BuildingType.APARTMENT, "instructions": "Behind screen door", }, - "requested_end_time": dateutil.parser.isoparse("2024-06-17T07:14:55.338Z"), - "requested_start_time": dateutil.parser.isoparse("2024-11-30T17:06:07.804Z"), + "requested_end_time": parse_datetime("2025-03-28T03:12:16.314Z"), + "requested_start_time": parse_datetime("2024-05-20T03:35:43.192Z"), "transactions": [ "adcfdddf8ec64b84ad22772bce3ea37a", ], }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/rates/README.md b/docs/sdks/rates/README.md index cd548c50..d40dd856 100644 --- a/docs/sdks/rates/README.md +++ b/docs/sdks/rates/README.md @@ -1,10 +1,8 @@ # Rates -(*rates*) ## Overview A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time. - ### Available Operations @@ -18,19 +16,18 @@ Returns an existing rate using a rate object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.rates.get(rate_id="") - assert res is not None - # Handle response print(res) @@ -59,18 +56,17 @@ Returns a paginated list of rates associated with a shipment ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.rates.list_shipment_rates(shipment_id="") - - assert res is not None + res = s_client.rates.list_shipment_rates(shipment_id="", page=1, results=25) # Handle response print(res) @@ -108,22 +104,20 @@ Note: re-requesting the rates with a different currency code will re-queue the s ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.rates.list_shipment_rates_by_currency_code(request={ "shipment_id": "", - "currency_code": "USD", }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/ratesatcheckout/README.md b/docs/sdks/ratesatcheckout/README.md index 98efa421..3c5a6db6 100644 --- a/docs/sdks/ratesatcheckout/README.md +++ b/docs/sdks/ratesatcheckout/README.md @@ -1,17 +1,15 @@ # RatesAtCheckout -(*rates_at_checkout*) ## Overview Rates at checkout is a tool for merchants to display up-to-date shipping estimates based on what's in their customers cart and where they’re shipping to. Merchants set up curated shipping options for customers in the checkout flow based on data in the shopping cart. The request must include the **to** address and item information. Optional fields are the **from** address and package information. If the optional fields are not included, the service will use the default address and/or package configured for rates at checkout. The response is a list of shipping options based on the Service Group configuration. -(see
Service Group configuration for details). - +(see Service Group configuration for details). + # Default Parcel Template Assign one of your user parcel templates to be the default used when generating Live Rates. This template will be used by default when generating Live Rates, unless you explicitly provide a parcel in the Live Rates request. - ### Available Operations @@ -29,56 +27,24 @@ template or a fully formed user parcel template object as the parcel value. ### Example Usage + ```python -import dateutil.parser from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.rates_at_checkout.create(request=components.LiveRateCreateRequest( - address_to=components.AddressCompleteCreateRequest( - name="Shwan Ippotle", - street1="215 Clayton St.", - city="San Francisco", - state="CA", - zip="94117", - country="US", - company="Shippo", - street3="", - street_no="", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - line_items=[ - components.LineItem( - currency="USD", - manufacture_country="US", - max_delivery_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), - max_ship_time=dateutil.parser.isoparse("2016-07-23T00:00:00Z"), - quantity=20, - sku="HM-123", - title="Hippo Magazines", - total_price="12.1", - variant_title="June Edition", - weight="0.4", - weight_unit=components.WeightUnitEnum.LB, - object_id="abf7d5675d744b6ea9fdb6f796b28f28", - ), - ], address_from="", + address_to="", + line_items=[], parcel="5df144dca289442cv7a06", )) - assert res is not None - # Handle response print(res) @@ -107,19 +73,18 @@ Retrieve and display the currently configured default parcel template for live r ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.rates_at_checkout.get_default_parcel_template(request={}) - assert res is not None - # Handle response print(res) @@ -148,21 +113,20 @@ Update the currently configured default parcel template for live rates. The obje ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.rates_at_checkout.update_default_parcel_template(request={ "object_id": "b958d3690bb04bb8b2986724872750f5", }) - assert res is not None - # Handle response print(res) @@ -191,13 +155,14 @@ Clears the currently configured default parcel template for live rates. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: s_client.rates_at_checkout.delete_default_parcel_template(request={}) diff --git a/docs/sdks/refunds/README.md b/docs/sdks/refunds/README.md index da4c0115..df739ffb 100644 --- a/docs/sdks/refunds/README.md +++ b/docs/sdks/refunds/README.md @@ -1,10 +1,8 @@ # Refunds -(*refunds*) ## Overview Refunds are reimbursements for successfully created but unused shipping labels or other charges. - ### Available Operations @@ -18,22 +16,21 @@ Creates a new refund object. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.refunds.create(request={ - "transaction": "915d94940ea54c3a80cbfa328722f5a1", "async_": False, + "transaction": "915d94940ea54c3a80cbfa328722f5a1", }) - assert res is not None - # Handle response print(res) @@ -62,19 +59,18 @@ Returns a list all refund objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.refunds.list(request={}) - assert res is not None - # Handle response print(res) @@ -103,19 +99,18 @@ Returns an existing rate using a rate object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.refunds.get(refund_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/servicegroups/README.md b/docs/sdks/servicegroups/README.md index 06f2955a..7d719f6b 100644 --- a/docs/sdks/servicegroups/README.md +++ b/docs/sdks/servicegroups/README.md @@ -1,11 +1,9 @@ # ServiceGroups -(*service_groups*) ## Overview A service group is a set of service levels grouped together. Rates at checkout uses services groups to present available shipping options to customers in their shopping basket. - ### Available Operations @@ -20,19 +18,18 @@ Returns a list of service group objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.service_groups.list(request={}) - assert res is not None - # Handle response print(res) @@ -61,35 +58,29 @@ Creates a new service group. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.service_groups.create(request={ "description": "USPS shipping options", - "name": "USPS Shipping", - "type": components.ServiceGroupTypeEnum.FLAT_RATE, - "service_levels": [ - { - "account_object_id": "80feb1633d4a43c898f0058506cfd82d", - "service_level_token": "ups_next_day_air_saver", - }, - ], "flat_rate": "5", "flat_rate_currency": "USD", "free_shipping_threshold_currency": "USD", "free_shipping_threshold_min": "5", + "name": "USPS Shipping", "rate_adjustment": 15, + "type": components.ServiceGroupTypeEnum.FLAT_RATE, + "service_levels": [], }) - assert res is not None - # Handle response print(res) @@ -118,19 +109,25 @@ Updates an existing service group object.
The object_id cannot be updated as ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.service_groups.update(request={ "description": "USPS shipping options", + "flat_rate": "5", + "flat_rate_currency": "USD", + "free_shipping_threshold_currency": "USD", + "free_shipping_threshold_min": "5", "name": "USPS Shipping", + "rate_adjustment": 15, "type": components.ServiceGroupTypeEnum.FLAT_RATE, "object_id": "80feb1633d4a43c898f005850", "is_active": True, @@ -139,24 +136,9 @@ with Shippo( "account_object_id": "80feb1633d4a43c898f0058506cfd82d", "service_level_token": "ups_next_day_air_saver", }, - { - "account_object_id": "80feb1633d4a43c898f0058506cfd82d", - "service_level_token": "ups_next_day_air_saver", - }, - { - "account_object_id": "80feb1633d4a43c898f0058506cfd82d", - "service_level_token": "ups_next_day_air_saver", - }, ], - "flat_rate": "5", - "flat_rate_currency": "USD", - "free_shipping_threshold_currency": "USD", - "free_shipping_threshold_min": "5", - "rate_adjustment": 15, }) - assert res is not None - # Handle response print(res) @@ -185,13 +167,14 @@ Deletes an existing service group using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: s_client.service_groups.delete(service_group_id="") diff --git a/docs/sdks/shipments/README.md b/docs/sdks/shipments/README.md index 28fced5e..65243b41 100644 --- a/docs/sdks/shipments/README.md +++ b/docs/sdks/shipments/README.md @@ -1,14 +1,8 @@ # Shipments -(*shipments*) ## Overview A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label. - - -# Shipment Extras -The following values are supported for the `extra` field of the shipment object. - ### Available Operations @@ -39,19 +33,18 @@ Optional path parameters:
### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shipments.list(request={}) - assert res is not None - # Handle response print(res) @@ -80,96 +73,18 @@ Creates a new shipment object. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shipments.create(request=components.ShipmentCreateRequest( - address_from=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - address_to=components.AddressCreateRequest( - country="US", - name="Shwan Ippotle", - company="Shippo", - street1="215 Clayton St.", - street3="", - street_no="", - city="San Francisco", - state="CA", - zip="94117", - phone="+1 555 341 9393", - email="shippotle@shippo.com", - is_residential=True, - metadata="Customer ID 123456", - validate_=True, - ), - parcels=[ - "", - components.ParcelCreateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - distance_unit=components.DistanceUnitEnum.IN, - height="1", - length="1", - width="1", - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - components.ParcelCreateRequest( - mass_unit=components.WeightUnitEnum.LB, - weight="1", - distance_unit=components.DistanceUnitEnum.IN, - height="1", - length="1", - width="1", - extra=components.ParcelExtra( - cod=components.Cod( - amount="5.5", - currency="USD", - payment_method=components.PaymentMethod.CASH, - ), - insurance=components.ParcelInsurance( - amount="5.5", - content="Laptop", - currency="USD", - provider=components.ParcelInsuranceProvider.UPS, - ), - ), - metadata="Customer ID 123456", - ), - ], extra=components.ShipmentExtra( accounts_receivable_customer_account=components.UPSReferenceFields( prefix="ABC", @@ -273,61 +188,19 @@ with Shippo( ), metadata="Customer ID 123456", shipment_date="2021-03-22T12:00:00Z", + address_from="d799c2679e644279b59fe661ac8fa488", address_return="d799c2679e644279b59fe661ac8fa488", - customs_declaration=components.CustomsDeclarationCreateRequest( - certify=True, - certify_signer="Shawn Ippotle", - contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE, - items=[ - - ], - non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN, - b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY, - contents_explanation="T-Shirt purchase", - duties_payor=components.CustomsDeclarationCreateRequestDutiesPayor( - account="2323434543", - type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY, - address=components.CustomsDeclarationCreateRequestAddress( - name="Patrick Kavanagh", - zip="80331", - country="DE", - ), - ), - exporter_identification=components.CustomsExporterIdentification( - eori_number="PL123456790ABCDE", - tax_id=components.CustomsTaxIdentification( - number="123456789", - type=components.CustomsTaxIdentificationType.EIN, - ), - ), - invoice="#123123", - metadata="Order ID #123123", - address_importer=components.AddressImporter( - name="Shwan Ippotle", - company="Shippo", - street1="Blumenstraße", - street3="", - street_no="22", - city="München", - state="CA", - zip="80331", - country="DE", - phone="80331", - email="shippotle@shippo.com", - is_residential=True, - ), - eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A, - incoterm=components.CustomsDeclarationIncotermEnum.DDP, - test=True, - ), + address_to="d799c2679e644279b59fe661ac8fa489", + customs_declaration="adcfdddf8ec64b84ad22772bce3ea37a", carrier_accounts=[ "065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0", ], + parcels=[ + "", + ], )) - assert res is not None - # Handle response print(res) @@ -356,19 +229,18 @@ Returns an existing shipment using an object ID ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shipments.get(shipment_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/shippo/README.md b/docs/sdks/shippo/README.md deleted file mode 100644 index 1ed996ba..00000000 --- a/docs/sdks/shippo/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Shippo SDK - -## Overview - -Shippo external API.: Use this API to integrate with the Shippo service - -### Available Operations diff --git a/docs/sdks/shippoaccounts/README.md b/docs/sdks/shippoaccounts/README.md index 8be27627..d9974f7f 100644 --- a/docs/sdks/shippoaccounts/README.md +++ b/docs/sdks/shippoaccounts/README.md @@ -1,12 +1,10 @@ # ShippoAccounts -(*shippo_accounts*) ## Overview Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts. Managed Shippo Accounts are headless accounts that represent your customers. They are opaque to your end customers, meaning customers do not need to create their own Shippo login or have a billing relationship with Shippo. They can be used by marketplaces, e-commerce platforms, and third-party logistics providers who want to offer, seamless, built-in shipping functionality to their customers. See our guide for more details. - ### Available Operations @@ -21,18 +19,17 @@ Returns a list of Shippo Managed Accounts objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: - res = s_client.shippo_accounts.list() - - assert res is not None + res = s_client.shippo_accounts.list(page=1, results=25) # Handle response print(res) @@ -63,13 +60,14 @@ Creates a new ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shippo_accounts.create(request={ @@ -79,8 +77,6 @@ with Shippo( "company_name": "Acme", }) - assert res is not None - # Handle response print(res) @@ -109,19 +105,18 @@ Returns a Shippo Managed Account using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shippo_accounts.get(shippo_account_id="") - assert res is not None - # Handle response print(res) @@ -150,13 +145,14 @@ Updates a Shippo Managed Account using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.shippo_accounts.update(shippo_account_id="", shippo_account_update_request={ @@ -166,8 +162,6 @@ with Shippo( "company_name": "Acme", }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/trackingstatus/README.md b/docs/sdks/trackingstatus/README.md index 4a686a8c..edf0afae 100644 --- a/docs/sdks/trackingstatus/README.md +++ b/docs/sdks/trackingstatus/README.md @@ -1,11 +1,10 @@ # TrackingStatus -(*tracking_status*) ## Overview


If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment -from the
Transaction object. +from the Transaction object.

A tracking status of a package is an indication of current location of a package in the supply chain. For example, sorting, warehousing, or out for delivery. Use the tracking status object to track the location of your shipments. @@ -13,7 +12,6 @@ When using your Tracking tutorial on how to do this, and what the payloads look like. - ### Available Operations @@ -26,23 +24,22 @@ Registers a webhook that will send HTTP notifications to you when the status of ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.tracking_status.create(request={ "carrier": "usps", - "tracking_number": "9205590164917312751089", "metadata": "Order 000123", + "tracking_number": "9205590164917312751089", }) - assert res is not None - # Handle response print(res) @@ -71,19 +68,18 @@ Returns the tracking status of a shipment using a carrier name and a tracking nu ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.tracking_status.get(tracking_number="", carrier="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/transactions/README.md b/docs/sdks/transactions/README.md index 92c1b72e..a45755ec 100644 --- a/docs/sdks/transactions/README.md +++ b/docs/sdks/transactions/README.md @@ -1,10 +1,8 @@ # Transactions -(*transactions*) ## Overview A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx. - ### Available Operations @@ -18,14 +16,15 @@ Returns a list of all transaction objects. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.transactions.list(request={ @@ -33,8 +32,6 @@ with Shippo( "tracking_status": components.TrackingStatusEnum.DELIVERED, }) - assert res is not None - # Handle response print(res) @@ -63,26 +60,25 @@ Creates a new transaction object and purchases the shipping label using a rate o ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.transactions.create(request={ - "rate": "ec9f0d3adc9441449c85d315f0997fd5", "async_": False, "label_file_type": components.LabelFileTypeEnum.PDF_4X6, "metadata": "Order ID #12345", + "rate": "ec9f0d3adc9441449c85d315f0997fd5", "order": "adcfdddf8ec64b84ad22772bce3ea37a", }) - assert res is not None - # Handle response print(res) @@ -111,19 +107,18 @@ Returns an existing transaction using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.transactions.get(transaction_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/userparceltemplates/README.md b/docs/sdks/userparceltemplates/README.md index 245e9013..5cb79ed5 100644 --- a/docs/sdks/userparceltemplates/README.md +++ b/docs/sdks/userparceltemplates/README.md @@ -1,5 +1,4 @@ # UserParcelTemplates -(*user_parcel_templates*) ## Overview @@ -9,7 +8,6 @@ them to be defined once and then used for many shipments. These parcel templates User parcel templates can also be created using a carrier parcel template, where the dimensions will be copied from the carrier presets, but the weight can be configured by you. - ### Available Operations @@ -25,19 +23,18 @@ Returns a list all of all user parcel template objects. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.user_parcel_templates.list(request={}) - assert res is not None - # Handle response print(res) @@ -65,30 +62,34 @@ with Shippo( Creates a new user parcel template.
You can choose to create a parcel template using a preset carrier template as a starting point, or you can create an entirely custom one. To use a preset carrier template, -pass in a unique template token from this list +pass in a unique template token from this list plus the weight fields (**weight** and **weight_unit**). Otherwise, omit the template field and pass the other fields, for the weight, length, height, and depth, as well as their units." ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.user_parcel_templates.create(request={ + "distance_unit": components.DistanceUnitEnum.IN, + "height": "6", + "length": "10", + "name": "My Custom Template", "weight": "12", "weight_unit": components.WeightUnitEnum.LB, + "width": "8", }) - assert res is not None - # Handle response print(res) @@ -117,13 +118,14 @@ Deletes a user parcel template using an object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: s_client.user_parcel_templates.delete(user_parcel_template_object_id="") @@ -152,19 +154,18 @@ template, identified by the object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.user_parcel_templates.get(user_parcel_template_object_id="") - assert res is not None - # Handle response print(res) @@ -193,14 +194,15 @@ Updates an existing user parcel template. ### Example Usage + ```python from shippo import Shippo from shippo.models import components with Shippo( - api_key_header="", shippo_api_version="2018-02-08", + api_key_header="", ) as s_client: res = s_client.user_parcel_templates.update(user_parcel_template_object_id="", user_parcel_template_update_request={ @@ -208,13 +210,11 @@ with Shippo( "height": "6", "length": "10", "name": "My Custom Template", - "width": "8", "weight": "12", "weight_unit": components.WeightUnitEnum.LB, + "width": "8", }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 5e7bb08a..3eaa829d 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -1,14 +1,8 @@ # Webhooks -(*webhooks*) ## Overview 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 @@ -24,6 +18,7 @@ Creates a new webhook to send notifications to a URL when a specific event occur ### Example Usage + ```python from shippo import Shippo from shippo.models import components @@ -31,18 +26,15 @@ from shippo.models import components with Shippo( api_key_header="", - shippo_api_version="2018-02-08", ) as s_client: res = s_client.webhooks.create_webhook(request={ - "event": components.WebhookEventTypeEnum.BATCH_CREATED, + "event": components.WebhookEventTypeEnum.TRANSACTION_UPDATED, "url": "https://example.com/shippo-webhook", "active": True, "is_test": False, }) - assert res is not None - # Handle response print(res) @@ -71,19 +63,17 @@ Returns a list of all webhooks you have created. ### Example Usage + ```python from shippo import Shippo with Shippo( api_key_header="", - shippo_api_version="2018-02-08", ) as s_client: res = s_client.webhooks.list_webhooks() - assert res is not None - # Handle response print(res) @@ -111,19 +101,17 @@ Returns the details of a specific webhook using the webhook object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( api_key_header="", - shippo_api_version="2018-02-08", ) as s_client: res = s_client.webhooks.get_webhook(webhook_id="") - assert res is not None - # Handle response print(res) @@ -152,6 +140,7 @@ Updates an existing webhook using the webhook object ID. ### Example Usage + ```python from shippo import Shippo from shippo.models import components @@ -159,18 +148,15 @@ from shippo.models import components with Shippo( api_key_header="", - shippo_api_version="2018-02-08", ) as s_client: res = s_client.webhooks.update_webhook(webhook_id="", webhook_update_request={ - "event": components.WebhookEventTypeEnum.BATCH_CREATED, + "event": components.WebhookEventTypeEnum.ALL, "url": "https://example.com/shippo-webhook", "active": True, "is_test": False, }) - assert res is not None - # Handle response print(res) @@ -200,13 +186,13 @@ Deletes a specific webhook using the webhook object ID. ### Example Usage + ```python from shippo import Shippo with Shippo( api_key_header="", - shippo_api_version="2018-02-08", ) as s_client: s_client.webhooks.delete_webhook(webhook_id="") diff --git a/poetry.lock b/poetry.lock index 8a4e1b7d..a432e281 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -32,7 +32,7 @@ typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} [package.extras] doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] trio = ["trio (>=0.26.1)"] [[package]] @@ -91,21 +91,6 @@ files = [ graph = ["objgraph (>=1.7.2)"] profile = ["gprof2dot (>=2022.7.29)"] -[[package]] -name = "eval-type-backport" -version = "0.2.2" -description = "Like `typing._eval_type`, but lets older Python versions use newer typing features." -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "eval_type_backport-0.2.2-py3-none-any.whl", hash = "sha256:cb6ad7c393517f476f96d456d0412ea80f0a8cf96f6892834cd9340149111b0a"}, - {file = "eval_type_backport-0.2.2.tar.gz", hash = "sha256:f0576b4cf01ebb5bd358d02314d31846af5e07678387486e2c798af0e7d849c1"}, -] - -[package.extras] -tests = ["pytest"] - [[package]] name = "exceptiongroup" version = "1.2.2" @@ -113,7 +98,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -124,31 +109,31 @@ test = ["pytest (>=6)"] [[package]] name = "h11" -version = "0.14.0" +version = "0.16.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" groups = ["main"] files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, ] [[package]] name = "httpcore" -version = "1.0.7" +version = "1.0.9" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" groups = ["main"] files = [ - {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, - {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, ] [package.dependencies] certifi = "*" -h11 = ">=0.13,<0.15" +h11 = ">=0.16" [package.extras] asyncio = ["anyio (>=4.0,<5.0)"] @@ -186,7 +171,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli", "brotlicffi"] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -268,50 +253,44 @@ files = [ [[package]] name = "mypy" -version = "1.14.1" +version = "1.15.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, - {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, - {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, - {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, - {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, - {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, - {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, - {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, - {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, - {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, - {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, - {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, - {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, - {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, - {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, - {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be68172e9fd9ad8fb876c6389f16d1c1b5f100ffa779f77b1fb2176fcc9ab95b"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7be1e46525adfa0d97681432ee9fcd61a3964c2446795714699a998d193f1a3"}, + {file = "mypy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2e2c2e6d3593f6451b18588848e66260ff62ccca522dd231cd4dd59b0160668b"}, + {file = "mypy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:6983aae8b2f653e098edb77f893f7b6aca69f6cffb19b2cc7443f23cce5f4828"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2922d42e16d6de288022e5ca321cd0618b238cfc5570e0263e5ba0a77dbef56f"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2ee2d57e01a7c35de00f4634ba1bbf015185b219e4dc5909e281016df43f5ee5"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:973500e0774b85d9689715feeffcc980193086551110fd678ebe1f4342fb7c5e"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a95fb17c13e29d2d5195869262f8125dfdb5c134dc8d9a9d0aecf7525b10c2c"}, + {file = "mypy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1905f494bfd7d85a23a88c5d97840888a7bd516545fc5aaedff0267e0bb54e2f"}, + {file = "mypy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:c9817fa23833ff189db061e6d2eff49b2f3b6ed9856b4a0a73046e41932d744f"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:aea39e0583d05124836ea645f412e88a5c7d0fd77a6d694b60d9b6b2d9f184fd"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f2147ab812b75e5b5499b01ade1f4a81489a147c01585cda36019102538615f"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce436f4c6d218a070048ed6a44c0bbb10cd2cc5e272b29e7845f6a2f57ee4464"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8023ff13985661b50a5928fc7a5ca15f3d1affb41e5f0a9952cb68ef090b31ee"}, + {file = "mypy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1124a18bc11a6a62887e3e137f37f53fbae476dc36c185d549d4f837a2a6a14e"}, + {file = "mypy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:171a9ca9a40cd1843abeca0e405bc1940cd9b305eaeea2dda769ba096932bb22"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93faf3fdb04768d44bf28693293f3904bbb555d076b781ad2530214ee53e3445"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:811aeccadfb730024c5d3e326b2fbe9249bb7413553f15499a4050f7c30e801d"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:98b7b9b9aedb65fe628c62a6dc57f6d5088ef2dfca37903a7d9ee374d03acca5"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036"}, + {file = "mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357"}, + {file = "mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b"}, + {file = "mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2"}, + {file = "mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980"}, + {file = "mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e"}, + {file = "mypy-1.15.0.tar.gz", hash = "sha256:404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43"}, ] [package.dependencies] @@ -338,6 +317,18 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nodeenv" +version = "1.10.0" +description = "Node.js virtual environment builder" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +files = [ + {file = "nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827"}, + {file = "nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb"}, +] + [[package]] name = "packaging" version = "24.2" @@ -385,133 +376,133 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.10.6" +version = "2.11.10" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic-2.10.6-py3-none-any.whl", hash = "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584"}, - {file = "pydantic-2.10.6.tar.gz", hash = "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236"}, + {file = "pydantic-2.11.10-py3-none-any.whl", hash = "sha256:802a655709d49bd004c31e865ef37da30b540786a46bfce02333e0e24b5fe29a"}, + {file = "pydantic-2.11.10.tar.gz", hash = "sha256:dc280f0982fbda6c38fada4e476dc0a4f3aeaf9c6ad4c28df68a666ec3c61423"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.2" +pydantic-core = "2.33.2" typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata"] +timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] [[package]] name = "pydantic-core" -version = "2.27.2" +version = "2.33.2" description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2d367ca20b2f14095a8f4fa1210f5a7b78b8a20009ecced6b12818f455b1e9fa"}, - {file = "pydantic_core-2.27.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:491a2b73db93fab69731eaee494f320faa4e093dbed776be1a829c2eb222c34c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7969e133a6f183be60e9f6f56bfae753585680f3b7307a8e555a948d443cc05a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3de9961f2a346257caf0aa508a4da705467f53778e9ef6fe744c038119737ef5"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e2bb4d3e5873c37bb3dd58714d4cd0b0e6238cebc4177ac8fe878f8b3aa8e74c"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:280d219beebb0752699480fe8f1dc61ab6615c2046d76b7ab7ee38858de0a4e7"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47956ae78b6422cbd46f772f1746799cbb862de838fd8d1fbd34a82e05b0983a"}, - {file = "pydantic_core-2.27.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:14d4a5c49d2f009d62a2a7140d3064f686d17a5d1a268bc641954ba181880236"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:337b443af21d488716f8d0b6164de833e788aa6bd7e3a39c005febc1284f4962"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:03d0f86ea3184a12f41a2d23f7ccb79cdb5a18e06993f8a45baa8dfec746f0e9"}, - {file = "pydantic_core-2.27.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7041c36f5680c6e0f08d922aed302e98b3745d97fe1589db0a3eebf6624523af"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win32.whl", hash = "sha256:50a68f3e3819077be2c98110c1f9dcb3817e93f267ba80a2c05bb4f8799e2ff4"}, - {file = "pydantic_core-2.27.2-cp310-cp310-win_amd64.whl", hash = "sha256:e0fd26b16394ead34a424eecf8a31a1f5137094cabe84a1bcb10fa6ba39d3d31"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:8e10c99ef58cfdf2a66fc15d66b16c4a04f62bca39db589ae8cba08bc55331bc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:26f32e0adf166a84d0cb63be85c562ca8a6fa8de28e5f0d92250c6b7e9e2aff7"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c19d1ea0673cd13cc2f872f6c9ab42acc4e4f492a7ca9d3795ce2b112dd7e15"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e68c4446fe0810e959cdff46ab0a41ce2f2c86d227d96dc3847af0ba7def306"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d9640b0059ff4f14d1f37321b94061c6db164fbe49b334b31643e0528d100d99"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:40d02e7d45c9f8af700f3452f329ead92da4c5f4317ca9b896de7ce7199ea459"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c1fd185014191700554795c99b347d64f2bb637966c4cfc16998a0ca700d048"}, - {file = "pydantic_core-2.27.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d81d2068e1c1228a565af076598f9e7451712700b673de8f502f0334f281387d"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:1a4207639fb02ec2dbb76227d7c751a20b1a6b4bc52850568e52260cae64ca3b"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3de3ce3c9ddc8bbd88f6e0e304dea0e66d843ec9de1b0042b0911c1663ffd474"}, - {file = "pydantic_core-2.27.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:30c5f68ded0c36466acede341551106821043e9afaad516adfb6e8fa80a4e6a6"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win32.whl", hash = "sha256:c70c26d2c99f78b125a3459f8afe1aed4d9687c24fd677c6a4436bc042e50d6c"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_amd64.whl", hash = "sha256:08e125dbdc505fa69ca7d9c499639ab6407cfa909214d500897d02afb816e7cc"}, - {file = "pydantic_core-2.27.2-cp311-cp311-win_arm64.whl", hash = "sha256:26f0d68d4b235a2bae0c3fc585c585b4ecc51382db0e3ba402a22cbc440915e4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9e0c8cfefa0ef83b4da9588448b6d8d2a2bf1a53c3f1ae5fca39eb3061e2f0b0"}, - {file = "pydantic_core-2.27.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:83097677b8e3bd7eaa6775720ec8e0405f1575015a463285a92bfdfe254529ef"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:172fce187655fece0c90d90a678424b013f8fbb0ca8b036ac266749c09438cb7"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:519f29f5213271eeeeb3093f662ba2fd512b91c5f188f3bb7b27bc5973816934"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05e3a55d124407fffba0dd6b0c0cd056d10e983ceb4e5dbd10dda135c31071d6"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c3ed807c7b91de05e63930188f19e921d1fe90de6b4f5cd43ee7fcc3525cb8c"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fb4aadc0b9a0c063206846d603b92030eb6f03069151a625667f982887153e2"}, - {file = "pydantic_core-2.27.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:28ccb213807e037460326424ceb8b5245acb88f32f3d2777427476e1b32c48c4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:de3cd1899e2c279b140adde9357c4495ed9d47131b4a4eaff9052f23398076b3"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:220f892729375e2d736b97d0e51466252ad84c51857d4d15f5e9692f9ef12be4"}, - {file = "pydantic_core-2.27.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a0fcd29cd6b4e74fe8ddd2c90330fd8edf2e30cb52acda47f06dd615ae72da57"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win32.whl", hash = "sha256:1e2cb691ed9834cd6a8be61228471d0a503731abfb42f82458ff27be7b2186fc"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_amd64.whl", hash = "sha256:cc3f1a99a4f4f9dd1de4fe0312c114e740b5ddead65bb4102884b384c15d8bc9"}, - {file = "pydantic_core-2.27.2-cp312-cp312-win_arm64.whl", hash = "sha256:3911ac9284cd8a1792d3cb26a2da18f3ca26c6908cc434a18f730dc0db7bfa3b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7d14bd329640e63852364c306f4d23eb744e0f8193148d4044dd3dacdaacbd8b"}, - {file = "pydantic_core-2.27.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:82f91663004eb8ed30ff478d77c4d1179b3563df6cdb15c0817cd1cdaf34d154"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71b24c7d61131bb83df10cc7e687433609963a944ccf45190cfc21e0887b08c9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa8e459d4954f608fa26116118bb67f56b93b209c39b008277ace29937453dc9"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8918cbebc8da707ba805b7fd0b382816858728ae7fe19a942080c24e5b7cd1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eda3f5c2a021bbc5d976107bb302e0131351c2ba54343f8a496dc8783d3d3a6a"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd8086fa684c4775c27f03f062cbb9eaa6e17f064307e86b21b9e0abc9c0f02e"}, - {file = "pydantic_core-2.27.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8d9b3388db186ba0c099a6d20f0604a44eabdeef1777ddd94786cdae158729e4"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7a66efda2387de898c8f38c0cf7f14fca0b51a8ef0b24bfea5849f1b3c95af27"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:18a101c168e4e092ab40dbc2503bdc0f62010e95d292b27827871dc85450d7ee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ba5dd002f88b78a4215ed2f8ddbdf85e8513382820ba15ad5ad8955ce0ca19a1"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win32.whl", hash = "sha256:1ebaf1d0481914d004a573394f4be3a7616334be70261007e47c2a6fe7e50130"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_amd64.whl", hash = "sha256:953101387ecf2f5652883208769a79e48db18c6df442568a0b5ccd8c2723abee"}, - {file = "pydantic_core-2.27.2-cp313-cp313-win_arm64.whl", hash = "sha256:ac4dbfd1691affb8f48c2c13241a2e3b60ff23247cbcf981759c768b6633cf8b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d3e8d504bdd3f10835468f29008d72fc8359d95c9c415ce6e767203db6127506"}, - {file = "pydantic_core-2.27.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:521eb9b7f036c9b6187f0b47318ab0d7ca14bd87f776240b90b21c1f4f149320"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85210c4d99a0114f5a9481b44560d7d1e35e32cc5634c656bc48e590b669b145"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d716e2e30c6f140d7560ef1538953a5cd1a87264c737643d481f2779fc247fe1"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f66d89ba397d92f840f8654756196d93804278457b5fbede59598a1f9f90b228"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:669e193c1c576a58f132e3158f9dfa9662969edb1a250c54d8fa52590045f046"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdbe7629b996647b99c01b37f11170a57ae675375b14b8c13b8518b8320ced5"}, - {file = "pydantic_core-2.27.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d262606bf386a5ba0b0af3b97f37c83d7011439e3dc1a9298f21efb292e42f1a"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cabb9bcb7e0d97f74df8646f34fc76fbf793b7f6dc2438517d7a9e50eee4f14d"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:d2d63f1215638d28221f664596b1ccb3944f6e25dd18cd3b86b0a4c408d5ebb9"}, - {file = "pydantic_core-2.27.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bca101c00bff0adb45a833f8451b9105d9df18accb8743b08107d7ada14bd7da"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win32.whl", hash = "sha256:f6f8e111843bbb0dee4cb6594cdc73e79b3329b526037ec242a3e49012495b3b"}, - {file = "pydantic_core-2.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:fd1aea04935a508f62e0d0ef1f5ae968774a32afc306fb8545e06f5ff5cdf3ad"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:c10eb4f1659290b523af58fa7cffb452a61ad6ae5613404519aee4bfbf1df993"}, - {file = "pydantic_core-2.27.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef592d4bad47296fb11f96cd7dc898b92e795032b4894dfb4076cfccd43a9308"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c61709a844acc6bf0b7dce7daae75195a10aac96a596ea1b776996414791ede4"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c5f762659e47fdb7b16956c71598292f60a03aa92f8b6351504359dbdba6cf"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4c9775e339e42e79ec99c441d9730fccf07414af63eac2f0e48e08fd38a64d76"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:57762139821c31847cfb2df63c12f725788bd9f04bc2fb392790959b8f70f118"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0d1e85068e818c73e048fe28cfc769040bb1f475524f4745a5dc621f75ac7630"}, - {file = "pydantic_core-2.27.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:097830ed52fd9e427942ff3b9bc17fab52913b2f50f2880dc4a5611446606a54"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:044a50963a614ecfae59bb1eaf7ea7efc4bc62f49ed594e18fa1e5d953c40e9f"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:4e0b4220ba5b40d727c7f879eac379b822eee5d8fff418e9d3381ee45b3b0362"}, - {file = "pydantic_core-2.27.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5e4f4bb20d75e9325cc9696c6802657b58bc1dbbe3022f32cc2b2b632c3fbb96"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win32.whl", hash = "sha256:cca63613e90d001b9f2f9a9ceb276c308bfa2a43fafb75c8031c4f66039e8c6e"}, - {file = "pydantic_core-2.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:77d1bca19b0f7021b3a982e6f903dcd5b2b06076def36a652e3907f596e29f67"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:2bf14caea37e91198329b828eae1618c068dfb8ef17bb33287a7ad4b61ac314e"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0cb791f5b45307caae8810c2023a184c74605ec3bcbb67d13846c28ff731ff8"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:688d3fd9fcb71f41c4c015c023d12a79d1c4c0732ec9eb35d96e3388a120dcf3"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d591580c34f4d731592f0e9fe40f9cc1b430d297eecc70b962e93c5c668f15f"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:82f986faf4e644ffc189a7f1aafc86e46ef70372bb153e7001e8afccc6e54133"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:bec317a27290e2537f922639cafd54990551725fc844249e64c523301d0822fc"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:0296abcb83a797db256b773f45773da397da75a08f5fcaef41f2044adec05f50"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0d75070718e369e452075a6017fbf187f788e17ed67a3abd47fa934d001863d9"}, - {file = "pydantic_core-2.27.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7e17b560be3c98a8e3aa66ce828bdebb9e9ac6ad5466fba92eb74c4c95cb1151"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c33939a82924da9ed65dab5a65d427205a73181d8098e79b6b426bdf8ad4e656"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:00bad2484fa6bda1e216e7345a798bd37c68fb2d97558edd584942aa41b7d278"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c817e2b40aba42bac6f457498dacabc568c3b7a986fc9ba7c8d9d260b71485fb"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:251136cdad0cb722e93732cb45ca5299fb56e1344a833640bf93b2803f8d1bfd"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d2088237af596f0a524d3afc39ab3b036e8adb054ee57cbb1dcf8e09da5b29cc"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d4041c0b966a84b4ae7a09832eb691a35aec90910cd2dbe7a208de59be77965b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8083d4e875ebe0b864ffef72a4304827015cff328a1be6e22cc850753bfb122b"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f141ee28a0ad2123b6611b6ceff018039df17f32ada8b534e6aa039545a3efb2"}, - {file = "pydantic_core-2.27.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7d0c8399fcc1848491f00e0314bd59fb34a9c008761bcb422a057670c3f65e35"}, - {file = "pydantic_core-2.27.2.tar.gz", hash = "sha256:eb026e5a4c1fee05726072337ff51d1efb6f59090b7da90d30ea58625b1ffb39"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:2b3d326aaef0c0399d9afffeb6367d5e26ddc24d351dbc9c636840ac355dc5d8"}, + {file = "pydantic_core-2.33.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0e5b2671f05ba48b94cb90ce55d8bdcaaedb8ba00cc5359f6810fc918713983d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0069c9acc3f3981b9ff4cdfaf088e98d83440a4c7ea1bc07460af3d4dc22e72d"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d53b22f2032c42eaaf025f7c40c2e3b94568ae077a606f006d206a463bc69572"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0405262705a123b7ce9f0b92f123334d67b70fd1f20a9372b907ce1080c7ba02"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b25d91e288e2c4e0662b8038a28c6a07eaac3e196cfc4ff69de4ea3db992a1b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bdfe4b3789761f3bcb4b1ddf33355a71079858958e3a552f16d5af19768fef2"}, + {file = "pydantic_core-2.33.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:efec8db3266b76ef9607c2c4c419bdb06bf335ae433b80816089ea7585816f6a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:031c57d67ca86902726e0fae2214ce6770bbe2f710dc33063187a68744a5ecac"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:f8de619080e944347f5f20de29a975c2d815d9ddd8be9b9b7268e2e3ef68605a"}, + {file = "pydantic_core-2.33.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:73662edf539e72a9440129f231ed3757faab89630d291b784ca99237fb94db2b"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win32.whl", hash = "sha256:0a39979dcbb70998b0e505fb1556a1d550a0781463ce84ebf915ba293ccb7e22"}, + {file = "pydantic_core-2.33.2-cp310-cp310-win_amd64.whl", hash = "sha256:b0379a2b24882fef529ec3b4987cb5d003b9cda32256024e6fe1586ac45fc640"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7"}, + {file = "pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef"}, + {file = "pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30"}, + {file = "pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab"}, + {file = "pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc"}, + {file = "pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6"}, + {file = "pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2"}, + {file = "pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f"}, + {file = "pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d"}, + {file = "pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e"}, + {file = "pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9"}, + {file = "pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5"}, + {file = "pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a2b911a5b90e0374d03813674bf0a5fbbb7741570dcd4b4e85a2e48d17def29d"}, + {file = "pydantic_core-2.33.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6fa6dfc3e4d1f734a34710f391ae822e0a8eb8559a85c6979e14e65ee6ba2954"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c54c939ee22dc8e2d545da79fc5381f1c020d6d3141d3bd747eab59164dc89fb"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:53a57d2ed685940a504248187d5685e49eb5eef0f696853647bf37c418c538f7"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:09fb9dd6571aacd023fe6aaca316bd01cf60ab27240d7eb39ebd66a3a15293b4"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0e6116757f7959a712db11f3e9c0a99ade00a5bbedae83cb801985aa154f071b"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d55ab81c57b8ff8548c3e4947f119551253f4e3787a7bbc0b6b3ca47498a9d3"}, + {file = "pydantic_core-2.33.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c20c462aa4434b33a2661701b861604913f912254e441ab8d78d30485736115a"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:44857c3227d3fb5e753d5fe4a3420d6376fa594b07b621e220cd93703fe21782"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:eb9b459ca4df0e5c87deb59d37377461a538852765293f9e6ee834f0435a93b9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9fcd347d2cc5c23b06de6d3b7b8275be558a0c90549495c699e379a80bf8379e"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win32.whl", hash = "sha256:83aa99b1285bc8f038941ddf598501a86f1536789740991d7d8756e34f1e74d9"}, + {file = "pydantic_core-2.33.2-cp39-cp39-win_amd64.whl", hash = "sha256:f481959862f57f29601ccced557cc2e817bce7533ab8e01a797a48b49c9692b3"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c4aa4e82353f65e548c476b37e64189783aa5384903bfea4f41580f255fddfa"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d946c8bf0d5c24bf4fe333af284c59a19358aa3ec18cb3dc4370080da1e8ad29"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:87b31b6846e361ef83fedb187bb5b4372d0da3f7e28d85415efa92d6125d6e6d"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa9d91b338f2df0508606f7009fde642391425189bba6d8c653afd80fd6bb64e"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2058a32994f1fde4ca0480ab9d1e75a0e8c87c22b53a3ae66554f9af78f2fe8c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:0e03262ab796d986f978f79c943fc5f620381be7287148b8010b4097f79a39ec"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1a8695a8d00c73e50bff9dfda4d540b7dee29ff9b8053e38380426a85ef10052"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:fa754d1850735a0b0e03bcffd9d4b4343eb417e47196e4485d9cca326073a42c"}, + {file = "pydantic_core-2.33.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a11c8d26a50bfab49002947d3d237abe4d9e4b5bdc8846a63537b6488e197808"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb"}, + {file = "pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:87acbfcf8e90ca885206e98359d7dca4bcbb35abdc0ff66672a293e1d7a19101"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:7f92c15cd1e97d4b12acd1cc9004fa092578acfa57b67ad5e43a197175d01a64"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3f26877a748dc4251cfcfda9dfb5f13fcb034f5308388066bcfe9031b63ae7d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dac89aea9af8cd672fa7b510e7b8c33b0bba9a43186680550ccf23020f32d535"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:970919794d126ba8645f3837ab6046fb4e72bbc057b3709144066204c19a455d"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3eb3fe62804e8f859c49ed20a8451342de53ed764150cb14ca71357c765dc2a6"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:3abcd9392a36025e3bd55f9bd38d908bd17962cc49bc6da8e7e96285336e2bca"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:3a1c81334778f9e3af2f8aeb7a960736e5cab1dfebfb26aabca09afd2906c039"}, + {file = "pydantic_core-2.33.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2807668ba86cb38c6817ad9bc66215ab8584d1d304030ce4f0887336f28a5e27"}, + {file = "pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc"}, ] [package.dependencies] @@ -535,19 +526,39 @@ colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, - {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=0.3.6", markers = "python_version == \"3.11\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] +[[package]] +name = "pyright" +version = "1.1.398" +description = "Command line wrapper for pyright" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "pyright-1.1.398-py3-none-any.whl", hash = "sha256:0a70bfd007d9ea7de1cf9740e1ad1a40a122592cfe22a3f6791b06162ad08753"}, + {file = "pyright-1.1.398.tar.gz", hash = "sha256:357a13edd9be8082dc73be51190913e475fa41a6efb6ec0d4b7aab3bc11638d8"}, +] + +[package.dependencies] +nodeenv = ">=1.6.0" +typing-extensions = ">=4.1" + +[package.extras] +all = ["nodejs-wheel-binaries", "twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] +nodejs = ["nodejs-wheel-binaries"] + [[package]] name = "pytest" version = "8.3.3" @@ -590,33 +601,6 @@ pytest = ">=8.2,<9" docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main"] -files = [ - {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, - {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "six" -version = "1.17.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main"] -files = [ - {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, - {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, -] - [[package]] name = "sniffio" version = "1.3.1" @@ -636,7 +620,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -684,18 +668,6 @@ files = [ {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] -[[package]] -name = "types-python-dateutil" -version = "2.9.0.20241206" -description = "Typing stubs for python-dateutil" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "types_python_dateutil-2.9.0.20241206-py3-none-any.whl", hash = "sha256:e248a4bc70a486d3e3ec84d0dc30eec3a5f979d6e7ee4123ae043eedbb987f53"}, - {file = "types_python_dateutil-2.9.0.20241206.tar.gz", hash = "sha256:18f493414c26ffba692a72369fea7a154c502646301ebfe3d56a04b3767284cb"}, -] - [[package]] name = "typing-extensions" version = "4.12.2" @@ -725,5 +697,5 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" -python-versions = ">=3.9" -content-hash = "107e18e59791e3fa2de5598653e9ad9e6613216805fff3fafa76268523615aae" +python-versions = ">=3.10" +content-hash = "ecb932504a54e2f381cc7a50985a9e753cc1fdc6e9d6e2aef3683a74b8430c51" diff --git a/poetry.toml b/poetry.toml index ab1033bd..cd3492ac 100644 --- a/poetry.toml +++ b/poetry.toml @@ -1,2 +1,3 @@ + [virtualenvs] in-project = true diff --git a/pylintrc b/pylintrc index 7f1dd32e..18f8c357 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no @@ -457,7 +457,8 @@ disable=raw-checker-failed, consider-using-with, wildcard-import, unused-wildcard-import, - too-many-return-statements + too-many-return-statements, + redefined-builtin # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -639,7 +640,7 @@ additional-builtins= allow-global-unused-variables=yes # List of names allowed to shadow builtins -allowed-redefined-builtins=id,object +allowed-redefined-builtins=id,object,dir # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. diff --git a/pyproject.toml b/pyproject.toml index fbbabdc8..394b2898 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,21 +1,20 @@ + [project] name = "shippo" -version = "4.0.0" +version = "5.0.0" description = "Shipping API Python library (USPS, FedEx, UPS and more)" authors = [{ name = "Shippo" },] readme = "README-PYPI.md" -requires-python = ">=3.9" +requires-python = ">=3.10" dependencies = [ - "eval-type-backport >=0.2.0", + "httpcore >=1.0.9", "httpx >=0.28.1", - "pydantic >=2.10.3", - "python-dateutil >=2.8.2", - "typing-inspection >=0.4.0", + "pydantic >=2.11.2", ] +license = { text = "MIT License" } [tool.poetry] repository = "https://github.com/goshippo/shippo-python-sdk.git" -license = "MIT License" packages = [ { include = "shippo", from = "src" } ] @@ -30,11 +29,11 @@ in-project = true [tool.poetry.group.dev.dependencies] httpretty = "==1.1.4" marshmallow = "==3.23.1" -mypy = "==1.14.1" +mypy = "==1.15.0" pylint = "==3.2.3" +pyright = "==1.1.398" pytest = "==8.3.3" pytest-asyncio = "==0.25.3" -types-python-dateutil = "^2.9.0.20240316" [build-system] requires = ["poetry-core"] @@ -46,6 +45,8 @@ pythonpath = ["src"] [tool.mypy] disable_error_code = "misc" +explicit_package_bases = true +mypy_path = "src" [[tool.mypy.overrides]] module = "typing_inspect" diff --git a/scripts/prepare_readme.py b/scripts/prepare_readme.py index 16553725..38b9b0c0 100644 --- a/scripts/prepare_readme.py +++ b/scripts/prepare_readme.py @@ -10,12 +10,14 @@ GITHUB_URL = ( GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL ) + REPO_SUBDIR = "" # links on PyPI should have absolute URLs readme_contents = re.sub( r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", lambda m: m.group(1) + GITHUB_URL + "/blob/master/" + + REPO_SUBDIR + m.group(2) + m.group(3), readme_contents, diff --git a/scripts/publish.sh b/scripts/publish.sh index f2f2cf2c..2a3ead70 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash - export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} poetry run python scripts/prepare_readme.py diff --git a/src/shippo/_hooks/types.py b/src/shippo/_hooks/types.py index 10b732cc..fa9462d4 100644 --- a/src/shippo/_hooks/types.py +++ b/src/shippo/_hooks/types.py @@ -3,10 +3,12 @@ from abc import ABC, abstractmethod import httpx from shippo.httpclient import HttpClient +from shippo.sdkconfiguration import SDKConfiguration from typing import Any, Callable, List, Optional, Tuple, Union class HookContext: + config: SDKConfiguration base_url: str operation_id: str oauth2_scopes: Optional[List[str]] = None @@ -14,11 +16,13 @@ class HookContext: def __init__( self, + config: SDKConfiguration, base_url: str, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], ): + self.config = config self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes @@ -28,6 +32,7 @@ def __init__( class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -38,6 +43,7 @@ def __init__(self, hook_ctx: HookContext): class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, @@ -48,6 +54,7 @@ def __init__(self, hook_ctx: HookContext): class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( + hook_ctx.config, hook_ctx.base_url, hook_ctx.operation_id, hook_ctx.oauth2_scopes, diff --git a/src/shippo/_version.py b/src/shippo/_version.py index f88e48c8..8a570946 100644 --- a/src/shippo/_version.py +++ b/src/shippo/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "shippo" -__version__: str = "4.0.0" +__version__: str = "5.0.0" __openapi_doc_version__: str = "2018-02-08" -__gen_version__: str = "2.558.5" -__user_agent__: str = "speakeasy-sdk/python 4.0.0 2.558.5 2018-02-08 shippo" +__gen_version__: str = "2.865.2" +__user_agent__: str = "speakeasy-sdk/python 5.0.0 2.865.2 2018-02-08 shippo" try: if __package__ is not None: diff --git a/src/shippo/addresses.py b/src/shippo/addresses.py index aff53028..a35c9b1f 100644 --- a/src/shippo/addresses.py +++ b/src/shippo/addresses.py @@ -5,13 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Addresses(BaseSDK): - r"""Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels. - - """ + r"""Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels.""" def list( self, @@ -22,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.AddressPaginatedList]: + ) -> components.AddressPaginatedList: r"""List all addresses Returns a list of all address objects that have been created in this account. @@ -65,6 +64,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -78,9 +78,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListAddresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -89,28 +90,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.AddressPaginatedList] - ) + return unmarshal_json_response(components.AddressPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -121,7 +109,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.AddressPaginatedList]: + ) -> components.AddressPaginatedList: r"""List all addresses Returns a list of all address objects that have been created in this account. @@ -164,6 +152,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -177,9 +166,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListAddresses", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -188,28 +178,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.AddressPaginatedList] - ) + return unmarshal_json_response(components.AddressPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -221,7 +198,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Create a new address Creates a new address object. You can use address objects to create new shipments, calculate rates, and to create orders. @@ -265,6 +242,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.AddressCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -278,9 +256,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -289,26 +268,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -320,7 +288,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Create a new address Creates a new address object. You can use address objects to create new shipments, calculate rates, and to create orders. @@ -364,6 +332,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.AddressCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -377,9 +346,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -388,26 +358,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -417,7 +376,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Retrieve an address Returns an existing address using an object ID. @@ -458,6 +417,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -471,9 +431,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -482,26 +443,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -511,7 +461,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Retrieve an address Returns an existing address using an object ID. @@ -552,6 +502,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -565,9 +516,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -576,26 +528,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def validate( self, @@ -605,7 +546,7 @@ def validate( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Validate an address Validates an existing address using an object ID @@ -646,6 +587,7 @@ def validate( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -659,9 +601,10 @@ def validate( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ValidateAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -670,26 +613,15 @@ def validate( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def validate_async( self, @@ -699,7 +631,7 @@ async def validate_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Address]: + ) -> components.Address: r"""Validate an address Validates an existing address using an object ID @@ -740,6 +672,7 @@ async def validate_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -753,9 +686,10 @@ async def validate_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ValidateAddress", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -764,23 +698,12 @@ async def validate_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Address]) + return unmarshal_json_response(components.Address, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/basesdk.py b/src/shippo/basesdk.py index f884014e..8ebb5667 100644 --- a/src/shippo/basesdk.py +++ b/src/shippo/basesdk.py @@ -5,16 +5,31 @@ from shippo import utils from shippo._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext from shippo.models import errors -from shippo.utils import RetryConfig, SerializedRequestBody, get_body_content +from shippo.utils import ( + RetryConfig, + SerializedRequestBody, + get_body_content, + run_sync_in_thread, +) from typing import Callable, List, Mapping, Optional, Tuple from urllib.parse import parse_qs, urlparse class BaseSDK: sdk_configuration: SDKConfiguration + parent_ref: Optional[object] = None + """ + Reference to the root SDK instance, if any. This will prevent it from + being garbage collected while there are active streams. + """ - def __init__(self, sdk_config: SDKConfiguration) -> None: + def __init__( + self, + sdk_config: SDKConfiguration, + parent_ref: Optional[object] = None, + ) -> None: self.sdk_configuration = sdk_config + self.parent_ref = parent_ref def _get_url(self, base_url, url_variables): sdk_url, sdk_variables = self.sdk_configuration.get_server_details() @@ -47,6 +62,7 @@ def _build_request_async( ] = None, url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, + allow_empty_value: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -67,6 +83,7 @@ def _build_request_async( get_serialized_body, url_override, http_headers, + allow_empty_value, ) def _build_request( @@ -89,6 +106,7 @@ def _build_request( ] = None, url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, + allow_empty_value: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -109,6 +127,7 @@ def _build_request( get_serialized_body, url_override, http_headers, + allow_empty_value, ) def _build_request_with_client( @@ -132,6 +151,7 @@ def _build_request_with_client( ] = None, url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, + allow_empty_value: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -147,6 +167,7 @@ def _build_request_with_client( query_params = utils.get_query_params( request if request_has_query_params else None, _globals if request_has_query_params else None, + allow_empty_value, ) else: # Pick up the query parameter from the override so they can be @@ -215,12 +236,12 @@ def do_request( client = self.sdk_configuration.client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request - ) + req = hooks.before_request(BeforeRequestContext(hook_ctx), request) logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -234,16 +255,14 @@ def do(): http_res = client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e - ) + _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise errors.SDKError("No response received") + raise errors.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -254,7 +273,7 @@ def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( + result, err = hooks.after_error( AfterErrorContext(hook_ctx), http_res, None ) if err is not None: @@ -264,7 +283,7 @@ def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred") + raise errors.SDKError("Unexpected error occurred", http_res) return http_res @@ -274,9 +293,7 @@ def do(): http_res = do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res - ) + http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res @@ -291,12 +308,15 @@ async def do_request_async( client = self.sdk_configuration.async_client logger = self.sdk_configuration.debug_logger + hooks = self.sdk_configuration.__dict__["_hooks"] + async def do(): http_res = None try: - req = self.sdk_configuration.get_hooks().before_request( - BeforeRequestContext(hook_ctx), request + req = await run_sync_in_thread( + hooks.before_request, BeforeRequestContext(hook_ctx), request ) + logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -310,16 +330,17 @@ async def do(): http_res = await client.send(req, stream=stream) except Exception as e: - _, e = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), None, e + _, e = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), None, e ) + if e is not None: logger.debug("Request Exception", exc_info=True) raise e if http_res is None: logger.debug("Raising no response SDK error") - raise errors.SDKError("No response received") + raise errors.NoResponseError("No response received") logger.debug( "Response:\nStatus Code: %s\nURL: %s\nHeaders: %s\nBody: %s", @@ -330,9 +351,10 @@ async def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = self.sdk_configuration.get_hooks().after_error( - AfterErrorContext(hook_ctx), http_res, None + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None ) + if err is not None: logger.debug("Request Exception", exc_info=True) raise err @@ -340,7 +362,7 @@ async def do(): http_res = result else: logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred") + raise errors.SDKError("Unexpected error occurred", http_res) return http_res @@ -352,8 +374,8 @@ async def do(): http_res = await do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = self.sdk_configuration.get_hooks().after_success( - AfterSuccessContext(hook_ctx), http_res + http_res = await run_sync_in_thread( + hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) return http_res diff --git a/src/shippo/batches.py b/src/shippo/batches.py index 1474de65..13ad5092 100644 --- a/src/shippo/batches.py +++ b/src/shippo/batches.py @@ -5,21 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional, Union, cast class Batches(BaseSDK): - r"""A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels. - - - # Batch Shipment - The batch shipment object is a wrapper around a shipment object, which include shipment-specific information - for batch processing. - - Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through - the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint - - """ + r"""A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels.""" def create( self, @@ -31,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Create a batch Creates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid. @@ -75,6 +66,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.BatchCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -88,9 +80,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -99,26 +92,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -130,7 +112,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Create a batch Creates a new batch object for purchasing shipping labels for many shipments at once. Batches are created asynchronously. This means that the API response won't include your batch shipments yet. You need to retrieve the batch later to verify that all batch shipments are valid. @@ -174,6 +156,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.BatchCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -187,9 +170,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -198,26 +182,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -229,7 +202,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Retrieve a batch Returns a batch using an object ID.
Batch shipments are displayed 100 at a time. You can iterate @@ -277,6 +250,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -290,9 +264,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -301,26 +276,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -332,7 +296,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Retrieve a batch Returns a batch using an object ID.
Batch shipments are displayed 100 at a time. You can iterate @@ -380,6 +344,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -393,9 +358,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -404,26 +370,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def add_shipments( self, @@ -437,7 +392,7 @@ def add_shipments( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Add shipments to a batch Adds batch shipments to an existing batch. @@ -489,6 +444,7 @@ def add_shipments( "json", List[components.BatchShipmentCreateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -502,9 +458,10 @@ def add_shipments( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="AddShipmentsToBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -513,26 +470,15 @@ def add_shipments( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def add_shipments_async( self, @@ -546,7 +492,7 @@ async def add_shipments_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Add shipments to a batch Adds batch shipments to an existing batch. @@ -598,6 +544,7 @@ async def add_shipments_async( "json", List[components.BatchShipmentCreateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -611,9 +558,10 @@ async def add_shipments_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="AddShipmentsToBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -622,26 +570,15 @@ async def add_shipments_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def purchase( self, @@ -651,7 +588,7 @@ def purchase( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Purchase a batch Purchases an existing batch with a status of `VALID`. @@ -695,6 +632,7 @@ def purchase( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -708,9 +646,10 @@ def purchase( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="PurchaseBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -719,26 +658,15 @@ def purchase( ) if utils.match_response(http_res, "202", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def purchase_async( self, @@ -748,7 +676,7 @@ async def purchase_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Purchase a batch Purchases an existing batch with a status of `VALID`. @@ -792,6 +720,7 @@ async def purchase_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -805,9 +734,10 @@ async def purchase_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="PurchaseBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -816,26 +746,15 @@ async def purchase_async( ) if utils.match_response(http_res, "202", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def remove_shipments( self, @@ -846,7 +765,7 @@ def remove_shipments( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Remove shipments from a batch Removes shipments from an existing batch shipment. @@ -892,6 +811,7 @@ def remove_shipments( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, False, "json", List[str] ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -905,9 +825,10 @@ def remove_shipments( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="RemoveShipmentsFromBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -916,26 +837,15 @@ def remove_shipments( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def remove_shipments_async( self, @@ -946,7 +856,7 @@ async def remove_shipments_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Batch]: + ) -> components.Batch: r"""Remove shipments from a batch Removes shipments from an existing batch shipment. @@ -992,6 +902,7 @@ async def remove_shipments_async( get_serialized_body=lambda: utils.serialize_request_body( request.request_body, False, False, "json", List[str] ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1005,9 +916,10 @@ async def remove_shipments_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="RemoveShipmentsFromBatch", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1016,23 +928,12 @@ async def remove_shipments_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Batch]) + return unmarshal_json_response(components.Batch, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/carrier_accounts.py b/src/shippo/carrier_accounts.py index f8f6d001..10f203cb 100644 --- a/src/shippo/carrier_accounts.py +++ b/src/shippo/carrier_accounts.py @@ -5,14 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional, Union, cast class CarrierAccounts(BaseSDK): - r"""Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers. - - - """ + r"""Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers.""" def list( self, @@ -25,7 +23,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccountPaginatedList]: + ) -> components.CarrierAccountPaginatedList: r"""List all carrier accounts Returns a list of all carrier accounts connected to your Shippo account. These carrier accounts include both Shippo carrier accounts and your own carrier accounts that you have connected to your Shippo account. @@ -70,6 +68,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -83,9 +82,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCarrierAccounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -94,28 +94,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccountPaginatedList] + return unmarshal_json_response( + components.CarrierAccountPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -128,7 +117,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccountPaginatedList]: + ) -> components.CarrierAccountPaginatedList: r"""List all carrier accounts Returns a list of all carrier accounts connected to your Shippo account. These carrier accounts include both Shippo carrier accounts and your own carrier accounts that you have connected to your Shippo account. @@ -173,6 +162,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -186,9 +176,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCarrierAccounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -197,28 +188,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccountPaginatedList] + return unmarshal_json_response( + components.CarrierAccountPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -231,7 +211,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Create a new carrier account Creates a new carrier account or connects an existing carrier account to the Shippo account. @@ -281,6 +261,7 @@ def create( "json", components.ConnectExistingOwnAccountRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -294,9 +275,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -305,28 +287,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -339,7 +308,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Create a new carrier account Creates a new carrier account or connects an existing carrier account to the Shippo account. @@ -389,6 +358,7 @@ async def create_async( "json", components.ConnectExistingOwnAccountRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -402,9 +372,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -413,28 +384,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -444,7 +402,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Retrieve a carrier account Returns an existing carrier account using an object ID. @@ -485,6 +443,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -498,9 +457,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -509,28 +469,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -540,7 +487,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Retrieve a carrier account Returns an existing carrier account using an object ID. @@ -581,6 +528,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -594,9 +542,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -605,28 +554,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def update( self, @@ -639,7 +575,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Update a carrier account Updates an existing carrier account object. The account_id and carrier can't be updated. This is because they form the unique identifier together. @@ -685,12 +621,13 @@ def update( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.carrier_account_base, + request.carrier_account_base if request is not None else None, False, True, "json", Optional[components.CarrierAccountBase], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -704,9 +641,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -715,28 +653,15 @@ def update( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def update_async( self, @@ -749,7 +674,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Update a carrier account Updates an existing carrier account object. The account_id and carrier can't be updated. This is because they form the unique identifier together. @@ -795,12 +720,13 @@ async def update_async( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.carrier_account_base, + request.carrier_account_base if request is not None else None, False, True, "json", Optional[components.CarrierAccountBase], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -814,9 +740,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -825,28 +752,15 @@ async def update_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def initiate_oauth2_signin( self, @@ -903,6 +817,7 @@ def initiate_oauth2_signin( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -916,9 +831,10 @@ def initiate_oauth2_signin( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="InitiateOauth2Signin", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -932,39 +848,26 @@ def initiate_oauth2_signin( headers=utils.get_response_headers(http_res.headers) ) if utils.match_response(http_res, "400", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.BadRequestErrorData + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res ) - raise errors.BadRequestError(data=response_data) + raise errors.BadRequestError(response_data, http_res) if utils.match_response(http_res, "401", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.UnauthorizedErrorData + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res ) - raise errors.UnauthorizedError(data=response_data) + raise errors.UnauthorizedError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.NotFoundErrorData - ) - raise errors.NotFoundError(data=response_data) + response_data = unmarshal_json_response(errors.NotFoundErrorData, http_res) + raise errors.NotFoundError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def initiate_oauth2_signin_async( self, @@ -1021,6 +924,7 @@ async def initiate_oauth2_signin_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1034,9 +938,10 @@ async def initiate_oauth2_signin_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="InitiateOauth2Signin", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1050,39 +955,26 @@ async def initiate_oauth2_signin_async( headers=utils.get_response_headers(http_res.headers) ) if utils.match_response(http_res, "400", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.BadRequestErrorData + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res ) - raise errors.BadRequestError(data=response_data) + raise errors.BadRequestError(response_data, http_res) if utils.match_response(http_res, "401", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.UnauthorizedErrorData + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res ) - raise errors.UnauthorizedError(data=response_data) + raise errors.UnauthorizedError(response_data, http_res) if utils.match_response(http_res, "404", "application/json"): - response_data = utils.unmarshal_json( - http_res.text, errors.NotFoundErrorData - ) - raise errors.NotFoundError(data=response_data) + response_data = unmarshal_json_response(errors.NotFoundErrorData, http_res) + raise errors.NotFoundError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def register( self, @@ -1095,7 +987,7 @@ def register( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Add a Shippo carrier account Adds a Shippo carrier account @@ -1139,6 +1031,7 @@ def register( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.RegisterCarrierAccountRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1152,9 +1045,10 @@ def register( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="RegisterCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1163,28 +1057,15 @@ def register( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def register_async( self, @@ -1197,7 +1078,7 @@ async def register_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccount]: + ) -> components.CarrierAccount: r"""Add a Shippo carrier account Adds a Shippo carrier account @@ -1241,6 +1122,7 @@ async def register_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.RegisterCarrierAccountRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1254,9 +1136,10 @@ async def register_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="RegisterCarrierAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1265,28 +1148,15 @@ async def register_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccount] - ) + return unmarshal_json_response(components.CarrierAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get_registration_status( self, @@ -1296,7 +1166,7 @@ def get_registration_status( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccountRegistrationStatus]: + ) -> components.CarrierAccountRegistrationStatus: r"""Get Carrier Registration status Returns the registration status for the given account for the given carrier @@ -1337,6 +1207,7 @@ def get_registration_status( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1350,9 +1221,10 @@ def get_registration_status( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierRegistrationStatus", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1361,28 +1233,17 @@ def get_registration_status( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccountRegistrationStatus] + return unmarshal_json_response( + components.CarrierAccountRegistrationStatus, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_registration_status_async( self, @@ -1392,7 +1253,7 @@ async def get_registration_status_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierAccountRegistrationStatus]: + ) -> components.CarrierAccountRegistrationStatus: r"""Get Carrier Registration status Returns the registration status for the given account for the given carrier @@ -1433,6 +1294,7 @@ async def get_registration_status_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1446,9 +1308,10 @@ async def get_registration_status_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierRegistrationStatus", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1457,25 +1320,14 @@ async def get_registration_status_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierAccountRegistrationStatus] + return unmarshal_json_response( + components.CarrierAccountRegistrationStatus, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/carrier_parcel_templates.py b/src/shippo/carrier_parcel_templates.py index 939ce6fb..b0194856 100644 --- a/src/shippo/carrier_parcel_templates.py +++ b/src/shippo/carrier_parcel_templates.py @@ -5,14 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional class CarrierParcelTemplates(BaseSDK): - r"""A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight. - - - """ + r"""A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight.""" def list( self, @@ -23,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierParcelTemplateList]: + ) -> 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.
@@ -72,6 +70,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -85,9 +84,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCarrierParcelTemplates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -96,28 +96,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierParcelTemplateList] + return unmarshal_json_response( + components.CarrierParcelTemplateList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -128,7 +117,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierParcelTemplateList]: + ) -> 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.
@@ -177,6 +166,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -190,9 +180,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCarrierParcelTemplates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -201,28 +192,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierParcelTemplateList] + return unmarshal_json_response( + components.CarrierParcelTemplateList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -232,7 +212,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierParcelTemplate]: + ) -> components.CarrierParcelTemplate: r"""Retrieve a carrier parcel templates Fetches the parcel template information for a specific carrier parcel template, identified by the token. @@ -273,6 +253,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -286,9 +267,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -297,28 +279,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierParcelTemplate] - ) + return unmarshal_json_response(components.CarrierParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -328,7 +297,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CarrierParcelTemplate]: + ) -> components.CarrierParcelTemplate: r"""Retrieve a carrier parcel templates Fetches the parcel template information for a specific carrier parcel template, identified by the token. @@ -369,6 +338,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -382,9 +352,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCarrierParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -393,25 +364,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CarrierParcelTemplate] - ) + return unmarshal_json_response(components.CarrierParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/customs_declarations.py b/src/shippo/customs_declarations.py index 7d40ab73..e3d7d760 100644 --- a/src/shippo/customs_declarations.py +++ b/src/shippo/customs_declarations.py @@ -5,13 +5,13 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class CustomsDeclarations(BaseSDK): r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - """ def list( @@ -23,10 +23,10 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclarationPaginatedList]: + ) -> components.CustomsDeclarationPaginatedList: r"""List all customs declarations - Returns a a list of all customs declaration objects + Returns a list of all customs declaration objects :param page: The page number you want to select :param results: The number of results to return per page (max 100, default 5) @@ -66,6 +66,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -79,9 +80,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCustomsDeclarations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -90,28 +92,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclarationPaginatedList] + return unmarshal_json_response( + components.CustomsDeclarationPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -122,10 +113,10 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclarationPaginatedList]: + ) -> components.CustomsDeclarationPaginatedList: r"""List all customs declarations - Returns a a list of all customs declaration objects + Returns a list of all customs declaration objects :param page: The page number you want to select :param results: The number of results to return per page (max 100, default 5) @@ -165,6 +156,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -178,9 +170,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCustomsDeclarations", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -189,28 +182,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclarationPaginatedList] + return unmarshal_json_response( + components.CustomsDeclarationPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -223,7 +205,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclaration]: + ) -> components.CustomsDeclaration: r"""Create a new customs declaration Creates a new customs declaration object @@ -273,6 +255,7 @@ def create( "json", components.CustomsDeclarationCreateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -286,9 +269,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCustomsDeclaration", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -297,28 +281,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclaration] - ) + return unmarshal_json_response(components.CustomsDeclaration, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -331,7 +302,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclaration]: + ) -> components.CustomsDeclaration: r"""Create a new customs declaration Creates a new customs declaration object @@ -381,6 +352,7 @@ async def create_async( "json", components.CustomsDeclarationCreateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -394,9 +366,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCustomsDeclaration", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -405,28 +378,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclaration] - ) + return unmarshal_json_response(components.CustomsDeclaration, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -437,7 +397,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclaration]: + ) -> components.CustomsDeclaration: r"""Retrieve a customs declaration Returns an existing customs declaration using an object ID @@ -480,6 +440,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -493,9 +454,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCustomsDeclaration", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -504,28 +466,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclaration] - ) + return unmarshal_json_response(components.CustomsDeclaration, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -536,7 +485,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsDeclaration]: + ) -> components.CustomsDeclaration: r"""Retrieve a customs declaration Returns an existing customs declaration using an object ID @@ -579,6 +528,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -592,9 +542,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCustomsDeclaration", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -603,25 +554,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsDeclaration] - ) + return unmarshal_json_response(components.CustomsDeclaration, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/customs_items.py b/src/shippo/customs_items.py index acc64245..d650fde4 100644 --- a/src/shippo/customs_items.py +++ b/src/shippo/customs_items.py @@ -5,13 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class CustomsItems(BaseSDK): - r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - - """ + r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.""" def list( self, @@ -22,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItemPaginatedList]: + ) -> components.CustomsItemPaginatedList: r"""List all customs items Returns a list all customs items objects. @@ -65,6 +64,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -78,9 +78,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCustomsItems", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -89,28 +90,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsItemPaginatedList] + return unmarshal_json_response( + components.CustomsItemPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -121,7 +111,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItemPaginatedList]: + ) -> components.CustomsItemPaginatedList: r"""List all customs items Returns a list all customs items objects. @@ -164,6 +154,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -177,9 +168,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListCustomsItems", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -188,28 +180,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.CustomsItemPaginatedList] + return unmarshal_json_response( + components.CustomsItemPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -222,7 +203,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItem]: + ) -> components.CustomsItem: r"""Create a new customs item Creates a new customs item object. @@ -266,6 +247,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.CustomsItemCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -279,9 +261,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCustomsItem", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -290,26 +273,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.CustomsItem]) + return unmarshal_json_response(components.CustomsItem, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -322,7 +294,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItem]: + ) -> components.CustomsItem: r"""Create a new customs item Creates a new customs item object. @@ -366,6 +338,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.CustomsItemCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -379,9 +352,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateCustomsItem", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -390,26 +364,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.CustomsItem]) + return unmarshal_json_response(components.CustomsItem, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -420,7 +383,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItem]: + ) -> components.CustomsItem: r"""Retrieve a customs item Returns an existing customs item using an object ID @@ -463,6 +426,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -476,9 +440,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCustomsItem", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -487,26 +452,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.CustomsItem]) + return unmarshal_json_response(components.CustomsItem, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -517,7 +471,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.CustomsItem]: + ) -> components.CustomsItem: r"""Retrieve a customs item Returns an existing customs item using an object ID @@ -560,6 +514,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -573,9 +528,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetCustomsItem", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -584,23 +540,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.CustomsItem]) + return unmarshal_json_response(components.CustomsItem, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/httpclient.py b/src/shippo/httpclient.py index 1e426352..89560b56 100644 --- a/src/shippo/httpclient.py +++ b/src/shippo/httpclient.py @@ -2,7 +2,6 @@ # pyright: reportReturnType = false import asyncio -from concurrent.futures import ThreadPoolExecutor from typing_extensions import Protocol, runtime_checkable import httpx from typing import Any, Optional, Union @@ -108,7 +107,6 @@ def close_clients( # to them from the owning SDK instance and they can be reaped. owner.client = None owner.async_client = None - if sync_client is not None and not sync_client_supplied: try: sync_client.close() @@ -116,21 +114,12 @@ def close_clients( pass if async_client is not None and not async_client_supplied: - is_async = False try: - asyncio.get_running_loop() - is_async = True + loop = asyncio.get_running_loop() + asyncio.run_coroutine_threadsafe(async_client.aclose(), loop) except RuntimeError: - pass - - try: - # If this function is called in an async loop then start another - # loop in a separate thread to close the async http client. - if is_async: - with ThreadPoolExecutor(max_workers=1) as executor: - future = executor.submit(asyncio.run, async_client.aclose()) - future.result() - else: + try: asyncio.run(async_client.aclose()) - except Exception: - pass + except RuntimeError: + # best effort + pass diff --git a/src/shippo/manifests.py b/src/shippo/manifests.py index 131901bd..29c419c3 100644 --- a/src/shippo/manifests.py +++ b/src/shippo/manifests.py @@ -5,18 +5,13 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Manifests(BaseSDK): r"""A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually. They are close-outs of shipping labels of a certain day. Some carriers require manifests to process the shipments. - - - - # Manifest Errors - The following codes and messages are the possible errors that may occur when creating Manifests. - """ def list( @@ -28,7 +23,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ManifestPaginatedList]: + ) -> components.ManifestPaginatedList: r"""List all manifests Returns a list of all manifest objects. @@ -71,6 +66,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -84,9 +80,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListManifests", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -95,28 +92,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ManifestPaginatedList] - ) + return unmarshal_json_response(components.ManifestPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -127,7 +111,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ManifestPaginatedList]: + ) -> components.ManifestPaginatedList: r"""List all manifests Returns a list of all manifest objects. @@ -170,6 +154,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -183,9 +168,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListManifests", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -194,28 +180,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ManifestPaginatedList] - ) + return unmarshal_json_response(components.ManifestPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -227,7 +200,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Manifest]: + ) -> components.Manifest: r"""Create a new manifest Creates a new manifest object. @@ -271,6 +244,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ManifestCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -284,9 +258,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateManifest", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -295,26 +270,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Manifest]) + return unmarshal_json_response(components.Manifest, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -326,7 +290,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Manifest]: + ) -> components.Manifest: r"""Create a new manifest Creates a new manifest object. @@ -370,6 +334,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ManifestCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -383,9 +348,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateManifest", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -394,26 +360,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Manifest]) + return unmarshal_json_response(components.Manifest, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -423,7 +378,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Manifest]: + ) -> components.Manifest: r"""Retrieve a manifest Returns an existing manifest using an object ID. @@ -464,6 +419,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -477,9 +433,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetManifest", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -488,26 +445,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Manifest]) + return unmarshal_json_response(components.Manifest, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -517,7 +463,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Manifest]: + ) -> components.Manifest: r"""Retrieve a manifest Returns an existing manifest using an object ID. @@ -558,6 +504,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -571,9 +518,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetManifest", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -582,23 +530,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Manifest]) + return unmarshal_json_response(components.Manifest, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/models/__init__.py b/src/shippo/models/__init__.py index cc53976c..1a349122 100644 --- a/src/shippo/models/__init__.py +++ b/src/shippo/models/__init__.py @@ -1,4 +1,23 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from typing import Any, TYPE_CHECKING + +from shippo.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from . import components, errors, internal, operations + # package + +_sub_packages = ["components", "errors", "internal", "operations"] + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports={}, sub_packages=_sub_packages + ) + + +def __dir__(): + return lazy_dir(dynamic_imports={}, sub_packages=_sub_packages) diff --git a/src/shippo/models/components/__init__.py b/src/shippo/models/components/__init__.py index ee1d5fed..9dee0611 100644 --- a/src/shippo/models/components/__init__.py +++ b/src/shippo/models/components/__init__.py @@ -1,508 +1,577 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .address import ( - Address, - AddressTypedDict, - Latitude, - LatitudeTypedDict, - Longitude, - LongitudeTypedDict, -) -from .addresscompletecreaterequest import ( - AddressCompleteCreateRequest, - AddressCompleteCreateRequestTypedDict, -) -from .addresscreaterequest import AddressCreateRequest, AddressCreateRequestTypedDict -from .addressimporter import AddressImporter, AddressImporterTypedDict -from .addresspaginatedlist import AddressPaginatedList, AddressPaginatedListTypedDict -from .addressvalidationresults import ( - AddressValidationResults, - AddressValidationResultsTypedDict, -) -from .addressvalidationresultsmessage import ( - AddressValidationResultsMessage, - AddressValidationResultsMessageTypedDict, -) -from .addressvalidationresultsmessagecodeenum import ( - AddressValidationResultsMessageCodeEnum, -) -from .addressvalidationresultsmessagesourceenum import ( - AddressValidationResultsMessageSourceEnum, -) -from .alcohol import Alcohol, AlcoholTypedDict, RecipientType -from .batch import ( - Batch, - BatchStatus, - BatchTypedDict, - ObjectResults, - ObjectResultsTypedDict, -) -from .batchcreaterequest import BatchCreateRequest, BatchCreateRequestTypedDict -from .batchshipment import BatchShipment, BatchShipmentStatus, BatchShipmentTypedDict -from .batchshipmentcreaterequest import ( - BatchShipmentCreateRequest, - BatchShipmentCreateRequestTypedDict, -) -from .batchshipmentpaginatedlist import ( - BatchShipmentPaginatedList, - BatchShipmentPaginatedListTypedDict, -) -from .billing import Billing, BillingType, BillingTypedDict -from .carrieraccount import ( - CarrierAccount, - CarrierAccountParameters, - CarrierAccountParametersTypedDict, - CarrierAccountTypedDict, -) -from .carrieraccountbase import ( - CarrierAccountBase, - CarrierAccountBaseParameters, - CarrierAccountBaseParametersTypedDict, - CarrierAccountBaseTypedDict, -) -from .carrieraccountcanadapostcreateparameters import ( - CarrierAccountCanadaPostCreateParameters, - CarrierAccountCanadaPostCreateParametersTypedDict, -) -from .carrieraccountcanadapostcreaterequest import ( - CarrierAccountCanadaPostCreateRequest, - CarrierAccountCanadaPostCreateRequestTypedDict, -) -from .carrieraccountchronopostcreaterequest import ( - CarrierAccountChronopostCreateRequest, - CarrierAccountChronopostCreateRequestParameters, - CarrierAccountChronopostCreateRequestParametersTypedDict, - CarrierAccountChronopostCreateRequestTypedDict, -) -from .carrieraccountcolissimocreaterequest import ( - CarrierAccountColissimoCreateRequest, - CarrierAccountColissimoCreateRequestParameters, - CarrierAccountColissimoCreateRequestParametersTypedDict, - CarrierAccountColissimoCreateRequestTypedDict, -) -from .carrieraccountcorreoscreaterequest import ( - CarrierAccountCorreosCreateRequest, - CarrierAccountCorreosCreateRequestParameters, - CarrierAccountCorreosCreateRequestParametersTypedDict, - CarrierAccountCorreosCreateRequestTypedDict, -) -from .carrieraccountdeutschepostcreaterequest import ( - CarrierAccountDeutschePostCreateRequest, - CarrierAccountDeutschePostCreateRequestParameters, - CarrierAccountDeutschePostCreateRequestParametersTypedDict, - CarrierAccountDeutschePostCreateRequestTypedDict, -) -from .carrieraccountdhlexpresscreaterequest import ( - CarrierAccountDHLExpressCreateRequest, - CarrierAccountDHLExpressCreateRequestTypedDict, -) -from .carrieraccountdhlexpresscreaterequestparameters import ( - CarrierAccountDHLExpressCreateRequestParameters, - CarrierAccountDHLExpressCreateRequestParametersTypedDict, -) -from .carrieraccountdpddecreaterequest import ( - CarrierAccountDpdDeCreateRequest, - CarrierAccountDpdDeCreateRequestParameters, - CarrierAccountDpdDeCreateRequestParametersTypedDict, - CarrierAccountDpdDeCreateRequestTypedDict, -) -from .carrieraccountdpdukcreaterequest import ( - CarrierAccountDPDUKCreateRequest, - CarrierAccountDPDUKCreateRequestParameters, - CarrierAccountDPDUKCreateRequestParametersTypedDict, - CarrierAccountDPDUKCreateRequestTypedDict, -) -from .carrieraccountfedexcreaterequest import ( - CarrierAccountFedExCreateRequest, - CarrierAccountFedExCreateRequestParameters, - CarrierAccountFedExCreateRequestParametersTypedDict, - CarrierAccountFedExCreateRequestTypedDict, -) -from .carrieraccounthermesukcreaterequest import ( - CarrierAccountHermesUKCreateRequest, - CarrierAccountHermesUKCreateRequestParameters, - CarrierAccountHermesUKCreateRequestParametersTypedDict, - CarrierAccountHermesUKCreateRequestTypedDict, -) -from .carrieraccountmondialrelaycreaterequest import ( - CarrierAccountMondialRelayCreateRequest, - CarrierAccountMondialRelayCreateRequestParameters, - CarrierAccountMondialRelayCreateRequestParametersTypedDict, - CarrierAccountMondialRelayCreateRequestTypedDict, -) -from .carrieraccountpaginatedlist import ( - CarrierAccountPaginatedList, - CarrierAccountPaginatedListTypedDict, -) -from .carrieraccountposteitalianecreaterequest import ( - CarrierAccountPosteItalianeCreateRequest, - CarrierAccountPosteItalianeCreateRequestParameters, - CarrierAccountPosteItalianeCreateRequestParametersTypedDict, - CarrierAccountPosteItalianeCreateRequestTypedDict, -) -from .carrieraccountregistrationstatus import ( - CarrierAccountRegistrationStatus, - CarrierAccountRegistrationStatusTypedDict, -) -from .carrieraccountsendlecreaterequest import ( - CarrierAccountSendleCreateRequest, - CarrierAccountSendleCreateRequestParameters, - CarrierAccountSendleCreateRequestParametersTypedDict, - CarrierAccountSendleCreateRequestTypedDict, -) -from .carrieraccountservicelevel import ( - CarrierAccountServiceLevel, - CarrierAccountServiceLevelTypedDict, -) -from .carrieraccountupscreaterequest import ( - CarrierAccountUPSCreateRequest, - CarrierAccountUPSCreateRequestTypedDict, -) -from .carrieraccountupscreaterequestparameters import ( - CarrierAccountUPSCreateRequestParameters, - CarrierAccountUPSCreateRequestParametersTypedDict, -) -from .carrieraccountuspscreaterequest import ( - CarrierAccountUSPSCreateRequest, - CarrierAccountUSPSCreateRequestParameters, - CarrierAccountUSPSCreateRequestParametersTypedDict, - CarrierAccountUSPSCreateRequestTypedDict, -) -from .carrieraccountwithextrainfo import ( - Authentication, - AuthenticationTypedDict, - CarrierAccountWithExtraInfo, - CarrierAccountWithExtraInfoParameters, - CarrierAccountWithExtraInfoParametersTypedDict, - CarrierAccountWithExtraInfoStatus, - CarrierAccountWithExtraInfoType, - CarrierAccountWithExtraInfoTypedDict, - ObjectInfo, - ObjectInfoTypedDict, -) -from .carrierparceltemplate import CarrierParcelTemplate, CarrierParcelTemplateTypedDict -from .carrierparceltemplatelist import ( - CarrierParcelTemplateList, - CarrierParcelTemplateListTypedDict, -) -from .carriersenum import CarriersEnum -from .cod import Cod, CodTypedDict, PaymentMethod -from .connectexistingownaccountrequest import ( - ConnectExistingOwnAccountRequest, - ConnectExistingOwnAccountRequestParameters, - ConnectExistingOwnAccountRequestParametersTypedDict, - ConnectExistingOwnAccountRequestTypedDict, -) -from .corerate import CoreRate, CoreRateTypedDict -from .customerreference import CustomerReference, CustomerReferenceTypedDict -from .customsdeclaration import ( - CustomsDeclaration, - CustomsDeclarationAddress, - CustomsDeclarationAddressTypedDict, - CustomsDeclarationDutiesPayor, - CustomsDeclarationDutiesPayorTypedDict, - CustomsDeclarationType, - CustomsDeclarationTypedDict, -) -from .customsdeclarationb13afilingoptionenum import ( - CustomsDeclarationB13AFilingOptionEnum, -) -from .customsdeclarationcontentstypeenum import CustomsDeclarationContentsTypeEnum -from .customsdeclarationcreaterequest import ( - CustomsDeclarationCreateRequest, - CustomsDeclarationCreateRequestAddress, - CustomsDeclarationCreateRequestAddressTypedDict, - CustomsDeclarationCreateRequestDutiesPayor, - CustomsDeclarationCreateRequestDutiesPayorTypedDict, - CustomsDeclarationCreateRequestType, - CustomsDeclarationCreateRequestTypedDict, -) -from .customsdeclarationeelpfcenum import CustomsDeclarationEelPfcEnum -from .customsdeclarationincotermenum import CustomsDeclarationIncotermEnum -from .customsdeclarationnondeliveryoptionenum import ( - CustomsDeclarationNonDeliveryOptionEnum, -) -from .customsdeclarationpaginatedlist import ( - CustomsDeclarationPaginatedList, - CustomsDeclarationPaginatedListTypedDict, -) -from .customsexporteridentification import ( - CustomsExporterIdentification, - CustomsExporterIdentificationTypedDict, -) -from .customsinvoicedcharges import ( - CustomsInvoicedCharges, - CustomsInvoicedChargesTypedDict, -) -from .customsitem import CustomsItem, CustomsItemTypedDict -from .customsitemcreaterequest import ( - CustomsItemCreateRequest, - CustomsItemCreateRequestTypedDict, -) -from .customsitempaginatedlist import ( - CustomsItemPaginatedList, - CustomsItemPaginatedListTypedDict, -) -from .customstaxidentification import ( - CustomsTaxIdentification, - CustomsTaxIdentificationType, - CustomsTaxIdentificationTypedDict, -) -from .dangerousgoodsbiologicalmaterial import ( - DangerousGoodsBiologicalMaterial, - DangerousGoodsBiologicalMaterialTypedDict, -) -from .dangerousgoodslithiumbatteries import ( - DangerousGoodsLithiumBatteries, - DangerousGoodsLithiumBatteriesTypedDict, -) -from .dangerousgoodsobject import DangerousGoodsObject, DangerousGoodsObjectTypedDict -from .defaultparceltemplate import DefaultParcelTemplate, DefaultParcelTemplateTypedDict -from .defaultparceltemplateupdaterequest import ( - DefaultParcelTemplateUpdateRequest, - DefaultParcelTemplateUpdateRequestTypedDict, -) -from .departmentnumber import DepartmentNumber, DepartmentNumberTypedDict -from .distanceunitenum import DistanceUnitEnum -from .dryice import DryIce, DryIceTypedDict -from .fedexconnectexistingownaccountparameters import ( - FedExConnectExistingOwnAccountParameters, - FedExConnectExistingOwnAccountParametersTypedDict, -) -from .instanttransactioncreaterequest import ( - InstantTransactionCreateRequest, - InstantTransactionCreateRequestTypedDict, - LabelFileType, -) -from .insurance import Insurance, InsuranceProvider, InsuranceTypedDict -from .invoicenumber import InvoiceNumber, InvoiceNumberTypedDict -from .labelfiletypeenum import LabelFileTypeEnum -from .lineitem import LineItem, LineItemTypedDict -from .lineitembase import LineItemBase, LineItemBaseTypedDict -from .liverate import LiveRate, LiveRateTypedDict -from .liveratecreaterequest import ( - LiveRateCreateRequest, - LiveRateCreateRequestAddressFrom, - LiveRateCreateRequestAddressFromTypedDict, - LiveRateCreateRequestAddressTo, - LiveRateCreateRequestAddressToTypedDict, - LiveRateCreateRequestParcel, - LiveRateCreateRequestParcelTypedDict, - LiveRateCreateRequestTypedDict, -) -from .liveratepaginatedlist import LiveRatePaginatedList, LiveRatePaginatedListTypedDict -from .location import BuildingLocationType, BuildingType, Location, LocationTypedDict -from .manifest import Manifest, ManifestStatus, ManifestTypedDict -from .manifestcreaterequest import ( - ManifestCreateRequest, - ManifestCreateRequestAddressFrom, - ManifestCreateRequestAddressFromTypedDict, - ManifestCreateRequestTypedDict, -) -from .manifestpaginatedlist import ManifestPaginatedList, ManifestPaginatedListTypedDict -from .objectstateenum import ObjectStateEnum -from .order import Order, OrderTransaction, OrderTransactionTypedDict, OrderTypedDict -from .ordercreaterequest import OrderCreateRequest, OrderCreateRequestTypedDict -from .orderpaginatedlist import OrderPaginatedList, OrderPaginatedListTypedDict -from .ordershopappenum import OrderShopAppEnum -from .orderstatusenum import OrderStatusEnum -from .parcel import ObjectState, Parcel, ParcelTypedDict -from .parcelcreatefromtemplaterequest import ( - ParcelCreateFromTemplateRequest, - ParcelCreateFromTemplateRequestTypedDict, -) -from .parcelcreaterequest import ParcelCreateRequest, ParcelCreateRequestTypedDict -from .parcelextra import ParcelExtra, ParcelExtraTypedDict -from .parcelinsurance import ( - ParcelInsurance, - ParcelInsuranceProvider, - ParcelInsuranceTypedDict, -) -from .parcelpaginatedlist import ParcelPaginatedList, ParcelPaginatedListTypedDict -from .parceltemplatearamexaustraliaenum import ParcelTemplateAramexAustraliaEnum -from .parceltemplatedhlecommerceenum import ParcelTemplateDHLeCommerceEnum -from .parceltemplatedpdukenum import ParcelTemplateDPDUKEnum -from .parceltemplateenumset import ParcelTemplateEnumSet, ParcelTemplateEnumSetTypedDict -from .parceltemplatefedexenum import ParcelTemplateFedExEnum -from .parceltemplateupsenum import ParcelTemplateUPSEnum -from .parceltemplateuspsenum import ParcelTemplateUSPSEnum -from .pickup import Pickup, PickupStatus, PickupTypedDict -from .pickupbase import PickupBase, PickupBaseTypedDict -from .ponumber import PoNumber, PoNumberTypedDict -from .rate import Attribute, Rate, RateTypedDict -from .ratepaginatedlist import RatePaginatedList, RatePaginatedListTypedDict -from .refund import Refund, RefundStatus, RefundTypedDict -from .refundpaginatedlist import RefundPaginatedList, RefundPaginatedListTypedDict -from .refundrequestbody import RefundRequestBody, RefundRequestBodyTypedDict -from .responsemessage import ResponseMessage, ResponseMessageTypedDict -from .rmanumber import RmaNumber, RmaNumberTypedDict -from .security import Security, SecurityTypedDict -from .servicegroup import ServiceGroup, ServiceGroupTypedDict -from .servicegroupaccountandservicelevel import ( - ServiceGroupAccountAndServiceLevel, - ServiceGroupAccountAndServiceLevelTypedDict, -) -from .servicegroupcreaterequest import ( - ServiceGroupCreateRequest, - ServiceGroupCreateRequestTypedDict, -) -from .servicegrouptypeenum import ServiceGroupTypeEnum -from .servicegroupupdaterequest import ( - ServiceGroupUpdateRequest, - ServiceGroupUpdateRequestTypedDict, -) -from .servicelevel import ServiceLevel, ServiceLevelTypedDict -from .servicelevelairterraenum import ServiceLevelAirterraEnum -from .servicelevelapcpostalenum import ServiceLevelAPCPostalEnum -from .servicelevelapgenum import ServiceLevelAPGEnum -from .servicelevelaramexaustraliaenum import ServiceLevelAramexAustraliaEnum -from .servicelevelasendiaenum import ServiceLevelAsendiaEnum -from .servicelevelaustraliapostenum import ServiceLevelAustraliaPostEnum -from .servicelevelbettertrucksenum import ServiceLevelBetterTrucksEnum -from .servicelevelcanadapostenum import ServiceLevelCanadaPostEnum -from .servicelevelcdlenum import ServiceLevelCDLEnum -from .servicelevelchronopostenum import ServiceLevelChronopostEnum -from .servicelevelcolissimoenum import ServiceLevelColissimoEnum -from .servicelevelcorreosespanaenum import ServiceLevelCorreosEspanaEnum -from .serviceleveldeutschepostenum import ServiceLevelDeutschePostEnum -from .serviceleveldhlecommerceenum import ServiceLevelDHLeCommerceEnum -from .serviceleveldhlexpressenum import ServiceLevelDHLExpressEnum -from .serviceleveldhlgermanyenum import ServiceLevelDHLGermanyEnum -from .serviceleveldpddeenum import ServiceLevelDPDDEEnum -from .serviceleveldpdukenum import ServiceLevelDPDUKEnum -from .servicelevelenumset import ServiceLevelEnumSet, ServiceLevelEnumSetTypedDict -from .servicelevelepostglobalenum import ServiceLevelePostGlobalEnum -from .servicelevelevriukenum import ServiceLevelEvriUKEnum -from .servicelevelfedexenum import ServiceLevelFedExEnum -from .servicelevelglobegisticsenum import ServiceLevelGlobegisticsEnum -from .servicelevelglsusenum import ServiceLevelGLSUSEnum -from .serviceleveljitsuenum import ServiceLevelJitsuEnum -from .servicelevellasershipenum import ServiceLevelLasershipEnum -from .servicelevellsoenum import ServiceLevelLSOEnum -from .servicelevelmondialrelayenum import ServiceLevelMondialRelayEnum -from .servicelevelontracenum import ServiceLevelOnTracEnum -from .servicelevelparcelforceenum import ServiceLevelParcelforceEnum -from .servicelevelpostitalianeenum import ServiceLevelPostItalianeEnum -from .servicelevelpurolatorenum import ServiceLevelPurolatorEnum -from .servicelevelroyalmailenum import ServiceLevelRoyalMailEnum -from .servicelevelsendleenum import ServiceLevelSendleEnum -from .servicelevelswyftenum import ServiceLevelSwyftEnum -from .serviceleveludsenum import ServiceLevelUDSEnum -from .servicelevelupsenum import ServiceLevelUPSEnum -from .serviceleveluspsenum import ServiceLevelUSPSEnum -from .servicelevelvehoenum import ServiceLevelVehoEnum -from .servicelevelwithparent import ( - ServiceLevelWithParent, - ServiceLevelWithParentTypedDict, -) -from .shipment import Shipment, ShipmentStatus, ShipmentTypedDict -from .shipmentcreaterequest import ( - AddressReturn, - AddressReturnTypedDict, - CustomsDeclarationUnion, - CustomsDeclarationUnionTypedDict, - ShipmentCreateRequest, - ShipmentCreateRequestAddressFrom, - ShipmentCreateRequestAddressFromTypedDict, - ShipmentCreateRequestAddressTo, - ShipmentCreateRequestAddressToTypedDict, - ShipmentCreateRequestParcel, - ShipmentCreateRequestParcelTypedDict, - ShipmentCreateRequestTypedDict, -) -from .shipmentextra import ( - AncillaryEndorsement, - DangerousGoodsCode, - PreferredDeliveryTimeframe, - ReturnServiceType, - ReturnServiceTypeTypedDict, - ShipmentExtra, - ShipmentExtraTypedDict, - SignatureConfirmation, -) -from .shipmentextralasershipattributesenum import ShipmentExtraLasershipAttributesEnum -from .shipmentextrareturnservicetypelasershipenum import ( - ShipmentExtraReturnServiceTypeLasershipEnum, -) -from .shipmentextrareturnservicetypeupsenum import ShipmentExtraReturnServiceTypeUPSEnum -from .shipmentpaginatedlist import ShipmentPaginatedList, ShipmentPaginatedListTypedDict -from .shippoaccount import ShippoAccount, ShippoAccountTypedDict -from .shippoaccountpaginatedlist import ( - ShippoAccountPaginatedList, - ShippoAccountPaginatedListTypedDict, -) -from .shippoaccountupdaterequest import ( - ShippoAccountUpdateRequest, - ShippoAccountUpdateRequestTypedDict, -) -from .track import Track, TrackTypedDict -from .trackingstatus import TrackingStatus, TrackingStatusTypedDict -from .trackingstatusenum import TrackingStatusEnum -from .trackingstatuslocationbase import ( - TrackingStatusLocationBase, - TrackingStatusLocationBaseTypedDict, -) -from .trackingstatussubstatus import ( - TrackingStatusSubstatus, - TrackingStatusSubstatusTypedDict, -) -from .tracksrequest import TracksRequest, TracksRequestTypedDict -from .transaction import ( - CreatedBy, - CreatedByTypedDict, - RateUnion, - RateUnionTypedDict, - Transaction, - TransactionTypedDict, -) -from .transactioncreaterequest import ( - TransactionCreateRequest, - TransactionCreateRequestTypedDict, -) -from .transactionpaginatedlist import ( - TransactionPaginatedList, - TransactionPaginatedListTypedDict, -) -from .transactionstatusenum import TransactionStatusEnum -from .upsconnectexistingownaccountparameters import ( - UPSConnectExistingOwnAccountParameters, - UPSConnectExistingOwnAccountParametersTypedDict, -) -from .upsreferencefields import UPSReferenceFields, UPSReferenceFieldsTypedDict -from .userparceltemplate import UserParcelTemplate, UserParcelTemplateTypedDict -from .userparceltemplatecreaterequest import ( - UserParcelTemplateCreateRequest, - UserParcelTemplateCreateRequestTypedDict, -) -from .userparceltemplatelist import ( - UserParcelTemplateList, - UserParcelTemplateListTypedDict, -) -from .userparceltemplateupdaterequest import ( - UserParcelTemplateUpdateRequest, - UserParcelTemplateUpdateRequestTypedDict, -) -from .userparceltemplatewithcarriertemplatecreaterequest import ( - UserParcelTemplateWithCarrierTemplateCreateRequest, - UserParcelTemplateWithCarrierTemplateCreateRequestTypedDict, -) -from .userparceltemplatewithoutcarriertemplatecreaterequest import ( - UserParcelTemplateWithoutCarrierTemplateCreateRequest, - UserParcelTemplateWithoutCarrierTemplateCreateRequestTypedDict, -) -from .webhook import Webhook, WebhookTypedDict -from .webhookeventtypeenum import WebhookEventTypeEnum -from .webhookpaginatedlist import WebhookPaginatedList, WebhookPaginatedListTypedDict -from .webhookpayload import WebhookPayload, WebhookPayloadTypedDict -from .webhookpayloadbatch import WebhookPayloadBatch, WebhookPayloadBatchTypedDict -from .webhookpayloadtrack import WebhookPayloadTrack, WebhookPayloadTrackTypedDict -from .webhookpayloadtransaction import ( - WebhookPayloadTransaction, - WebhookPayloadTransactionTypedDict, -) -from .webhookupdaterequest import WebhookUpdateRequest, WebhookUpdateRequestTypedDict -from .weightunitenum import WeightUnitEnum +from typing import Any, TYPE_CHECKING +from shippo.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from .address import ( + Address, + AddressTypedDict, + Latitude, + LatitudeTypedDict, + Longitude, + LongitudeTypedDict, + ) + from .addresscompletecreaterequest import ( + AddressCompleteCreateRequest, + AddressCompleteCreateRequestTypedDict, + ) + from .addresscreaterequest import ( + AddressCreateRequest, + AddressCreateRequestTypedDict, + ) + from .addressimporter import AddressImporter, AddressImporterTypedDict + from .addresspaginatedlist import ( + AddressPaginatedList, + AddressPaginatedListTypedDict, + ) + from .addressvalidationresults import ( + AddressValidationResults, + AddressValidationResultsTypedDict, + ) + from .addressvalidationresultsmessage import ( + AddressValidationResultsMessage, + AddressValidationResultsMessageTypedDict, + ) + from .addressvalidationresultsmessagecodeenum import ( + AddressValidationResultsMessageCodeEnum, + ) + from .addressvalidationresultsmessagesourceenum import ( + AddressValidationResultsMessageSourceEnum, + ) + from .alcohol import Alcohol, AlcoholTypedDict, RecipientType + from .batch import ( + Batch, + BatchStatus, + BatchTypedDict, + ObjectResults, + ObjectResultsTypedDict, + ) + from .batchcreaterequest import BatchCreateRequest, BatchCreateRequestTypedDict + from .batchshipment import ( + BatchShipment, + BatchShipmentStatus, + BatchShipmentTypedDict, + ) + from .batchshipmentcreaterequest import ( + BatchShipmentCreateRequest, + BatchShipmentCreateRequestTypedDict, + ) + from .batchshipmentpaginatedlist import ( + BatchShipmentPaginatedList, + BatchShipmentPaginatedListTypedDict, + ) + from .billing import Billing, BillingType, BillingTypedDict + from .carrieraccount import ( + CarrierAccount, + CarrierAccountParameters, + CarrierAccountParametersTypedDict, + CarrierAccountTypedDict, + ) + from .carrieraccountbase import ( + CarrierAccountBase, + CarrierAccountBaseParameters, + CarrierAccountBaseParametersTypedDict, + CarrierAccountBaseTypedDict, + ) + from .carrieraccountcanadapostcreateparameters import ( + CarrierAccountCanadaPostCreateParameters, + CarrierAccountCanadaPostCreateParametersTypedDict, + ) + from .carrieraccountcanadapostcreaterequest import ( + CarrierAccountCanadaPostCreateRequest, + CarrierAccountCanadaPostCreateRequestTypedDict, + ) + from .carrieraccountchronopostcreaterequest import ( + CarrierAccountChronopostCreateRequest, + CarrierAccountChronopostCreateRequestParameters, + CarrierAccountChronopostCreateRequestParametersTypedDict, + CarrierAccountChronopostCreateRequestTypedDict, + ) + from .carrieraccountcolissimocreaterequest import ( + CarrierAccountColissimoCreateRequest, + CarrierAccountColissimoCreateRequestParameters, + CarrierAccountColissimoCreateRequestParametersTypedDict, + CarrierAccountColissimoCreateRequestTypedDict, + ) + from .carrieraccountcorreoscreaterequest import ( + CarrierAccountCorreosCreateRequest, + CarrierAccountCorreosCreateRequestParameters, + CarrierAccountCorreosCreateRequestParametersTypedDict, + CarrierAccountCorreosCreateRequestTypedDict, + ) + from .carrieraccountdeutschepostcreaterequest import ( + CarrierAccountDeutschePostCreateRequest, + CarrierAccountDeutschePostCreateRequestParameters, + CarrierAccountDeutschePostCreateRequestParametersTypedDict, + CarrierAccountDeutschePostCreateRequestTypedDict, + ) + from .carrieraccountdhlexpresscreaterequest import ( + CarrierAccountDHLExpressCreateRequest, + CarrierAccountDHLExpressCreateRequestTypedDict, + ) + from .carrieraccountdhlexpresscreaterequestparameters import ( + CarrierAccountDHLExpressCreateRequestParameters, + CarrierAccountDHLExpressCreateRequestParametersTypedDict, + ) + from .carrieraccountdpddecreaterequest import ( + CarrierAccountDpdDeCreateRequest, + CarrierAccountDpdDeCreateRequestParameters, + CarrierAccountDpdDeCreateRequestParametersTypedDict, + CarrierAccountDpdDeCreateRequestTypedDict, + ) + from .carrieraccountdpdukcreaterequest import ( + CarrierAccountDPDUKCreateRequest, + CarrierAccountDPDUKCreateRequestParameters, + CarrierAccountDPDUKCreateRequestParametersTypedDict, + CarrierAccountDPDUKCreateRequestTypedDict, + ) + from .carrieraccountfedexcreaterequest import ( + CarrierAccountFedExCreateRequest, + CarrierAccountFedExCreateRequestParameters, + CarrierAccountFedExCreateRequestParametersTypedDict, + CarrierAccountFedExCreateRequestTypedDict, + ) + from .carrieraccounthermesukcreaterequest import ( + CarrierAccountHermesUKCreateRequest, + CarrierAccountHermesUKCreateRequestParameters, + CarrierAccountHermesUKCreateRequestParametersTypedDict, + CarrierAccountHermesUKCreateRequestTypedDict, + ) + from .carrieraccountmondialrelaycreaterequest import ( + CarrierAccountMondialRelayCreateRequest, + CarrierAccountMondialRelayCreateRequestParameters, + CarrierAccountMondialRelayCreateRequestParametersTypedDict, + CarrierAccountMondialRelayCreateRequestTypedDict, + ) + from .carrieraccountpaginatedlist import ( + CarrierAccountPaginatedList, + CarrierAccountPaginatedListTypedDict, + ) + from .carrieraccountposteitalianecreaterequest import ( + CarrierAccountPosteItalianeCreateRequest, + CarrierAccountPosteItalianeCreateRequestParameters, + CarrierAccountPosteItalianeCreateRequestParametersTypedDict, + CarrierAccountPosteItalianeCreateRequestTypedDict, + ) + from .carrieraccountregistrationstatus import ( + CarrierAccountRegistrationStatus, + CarrierAccountRegistrationStatusTypedDict, + ) + from .carrieraccountroyalmailcreaterequest import ( + CarrierAccountRoyalMailCreateRequest, + CarrierAccountRoyalMailCreateRequestTypedDict, + ) + from .carrieraccountroyalmailcreaterequestparameters import ( + CarrierAccountRoyalMailCreateRequestParameters, + CarrierAccountRoyalMailCreateRequestParametersTypedDict, + ) + from .carrieraccountroyalmailsfcreaterequest import ( + CarrierAccountRoyalMailSfCreateRequest, + CarrierAccountRoyalMailSfCreateRequestTypedDict, + ) + from .carrieraccountroyalmailsfcreaterequestparameters import ( + CarrierAccountRoyalMailSfCreateRequestParameters, + CarrierAccountRoyalMailSfCreateRequestParametersTypedDict, + ) + from .carrieraccountservicelevel import ( + CarrierAccountServiceLevel, + CarrierAccountServiceLevelTypedDict, + ) + from .carrieraccountupscreaterequest import ( + CarrierAccountUPSCreateRequest, + CarrierAccountUPSCreateRequestTypedDict, + ) + from .carrieraccountupscreaterequestparameters import ( + CarrierAccountUPSCreateRequestParameters, + CarrierAccountUPSCreateRequestParametersTypedDict, + ) + from .carrieraccountuspscreaterequest import ( + CarrierAccountUSPSCreateRequest, + CarrierAccountUSPSCreateRequestParameters, + CarrierAccountUSPSCreateRequestParametersTypedDict, + CarrierAccountUSPSCreateRequestTypedDict, + ) + from .carrieraccountwithextrainfo import ( + Authentication, + AuthenticationTypedDict, + CarrierAccountWithExtraInfo, + CarrierAccountWithExtraInfoParameters, + CarrierAccountWithExtraInfoParametersTypedDict, + CarrierAccountWithExtraInfoStatus, + CarrierAccountWithExtraInfoType, + CarrierAccountWithExtraInfoTypedDict, + ObjectInfo, + ObjectInfoTypedDict, + Policy, + Verification, + VerificationTypedDict, + ) + from .carrierparceltemplate import ( + CarrierParcelTemplate, + CarrierParcelTemplateTypedDict, + ) + from .carrierparceltemplatelist import ( + CarrierParcelTemplateList, + CarrierParcelTemplateListTypedDict, + ) + from .carriersenum import CarriersEnum + from .cod import Cod, CodTypedDict, PaymentMethod + from .connectexistingownaccountrequest import ( + ConnectExistingOwnAccountRequest, + ConnectExistingOwnAccountRequestParameters, + ConnectExistingOwnAccountRequestParametersTypedDict, + ConnectExistingOwnAccountRequestTypedDict, + ) + from .corerate import CoreRate, CoreRateTypedDict + from .customerreference import CustomerReference, CustomerReferenceTypedDict + from .customsdeclaration import ( + CustomsDeclaration, + CustomsDeclarationAddress, + CustomsDeclarationAddressTypedDict, + CustomsDeclarationDutiesPayor, + CustomsDeclarationDutiesPayorTypedDict, + CustomsDeclarationType, + CustomsDeclarationTypedDict, + ) + from .customsdeclarationb13afilingoptionenum import ( + CustomsDeclarationB13AFilingOptionEnum, + ) + from .customsdeclarationcontentstypeenum import CustomsDeclarationContentsTypeEnum + from .customsdeclarationcreaterequest import ( + CustomsDeclarationCreateRequest, + CustomsDeclarationCreateRequestAddress, + CustomsDeclarationCreateRequestAddressTypedDict, + CustomsDeclarationCreateRequestDutiesPayor, + CustomsDeclarationCreateRequestDutiesPayorTypedDict, + CustomsDeclarationCreateRequestType, + CustomsDeclarationCreateRequestTypedDict, + ) + from .customsdeclarationeelpfcenum import CustomsDeclarationEelPfcEnum + from .customsdeclarationincotermenum import CustomsDeclarationIncotermEnum + from .customsdeclarationnondeliveryoptionenum import ( + CustomsDeclarationNonDeliveryOptionEnum, + ) + from .customsdeclarationpaginatedlist import ( + CustomsDeclarationPaginatedList, + CustomsDeclarationPaginatedListTypedDict, + ) + from .customsexporteridentification import ( + CustomsExporterIdentification, + CustomsExporterIdentificationTypedDict, + ) + from .customsinvoicedcharges import ( + CustomsInvoicedCharges, + CustomsInvoicedChargesTypedDict, + ) + from .customsitem import CustomsItem, CustomsItemTypedDict + from .customsitemcreaterequest import ( + CustomsItemCreateRequest, + CustomsItemCreateRequestTypedDict, + ) + from .customsitempaginatedlist import ( + CustomsItemPaginatedList, + CustomsItemPaginatedListTypedDict, + ) + from .customstaxidentification import ( + CustomsTaxIdentification, + CustomsTaxIdentificationType, + CustomsTaxIdentificationTypedDict, + ) + from .dangerousgoodsbiologicalmaterial import ( + DangerousGoodsBiologicalMaterial, + DangerousGoodsBiologicalMaterialTypedDict, + ) + from .dangerousgoodslithiumbatteries import ( + DangerousGoodsLithiumBatteries, + DangerousGoodsLithiumBatteriesTypedDict, + ) + from .dangerousgoodsobject import ( + DangerousGoodsObject, + DangerousGoodsObjectTypedDict, + ) + from .defaultparceltemplate import ( + DefaultParcelTemplate, + DefaultParcelTemplateTypedDict, + ) + from .defaultparceltemplateupdaterequest import ( + DefaultParcelTemplateUpdateRequest, + DefaultParcelTemplateUpdateRequestTypedDict, + ) + from .departmentnumber import DepartmentNumber, DepartmentNumberTypedDict + from .distanceunitenum import DistanceUnitEnum + from .dryice import DryIce, DryIceTypedDict + from .fedexconnectexistingownaccountparameters import ( + FedExConnectExistingOwnAccountParameters, + FedExConnectExistingOwnAccountParametersTypedDict, + VerificationOption, + ) + from .instanttransactioncreaterequest import ( + InstantTransactionCreateRequest, + InstantTransactionCreateRequestTypedDict, + LabelFileType, + ) + from .insurance import Insurance, InsuranceProvider, InsuranceTypedDict + from .invoicenumber import InvoiceNumber, InvoiceNumberTypedDict + from .labelfiletypeenum import LabelFileTypeEnum + from .lineitem import LineItem, LineItemTypedDict + from .lineitembase import LineItemBase, LineItemBaseTypedDict + from .liverate import LiveRate, LiveRateTypedDict + from .liveratecreaterequest import ( + LiveRateCreateRequest, + LiveRateCreateRequestAddressFrom, + LiveRateCreateRequestAddressFromTypedDict, + LiveRateCreateRequestAddressTo, + LiveRateCreateRequestAddressToTypedDict, + LiveRateCreateRequestParcel, + LiveRateCreateRequestParcelTypedDict, + LiveRateCreateRequestTypedDict, + ) + from .liveratepaginatedlist import ( + LiveRatePaginatedList, + LiveRatePaginatedListTypedDict, + ) + from .location import ( + BuildingLocationType, + BuildingType, + Location, + LocationTypedDict, + ) + from .manifest import Manifest, ManifestStatus, ManifestTypedDict + from .manifestcreaterequest import ( + ManifestCreateRequest, + ManifestCreateRequestAddressFrom, + ManifestCreateRequestAddressFromTypedDict, + ManifestCreateRequestTypedDict, + ) + from .manifestpaginatedlist import ( + ManifestPaginatedList, + ManifestPaginatedListTypedDict, + ) + from .objectstateenum import ObjectStateEnum + from .order import ( + Order, + OrderTransaction, + OrderTransactionTypedDict, + OrderTypedDict, + ) + from .ordercreaterequest import OrderCreateRequest, OrderCreateRequestTypedDict + from .orderpaginatedlist import OrderPaginatedList, OrderPaginatedListTypedDict + from .ordershopappenum import OrderShopAppEnum + from .orderstatusenum import OrderStatusEnum + from .parcel import ObjectState, Parcel, ParcelTypedDict + from .parcelcreatefromtemplaterequest import ( + ParcelCreateFromTemplateRequest, + ParcelCreateFromTemplateRequestTypedDict, + ) + from .parcelcreaterequest import ParcelCreateRequest, ParcelCreateRequestTypedDict + from .parcelextra import ParcelExtra, ParcelExtraTypedDict + from .parcelinsurance import ( + ParcelInsurance, + ParcelInsuranceProvider, + ParcelInsuranceTypedDict, + ) + from .parcelpaginatedlist import ParcelPaginatedList, ParcelPaginatedListTypedDict + from .parceltemplatearamexaustraliaenum import ParcelTemplateAramexAustraliaEnum + from .parceltemplatedhlecommerceenum import ParcelTemplateDHLeCommerceEnum + from .parceltemplatedpdukenum import ParcelTemplateDPDUKEnum + from .parceltemplateenumset import ( + ParcelTemplateEnumSet, + ParcelTemplateEnumSetTypedDict, + ) + from .parceltemplatefedexenum import ParcelTemplateFedExEnum + from .parceltemplateupsenum import ParcelTemplateUPSEnum + from .parceltemplateuspsenum import ParcelTemplateUSPSEnum + from .pickup import Pickup, PickupStatus, PickupTypedDict + from .pickupbase import PickupBase, PickupBaseTypedDict + from .ponumber import PoNumber, PoNumberTypedDict + from .rate import Attribute, Rate, RateTypedDict + from .ratepaginatedlist import RatePaginatedList, RatePaginatedListTypedDict + from .refund import Refund, RefundStatus, RefundTypedDict + from .refundpaginatedlist import RefundPaginatedList, RefundPaginatedListTypedDict + from .refundrequestbody import RefundRequestBody, RefundRequestBodyTypedDict + from .responsemessage import ResponseMessage, ResponseMessageTypedDict + from .rmanumber import RmaNumber, RmaNumberTypedDict + from .security import Security, SecurityTypedDict + from .servicegroup import ServiceGroup, ServiceGroupTypedDict + from .servicegroupaccountandservicelevel import ( + ServiceGroupAccountAndServiceLevel, + ServiceGroupAccountAndServiceLevelTypedDict, + ) + from .servicegroupcreaterequest import ( + ServiceGroupCreateRequest, + ServiceGroupCreateRequestTypedDict, + ) + from .servicegrouptypeenum import ServiceGroupTypeEnum + from .servicegroupupdaterequest import ( + ServiceGroupUpdateRequest, + ServiceGroupUpdateRequestTypedDict, + ) + from .servicelevel import ServiceLevel, ServiceLevelTypedDict + from .servicelevelairterraenum import ServiceLevelAirterraEnum + from .servicelevelapcpostalenum import ServiceLevelAPCPostalEnum + from .servicelevelapgenum import ServiceLevelAPGEnum + from .servicelevelaramexaustraliaenum import ServiceLevelAramexAustraliaEnum + from .servicelevelasendiaenum import ServiceLevelAsendiaEnum + from .servicelevelaustraliapostenum import ServiceLevelAustraliaPostEnum + from .servicelevelbettertrucksenum import ServiceLevelBetterTrucksEnum + from .servicelevelcanadapostenum import ServiceLevelCanadaPostEnum + from .servicelevelcdlenum import ServiceLevelCDLEnum + from .servicelevelchronopostenum import ServiceLevelChronopostEnum + from .servicelevelcolissimoenum import ServiceLevelColissimoEnum + from .servicelevelcorreosespanaenum import ServiceLevelCorreosEspanaEnum + from .serviceleveldeutschepostenum import ServiceLevelDeutschePostEnum + from .serviceleveldhlecommerceenum import ServiceLevelDHLeCommerceEnum + from .serviceleveldhlexpressenum import ServiceLevelDHLExpressEnum + from .serviceleveldhlgermanyenum import ServiceLevelDHLGermanyEnum + from .serviceleveldpddeenum import ServiceLevelDPDDEEnum + from .serviceleveldpdukenum import ServiceLevelDPDUKEnum + from .servicelevelenumset import ServiceLevelEnumSet, ServiceLevelEnumSetTypedDict + from .servicelevelepostglobalenum import ServiceLevelePostGlobalEnum + from .servicelevelevriukenum import ServiceLevelEvriUKEnum + from .servicelevelfedexenum import ServiceLevelFedExEnum + from .servicelevelglobegisticsenum import ServiceLevelGlobegisticsEnum + from .servicelevelglsusenum import ServiceLevelGLSUSEnum + from .serviceleveljitsuenum import ServiceLevelJitsuEnum + from .servicelevellasershipenum import ServiceLevelLasershipEnum + from .servicelevellsoenum import ServiceLevelLSOEnum + from .servicelevelmondialrelayenum import ServiceLevelMondialRelayEnum + from .servicelevelontracenum import ServiceLevelOnTracEnum + from .servicelevelparcelforceenum import ServiceLevelParcelforceEnum + from .servicelevelpostitalianeenum import ServiceLevelPostItalianeEnum + from .servicelevelpurolatorenum import ServiceLevelPurolatorEnum + from .servicelevelroyalmailenum import ServiceLevelRoyalMailEnum + from .servicelevelroyalmailsfenum import ServiceLevelRoyalMailSFEnum + from .servicelevelswyftenum import ServiceLevelSwyftEnum + from .serviceleveludsenum import ServiceLevelUDSEnum + from .servicelevelupsenum import ServiceLevelUPSEnum + from .serviceleveluspsenum import ServiceLevelUSPSEnum + from .servicelevelvehoenum import ServiceLevelVehoEnum + from .servicelevelwithparent import ( + ServiceLevelWithParent, + ServiceLevelWithParentTypedDict, + ) + from .shipment import Shipment, ShipmentStatus, ShipmentTypedDict + from .shipmentcreaterequest import ( + AddressReturn, + AddressReturnTypedDict, + CustomsDeclarationUnion, + CustomsDeclarationUnionTypedDict, + ShipmentCreateRequest, + ShipmentCreateRequestAddressFrom, + ShipmentCreateRequestAddressFromTypedDict, + ShipmentCreateRequestAddressTo, + ShipmentCreateRequestAddressToTypedDict, + ShipmentCreateRequestParcel, + ShipmentCreateRequestParcelTypedDict, + ShipmentCreateRequestTypedDict, + ) + from .shipmentextra import ( + AncillaryEndorsement, + DangerousGoodsCode, + PreferredDeliveryTimeframe, + ReturnServiceType, + ReturnServiceTypeTypedDict, + ShipmentExtra, + ShipmentExtraTypedDict, + SignatureConfirmation, + ) + from .shipmentextralasershipattributesenum import ( + ShipmentExtraLasershipAttributesEnum, + ) + from .shipmentextrareturnservicetypelasershipenum import ( + ShipmentExtraReturnServiceTypeLasershipEnum, + ) + from .shipmentextrareturnservicetypeupsenum import ( + ShipmentExtraReturnServiceTypeUPSEnum, + ) + from .shipmentpaginatedlist import ( + ShipmentPaginatedList, + ShipmentPaginatedListTypedDict, + ) + from .shippoaccount import ShippoAccount, ShippoAccountTypedDict + from .shippoaccountpaginatedlist import ( + ShippoAccountPaginatedList, + ShippoAccountPaginatedListTypedDict, + ) + from .shippoaccountupdaterequest import ( + ShippoAccountUpdateRequest, + ShippoAccountUpdateRequestTypedDict, + ) + from .track import Track, TrackTypedDict + from .trackingstatus import TrackingStatus, TrackingStatusTypedDict + from .trackingstatusenum import TrackingStatusEnum + from .trackingstatuslocationbase import ( + TrackingStatusLocationBase, + TrackingStatusLocationBaseTypedDict, + ) + from .trackingstatussubstatus import ( + TrackingStatusSubstatus, + TrackingStatusSubstatusTypedDict, + ) + from .tracksrequest import TracksRequest, TracksRequestTypedDict + from .transaction import ( + CreatedBy, + CreatedByTypedDict, + RateUnion, + RateUnionTypedDict, + Transaction, + TransactionTypedDict, + ) + from .transactioncreaterequest import ( + TransactionCreateRequest, + TransactionCreateRequestTypedDict, + ) + from .transactionpaginatedlist import ( + TransactionPaginatedList, + TransactionPaginatedListTypedDict, + ) + from .transactionstatusenum import TransactionStatusEnum + from .upsconnectexistingownaccountparameters import ( + UPSConnectExistingOwnAccountParameters, + UPSConnectExistingOwnAccountParametersTypedDict, + ) + from .upsreferencefields import UPSReferenceFields, UPSReferenceFieldsTypedDict + from .userparceltemplate import UserParcelTemplate, UserParcelTemplateTypedDict + from .userparceltemplatecreaterequest import ( + UserParcelTemplateCreateRequest, + UserParcelTemplateCreateRequestTypedDict, + ) + from .userparceltemplatelist import ( + UserParcelTemplateList, + UserParcelTemplateListTypedDict, + ) + from .userparceltemplateupdaterequest import ( + UserParcelTemplateUpdateRequest, + UserParcelTemplateUpdateRequestTypedDict, + ) + from .userparceltemplatewithcarriertemplatecreaterequest import ( + UserParcelTemplateWithCarrierTemplateCreateRequest, + UserParcelTemplateWithCarrierTemplateCreateRequestTypedDict, + ) + from .userparceltemplatewithoutcarriertemplatecreaterequest import ( + UserParcelTemplateWithoutCarrierTemplateCreateRequest, + UserParcelTemplateWithoutCarrierTemplateCreateRequestTypedDict, + ) + from .webhook import Webhook, WebhookTypedDict + from .webhookeventtypeenum import WebhookEventTypeEnum + from .webhookpaginatedlist import ( + WebhookPaginatedList, + WebhookPaginatedListTypedDict, + ) + from .webhookpayload import WebhookPayload, WebhookPayloadTypedDict + from .webhookpayloadbatch import WebhookPayloadBatch, WebhookPayloadBatchTypedDict + from .webhookpayloadtrack import WebhookPayloadTrack, WebhookPayloadTrackTypedDict + from .webhookpayloadtransaction import ( + WebhookPayloadTransaction, + WebhookPayloadTransactionTypedDict, + ) + from .webhookupdaterequest import ( + WebhookUpdateRequest, + WebhookUpdateRequestTypedDict, + ) + from .weightunitenum import WeightUnitEnum __all__ = [ "Address", @@ -605,10 +674,14 @@ "CarrierAccountPosteItalianeCreateRequestTypedDict", "CarrierAccountRegistrationStatus", "CarrierAccountRegistrationStatusTypedDict", - "CarrierAccountSendleCreateRequest", - "CarrierAccountSendleCreateRequestParameters", - "CarrierAccountSendleCreateRequestParametersTypedDict", - "CarrierAccountSendleCreateRequestTypedDict", + "CarrierAccountRoyalMailCreateRequest", + "CarrierAccountRoyalMailCreateRequestParameters", + "CarrierAccountRoyalMailCreateRequestParametersTypedDict", + "CarrierAccountRoyalMailCreateRequestTypedDict", + "CarrierAccountRoyalMailSfCreateRequest", + "CarrierAccountRoyalMailSfCreateRequestParameters", + "CarrierAccountRoyalMailSfCreateRequestParametersTypedDict", + "CarrierAccountRoyalMailSfCreateRequestTypedDict", "CarrierAccountServiceLevel", "CarrierAccountServiceLevelTypedDict", "CarrierAccountTypedDict", @@ -782,6 +855,7 @@ "PickupTypedDict", "PoNumber", "PoNumberTypedDict", + "Policy", "PreferredDeliveryTimeframe", "Rate", "RatePaginatedList", @@ -848,7 +922,7 @@ "ServiceLevelPostItalianeEnum", "ServiceLevelPurolatorEnum", "ServiceLevelRoyalMailEnum", - "ServiceLevelSendleEnum", + "ServiceLevelRoyalMailSFEnum", "ServiceLevelSwyftEnum", "ServiceLevelTypedDict", "ServiceLevelUDSEnum", @@ -917,6 +991,9 @@ "UserParcelTemplateWithCarrierTemplateCreateRequestTypedDict", "UserParcelTemplateWithoutCarrierTemplateCreateRequest", "UserParcelTemplateWithoutCarrierTemplateCreateRequestTypedDict", + "Verification", + "VerificationOption", + "VerificationTypedDict", "Webhook", "WebhookEventTypeEnum", "WebhookPaginatedList", @@ -934,3 +1011,452 @@ "WebhookUpdateRequestTypedDict", "WeightUnitEnum", ] + +_dynamic_imports: dict[str, str] = { + "Address": ".address", + "AddressTypedDict": ".address", + "Latitude": ".address", + "LatitudeTypedDict": ".address", + "Longitude": ".address", + "LongitudeTypedDict": ".address", + "AddressCompleteCreateRequest": ".addresscompletecreaterequest", + "AddressCompleteCreateRequestTypedDict": ".addresscompletecreaterequest", + "AddressCreateRequest": ".addresscreaterequest", + "AddressCreateRequestTypedDict": ".addresscreaterequest", + "AddressImporter": ".addressimporter", + "AddressImporterTypedDict": ".addressimporter", + "AddressPaginatedList": ".addresspaginatedlist", + "AddressPaginatedListTypedDict": ".addresspaginatedlist", + "AddressValidationResults": ".addressvalidationresults", + "AddressValidationResultsTypedDict": ".addressvalidationresults", + "AddressValidationResultsMessage": ".addressvalidationresultsmessage", + "AddressValidationResultsMessageTypedDict": ".addressvalidationresultsmessage", + "AddressValidationResultsMessageCodeEnum": ".addressvalidationresultsmessagecodeenum", + "AddressValidationResultsMessageSourceEnum": ".addressvalidationresultsmessagesourceenum", + "Alcohol": ".alcohol", + "AlcoholTypedDict": ".alcohol", + "RecipientType": ".alcohol", + "Batch": ".batch", + "BatchStatus": ".batch", + "BatchTypedDict": ".batch", + "ObjectResults": ".batch", + "ObjectResultsTypedDict": ".batch", + "BatchCreateRequest": ".batchcreaterequest", + "BatchCreateRequestTypedDict": ".batchcreaterequest", + "BatchShipment": ".batchshipment", + "BatchShipmentStatus": ".batchshipment", + "BatchShipmentTypedDict": ".batchshipment", + "BatchShipmentCreateRequest": ".batchshipmentcreaterequest", + "BatchShipmentCreateRequestTypedDict": ".batchshipmentcreaterequest", + "BatchShipmentPaginatedList": ".batchshipmentpaginatedlist", + "BatchShipmentPaginatedListTypedDict": ".batchshipmentpaginatedlist", + "Billing": ".billing", + "BillingType": ".billing", + "BillingTypedDict": ".billing", + "CarrierAccount": ".carrieraccount", + "CarrierAccountParameters": ".carrieraccount", + "CarrierAccountParametersTypedDict": ".carrieraccount", + "CarrierAccountTypedDict": ".carrieraccount", + "CarrierAccountBase": ".carrieraccountbase", + "CarrierAccountBaseParameters": ".carrieraccountbase", + "CarrierAccountBaseParametersTypedDict": ".carrieraccountbase", + "CarrierAccountBaseTypedDict": ".carrieraccountbase", + "CarrierAccountCanadaPostCreateParameters": ".carrieraccountcanadapostcreateparameters", + "CarrierAccountCanadaPostCreateParametersTypedDict": ".carrieraccountcanadapostcreateparameters", + "CarrierAccountCanadaPostCreateRequest": ".carrieraccountcanadapostcreaterequest", + "CarrierAccountCanadaPostCreateRequestTypedDict": ".carrieraccountcanadapostcreaterequest", + "CarrierAccountChronopostCreateRequest": ".carrieraccountchronopostcreaterequest", + "CarrierAccountChronopostCreateRequestParameters": ".carrieraccountchronopostcreaterequest", + "CarrierAccountChronopostCreateRequestParametersTypedDict": ".carrieraccountchronopostcreaterequest", + "CarrierAccountChronopostCreateRequestTypedDict": ".carrieraccountchronopostcreaterequest", + "CarrierAccountColissimoCreateRequest": ".carrieraccountcolissimocreaterequest", + "CarrierAccountColissimoCreateRequestParameters": ".carrieraccountcolissimocreaterequest", + "CarrierAccountColissimoCreateRequestParametersTypedDict": ".carrieraccountcolissimocreaterequest", + "CarrierAccountColissimoCreateRequestTypedDict": ".carrieraccountcolissimocreaterequest", + "CarrierAccountCorreosCreateRequest": ".carrieraccountcorreoscreaterequest", + "CarrierAccountCorreosCreateRequestParameters": ".carrieraccountcorreoscreaterequest", + "CarrierAccountCorreosCreateRequestParametersTypedDict": ".carrieraccountcorreoscreaterequest", + "CarrierAccountCorreosCreateRequestTypedDict": ".carrieraccountcorreoscreaterequest", + "CarrierAccountDeutschePostCreateRequest": ".carrieraccountdeutschepostcreaterequest", + "CarrierAccountDeutschePostCreateRequestParameters": ".carrieraccountdeutschepostcreaterequest", + "CarrierAccountDeutschePostCreateRequestParametersTypedDict": ".carrieraccountdeutschepostcreaterequest", + "CarrierAccountDeutschePostCreateRequestTypedDict": ".carrieraccountdeutschepostcreaterequest", + "CarrierAccountDHLExpressCreateRequest": ".carrieraccountdhlexpresscreaterequest", + "CarrierAccountDHLExpressCreateRequestTypedDict": ".carrieraccountdhlexpresscreaterequest", + "CarrierAccountDHLExpressCreateRequestParameters": ".carrieraccountdhlexpresscreaterequestparameters", + "CarrierAccountDHLExpressCreateRequestParametersTypedDict": ".carrieraccountdhlexpresscreaterequestparameters", + "CarrierAccountDpdDeCreateRequest": ".carrieraccountdpddecreaterequest", + "CarrierAccountDpdDeCreateRequestParameters": ".carrieraccountdpddecreaterequest", + "CarrierAccountDpdDeCreateRequestParametersTypedDict": ".carrieraccountdpddecreaterequest", + "CarrierAccountDpdDeCreateRequestTypedDict": ".carrieraccountdpddecreaterequest", + "CarrierAccountDPDUKCreateRequest": ".carrieraccountdpdukcreaterequest", + "CarrierAccountDPDUKCreateRequestParameters": ".carrieraccountdpdukcreaterequest", + "CarrierAccountDPDUKCreateRequestParametersTypedDict": ".carrieraccountdpdukcreaterequest", + "CarrierAccountDPDUKCreateRequestTypedDict": ".carrieraccountdpdukcreaterequest", + "CarrierAccountFedExCreateRequest": ".carrieraccountfedexcreaterequest", + "CarrierAccountFedExCreateRequestParameters": ".carrieraccountfedexcreaterequest", + "CarrierAccountFedExCreateRequestParametersTypedDict": ".carrieraccountfedexcreaterequest", + "CarrierAccountFedExCreateRequestTypedDict": ".carrieraccountfedexcreaterequest", + "CarrierAccountHermesUKCreateRequest": ".carrieraccounthermesukcreaterequest", + "CarrierAccountHermesUKCreateRequestParameters": ".carrieraccounthermesukcreaterequest", + "CarrierAccountHermesUKCreateRequestParametersTypedDict": ".carrieraccounthermesukcreaterequest", + "CarrierAccountHermesUKCreateRequestTypedDict": ".carrieraccounthermesukcreaterequest", + "CarrierAccountMondialRelayCreateRequest": ".carrieraccountmondialrelaycreaterequest", + "CarrierAccountMondialRelayCreateRequestParameters": ".carrieraccountmondialrelaycreaterequest", + "CarrierAccountMondialRelayCreateRequestParametersTypedDict": ".carrieraccountmondialrelaycreaterequest", + "CarrierAccountMondialRelayCreateRequestTypedDict": ".carrieraccountmondialrelaycreaterequest", + "CarrierAccountPaginatedList": ".carrieraccountpaginatedlist", + "CarrierAccountPaginatedListTypedDict": ".carrieraccountpaginatedlist", + "CarrierAccountPosteItalianeCreateRequest": ".carrieraccountposteitalianecreaterequest", + "CarrierAccountPosteItalianeCreateRequestParameters": ".carrieraccountposteitalianecreaterequest", + "CarrierAccountPosteItalianeCreateRequestParametersTypedDict": ".carrieraccountposteitalianecreaterequest", + "CarrierAccountPosteItalianeCreateRequestTypedDict": ".carrieraccountposteitalianecreaterequest", + "CarrierAccountRegistrationStatus": ".carrieraccountregistrationstatus", + "CarrierAccountRegistrationStatusTypedDict": ".carrieraccountregistrationstatus", + "CarrierAccountRoyalMailCreateRequest": ".carrieraccountroyalmailcreaterequest", + "CarrierAccountRoyalMailCreateRequestTypedDict": ".carrieraccountroyalmailcreaterequest", + "CarrierAccountRoyalMailCreateRequestParameters": ".carrieraccountroyalmailcreaterequestparameters", + "CarrierAccountRoyalMailCreateRequestParametersTypedDict": ".carrieraccountroyalmailcreaterequestparameters", + "CarrierAccountRoyalMailSfCreateRequest": ".carrieraccountroyalmailsfcreaterequest", + "CarrierAccountRoyalMailSfCreateRequestTypedDict": ".carrieraccountroyalmailsfcreaterequest", + "CarrierAccountRoyalMailSfCreateRequestParameters": ".carrieraccountroyalmailsfcreaterequestparameters", + "CarrierAccountRoyalMailSfCreateRequestParametersTypedDict": ".carrieraccountroyalmailsfcreaterequestparameters", + "CarrierAccountServiceLevel": ".carrieraccountservicelevel", + "CarrierAccountServiceLevelTypedDict": ".carrieraccountservicelevel", + "CarrierAccountUPSCreateRequest": ".carrieraccountupscreaterequest", + "CarrierAccountUPSCreateRequestTypedDict": ".carrieraccountupscreaterequest", + "CarrierAccountUPSCreateRequestParameters": ".carrieraccountupscreaterequestparameters", + "CarrierAccountUPSCreateRequestParametersTypedDict": ".carrieraccountupscreaterequestparameters", + "CarrierAccountUSPSCreateRequest": ".carrieraccountuspscreaterequest", + "CarrierAccountUSPSCreateRequestParameters": ".carrieraccountuspscreaterequest", + "CarrierAccountUSPSCreateRequestParametersTypedDict": ".carrieraccountuspscreaterequest", + "CarrierAccountUSPSCreateRequestTypedDict": ".carrieraccountuspscreaterequest", + "Authentication": ".carrieraccountwithextrainfo", + "AuthenticationTypedDict": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfo": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfoParameters": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfoParametersTypedDict": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfoStatus": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfoType": ".carrieraccountwithextrainfo", + "CarrierAccountWithExtraInfoTypedDict": ".carrieraccountwithextrainfo", + "ObjectInfo": ".carrieraccountwithextrainfo", + "ObjectInfoTypedDict": ".carrieraccountwithextrainfo", + "Policy": ".carrieraccountwithextrainfo", + "Verification": ".carrieraccountwithextrainfo", + "VerificationTypedDict": ".carrieraccountwithextrainfo", + "CarrierParcelTemplate": ".carrierparceltemplate", + "CarrierParcelTemplateTypedDict": ".carrierparceltemplate", + "CarrierParcelTemplateList": ".carrierparceltemplatelist", + "CarrierParcelTemplateListTypedDict": ".carrierparceltemplatelist", + "CarriersEnum": ".carriersenum", + "Cod": ".cod", + "CodTypedDict": ".cod", + "PaymentMethod": ".cod", + "ConnectExistingOwnAccountRequest": ".connectexistingownaccountrequest", + "ConnectExistingOwnAccountRequestParameters": ".connectexistingownaccountrequest", + "ConnectExistingOwnAccountRequestParametersTypedDict": ".connectexistingownaccountrequest", + "ConnectExistingOwnAccountRequestTypedDict": ".connectexistingownaccountrequest", + "CoreRate": ".corerate", + "CoreRateTypedDict": ".corerate", + "CustomerReference": ".customerreference", + "CustomerReferenceTypedDict": ".customerreference", + "CustomsDeclaration": ".customsdeclaration", + "CustomsDeclarationAddress": ".customsdeclaration", + "CustomsDeclarationAddressTypedDict": ".customsdeclaration", + "CustomsDeclarationDutiesPayor": ".customsdeclaration", + "CustomsDeclarationDutiesPayorTypedDict": ".customsdeclaration", + "CustomsDeclarationType": ".customsdeclaration", + "CustomsDeclarationTypedDict": ".customsdeclaration", + "CustomsDeclarationB13AFilingOptionEnum": ".customsdeclarationb13afilingoptionenum", + "CustomsDeclarationContentsTypeEnum": ".customsdeclarationcontentstypeenum", + "CustomsDeclarationCreateRequest": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestAddress": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestAddressTypedDict": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestDutiesPayor": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestDutiesPayorTypedDict": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestType": ".customsdeclarationcreaterequest", + "CustomsDeclarationCreateRequestTypedDict": ".customsdeclarationcreaterequest", + "CustomsDeclarationEelPfcEnum": ".customsdeclarationeelpfcenum", + "CustomsDeclarationIncotermEnum": ".customsdeclarationincotermenum", + "CustomsDeclarationNonDeliveryOptionEnum": ".customsdeclarationnondeliveryoptionenum", + "CustomsDeclarationPaginatedList": ".customsdeclarationpaginatedlist", + "CustomsDeclarationPaginatedListTypedDict": ".customsdeclarationpaginatedlist", + "CustomsExporterIdentification": ".customsexporteridentification", + "CustomsExporterIdentificationTypedDict": ".customsexporteridentification", + "CustomsInvoicedCharges": ".customsinvoicedcharges", + "CustomsInvoicedChargesTypedDict": ".customsinvoicedcharges", + "CustomsItem": ".customsitem", + "CustomsItemTypedDict": ".customsitem", + "CustomsItemCreateRequest": ".customsitemcreaterequest", + "CustomsItemCreateRequestTypedDict": ".customsitemcreaterequest", + "CustomsItemPaginatedList": ".customsitempaginatedlist", + "CustomsItemPaginatedListTypedDict": ".customsitempaginatedlist", + "CustomsTaxIdentification": ".customstaxidentification", + "CustomsTaxIdentificationType": ".customstaxidentification", + "CustomsTaxIdentificationTypedDict": ".customstaxidentification", + "DangerousGoodsBiologicalMaterial": ".dangerousgoodsbiologicalmaterial", + "DangerousGoodsBiologicalMaterialTypedDict": ".dangerousgoodsbiologicalmaterial", + "DangerousGoodsLithiumBatteries": ".dangerousgoodslithiumbatteries", + "DangerousGoodsLithiumBatteriesTypedDict": ".dangerousgoodslithiumbatteries", + "DangerousGoodsObject": ".dangerousgoodsobject", + "DangerousGoodsObjectTypedDict": ".dangerousgoodsobject", + "DefaultParcelTemplate": ".defaultparceltemplate", + "DefaultParcelTemplateTypedDict": ".defaultparceltemplate", + "DefaultParcelTemplateUpdateRequest": ".defaultparceltemplateupdaterequest", + "DefaultParcelTemplateUpdateRequestTypedDict": ".defaultparceltemplateupdaterequest", + "DepartmentNumber": ".departmentnumber", + "DepartmentNumberTypedDict": ".departmentnumber", + "DistanceUnitEnum": ".distanceunitenum", + "DryIce": ".dryice", + "DryIceTypedDict": ".dryice", + "FedExConnectExistingOwnAccountParameters": ".fedexconnectexistingownaccountparameters", + "FedExConnectExistingOwnAccountParametersTypedDict": ".fedexconnectexistingownaccountparameters", + "VerificationOption": ".fedexconnectexistingownaccountparameters", + "InstantTransactionCreateRequest": ".instanttransactioncreaterequest", + "InstantTransactionCreateRequestTypedDict": ".instanttransactioncreaterequest", + "LabelFileType": ".instanttransactioncreaterequest", + "Insurance": ".insurance", + "InsuranceProvider": ".insurance", + "InsuranceTypedDict": ".insurance", + "InvoiceNumber": ".invoicenumber", + "InvoiceNumberTypedDict": ".invoicenumber", + "LabelFileTypeEnum": ".labelfiletypeenum", + "LineItem": ".lineitem", + "LineItemTypedDict": ".lineitem", + "LineItemBase": ".lineitembase", + "LineItemBaseTypedDict": ".lineitembase", + "LiveRate": ".liverate", + "LiveRateTypedDict": ".liverate", + "LiveRateCreateRequest": ".liveratecreaterequest", + "LiveRateCreateRequestAddressFrom": ".liveratecreaterequest", + "LiveRateCreateRequestAddressFromTypedDict": ".liveratecreaterequest", + "LiveRateCreateRequestAddressTo": ".liveratecreaterequest", + "LiveRateCreateRequestAddressToTypedDict": ".liveratecreaterequest", + "LiveRateCreateRequestParcel": ".liveratecreaterequest", + "LiveRateCreateRequestParcelTypedDict": ".liveratecreaterequest", + "LiveRateCreateRequestTypedDict": ".liveratecreaterequest", + "LiveRatePaginatedList": ".liveratepaginatedlist", + "LiveRatePaginatedListTypedDict": ".liveratepaginatedlist", + "BuildingLocationType": ".location", + "BuildingType": ".location", + "Location": ".location", + "LocationTypedDict": ".location", + "Manifest": ".manifest", + "ManifestStatus": ".manifest", + "ManifestTypedDict": ".manifest", + "ManifestCreateRequest": ".manifestcreaterequest", + "ManifestCreateRequestAddressFrom": ".manifestcreaterequest", + "ManifestCreateRequestAddressFromTypedDict": ".manifestcreaterequest", + "ManifestCreateRequestTypedDict": ".manifestcreaterequest", + "ManifestPaginatedList": ".manifestpaginatedlist", + "ManifestPaginatedListTypedDict": ".manifestpaginatedlist", + "ObjectStateEnum": ".objectstateenum", + "Order": ".order", + "OrderTransaction": ".order", + "OrderTransactionTypedDict": ".order", + "OrderTypedDict": ".order", + "OrderCreateRequest": ".ordercreaterequest", + "OrderCreateRequestTypedDict": ".ordercreaterequest", + "OrderPaginatedList": ".orderpaginatedlist", + "OrderPaginatedListTypedDict": ".orderpaginatedlist", + "OrderShopAppEnum": ".ordershopappenum", + "OrderStatusEnum": ".orderstatusenum", + "ObjectState": ".parcel", + "Parcel": ".parcel", + "ParcelTypedDict": ".parcel", + "ParcelCreateFromTemplateRequest": ".parcelcreatefromtemplaterequest", + "ParcelCreateFromTemplateRequestTypedDict": ".parcelcreatefromtemplaterequest", + "ParcelCreateRequest": ".parcelcreaterequest", + "ParcelCreateRequestTypedDict": ".parcelcreaterequest", + "ParcelExtra": ".parcelextra", + "ParcelExtraTypedDict": ".parcelextra", + "ParcelInsurance": ".parcelinsurance", + "ParcelInsuranceProvider": ".parcelinsurance", + "ParcelInsuranceTypedDict": ".parcelinsurance", + "ParcelPaginatedList": ".parcelpaginatedlist", + "ParcelPaginatedListTypedDict": ".parcelpaginatedlist", + "ParcelTemplateAramexAustraliaEnum": ".parceltemplatearamexaustraliaenum", + "ParcelTemplateDHLeCommerceEnum": ".parceltemplatedhlecommerceenum", + "ParcelTemplateDPDUKEnum": ".parceltemplatedpdukenum", + "ParcelTemplateEnumSet": ".parceltemplateenumset", + "ParcelTemplateEnumSetTypedDict": ".parceltemplateenumset", + "ParcelTemplateFedExEnum": ".parceltemplatefedexenum", + "ParcelTemplateUPSEnum": ".parceltemplateupsenum", + "ParcelTemplateUSPSEnum": ".parceltemplateuspsenum", + "Pickup": ".pickup", + "PickupStatus": ".pickup", + "PickupTypedDict": ".pickup", + "PickupBase": ".pickupbase", + "PickupBaseTypedDict": ".pickupbase", + "PoNumber": ".ponumber", + "PoNumberTypedDict": ".ponumber", + "Attribute": ".rate", + "Rate": ".rate", + "RateTypedDict": ".rate", + "RatePaginatedList": ".ratepaginatedlist", + "RatePaginatedListTypedDict": ".ratepaginatedlist", + "Refund": ".refund", + "RefundStatus": ".refund", + "RefundTypedDict": ".refund", + "RefundPaginatedList": ".refundpaginatedlist", + "RefundPaginatedListTypedDict": ".refundpaginatedlist", + "RefundRequestBody": ".refundrequestbody", + "RefundRequestBodyTypedDict": ".refundrequestbody", + "ResponseMessage": ".responsemessage", + "ResponseMessageTypedDict": ".responsemessage", + "RmaNumber": ".rmanumber", + "RmaNumberTypedDict": ".rmanumber", + "Security": ".security", + "SecurityTypedDict": ".security", + "ServiceGroup": ".servicegroup", + "ServiceGroupTypedDict": ".servicegroup", + "ServiceGroupAccountAndServiceLevel": ".servicegroupaccountandservicelevel", + "ServiceGroupAccountAndServiceLevelTypedDict": ".servicegroupaccountandservicelevel", + "ServiceGroupCreateRequest": ".servicegroupcreaterequest", + "ServiceGroupCreateRequestTypedDict": ".servicegroupcreaterequest", + "ServiceGroupTypeEnum": ".servicegrouptypeenum", + "ServiceGroupUpdateRequest": ".servicegroupupdaterequest", + "ServiceGroupUpdateRequestTypedDict": ".servicegroupupdaterequest", + "ServiceLevel": ".servicelevel", + "ServiceLevelTypedDict": ".servicelevel", + "ServiceLevelAirterraEnum": ".servicelevelairterraenum", + "ServiceLevelAPCPostalEnum": ".servicelevelapcpostalenum", + "ServiceLevelAPGEnum": ".servicelevelapgenum", + "ServiceLevelAramexAustraliaEnum": ".servicelevelaramexaustraliaenum", + "ServiceLevelAsendiaEnum": ".servicelevelasendiaenum", + "ServiceLevelAustraliaPostEnum": ".servicelevelaustraliapostenum", + "ServiceLevelBetterTrucksEnum": ".servicelevelbettertrucksenum", + "ServiceLevelCanadaPostEnum": ".servicelevelcanadapostenum", + "ServiceLevelCDLEnum": ".servicelevelcdlenum", + "ServiceLevelChronopostEnum": ".servicelevelchronopostenum", + "ServiceLevelColissimoEnum": ".servicelevelcolissimoenum", + "ServiceLevelCorreosEspanaEnum": ".servicelevelcorreosespanaenum", + "ServiceLevelDeutschePostEnum": ".serviceleveldeutschepostenum", + "ServiceLevelDHLeCommerceEnum": ".serviceleveldhlecommerceenum", + "ServiceLevelDHLExpressEnum": ".serviceleveldhlexpressenum", + "ServiceLevelDHLGermanyEnum": ".serviceleveldhlgermanyenum", + "ServiceLevelDPDDEEnum": ".serviceleveldpddeenum", + "ServiceLevelDPDUKEnum": ".serviceleveldpdukenum", + "ServiceLevelEnumSet": ".servicelevelenumset", + "ServiceLevelEnumSetTypedDict": ".servicelevelenumset", + "ServiceLevelePostGlobalEnum": ".servicelevelepostglobalenum", + "ServiceLevelEvriUKEnum": ".servicelevelevriukenum", + "ServiceLevelFedExEnum": ".servicelevelfedexenum", + "ServiceLevelGlobegisticsEnum": ".servicelevelglobegisticsenum", + "ServiceLevelGLSUSEnum": ".servicelevelglsusenum", + "ServiceLevelJitsuEnum": ".serviceleveljitsuenum", + "ServiceLevelLasershipEnum": ".servicelevellasershipenum", + "ServiceLevelLSOEnum": ".servicelevellsoenum", + "ServiceLevelMondialRelayEnum": ".servicelevelmondialrelayenum", + "ServiceLevelOnTracEnum": ".servicelevelontracenum", + "ServiceLevelParcelforceEnum": ".servicelevelparcelforceenum", + "ServiceLevelPostItalianeEnum": ".servicelevelpostitalianeenum", + "ServiceLevelPurolatorEnum": ".servicelevelpurolatorenum", + "ServiceLevelRoyalMailEnum": ".servicelevelroyalmailenum", + "ServiceLevelRoyalMailSFEnum": ".servicelevelroyalmailsfenum", + "ServiceLevelSwyftEnum": ".servicelevelswyftenum", + "ServiceLevelUDSEnum": ".serviceleveludsenum", + "ServiceLevelUPSEnum": ".servicelevelupsenum", + "ServiceLevelUSPSEnum": ".serviceleveluspsenum", + "ServiceLevelVehoEnum": ".servicelevelvehoenum", + "ServiceLevelWithParent": ".servicelevelwithparent", + "ServiceLevelWithParentTypedDict": ".servicelevelwithparent", + "Shipment": ".shipment", + "ShipmentStatus": ".shipment", + "ShipmentTypedDict": ".shipment", + "AddressReturn": ".shipmentcreaterequest", + "AddressReturnTypedDict": ".shipmentcreaterequest", + "CustomsDeclarationUnion": ".shipmentcreaterequest", + "CustomsDeclarationUnionTypedDict": ".shipmentcreaterequest", + "ShipmentCreateRequest": ".shipmentcreaterequest", + "ShipmentCreateRequestAddressFrom": ".shipmentcreaterequest", + "ShipmentCreateRequestAddressFromTypedDict": ".shipmentcreaterequest", + "ShipmentCreateRequestAddressTo": ".shipmentcreaterequest", + "ShipmentCreateRequestAddressToTypedDict": ".shipmentcreaterequest", + "ShipmentCreateRequestParcel": ".shipmentcreaterequest", + "ShipmentCreateRequestParcelTypedDict": ".shipmentcreaterequest", + "ShipmentCreateRequestTypedDict": ".shipmentcreaterequest", + "AncillaryEndorsement": ".shipmentextra", + "DangerousGoodsCode": ".shipmentextra", + "PreferredDeliveryTimeframe": ".shipmentextra", + "ReturnServiceType": ".shipmentextra", + "ReturnServiceTypeTypedDict": ".shipmentextra", + "ShipmentExtra": ".shipmentextra", + "ShipmentExtraTypedDict": ".shipmentextra", + "SignatureConfirmation": ".shipmentextra", + "ShipmentExtraLasershipAttributesEnum": ".shipmentextralasershipattributesenum", + "ShipmentExtraReturnServiceTypeLasershipEnum": ".shipmentextrareturnservicetypelasershipenum", + "ShipmentExtraReturnServiceTypeUPSEnum": ".shipmentextrareturnservicetypeupsenum", + "ShipmentPaginatedList": ".shipmentpaginatedlist", + "ShipmentPaginatedListTypedDict": ".shipmentpaginatedlist", + "ShippoAccount": ".shippoaccount", + "ShippoAccountTypedDict": ".shippoaccount", + "ShippoAccountPaginatedList": ".shippoaccountpaginatedlist", + "ShippoAccountPaginatedListTypedDict": ".shippoaccountpaginatedlist", + "ShippoAccountUpdateRequest": ".shippoaccountupdaterequest", + "ShippoAccountUpdateRequestTypedDict": ".shippoaccountupdaterequest", + "Track": ".track", + "TrackTypedDict": ".track", + "TrackingStatus": ".trackingstatus", + "TrackingStatusTypedDict": ".trackingstatus", + "TrackingStatusEnum": ".trackingstatusenum", + "TrackingStatusLocationBase": ".trackingstatuslocationbase", + "TrackingStatusLocationBaseTypedDict": ".trackingstatuslocationbase", + "TrackingStatusSubstatus": ".trackingstatussubstatus", + "TrackingStatusSubstatusTypedDict": ".trackingstatussubstatus", + "TracksRequest": ".tracksrequest", + "TracksRequestTypedDict": ".tracksrequest", + "CreatedBy": ".transaction", + "CreatedByTypedDict": ".transaction", + "RateUnion": ".transaction", + "RateUnionTypedDict": ".transaction", + "Transaction": ".transaction", + "TransactionTypedDict": ".transaction", + "TransactionCreateRequest": ".transactioncreaterequest", + "TransactionCreateRequestTypedDict": ".transactioncreaterequest", + "TransactionPaginatedList": ".transactionpaginatedlist", + "TransactionPaginatedListTypedDict": ".transactionpaginatedlist", + "TransactionStatusEnum": ".transactionstatusenum", + "UPSConnectExistingOwnAccountParameters": ".upsconnectexistingownaccountparameters", + "UPSConnectExistingOwnAccountParametersTypedDict": ".upsconnectexistingownaccountparameters", + "UPSReferenceFields": ".upsreferencefields", + "UPSReferenceFieldsTypedDict": ".upsreferencefields", + "UserParcelTemplate": ".userparceltemplate", + "UserParcelTemplateTypedDict": ".userparceltemplate", + "UserParcelTemplateCreateRequest": ".userparceltemplatecreaterequest", + "UserParcelTemplateCreateRequestTypedDict": ".userparceltemplatecreaterequest", + "UserParcelTemplateList": ".userparceltemplatelist", + "UserParcelTemplateListTypedDict": ".userparceltemplatelist", + "UserParcelTemplateUpdateRequest": ".userparceltemplateupdaterequest", + "UserParcelTemplateUpdateRequestTypedDict": ".userparceltemplateupdaterequest", + "UserParcelTemplateWithCarrierTemplateCreateRequest": ".userparceltemplatewithcarriertemplatecreaterequest", + "UserParcelTemplateWithCarrierTemplateCreateRequestTypedDict": ".userparceltemplatewithcarriertemplatecreaterequest", + "UserParcelTemplateWithoutCarrierTemplateCreateRequest": ".userparceltemplatewithoutcarriertemplatecreaterequest", + "UserParcelTemplateWithoutCarrierTemplateCreateRequestTypedDict": ".userparceltemplatewithoutcarriertemplatecreaterequest", + "Webhook": ".webhook", + "WebhookTypedDict": ".webhook", + "WebhookEventTypeEnum": ".webhookeventtypeenum", + "WebhookPaginatedList": ".webhookpaginatedlist", + "WebhookPaginatedListTypedDict": ".webhookpaginatedlist", + "WebhookPayload": ".webhookpayload", + "WebhookPayloadTypedDict": ".webhookpayload", + "WebhookPayloadBatch": ".webhookpayloadbatch", + "WebhookPayloadBatchTypedDict": ".webhookpayloadbatch", + "WebhookPayloadTrack": ".webhookpayloadtrack", + "WebhookPayloadTrackTypedDict": ".webhookpayloadtrack", + "WebhookPayloadTransaction": ".webhookpayloadtransaction", + "WebhookPayloadTransactionTypedDict": ".webhookpayloadtransaction", + "WebhookUpdateRequest": ".webhookupdaterequest", + "WebhookUpdateRequestTypedDict": ".webhookupdaterequest", + "WeightUnitEnum": ".weightunitenum", +} + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) + + +def __dir__(): + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/shippo/models/components/address.py b/src/shippo/models/components/address.py index a8ad23d1..446856e5 100644 --- a/src/shippo/models/components/address.py +++ b/src/shippo/models/components/address.py @@ -6,28 +6,33 @@ AddressValidationResultsTypedDict, ) from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict LatitudeTypedDict = TypeAliasType("LatitudeTypedDict", Union[float, str]) +r"""Latitude of address""" Latitude = TypeAliasType("Latitude", Union[float, str]) +r"""Latitude of address""" LongitudeTypedDict = TypeAliasType("LongitudeTypedDict", Union[float, str]) +r"""Longitude of address""" Longitude = TypeAliasType("Longitude", Union[float, str]) +r"""Longitude of address""" class AddressTypedDict(TypedDict): r"""Address represents the address as retrieved from the database""" country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. @@ -35,18 +40,45 @@ class AddressTypedDict(TypedDict): name: NotRequired[str] r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ company: NotRequired[str] - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street1: NotRequired[str] r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street2: NotRequired[str] - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: NotRequired[str] - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: NotRequired[str] r"""Street number of the addressed building. @@ -57,24 +89,50 @@ class AddressTypedDict(TypedDict): Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: NotRequired[str] r"""**required for purchase for some countries**
State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: NotRequired[str] r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ phone: NotRequired[str] r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: NotRequired[str] - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: NotRequired[bool] metadata: NotRequired[str] r"""A string of up to 100 characters that can be filled with any additional information you want @@ -114,7 +172,7 @@ class Address(BaseModel): r"""Address represents the address as retrieved from the database""" country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. @@ -123,22 +181,49 @@ class Address(BaseModel): name: Optional[str] = None r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ company: Optional[str] = None - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street1: Optional[str] = None r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street2: Optional[str] = None - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: Optional[str] = None - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: Optional[str] = None @@ -151,6 +236,11 @@ class Address(BaseModel): Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: Optional[str] = None @@ -158,21 +248,42 @@ class Address(BaseModel): State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: Optional[str] = None r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ phone: Optional[str] = None r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: Optional[str] = None - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: Optional[bool] = None @@ -217,3 +328,44 @@ class Address(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "company", + "street1", + "street2", + "street3", + "street_no", + "city", + "state", + "zip", + "phone", + "email", + "is_residential", + "metadata", + "is_complete", + "latitude", + "longitude", + "object_created", + "object_id", + "object_owner", + "object_updated", + "validation_results", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/addresscompletecreaterequest.py b/src/shippo/models/components/addresscompletecreaterequest.py index a154db47..81c9d267 100644 --- a/src/shippo/models/components/addresscompletecreaterequest.py +++ b/src/shippo/models/components/addresscompletecreaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -13,41 +14,83 @@ class AddressCompleteCreateRequestTypedDict(TypedDict): name: str r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ street1: str r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ city: str r"""**required for purchase**
Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: str r"""**required for purchase for some countries**
State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: str r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. """ company: NotRequired[str] - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street2: NotRequired[str] - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: NotRequired[str] - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: NotRequired[str] r"""Street number of the addressed building. @@ -56,9 +99,20 @@ class AddressCompleteCreateRequestTypedDict(TypedDict): phone: NotRequired[str] r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: NotRequired[str] - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: NotRequired[bool] metadata: NotRequired[str] r"""A string of up to 100 characters that can be filled with any additional information you want @@ -73,11 +127,21 @@ class AddressCompleteCreateRequest(BaseModel): name: str r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ street1: str r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ city: str @@ -85,6 +149,11 @@ class AddressCompleteCreateRequest(BaseModel): Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: str @@ -92,30 +161,57 @@ class AddressCompleteCreateRequest(BaseModel): State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: str r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. """ company: Optional[str] = None - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street2: Optional[str] = None - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: Optional[str] = None - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: Optional[str] = None @@ -126,10 +222,21 @@ class AddressCompleteCreateRequest(BaseModel): phone: Optional[str] = None r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: Optional[str] = None - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: Optional[bool] = None @@ -139,3 +246,37 @@ class AddressCompleteCreateRequest(BaseModel): """ validate_: Annotated[Optional[bool], pydantic.Field(alias="validate")] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "company", + "street2", + "street3", + "street_no", + "phone", + "email", + "is_residential", + "metadata", + "validate", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + AddressCompleteCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/addresscreaterequest.py b/src/shippo/models/components/addresscreaterequest.py index d5588ad7..11112a87 100644 --- a/src/shippo/models/components/addresscreaterequest.py +++ b/src/shippo/models/components/addresscreaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -11,7 +12,7 @@ class AddressCreateRequestTypedDict(TypedDict): r"""Address represents the address as retrieved from the database""" country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. @@ -19,18 +20,45 @@ class AddressCreateRequestTypedDict(TypedDict): name: NotRequired[str] r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ company: NotRequired[str] - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street1: NotRequired[str] r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street2: NotRequired[str] - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: NotRequired[str] - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: NotRequired[str] r"""Street number of the addressed building. @@ -41,24 +69,50 @@ class AddressCreateRequestTypedDict(TypedDict): Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: NotRequired[str] r"""**required for purchase for some countries**
State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: NotRequired[str] r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ phone: NotRequired[str] r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: NotRequired[str] - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: NotRequired[bool] metadata: NotRequired[str] r"""A string of up to 100 characters that can be filled with any additional information you want @@ -72,7 +126,7 @@ class AddressCreateRequest(BaseModel): r"""Address represents the address as retrieved from the database""" country: str - r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend using country codes like `US` or `DE`. + r"""ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we recommend using country codes like `US` or `DE`. If using country names, please ensure they are spelled correctly and in English. Country names are converted to country codes. Refer to this guide for a list of country codes. Sending a country is always required. @@ -81,22 +135,49 @@ class AddressCreateRequest(BaseModel): name: Optional[str] = None r"""**required for purchase**
First and Last Name of the addressee + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Either company or name required; No length validation (first 35 chars printed on label) | """ company: Optional[str] = None - r"""Company Name""" + r"""Company Name + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 35 characters; Either company or name required | + """ street1: Optional[str] = None r"""**required for purchase**
- First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). + First street line. Usually street number and street name (except for DHL Germany, see street_no). + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street2: Optional[str] = None - r"""Second street line, 35 character limit.""" + r"""Second street line. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | + """ street3: Optional[str] = None - r"""Third street line, 35 character limit. + r"""Third street line. Only accepted for USPS international shipments, UPS domestic and UPS international shipments. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | At least one street line required; Max 35 characters per line | """ street_no: Optional[str] = None @@ -109,6 +190,11 @@ class AddressCreateRequest(BaseModel): Name of a city. When creating a Quote Address, sending a city is optional but will yield more accurate Rates. Please bear in mind that city names may be ambiguous (there are 34 Springfields in the US). Pass in a state or a ZIP code (see below), if known, it will yield more accurate results. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Max 35 characters | """ state: Optional[str] = None @@ -116,21 +202,42 @@ class AddressCreateRequest(BaseModel): State/Province values are required for shipments from/to the US, AU, and CA. UPS requires province for some countries (i.e Ireland). To receive more accurate quotes, passing this field is recommended. Most carriers only accept two or three character state abbreviations. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required if country requires state; Max 2 characters for US, CA, PR | """ zip: Optional[str] = None r"""**required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 10 characters | """ phone: Optional[str] = None r"""Addresses containing a phone number allow carriers to call the recipient when delivering the Parcel. This increases the probability of delivery and helps to avoid accessorial charges after a Parcel has been shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Required; Min 1, max 15 characters | """ email: Optional[str] = None - r"""E-mail address of the contact person, RFC3696/5321-compliant.""" + r"""E-mail address of the contact person, RFC3696/5321-compliant. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 80 characters | + """ is_residential: Optional[bool] = None @@ -141,3 +248,42 @@ class AddressCreateRequest(BaseModel): validate_: Annotated[Optional[bool], pydantic.Field(alias="validate")] = None r"""Set to true to validate Address object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "company", + "street1", + "street2", + "street3", + "street_no", + "city", + "state", + "zip", + "phone", + "email", + "is_residential", + "metadata", + "validate", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + AddressCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/addressimporter.py b/src/shippo/models/components/addressimporter.py index dbeb5cac..40f5ee7e 100644 --- a/src/shippo/models/components/addressimporter.py +++ b/src/shippo/models/components/addressimporter.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -104,3 +105,35 @@ class AddressImporter(BaseModel): is_residential: Optional[bool] = None r"""Indicates whether the address provided is a residential address or not.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "company", + "street1", + "street2", + "street3", + "street_no", + "city", + "state", + "zip", + "country", + "phone", + "email", + "is_residential", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/addresspaginatedlist.py b/src/shippo/models/components/addresspaginatedlist.py index c984823e..e51c6d73 100644 --- a/src/shippo/models/components/addresspaginatedlist.py +++ b/src/shippo/models/components/addresspaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .address import Address, AddressTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class AddressPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Address]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/addressvalidationresults.py b/src/shippo/models/components/addressvalidationresults.py index 4a19797a..458b230f 100644 --- a/src/shippo/models/components/addressvalidationresults.py +++ b/src/shippo/models/components/addressvalidationresults.py @@ -5,7 +5,8 @@ AddressValidationResultsMessage, AddressValidationResultsMessageTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -27,3 +28,19 @@ class AddressValidationResults(BaseModel): is_valid: Optional[bool] = None messages: Optional[List[AddressValidationResultsMessage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_valid", "messages"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/addressvalidationresultsmessage.py b/src/shippo/models/components/addressvalidationresultsmessage.py index ba50e314..205b46d3 100644 --- a/src/shippo/models/components/addressvalidationresultsmessage.py +++ b/src/shippo/models/components/addressvalidationresultsmessage.py @@ -1,27 +1,44 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict class AddressValidationResultsMessageTypedDict(TypedDict): code: NotRequired[str] - r"""See Address Validation Codes""" + r"""See Address Validation Codes""" source: NotRequired[str] - r"""See Address Validation Source""" + r"""See Address Validation Source""" text: NotRequired[str] type: NotRequired[str] class AddressValidationResultsMessage(BaseModel): code: Optional[str] = None - r"""See Address Validation Codes""" + r"""See Address Validation Codes""" source: Optional[str] = None - r"""See Address Validation Source""" + r"""See Address Validation Source""" text: Optional[str] = None type: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["code", "source", "text", "type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/alcohol.py b/src/shippo/models/components/alcohol.py index 0f26f301..b591dadc 100644 --- a/src/shippo/models/components/alcohol.py +++ b/src/shippo/models/components/alcohol.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -31,3 +32,19 @@ class Alcohol(BaseModel): recipient_type: Optional[RecipientType] = None r"""Mandatory for Fedex only. License type of the recipient of the Alcohol Package.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contains_alcohol", "recipient_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/batch.py b/src/shippo/models/components/batch.py index 427e9e59..59904e3b 100644 --- a/src/shippo/models/components/batch.py +++ b/src/shippo/models/components/batch.py @@ -7,7 +7,8 @@ ) from .labelfiletypeenum import LabelFileTypeEnum from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -57,7 +58,7 @@ class BatchTypedDict(TypedDict): default_servicelevel_token: str r"""Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the - corresponding BatchShipment object. Servicelevel tokens can be found here. + corresponding BatchShipment object. Servicelevel tokens can be found here. """ batch_shipments: BatchShipmentPaginatedListTypedDict label_url: List[str] @@ -67,7 +68,7 @@ class BatchTypedDict(TypedDict): object_id: str r"""Unique identifier of the given Batch object""" object_owner: str - r"""Username of the user who created the Address object.""" + r"""Username of the user who created the Batch object.""" object_results: ObjectResultsTypedDict r"""An object containing the following counts:
`creation_succeeded`
`creation_failed`
`purchase_succeeded`
`purchase_failed`""" object_updated: str @@ -98,7 +99,7 @@ class Batch(BaseModel): default_servicelevel_token: str r"""Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the - corresponding BatchShipment object. Servicelevel tokens can be found here. + corresponding BatchShipment object. Servicelevel tokens can be found here. """ batch_shipments: BatchShipmentPaginatedList @@ -113,7 +114,7 @@ class Batch(BaseModel): r"""Unique identifier of the given Batch object""" object_owner: str - r"""Username of the user who created the Address object.""" + r"""Username of the user who created the Batch object.""" object_results: ObjectResults r"""An object containing the following counts:
`creation_succeeded`
`creation_failed`
`purchase_succeeded`
`purchase_failed`""" @@ -138,3 +139,19 @@ class Batch(BaseModel): r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object.""" test: Optional[bool] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["label_filetype", "metadata", "test"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/batchcreaterequest.py b/src/shippo/models/components/batchcreaterequest.py index 075033d1..c0aa689d 100644 --- a/src/shippo/models/components/batchcreaterequest.py +++ b/src/shippo/models/components/batchcreaterequest.py @@ -6,7 +6,8 @@ BatchShipmentCreateRequestTypedDict, ) from .labelfiletypeenum import LabelFileTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -20,7 +21,7 @@ class BatchCreateRequestTypedDict(TypedDict): default_servicelevel_token: str r"""Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the - corresponding BatchShipment object. Servicelevel tokens can be found here. + corresponding BatchShipment object. Servicelevel tokens can be found here. """ batch_shipments: List[BatchShipmentCreateRequestTypedDict] r"""Array of BatchShipment objects. The response keeps the same order as in the request array.""" @@ -42,7 +43,7 @@ class BatchCreateRequest(BaseModel): default_servicelevel_token: str r"""Token of the service level to use as the default for all shipments in this Batch. The servicelevel can be changed on a per-shipment basis by changing the servicelevel_token in the - corresponding BatchShipment object. Servicelevel tokens can be found here. + corresponding BatchShipment object. Servicelevel tokens can be found here. """ batch_shipments: List[BatchShipmentCreateRequest] @@ -55,3 +56,19 @@ class BatchCreateRequest(BaseModel): metadata: Optional[str] = None r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["label_filetype", "metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/batchshipment.py b/src/shippo/models/components/batchshipment.py index b1fee9dd..498dbe8c 100644 --- a/src/shippo/models/components/batchshipment.py +++ b/src/shippo/models/components/batchshipment.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Any, List, Optional from typing_extensions import NotRequired, TypedDict @@ -21,6 +22,13 @@ class BatchShipmentStatus(str, Enum): class BatchShipmentTypedDict(TypedDict): + r"""The batch shipment object is a wrapper around a shipment object, which include shipment-specific information + for batch processing. + + Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through + the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint + """ + object_id: str r"""Object ID of this batch shipment. Can be used in the remove_shipments endpoint.""" shipment: str @@ -39,8 +47,8 @@ class BatchShipmentTypedDict(TypedDict): """ servicelevel_token: NotRequired[str] r"""A token that sets the shipping method for the batch, overriding the batch default. - Servicelevel tokens can be found in this list - or at this endpoint. + Servicelevel tokens can be found in this list + or at this endpoint. """ messages: NotRequired[List[Any]] r"""List of Shipment and Transaction error messages.""" @@ -49,6 +57,13 @@ class BatchShipmentTypedDict(TypedDict): class BatchShipment(BaseModel): + r"""The batch shipment object is a wrapper around a shipment object, which include shipment-specific information + for batch processing. + + Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through + the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint + """ + object_id: str r"""Object ID of this batch shipment. Can be used in the remove_shipments endpoint.""" @@ -72,8 +87,8 @@ class BatchShipment(BaseModel): servicelevel_token: Optional[str] = None r"""A token that sets the shipping method for the batch, overriding the batch default. - Servicelevel tokens can be found in this list - or at this endpoint. + Servicelevel tokens can be found in this list + or at this endpoint. """ messages: Optional[List[Any]] = None @@ -81,3 +96,27 @@ class BatchShipment(BaseModel): transaction: Optional[str] = None r"""Object ID of the transaction object created for this batch shipment.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "carrier_account", + "metadata", + "servicelevel_token", + "messages", + "transaction", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/batchshipmentcreaterequest.py b/src/shippo/models/components/batchshipmentcreaterequest.py index 0b4a7a7d..3332c3c2 100644 --- a/src/shippo/models/components/batchshipmentcreaterequest.py +++ b/src/shippo/models/components/batchshipmentcreaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations from .shipmentcreaterequest import ShipmentCreateRequest, ShipmentCreateRequestTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -17,8 +18,8 @@ class BatchShipmentCreateRequestTypedDict(TypedDict): """ servicelevel_token: NotRequired[str] r"""A token that sets the shipping method for the batch, overriding the batch default. - Servicelevel tokens can be found in this list - or at this endpoint. + Servicelevel tokens can be found in this list + or at this endpoint. """ @@ -35,6 +36,22 @@ class BatchShipmentCreateRequest(BaseModel): servicelevel_token: Optional[str] = None r"""A token that sets the shipping method for the batch, overriding the batch default. - Servicelevel tokens can be found in this list - or at this endpoint. + Servicelevel tokens can be found in this list + or at this endpoint. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["carrier_account", "metadata", "servicelevel_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/batchshipmentpaginatedlist.py b/src/shippo/models/components/batchshipmentpaginatedlist.py index d4f53906..847a8ba8 100644 --- a/src/shippo/models/components/batchshipmentpaginatedlist.py +++ b/src/shippo/models/components/batchshipmentpaginatedlist.py @@ -2,13 +2,14 @@ from __future__ import annotations from .batchshipment import BatchShipment, BatchShipmentTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict class BatchShipmentPaginatedListTypedDict(TypedDict): - r"""Array of BatchShipment objects. + r"""Array of BatchShipment objects. The response keeps the same order as in the request array. """ @@ -18,7 +19,7 @@ class BatchShipmentPaginatedListTypedDict(TypedDict): class BatchShipmentPaginatedList(BaseModel): - r"""Array of BatchShipment objects. + r"""Array of BatchShipment objects. The response keeps the same order as in the request array. """ @@ -27,3 +28,19 @@ class BatchShipmentPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[BatchShipment]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/billing.py b/src/shippo/models/components/billing.py index 893ad687..b771da77 100644 --- a/src/shippo/models/components/billing.py +++ b/src/shippo/models/components/billing.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -49,3 +50,21 @@ class Billing(BaseModel): zip: Optional[str] = None r"""ZIP code of account number to be billed (required for UPS if there is a zip on the billing account).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["account", "country", "participation_code", "type", "zip"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccount.py b/src/shippo/models/components/carrieraccount.py index 39cba4f6..98c470cc 100644 --- a/src/shippo/models/components/carrieraccount.py +++ b/src/shippo/models/components/carrieraccount.py @@ -13,7 +13,8 @@ UPSConnectExistingOwnAccountParameters, UPSConnectExistingOwnAccountParametersTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -45,7 +46,7 @@ class CarrierAccountTypedDict(TypedDict): To protect account information, this field will be masked in any API response. """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ active: NotRequired[bool] @@ -54,7 +55,7 @@ class CarrierAccountTypedDict(TypedDict): """ parameters: NotRequired[CarrierAccountParametersTypedDict] carrier_name: NotRequired[Any] - r"""Carrier name, see Carriers
""" + r"""Carrier name, see Carriers
""" is_shippo_account: NotRequired[bool] metadata: NotRequired[str] object_id: NotRequired[str] @@ -74,7 +75,7 @@ class CarrierAccount(BaseModel): """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ @@ -86,7 +87,7 @@ class CarrierAccount(BaseModel): parameters: Optional[CarrierAccountParameters] = None carrier_name: Optional[Any] = None - r"""Carrier name, see Carriers
""" + r"""Carrier name, see Carriers
""" is_shippo_account: Optional[bool] = None @@ -102,3 +103,31 @@ class CarrierAccount(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "active", + "parameters", + "carrier_name", + "is_shippo_account", + "metadata", + "object_id", + "object_owner", + "service_levels", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountbase.py b/src/shippo/models/components/carrieraccountbase.py index 1c7412f8..b86bb1b3 100644 --- a/src/shippo/models/components/carrieraccountbase.py +++ b/src/shippo/models/components/carrieraccountbase.py @@ -9,7 +9,8 @@ UPSConnectExistingOwnAccountParameters, UPSConnectExistingOwnAccountParametersTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -41,7 +42,7 @@ class CarrierAccountBaseTypedDict(TypedDict): To protect account information, this field will be masked in any API response. """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ active: NotRequired[bool] @@ -59,7 +60,7 @@ class CarrierAccountBase(BaseModel): """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ @@ -69,3 +70,19 @@ class CarrierAccountBase(BaseModel): """ parameters: Optional[CarrierAccountBaseParameters] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["active", "parameters"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountcanadapostcreaterequest.py b/src/shippo/models/components/carrieraccountcanadapostcreaterequest.py index 17e78e76..e8a81754 100644 --- a/src/shippo/models/components/carrieraccountcanadapostcreaterequest.py +++ b/src/shippo/models/components/carrieraccountcanadapostcreaterequest.py @@ -27,3 +27,9 @@ class CarrierAccountCanadaPostCreateRequest(BaseModel): ], pydantic.Field(alias="carrier"), ] = "canada_post" + + +try: + CarrierAccountCanadaPostCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountchronopostcreaterequest.py b/src/shippo/models/components/carrieraccountchronopostcreaterequest.py index 700fc9d3..c33985ef 100644 --- a/src/shippo/models/components/carrieraccountchronopostcreaterequest.py +++ b/src/shippo/models/components/carrieraccountchronopostcreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountChronopostCreateRequest(BaseModel): Annotated[Literal["chronopost"], AfterValidator(validate_const("chronopost"))], pydantic.Field(alias="carrier"), ] = "chronopost" + + +try: + CarrierAccountChronopostCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountcolissimocreaterequest.py b/src/shippo/models/components/carrieraccountcolissimocreaterequest.py index 1b3f48a9..d7f9d942 100644 --- a/src/shippo/models/components/carrieraccountcolissimocreaterequest.py +++ b/src/shippo/models/components/carrieraccountcolissimocreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountColissimoCreateRequest(BaseModel): Annotated[Literal["colissimo"], AfterValidator(validate_const("colissimo"))], pydantic.Field(alias="carrier"), ] = "colissimo" + + +try: + CarrierAccountColissimoCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountcorreoscreaterequest.py b/src/shippo/models/components/carrieraccountcorreoscreaterequest.py index f1e91d08..cd5f649a 100644 --- a/src/shippo/models/components/carrieraccountcorreoscreaterequest.py +++ b/src/shippo/models/components/carrieraccountcorreoscreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountCorreosCreateRequest(BaseModel): Annotated[Literal["correos"], AfterValidator(validate_const("correos"))], pydantic.Field(alias="carrier"), ] = "correos" + + +try: + CarrierAccountCorreosCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py b/src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py index cab1d6b8..244c6a97 100644 --- a/src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py +++ b/src/shippo/models/components/carrieraccountdeutschepostcreaterequest.py @@ -31,3 +31,9 @@ class CarrierAccountDeutschePostCreateRequest(BaseModel): ], pydantic.Field(alias="carrier"), ] = "deutsche_post" + + +try: + CarrierAccountDeutschePostCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py b/src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py index ae846faf..f4c7fc9e 100644 --- a/src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py +++ b/src/shippo/models/components/carrieraccountdhlexpresscreaterequest.py @@ -27,3 +27,9 @@ class CarrierAccountDHLExpressCreateRequest(BaseModel): ], pydantic.Field(alias="carrier"), ] = "dhl_express" + + +try: + CarrierAccountDHLExpressCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountdpddecreaterequest.py b/src/shippo/models/components/carrieraccountdpddecreaterequest.py index d68745ea..de2c5d7b 100644 --- a/src/shippo/models/components/carrieraccountdpddecreaterequest.py +++ b/src/shippo/models/components/carrieraccountdpddecreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountDpdDeCreateRequest(BaseModel): Annotated[Literal["dpd_de"], AfterValidator(validate_const("dpd_de"))], pydantic.Field(alias="carrier"), ] = "dpd_de" + + +try: + CarrierAccountDpdDeCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountdpdukcreaterequest.py b/src/shippo/models/components/carrieraccountdpdukcreaterequest.py index 18ef2b87..d6388596 100644 --- a/src/shippo/models/components/carrieraccountdpdukcreaterequest.py +++ b/src/shippo/models/components/carrieraccountdpdukcreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountDPDUKCreateRequest(BaseModel): Annotated[Literal["dpd_uk"], AfterValidator(validate_const("dpd_uk"))], pydantic.Field(alias="carrier"), ] = "dpd_uk" + + +try: + CarrierAccountDPDUKCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountfedexcreaterequest.py b/src/shippo/models/components/carrieraccountfedexcreaterequest.py index d70bb141..1f404290 100644 --- a/src/shippo/models/components/carrieraccountfedexcreaterequest.py +++ b/src/shippo/models/components/carrieraccountfedexcreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountFedExCreateRequest(BaseModel): Annotated[Literal["fedex"], AfterValidator(validate_const("fedex"))], pydantic.Field(alias="carrier"), ] = "fedex" + + +try: + CarrierAccountFedExCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccounthermesukcreaterequest.py b/src/shippo/models/components/carrieraccounthermesukcreaterequest.py index 55d10bcc..30fd0fbd 100644 --- a/src/shippo/models/components/carrieraccounthermesukcreaterequest.py +++ b/src/shippo/models/components/carrieraccounthermesukcreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountHermesUKCreateRequest(BaseModel): Annotated[Literal["hermes_uk"], AfterValidator(validate_const("hermes_uk"))], pydantic.Field(alias="carrier"), ] = "hermes_uk" + + +try: + CarrierAccountHermesUKCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py b/src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py index 49aa4d77..800dabfa 100644 --- a/src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py +++ b/src/shippo/models/components/carrieraccountmondialrelaycreaterequest.py @@ -31,3 +31,9 @@ class CarrierAccountMondialRelayCreateRequest(BaseModel): ], pydantic.Field(alias="carrier"), ] = "mondial_relay" + + +try: + CarrierAccountMondialRelayCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountpaginatedlist.py b/src/shippo/models/components/carrieraccountpaginatedlist.py index 71ac5db2..294607ce 100644 --- a/src/shippo/models/components/carrieraccountpaginatedlist.py +++ b/src/shippo/models/components/carrieraccountpaginatedlist.py @@ -5,7 +5,8 @@ CarrierAccountWithExtraInfo, CarrierAccountWithExtraInfoTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -22,3 +23,19 @@ class CarrierAccountPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[CarrierAccountWithExtraInfo]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountposteitalianecreaterequest.py b/src/shippo/models/components/carrieraccountposteitalianecreaterequest.py index 816ca0b1..eefa9b3d 100644 --- a/src/shippo/models/components/carrieraccountposteitalianecreaterequest.py +++ b/src/shippo/models/components/carrieraccountposteitalianecreaterequest.py @@ -31,3 +31,9 @@ class CarrierAccountPosteItalianeCreateRequest(BaseModel): ], pydantic.Field(alias="carrier"), ] = "poste_italiane" + + +try: + CarrierAccountPosteItalianeCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountregistrationstatus.py b/src/shippo/models/components/carrieraccountregistrationstatus.py index d5ba9076..f9f9d32e 100644 --- a/src/shippo/models/components/carrieraccountregistrationstatus.py +++ b/src/shippo/models/components/carrieraccountregistrationstatus.py @@ -2,7 +2,8 @@ from __future__ import annotations from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -25,3 +26,27 @@ class CarrierAccountRegistrationStatus(BaseModel): object_updated: Optional[datetime] = None status: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "carrier_account", + "object_created", + "object_owner", + "object_updated", + "status", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountroyalmailcreaterequest.py b/src/shippo/models/components/carrieraccountroyalmailcreaterequest.py new file mode 100644 index 00000000..1987f901 --- /dev/null +++ b/src/shippo/models/components/carrieraccountroyalmailcreaterequest.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .carrieraccountroyalmailcreaterequestparameters import ( + CarrierAccountRoyalMailCreateRequestParameters, + CarrierAccountRoyalMailCreateRequestParametersTypedDict, +) +import pydantic +from pydantic.functional_validators import AfterValidator +from shippo.types import BaseModel +from shippo.utils import validate_const +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class CarrierAccountRoyalMailCreateRequestTypedDict(TypedDict): + parameters: CarrierAccountRoyalMailCreateRequestParametersTypedDict + carrier: Literal["royal_mail"] + + +class CarrierAccountRoyalMailCreateRequest(BaseModel): + parameters: CarrierAccountRoyalMailCreateRequestParameters + + CARRIER: Annotated[ + Annotated[Literal["royal_mail"], AfterValidator(validate_const("royal_mail"))], + pydantic.Field(alias="carrier"), + ] = "royal_mail" + + +try: + CarrierAccountRoyalMailCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountroyalmailcreaterequestparameters.py b/src/shippo/models/components/carrieraccountroyalmailcreaterequestparameters.py new file mode 100644 index 00000000..bf956c02 --- /dev/null +++ b/src/shippo/models/components/carrieraccountroyalmailcreaterequestparameters.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from shippo.types import BaseModel +from typing_extensions import TypedDict + + +class CarrierAccountRoyalMailCreateRequestParametersTypedDict(TypedDict): + client_id: str + r"""The client ID assigned to the user""" + client_secret: str + r"""The secret that corresponds to the supplied client ID""" + partner_token: str + r"""A unique identifier for your OBA account""" + + +class CarrierAccountRoyalMailCreateRequestParameters(BaseModel): + client_id: str + r"""The client ID assigned to the user""" + + client_secret: str + r"""The secret that corresponds to the supplied client ID""" + + partner_token: str + r"""A unique identifier for your OBA account""" diff --git a/src/shippo/models/components/carrieraccountroyalmailsfcreaterequest.py b/src/shippo/models/components/carrieraccountroyalmailsfcreaterequest.py new file mode 100644 index 00000000..03615ac8 --- /dev/null +++ b/src/shippo/models/components/carrieraccountroyalmailsfcreaterequest.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .carrieraccountroyalmailsfcreaterequestparameters import ( + CarrierAccountRoyalMailSfCreateRequestParameters, + CarrierAccountRoyalMailSfCreateRequestParametersTypedDict, +) +import pydantic +from pydantic.functional_validators import AfterValidator +from shippo.types import BaseModel +from shippo.utils import validate_const +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class CarrierAccountRoyalMailSfCreateRequestTypedDict(TypedDict): + parameters: CarrierAccountRoyalMailSfCreateRequestParametersTypedDict + carrier: Literal["royal_mail_sf"] + + +class CarrierAccountRoyalMailSfCreateRequest(BaseModel): + parameters: CarrierAccountRoyalMailSfCreateRequestParameters + + CARRIER: Annotated[ + Annotated[ + Literal["royal_mail_sf"], AfterValidator(validate_const("royal_mail_sf")) + ], + pydantic.Field(alias="carrier"), + ] = "royal_mail_sf" + + +try: + CarrierAccountRoyalMailSfCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountroyalmailsfcreaterequestparameters.py b/src/shippo/models/components/carrieraccountroyalmailsfcreaterequestparameters.py new file mode 100644 index 00000000..1f740b44 --- /dev/null +++ b/src/shippo/models/components/carrieraccountroyalmailsfcreaterequestparameters.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from shippo.types import BaseModel +from typing_extensions import TypedDict + + +class CarrierAccountRoyalMailSfCreateRequestParametersTypedDict(TypedDict): + royal_mail_sf_agreements: bool + + +class CarrierAccountRoyalMailSfCreateRequestParameters(BaseModel): + royal_mail_sf_agreements: bool diff --git a/src/shippo/models/components/carrieraccountsendlecreaterequest.py b/src/shippo/models/components/carrieraccountsendlecreaterequest.py deleted file mode 100644 index 7c09d2ec..00000000 --- a/src/shippo/models/components/carrieraccountsendlecreaterequest.py +++ /dev/null @@ -1,31 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -import pydantic -from pydantic.functional_validators import AfterValidator -from shippo.types import BaseModel -from shippo.utils import validate_const -from typing import Literal -from typing_extensions import Annotated, TypedDict - - -class CarrierAccountSendleCreateRequestParametersTypedDict(TypedDict): - pass - - -class CarrierAccountSendleCreateRequestParameters(BaseModel): - pass - - -class CarrierAccountSendleCreateRequestTypedDict(TypedDict): - parameters: CarrierAccountSendleCreateRequestParametersTypedDict - carrier: Literal["sendle"] - - -class CarrierAccountSendleCreateRequest(BaseModel): - parameters: CarrierAccountSendleCreateRequestParameters - - CARRIER: Annotated[ - Annotated[Literal["sendle"], AfterValidator(validate_const("sendle"))], - pydantic.Field(alias="carrier"), - ] = "sendle" diff --git a/src/shippo/models/components/carrieraccountservicelevel.py b/src/shippo/models/components/carrieraccountservicelevel.py index d02247af..ec3b9c0f 100644 --- a/src/shippo/models/components/carrieraccountservicelevel.py +++ b/src/shippo/models/components/carrieraccountservicelevel.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -13,11 +14,11 @@ class CarrierAccountServiceLevelTypedDict(TypedDict): r"""Service level name, e.g. `Priority Mail` or `FedEx Ground®`. A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties. These names vary depending on the provider.
- See Service Levels. + See Service Levels. """ token: NotRequired[str] r"""Service level token, e.g. `usps_priority` or `fedex_ground`.
- See Service Levels. + See Service Levels. """ supports_return_labels: NotRequired[bool] r"""Whether or not the service level supports return labels.""" @@ -30,13 +31,29 @@ class CarrierAccountServiceLevel(BaseModel): r"""Service level name, e.g. `Priority Mail` or `FedEx Ground®`. A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties. These names vary depending on the provider.
- See Service Levels. + See Service Levels. """ token: Optional[str] = None r"""Service level token, e.g. `usps_priority` or `fedex_ground`.
- See Service Levels. + See Service Levels. """ supports_return_labels: Optional[bool] = None r"""Whether or not the service level supports return labels.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "token", "supports_return_labels"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountupscreaterequest.py b/src/shippo/models/components/carrieraccountupscreaterequest.py index 34028fb1..6416da06 100644 --- a/src/shippo/models/components/carrieraccountupscreaterequest.py +++ b/src/shippo/models/components/carrieraccountupscreaterequest.py @@ -6,8 +6,9 @@ CarrierAccountUPSCreateRequestParametersTypedDict, ) import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import validate_const from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,3 +26,25 @@ class CarrierAccountUPSCreateRequest(BaseModel): ] = "ups" parameters: Optional[CarrierAccountUPSCreateRequestParameters] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parameters"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + CarrierAccountUPSCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountupscreaterequestparameters.py b/src/shippo/models/components/carrieraccountupscreaterequestparameters.py index 53c040fc..ac4e51b8 100644 --- a/src/shippo/models/components/carrieraccountupscreaterequestparameters.py +++ b/src/shippo/models/components/carrieraccountupscreaterequestparameters.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -83,3 +84,29 @@ class CarrierAccountUPSCreateRequestParameters(BaseModel): pickup_address_street2: Optional[str] = None r"""User's pickup street 2.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "billing_address_street2", + "company", + "email", + "full_name", + "phone", + "pickup_address_same_as_billing_address", + "pickup_address_street2", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrieraccountuspscreaterequest.py b/src/shippo/models/components/carrieraccountuspscreaterequest.py index 4f9698cc..4d7fca9a 100644 --- a/src/shippo/models/components/carrieraccountuspscreaterequest.py +++ b/src/shippo/models/components/carrieraccountuspscreaterequest.py @@ -29,3 +29,9 @@ class CarrierAccountUSPSCreateRequest(BaseModel): Annotated[Literal["usps"], AfterValidator(validate_const("usps"))], pydantic.Field(alias="carrier"), ] = "usps" + + +try: + CarrierAccountUSPSCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/carrieraccountwithextrainfo.py b/src/shippo/models/components/carrieraccountwithextrainfo.py index 50448e09..c8e8bcad 100644 --- a/src/shippo/models/components/carrieraccountwithextrainfo.py +++ b/src/shippo/models/components/carrieraccountwithextrainfo.py @@ -14,7 +14,8 @@ UPSConnectExistingOwnAccountParametersTypedDict, ) from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -68,11 +69,61 @@ class Authentication(BaseModel): status: Optional[CarrierAccountWithExtraInfoStatus] = None r"""Current authentication status. Possible values: 'disconnected' (authorization lost, reconnect needed), 'connected' (authorized and active), 'authorization_pending' (awaiting initial authorization flow).""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "status"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class Policy(str, Enum): + r"""Policy to indicate if the Account needs multi-factor verification.""" + + REQUIRED = "required" + NOT_REQUIRED = "not-required" + + +class VerificationTypedDict(TypedDict): + policy: NotRequired[Policy] + r"""Policy to indicate if the Account needs multi-factor verification.""" + + +class Verification(BaseModel): + policy: Optional[Policy] = None + r"""Policy to indicate if the Account needs multi-factor verification.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["policy"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ObjectInfoTypedDict(TypedDict): r"""Holds internal state relevant to users.""" authentication: NotRequired[AuthenticationTypedDict] + verification: NotRequired[VerificationTypedDict] class ObjectInfo(BaseModel): @@ -80,6 +131,24 @@ class ObjectInfo(BaseModel): authentication: Optional[Authentication] = None + verification: Optional[Verification] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["authentication", "verification"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class CarrierAccountWithExtraInfoTypedDict(TypedDict): account_id: str @@ -88,7 +157,7 @@ class CarrierAccountWithExtraInfoTypedDict(TypedDict): To protect account information, this field will be masked in any API response. """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ active: NotRequired[bool] @@ -97,7 +166,7 @@ class CarrierAccountWithExtraInfoTypedDict(TypedDict): """ parameters: NotRequired[CarrierAccountWithExtraInfoParametersTypedDict] carrier_name: NotRequired[Any] - r"""Carrier name, see Carriers
""" + r"""Carrier name, see Carriers
""" is_shippo_account: NotRequired[bool] metadata: NotRequired[str] object_id: NotRequired[str] @@ -119,7 +188,7 @@ class CarrierAccountWithExtraInfo(BaseModel): """ carrier: str - r"""Carrier token, see Carriers
+ r"""Carrier token, see Carriers
Please check the carrier accounts tutorial page for all supported carriers. """ @@ -131,7 +200,7 @@ class CarrierAccountWithExtraInfo(BaseModel): parameters: Optional[CarrierAccountWithExtraInfoParameters] = None carrier_name: Optional[Any] = None - r"""Carrier name, see Carriers
""" + r"""Carrier name, see Carriers
""" is_shippo_account: Optional[bool] = None @@ -150,3 +219,32 @@ class CarrierAccountWithExtraInfo(BaseModel): object_info: Optional[ObjectInfo] = None r"""Holds internal state relevant to users.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "active", + "parameters", + "carrier_name", + "is_shippo_account", + "metadata", + "object_id", + "object_owner", + "service_levels", + "test", + "object_info", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrierparceltemplate.py b/src/shippo/models/components/carrierparceltemplate.py index dba6a839..209f8cd9 100644 --- a/src/shippo/models/components/carrierparceltemplate.py +++ b/src/shippo/models/components/carrierparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations from .distanceunitenum import DistanceUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -50,3 +51,30 @@ class CarrierParcelTemplate(BaseModel): width: Optional[str] = None r"""The width of the package, in units specified by the distance_unit attribute""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "carrier", + "distance_unit", + "height", + "is_variable_dimensions", + "length", + "name", + "token", + "width", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carrierparceltemplatelist.py b/src/shippo/models/components/carrierparceltemplatelist.py index f0f57041..204d3200 100644 --- a/src/shippo/models/components/carrierparceltemplatelist.py +++ b/src/shippo/models/components/carrierparceltemplatelist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .carrierparceltemplate import CarrierParcelTemplate, CarrierParcelTemplateTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -13,3 +14,19 @@ class CarrierParcelTemplateListTypedDict(TypedDict): class CarrierParcelTemplateList(BaseModel): results: Optional[List[CarrierParcelTemplate]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/carriersenum.py b/src/shippo/models/components/carriersenum.py index d898552b..94a9cb51 100644 --- a/src/shippo/models/components/carriersenum.py +++ b/src/shippo/models/components/carriersenum.py @@ -56,9 +56,9 @@ class CarriersEnum(str, Enum): | posti | Posti| | purolator | Purolator| | royal_mail | Royal Mail| + | royal_mail_sf | Royal Mail Storefeeder| | rr_donnelley | ePost Global| | russian_post | Russian Post| - | sendle | Sendle| | skypostal | SkyPostal| | stuart | Stuart| | swyft | Swyft| @@ -118,9 +118,9 @@ class CarriersEnum(str, Enum): POSTI = "posti" PUROLATOR = "purolator" ROYAL_MAIL = "royal_mail" + ROYAL_MAIL_SF = "royal_mail_sf" RR_DONNELLEY = "rr_donnelley" RUSSIAN_POST = "russian_post" - SENDLE = "sendle" SKYPOSTAL = "skypostal" STUART = "stuart" SWYFT = "swyft" diff --git a/src/shippo/models/components/cod.py b/src/shippo/models/components/cod.py index ae03b748..bee67cd8 100644 --- a/src/shippo/models/components/cod.py +++ b/src/shippo/models/components/cod.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -46,3 +47,19 @@ class Cod(BaseModel): UPS for details). If no payment_method inputted the value defaults to \"ANY\".) """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["amount", "currency", "payment_method"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/connectexistingownaccountrequest.py b/src/shippo/models/components/connectexistingownaccountrequest.py index f63fc1ea..9e1592b4 100644 --- a/src/shippo/models/components/connectexistingownaccountrequest.py +++ b/src/shippo/models/components/connectexistingownaccountrequest.py @@ -9,7 +9,8 @@ UPSConnectExistingOwnAccountParameters, UPSConnectExistingOwnAccountParametersTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Any, Dict, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -55,3 +56,19 @@ class ConnectExistingOwnAccountRequest(BaseModel): metadata: Optional[str] = None test: Optional[bool] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["active", "metadata", "test"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/corerate.py b/src/shippo/models/components/corerate.py index 2009c4dc..1fd425cc 100644 --- a/src/shippo/models/components/corerate.py +++ b/src/shippo/models/components/corerate.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -29,11 +30,11 @@ class CoreRateTypedDict(TypedDict): r"""Service level name, e.g. `Priority Mail` or `FedEx Ground®`. A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties. These names vary depending on the provider.
- See Service Levels. + See Service Levels. """ servicelevel_token: NotRequired[str] r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ @@ -67,10 +68,38 @@ class CoreRate(BaseModel): r"""Service level name, e.g. `Priority Mail` or `FedEx Ground®`. A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), along with other properties. These names vary depending on the provider.
- See Service Levels. + See Service Levels. """ servicelevel_token: Optional[str] = None r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "amount", + "amount_local", + "currency", + "currency_local", + "object_id", + "provider", + "carrier_account", + "servicelevel_name", + "servicelevel_token", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customerreference.py b/src/shippo/models/components/customerreference.py index 23166163..6f423e2e 100644 --- a/src/shippo/models/components/customerreference.py +++ b/src/shippo/models/components/customerreference.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -17,6 +18,11 @@ class CustomerReferenceTypedDict(TypedDict): value: NotRequired[str] r"""Optional text to be printed on the shipping label for customer reference. Up to 40 characters. If this is provided, reference_1 will be ignored. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | """ ref_sort: NotRequired[int] r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" @@ -34,7 +40,28 @@ class CustomerReference(BaseModel): value: Optional[str] = None r"""Optional text to be printed on the shipping label for customer reference. Up to 40 characters. If this is provided, reference_1 will be ignored. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | """ ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsdeclaration.py b/src/shippo/models/components/customsdeclaration.py index d172cd91..3531b070 100644 --- a/src/shippo/models/components/customsdeclaration.py +++ b/src/shippo/models/components/customsdeclaration.py @@ -12,7 +12,8 @@ from .objectstateenum import ObjectStateEnum from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -44,6 +45,22 @@ class CustomsDeclarationAddress(BaseModel): country: Optional[str] = None r"""Country ISO code of account number to be billed.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "zip", "country"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class CustomsDeclarationDutiesPayorTypedDict(TypedDict): r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" @@ -66,6 +83,22 @@ class CustomsDeclarationDutiesPayor(BaseModel): address: Optional[CustomsDeclarationAddress] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["account", "type", "address"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class CustomsDeclarationTypedDict(TypedDict): certify: bool @@ -76,13 +109,13 @@ class CustomsDeclarationTypedDict(TypedDict): """ contents_type: str r"""Type of goods of the shipment. - Allowed values available here + Allowed values available here """ items: List[str] r"""Distinct Parcel content items as Customs Items object_ids.""" non_delivery_option: str r"""Indicates how the carrier should proceed in case the shipment can't be delivered. - Allowed values available here + Allowed values available here """ aes_itn: NotRequired[str] r"""**required if eel_pfc is `AES_ITN`**
@@ -91,7 +124,7 @@ class CustomsDeclarationTypedDict(TypedDict): b13a_filing_option: NotRequired[str] r"""B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS). More information on reporting commercial exports from Canada. - Allowed values available here + Allowed values available here """ b13a_number: NotRequired[str] r"""**must be provided if and only if b13a_filing_option is provided**
@@ -107,7 +140,13 @@ class CustomsDeclarationTypedDict(TypedDict): Explanation of the type of goods of the shipment. """ disclaimer: NotRequired[str] - r"""Disclaimer for the shipment and customs information that have been provided.""" + r"""Disclaimer for the shipment and customs information that have been provided. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 554 characters | + """ duties_payor: NotRequired[CustomsDeclarationDutiesPayorTypedDict] r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" exporter_identification: NotRequired[CustomsExporterIdentificationTypedDict] @@ -133,13 +172,19 @@ class CustomsDeclarationTypedDict(TypedDict): eel_pfc: NotRequired[str] r"""EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most other shipments from the US, `NOEEI_30_37_a` is applicable. - Allowed values available here + Allowed values available here """ incoterm: NotRequired[str] r"""The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. - eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK. + eDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK. If expecting DAP for other carriers, please use DDU. - Allowed values available here + Allowed values available here + Carrier-specific restrictions are in the table below. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Must be one of DDP, DDU, FCA, DAP | """ invoiced_charges: NotRequired[CustomsInvoicedChargesTypedDict] r"""Additional invoiced charges to be shown on the Customs Declaration Commercial Invoice.""" @@ -168,7 +213,7 @@ class CustomsDeclaration(BaseModel): contents_type: str r"""Type of goods of the shipment. - Allowed values available here + Allowed values available here """ items: List[str] @@ -176,7 +221,7 @@ class CustomsDeclaration(BaseModel): non_delivery_option: str r"""Indicates how the carrier should proceed in case the shipment can't be delivered. - Allowed values available here + Allowed values available here """ aes_itn: Optional[str] = None @@ -187,7 +232,7 @@ class CustomsDeclaration(BaseModel): b13a_filing_option: Optional[str] = None r"""B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS). More information on reporting commercial exports from Canada. - Allowed values available here + Allowed values available here """ b13a_number: Optional[str] = None @@ -208,7 +253,13 @@ class CustomsDeclaration(BaseModel): """ disclaimer: Optional[str] = None - r"""Disclaimer for the shipment and customs information that have been provided.""" + r"""Disclaimer for the shipment and customs information that have been provided. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 554 characters | + """ duties_payor: Optional[CustomsDeclarationDutiesPayor] = None r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" @@ -245,14 +296,20 @@ class CustomsDeclaration(BaseModel): eel_pfc: Optional[str] = None r"""EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most other shipments from the US, `NOEEI_30_37_a` is applicable. - Allowed values available here + Allowed values available here """ incoterm: Optional[str] = None r"""The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. - eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK. + eDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK. If expecting DAP for other carriers, please use DDU. - Allowed values available here + Allowed values available here + Carrier-specific restrictions are in the table below. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Must be one of DDP, DDU, FCA, DAP | """ invoiced_charges: Optional[CustomsInvoicedCharges] = None @@ -275,3 +332,48 @@ class CustomsDeclaration(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "aes_itn", + "b13a_filing_option", + "b13a_number", + "certificate", + "commercial_invoice", + "contents_explanation", + "disclaimer", + "duties_payor", + "exporter_identification", + "exporter_reference", + "importer_reference", + "is_vat_collected", + "invoice", + "license", + "metadata", + "notes", + "address_importer", + "eel_pfc", + "incoterm", + "invoiced_charges", + "object_created", + "object_id", + "object_owner", + "object_state", + "object_updated", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsdeclarationb13afilingoptionenum.py b/src/shippo/models/components/customsdeclarationb13afilingoptionenum.py index 9a1745b4..9068557c 100644 --- a/src/shippo/models/components/customsdeclarationb13afilingoptionenum.py +++ b/src/shippo/models/components/customsdeclarationb13afilingoptionenum.py @@ -7,7 +7,7 @@ class CustomsDeclarationB13AFilingOptionEnum(str, Enum): r"""B13A Option details are obtained by filing a B13A Canada Export Declaration via the Canadian Export Reporting System (CERS). More information on reporting commercial exports from Canada. - Allowed values available here + Allowed values available here """ FILED_ELECTRONICALLY = "FILED_ELECTRONICALLY" diff --git a/src/shippo/models/components/customsdeclarationcontentstypeenum.py b/src/shippo/models/components/customsdeclarationcontentstypeenum.py index c941b3cf..bebca60b 100644 --- a/src/shippo/models/components/customsdeclarationcontentstypeenum.py +++ b/src/shippo/models/components/customsdeclarationcontentstypeenum.py @@ -6,7 +6,7 @@ class CustomsDeclarationContentsTypeEnum(str, Enum): r"""Type of goods of the shipment. - Allowed values available here + Allowed values available here """ DOCUMENTS = "DOCUMENTS" diff --git a/src/shippo/models/components/customsdeclarationcreaterequest.py b/src/shippo/models/components/customsdeclarationcreaterequest.py index 3794dc49..e8eca192 100644 --- a/src/shippo/models/components/customsdeclarationcreaterequest.py +++ b/src/shippo/models/components/customsdeclarationcreaterequest.py @@ -20,7 +20,8 @@ CustomsItemCreateRequestTypedDict, ) from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -52,6 +53,22 @@ class CustomsDeclarationCreateRequestAddress(BaseModel): country: Optional[str] = None r"""Country ISO code of account number to be billed.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "zip", "country"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class CustomsDeclarationCreateRequestDutiesPayorTypedDict(TypedDict): r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" @@ -74,6 +91,22 @@ class CustomsDeclarationCreateRequestDutiesPayor(BaseModel): address: Optional[CustomsDeclarationCreateRequestAddress] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["account", "type", "address"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class CustomsDeclarationCreateRequestTypedDict(TypedDict): certify: bool @@ -104,7 +137,13 @@ class CustomsDeclarationCreateRequestTypedDict(TypedDict): Explanation of the type of goods of the shipment. """ disclaimer: NotRequired[str] - r"""Disclaimer for the shipment and customs information that have been provided.""" + r"""Disclaimer for the shipment and customs information that have been provided. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 554 characters | + """ duties_payor: NotRequired[CustomsDeclarationCreateRequestDutiesPayorTypedDict] r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" exporter_identification: NotRequired[CustomsExporterIdentificationTypedDict] @@ -172,7 +211,13 @@ class CustomsDeclarationCreateRequest(BaseModel): """ disclaimer: Optional[str] = None - r"""Disclaimer for the shipment and customs information that have been provided.""" + r"""Disclaimer for the shipment and customs information that have been provided. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 554 characters | + """ duties_payor: Optional[CustomsDeclarationCreateRequestDutiesPayor] = None r"""Specifies who will pay the duties for the shipment. Only accepted for FedEx shipments.""" @@ -211,3 +256,42 @@ class CustomsDeclarationCreateRequest(BaseModel): incoterm: Optional[CustomsDeclarationIncotermEnum] = None test: Optional[bool] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "aes_itn", + "b13a_filing_option", + "b13a_number", + "certificate", + "commercial_invoice", + "contents_explanation", + "disclaimer", + "duties_payor", + "exporter_identification", + "exporter_reference", + "importer_reference", + "is_vat_collected", + "invoice", + "license", + "metadata", + "notes", + "address_importer", + "eel_pfc", + "incoterm", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsdeclarationeelpfcenum.py b/src/shippo/models/components/customsdeclarationeelpfcenum.py index e22c5779..93492623 100644 --- a/src/shippo/models/components/customsdeclarationeelpfcenum.py +++ b/src/shippo/models/components/customsdeclarationeelpfcenum.py @@ -7,7 +7,7 @@ class CustomsDeclarationEelPfcEnum(str, Enum): r"""EEL / PFC type of the shipment. For most shipments from the US to CA, `NOEEI_30_36` is applicable; for most other shipments from the US, `NOEEI_30_37_a` is applicable. - Allowed values available here + Allowed values available here """ NOEEI_30_37_A = "NOEEI_30_37_a" diff --git a/src/shippo/models/components/customsdeclarationincotermenum.py b/src/shippo/models/components/customsdeclarationincotermenum.py index f92fc9c1..62453d34 100644 --- a/src/shippo/models/components/customsdeclarationincotermenum.py +++ b/src/shippo/models/components/customsdeclarationincotermenum.py @@ -6,9 +6,15 @@ class CustomsDeclarationIncotermEnum(str, Enum): r"""The incoterm reference of the shipment. FCA is available for DHL Express and FedEx only. - eDAP is available for DPD UK only. DAP is available for DHL Express and DPD UK. + eDAP is available for DPD UK only. DAP is available for DHL Express, FedEx, and DPD UK. If expecting DAP for other carriers, please use DDU. - Allowed values available here + Allowed values available here + Carrier-specific restrictions are in the table below. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Must be one of DDP, DDU, FCA, DAP | """ DDP = "DDP" diff --git a/src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py b/src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py index cb01aff5..ccb37bb1 100644 --- a/src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py +++ b/src/shippo/models/components/customsdeclarationnondeliveryoptionenum.py @@ -6,7 +6,7 @@ class CustomsDeclarationNonDeliveryOptionEnum(str, Enum): r"""Indicates how the carrier should proceed in case the shipment can't be delivered. - Allowed values available here + Allowed values available here """ ABANDON = "ABANDON" diff --git a/src/shippo/models/components/customsdeclarationpaginatedlist.py b/src/shippo/models/components/customsdeclarationpaginatedlist.py index c4a66b30..cb5ee009 100644 --- a/src/shippo/models/components/customsdeclarationpaginatedlist.py +++ b/src/shippo/models/components/customsdeclarationpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .customsdeclaration import CustomsDeclaration, CustomsDeclarationTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class CustomsDeclarationPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[CustomsDeclaration]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsexporteridentification.py b/src/shippo/models/components/customsexporteridentification.py index 2efbf4be..4dfcc784 100644 --- a/src/shippo/models/components/customsexporteridentification.py +++ b/src/shippo/models/components/customsexporteridentification.py @@ -5,7 +5,8 @@ CustomsTaxIdentification, CustomsTaxIdentificationTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -37,3 +38,19 @@ class CustomsExporterIdentification(BaseModel): r"""Tax identification that may be required to ship in certain countries. Typically used to assess duties on goods that are crossing a border. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["eori_number", "tax_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsinvoicedcharges.py b/src/shippo/models/components/customsinvoicedcharges.py index 6f196485..2d65ce37 100644 --- a/src/shippo/models/components/customsinvoicedcharges.py +++ b/src/shippo/models/components/customsinvoicedcharges.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -38,3 +39,21 @@ class CustomsInvoicedCharges(BaseModel): other_fees: Optional[str] = None r"""Other fees paid by the buyer.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["total_shipping", "total_taxes", "total_duties", "other_fees"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsitem.py b/src/shippo/models/components/customsitem.py index 062549b9..05b7f645 100644 --- a/src/shippo/models/components/customsitem.py +++ b/src/shippo/models/components/customsitem.py @@ -4,7 +4,8 @@ from .objectstateenum import ObjectStateEnum from .weightunitenum import WeightUnitEnum from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -114,3 +115,33 @@ class CustomsItem(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "eccn_ear99", + "metadata", + "sku_code", + "hs_code", + "tariff_number", + "object_created", + "object_id", + "object_owner", + "object_state", + "object_updated", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsitemcreaterequest.py b/src/shippo/models/components/customsitemcreaterequest.py index 7406ca49..e330e499 100644 --- a/src/shippo/models/components/customsitemcreaterequest.py +++ b/src/shippo/models/components/customsitemcreaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -82,3 +83,21 @@ class CustomsItemCreateRequest(BaseModel): tariff_number: Optional[str] = None r"""The tariff number of the item. If `tariff_number` is not provided, `hs_code` will be used. If both `hs_code` and `tariff_number` are provided, `tariff_number` will be used. 12 character limit.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["eccn_ear99", "metadata", "sku_code", "hs_code", "tariff_number"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customsitempaginatedlist.py b/src/shippo/models/components/customsitempaginatedlist.py index d2cefe28..83cdbb93 100644 --- a/src/shippo/models/components/customsitempaginatedlist.py +++ b/src/shippo/models/components/customsitempaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .customsitem import CustomsItem, CustomsItemTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class CustomsItemPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[CustomsItem]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/customstaxidentification.py b/src/shippo/models/components/customstaxidentification.py index d0ff2e8c..64734cd5 100644 --- a/src/shippo/models/components/customstaxidentification.py +++ b/src/shippo/models/components/customstaxidentification.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -52,3 +53,19 @@ class CustomsTaxIdentification(BaseModel): * `IOSS` - Import One-Stop Shop * `ARN` - Australian Taxation Office Reference Number """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["number", "type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/dangerousgoodsbiologicalmaterial.py b/src/shippo/models/components/dangerousgoodsbiologicalmaterial.py index cbc3952c..c153b9a5 100644 --- a/src/shippo/models/components/dangerousgoodsbiologicalmaterial.py +++ b/src/shippo/models/components/dangerousgoodsbiologicalmaterial.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -18,3 +19,19 @@ class DangerousGoodsBiologicalMaterial(BaseModel): contains: Optional[bool] = None r"""Indicates if the shipment contains biological material.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contains"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/dangerousgoodslithiumbatteries.py b/src/shippo/models/components/dangerousgoodslithiumbatteries.py index 31e8d4cd..5222df39 100644 --- a/src/shippo/models/components/dangerousgoodslithiumbatteries.py +++ b/src/shippo/models/components/dangerousgoodslithiumbatteries.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -18,3 +19,19 @@ class DangerousGoodsLithiumBatteries(BaseModel): contains: Optional[bool] = None r"""Indicates if the shipment contains lithium batteries.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contains"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/dangerousgoodsobject.py b/src/shippo/models/components/dangerousgoodsobject.py index ee8e383f..c663e2bc 100644 --- a/src/shippo/models/components/dangerousgoodsobject.py +++ b/src/shippo/models/components/dangerousgoodsobject.py @@ -9,7 +9,8 @@ DangerousGoodsLithiumBatteries, DangerousGoodsLithiumBatteriesTypedDict, ) -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -42,3 +43,19 @@ class DangerousGoodsObject(BaseModel): lithium_batteries: Optional[DangerousGoodsLithiumBatteries] = None r"""Container for specifying the presence of lithium batteries.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contains", "biological_material", "lithium_batteries"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/defaultparceltemplate.py b/src/shippo/models/components/defaultparceltemplate.py index 579087f2..f132db3e 100644 --- a/src/shippo/models/components/defaultparceltemplate.py +++ b/src/shippo/models/components/defaultparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations from .userparceltemplate import UserParcelTemplate, UserParcelTemplateTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -13,3 +14,19 @@ class DefaultParcelTemplateTypedDict(TypedDict): class DefaultParcelTemplate(BaseModel): result: Optional[UserParcelTemplate] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/defaultparceltemplateupdaterequest.py b/src/shippo/models/components/defaultparceltemplateupdaterequest.py index 3ffebb37..166f1b0b 100644 --- a/src/shippo/models/components/defaultparceltemplateupdaterequest.py +++ b/src/shippo/models/components/defaultparceltemplateupdaterequest.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -12,3 +13,19 @@ class DefaultParcelTemplateUpdateRequestTypedDict(TypedDict): class DefaultParcelTemplateUpdateRequest(BaseModel): object_id: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["object_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/departmentnumber.py b/src/shippo/models/components/departmentnumber.py index d6bb26d3..e3e4cf01 100644 --- a/src/shippo/models/components/departmentnumber.py +++ b/src/shippo/models/components/departmentnumber.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -15,7 +16,13 @@ class DepartmentNumberTypedDict(TypedDict): this property. """ value: NotRequired[str] - r"""Optional text to be printed on the shipping label for department number. Up to 40 characters.""" + r"""Optional text to be printed on the shipping label for department number. Up to 40 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ ref_sort: NotRequired[int] r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" @@ -30,7 +37,29 @@ class DepartmentNumber(BaseModel): """ value: Optional[str] = None - r"""Optional text to be printed on the shipping label for department number. Up to 40 characters.""" + r"""Optional text to be printed on the shipping label for department number. Up to 40 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/dryice.py b/src/shippo/models/components/dryice.py index 41897de5..5a88bb23 100644 --- a/src/shippo/models/components/dryice.py +++ b/src/shippo/models/components/dryice.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -23,3 +24,19 @@ class DryIce(BaseModel): weight: Optional[str] = None r"""Mandatory. Units must be in Kilograms. Cannot be greater than package weight.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["contains_dry_ice", "weight"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/fedexconnectexistingownaccountparameters.py b/src/shippo/models/components/fedexconnectexistingownaccountparameters.py index 6c404a37..18fc50df 100644 --- a/src/shippo/models/components/fedexconnectexistingownaccountparameters.py +++ b/src/shippo/models/components/fedexconnectexistingownaccountparameters.py @@ -1,11 +1,39 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel -from typing_extensions import TypedDict +from datetime import date +from decimal import Decimal +from enum import Enum +import pydantic +from pydantic import model_serializer +from pydantic.functional_serializers import PlainSerializer +from pydantic.functional_validators import AfterValidator, BeforeValidator +from shippo.types import BaseModel, UNSET_SENTINEL +from shippo.utils import serialize_decimal, validate_const, validate_decimal +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class VerificationOption(str, Enum): + r"""Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE).""" + + SMS = "SMS" + EMAIL = "EMAIL" + CALL = "CALL" + INVOICE = "INVOICE" class FedExConnectExistingOwnAccountParametersTypedDict(TypedDict): + r"""In the case of masked fields, they should be handled carefully. + + Fields also must consider: + - Not providing a *fields* in parameters will not result in a change to any configured value + - Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value + - Providing *field* with null will clear the configured value + - Providing *field* with any other value will change the configured value and may affect the behavior of the account. + + """ + first_name: str r"""First name of the account holder""" last_name: str @@ -22,9 +50,33 @@ class FedExConnectExistingOwnAccountParametersTypedDict(TypedDict): r"""Zip code of the account holder""" from_address_country_iso2: str r"""Country of the account holder""" + verification_option: VerificationOption + r"""Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE).""" + use_multi_factor_registration: Literal[True] + r"""Must be true. FedEx accounts are registered using the multi-factor registration workflow.""" + verification_pin: NotRequired[str] + r"""(optional) The PIN to verify the account.""" + verification_invoice_number: NotRequired[str] + r"""(optional) The invoice number to verify the account.""" + verification_invoice_amount: NotRequired[Decimal] + r"""(optional) The invoice amount to verify the account.""" + verification_invoice_date: NotRequired[date] + r"""(optional) The invoice date to verify the account. In the format `YYYY-MM-DD`.""" + verification_invoice_currency: NotRequired[str] + r"""(optional) The invoice currency to verify the account.""" class FedExConnectExistingOwnAccountParameters(BaseModel): + r"""In the case of masked fields, they should be handled carefully. + + Fields also must consider: + - Not providing a *fields* in parameters will not result in a change to any configured value + - Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value + - Providing *field* with null will clear the configured value + - Providing *field* with any other value will change the configured value and may affect the behavior of the account. + + """ + first_name: str r"""First name of the account holder""" @@ -48,3 +100,61 @@ class FedExConnectExistingOwnAccountParameters(BaseModel): from_address_country_iso2: str r"""Country of the account holder""" + + verification_option: VerificationOption + r"""Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE).""" + + USE_MULTI_FACTOR_REGISTRATION: Annotated[ + Annotated[Literal[True], AfterValidator(validate_const(True))], + pydantic.Field(alias="use_multi_factor_registration"), + ] = True + r"""Must be true. FedEx accounts are registered using the multi-factor registration workflow.""" + + verification_pin: Optional[str] = None + r"""(optional) The PIN to verify the account.""" + + verification_invoice_number: Optional[str] = None + r"""(optional) The invoice number to verify the account.""" + + verification_invoice_amount: Annotated[ + Optional[Decimal], + BeforeValidator(validate_decimal), + PlainSerializer(serialize_decimal(True)), + ] = None + r"""(optional) The invoice amount to verify the account.""" + + verification_invoice_date: Optional[date] = None + r"""(optional) The invoice date to verify the account. In the format `YYYY-MM-DD`.""" + + verification_invoice_currency: Optional[str] = None + r"""(optional) The invoice currency to verify the account.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "verification_pin", + "verification_invoice_number", + "verification_invoice_amount", + "verification_invoice_date", + "verification_invoice_currency", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + FedExConnectExistingOwnAccountParameters.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/instanttransactioncreaterequest.py b/src/shippo/models/components/instanttransactioncreaterequest.py index 8ca88189..4f8afbc7 100644 --- a/src/shippo/models/components/instanttransactioncreaterequest.py +++ b/src/shippo/models/components/instanttransactioncreaterequest.py @@ -4,7 +4,8 @@ from .shipmentcreaterequest import ShipmentCreateRequest, ShipmentCreateRequestTypedDict from enum import Enum import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -45,3 +46,25 @@ class InstantTransactionCreateRequest(BaseModel): metadata: Optional[str] = None order: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["async", "label_file_type", "metadata", "order"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + InstantTransactionCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/insurance.py b/src/shippo/models/components/insurance.py index df2938ad..1a76bbd3 100644 --- a/src/shippo/models/components/insurance.py +++ b/src/shippo/models/components/insurance.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -54,3 +55,19 @@ class Insurance(BaseModel): provider: Optional[InsuranceProvider] = None r"""To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set `provider` to `FEDEX`, `UPS`, or `ONTRAC`.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["amount", "content", "currency", "provider"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/invoicenumber.py b/src/shippo/models/components/invoicenumber.py index 0c117111..a6d425cb 100644 --- a/src/shippo/models/components/invoicenumber.py +++ b/src/shippo/models/components/invoicenumber.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -17,6 +18,11 @@ class InvoiceNumberTypedDict(TypedDict): value: NotRequired[str] r"""Optional text to be printed on the shipping label for invoice number. Up to 40 characters. If provided, this will be used on the label instead of shipment.customs_declaration.invoice. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | """ ref_sort: NotRequired[int] r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" @@ -34,7 +40,28 @@ class InvoiceNumber(BaseModel): value: Optional[str] = None r"""Optional text to be printed on the shipping label for invoice number. Up to 40 characters. If provided, this will be used on the label instead of shipment.customs_declaration.invoice. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | """ ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/lineitem.py b/src/shippo/models/components/lineitem.py index a96e0e2c..34d75c4d 100644 --- a/src/shippo/models/components/lineitem.py +++ b/src/shippo/models/components/lineitem.py @@ -3,12 +3,20 @@ from __future__ import annotations from .weightunitenum import WeightUnitEnum from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict class LineItemTypedDict(TypedDict): + r"""

+
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource + in the future. Currently it's a nested object within the order resource.

+

+ A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. + """ + currency: NotRequired[str] r"""Currency of the total_price amount.""" manufacture_country: NotRequired[str] @@ -47,6 +55,13 @@ class LineItemTypedDict(TypedDict): class LineItem(BaseModel): + r"""

+
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource + in the future. Currently it's a nested object within the order resource.

+

+ A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. + """ + currency: Optional[str] = None r"""Currency of the total_price amount.""" @@ -93,3 +108,34 @@ class LineItem(BaseModel): object_id: Optional[str] = None r"""Unique identifier of the line item object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "currency", + "manufacture_country", + "max_delivery_time", + "max_ship_time", + "quantity", + "sku", + "title", + "total_price", + "variant_title", + "weight", + "weight_unit", + "object_id", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/lineitembase.py b/src/shippo/models/components/lineitembase.py index 990a6fc7..00564347 100644 --- a/src/shippo/models/components/lineitembase.py +++ b/src/shippo/models/components/lineitembase.py @@ -3,7 +3,8 @@ from __future__ import annotations from .weightunitenum import WeightUnitEnum from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -88,3 +89,33 @@ class LineItemBase(BaseModel): weight_unit: Optional[WeightUnitEnum] = None r"""The unit used for weight.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "currency", + "manufacture_country", + "max_delivery_time", + "max_ship_time", + "quantity", + "sku", + "title", + "total_price", + "variant_title", + "weight", + "weight_unit", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/liverate.py b/src/shippo/models/components/liverate.py index b936dc44..33767ab6 100644 --- a/src/shippo/models/components/liverate.py +++ b/src/shippo/models/components/liverate.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -47,3 +48,28 @@ class LiveRate(BaseModel): title: Optional[str] = None r"""The name of the service group being returned""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "amount", + "amount_local", + "currency", + "currency_local", + "estimated_days", + "title", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/liveratecreaterequest.py b/src/shippo/models/components/liveratecreaterequest.py index da173db5..9c5a3eea 100644 --- a/src/shippo/models/components/liveratecreaterequest.py +++ b/src/shippo/models/components/liveratecreaterequest.py @@ -7,7 +7,8 @@ ) from .lineitem import LineItem, LineItemTypedDict from .parcel import Parcel, ParcelTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -97,3 +98,19 @@ class LiveRateCreateRequest(BaseModel): parcel: Optional[LiveRateCreateRequestParcel] = None r"""Object ID for an existing User Parcel Template OR a fully formed Parcel object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["address_from", "parcel"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/liveratepaginatedlist.py b/src/shippo/models/components/liveratepaginatedlist.py index 72f06f7f..8e8b1133 100644 --- a/src/shippo/models/components/liveratepaginatedlist.py +++ b/src/shippo/models/components/liveratepaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .liverate import LiveRate, LiveRateTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -22,3 +23,19 @@ class LiveRatePaginatedList(BaseModel): count: Optional[int] = None results: Optional[List[LiveRate]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "count", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/location.py b/src/shippo/models/components/location.py index 23e16c75..f8a0f292 100644 --- a/src/shippo/models/components/location.py +++ b/src/shippo/models/components/location.py @@ -6,7 +6,8 @@ AddressCompleteCreateRequestTypedDict, ) from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -78,3 +79,19 @@ class Location(BaseModel): instructions: Optional[str] = None r"""Pickup instructions for the courier. This is a mandatory field if the building_location_type is \"Other\".""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["building_type", "instructions"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/manifest.py b/src/shippo/models/components/manifest.py index 60996ff7..84972107 100644 --- a/src/shippo/models/components/manifest.py +++ b/src/shippo/models/components/manifest.py @@ -3,7 +3,8 @@ from __future__ import annotations from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -86,3 +87,19 @@ class Manifest(BaseModel): errors: Optional[List[str]] = None r"""An array of codes and messages describing the error that occurred if any.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["transactions", "errors"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/manifestcreaterequest.py b/src/shippo/models/components/manifestcreaterequest.py index 569c0b15..7ba9a587 100644 --- a/src/shippo/models/components/manifestcreaterequest.py +++ b/src/shippo/models/components/manifestcreaterequest.py @@ -3,7 +3,8 @@ from __future__ import annotations from .addresscreaterequest import AddressCreateRequest, AddressCreateRequestTypedDict import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -51,3 +52,25 @@ class ManifestCreateRequest(BaseModel): """ async_: Annotated[Optional[bool], pydantic.Field(alias="async")] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["transactions", "async"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + ManifestCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/manifestpaginatedlist.py b/src/shippo/models/components/manifestpaginatedlist.py index d00e9223..9a67a634 100644 --- a/src/shippo/models/components/manifestpaginatedlist.py +++ b/src/shippo/models/components/manifestpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .manifest import Manifest, ManifestTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class ManifestPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Manifest]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/order.py b/src/shippo/models/components/order.py index 8a34b699..4fff607d 100644 --- a/src/shippo/models/components/order.py +++ b/src/shippo/models/components/order.py @@ -6,7 +6,8 @@ from .ordershopappenum import OrderShopAppEnum from .orderstatusenum import OrderStatusEnum from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -23,7 +24,7 @@ class OrderTypedDict(TypedDict): placed_at: str r"""Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo.""" to_address: AddressTypedDict - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" currency: NotRequired[str] r"""**Required if total_price is provided**
Currency of the total_price and total_tax amounts. @@ -56,9 +57,9 @@ class OrderTypedDict(TypedDict): weight_unit: NotRequired[WeightUnitEnum] r"""The unit used for weight.""" from_address: NotRequired[AddressTypedDict] - r"""Address object of the sender / seller. Will be returned expanded by default.""" + r"""Address object of the sender / seller. Will be returned expanded by default.""" line_items: NotRequired[List[LineItemTypedDict]] - r"""Array of line item objects representing the items in this order. + r"""Array of line item objects representing the items in this order. All objects will be returned expanded by default. """ object_id: NotRequired[str] @@ -70,7 +71,7 @@ class OrderTypedDict(TypedDict): Orders created via the Shippo API or dashboard will have the value \"Shippo\". """ transactions: NotRequired[List[OrderTransactionTypedDict]] - r"""Array of transaction objects representing all shipping labels purchased for this order. + r"""Array of transaction objects representing all shipping labels purchased for this order. All objects are returned expanded with a limited number of fields by default. """ @@ -80,7 +81,7 @@ class Order(BaseModel): r"""Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo.""" to_address: Address - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" currency: Optional[str] = None r"""**Required if total_price is provided**
@@ -126,10 +127,10 @@ class Order(BaseModel): r"""The unit used for weight.""" from_address: Optional[Address] = None - r"""Address object of the sender / seller. Will be returned expanded by default.""" + r"""Address object of the sender / seller. Will be returned expanded by default.""" line_items: Optional[List[LineItem]] = None - r"""Array of line item objects representing the items in this order. + r"""Array of line item objects representing the items in this order. All objects will be returned expanded by default. """ @@ -145,6 +146,43 @@ class Order(BaseModel): """ transactions: Optional[List[OrderTransaction]] = None - r"""Array of transaction objects representing all shipping labels purchased for this order. + r"""Array of transaction objects representing all shipping labels purchased for this order. All objects are returned expanded with a limited number of fields by default. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "currency", + "notes", + "order_number", + "order_status", + "shipping_cost", + "shipping_cost_currency", + "shipping_method", + "subtotal_price", + "total_price", + "total_tax", + "weight", + "weight_unit", + "from_address", + "line_items", + "object_id", + "object_owner", + "shop_app", + "transactions", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/ordercreaterequest.py b/src/shippo/models/components/ordercreaterequest.py index ca63f256..f09a8461 100644 --- a/src/shippo/models/components/ordercreaterequest.py +++ b/src/shippo/models/components/ordercreaterequest.py @@ -5,7 +5,8 @@ from .lineitembase import LineItemBase, LineItemBaseTypedDict from .orderstatusenum import OrderStatusEnum from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -14,7 +15,7 @@ class OrderCreateRequestTypedDict(TypedDict): placed_at: str r"""Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo.""" to_address: AddressCreateRequestTypedDict - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" currency: NotRequired[str] r"""**Required if total_price is provided**
Currency of the total_price and total_tax amounts. @@ -47,9 +48,9 @@ class OrderCreateRequestTypedDict(TypedDict): weight_unit: NotRequired[WeightUnitEnum] r"""The unit used for weight.""" from_address: NotRequired[AddressCreateRequestTypedDict] - r"""Address object of the sender / seller. Will be returned expanded by default..""" + r"""Address object of the sender / seller. Will be returned expanded by default..""" line_items: NotRequired[List[LineItemBaseTypedDict]] - r"""Array of line item objects representing the items in this order. + r"""Array of line item objects representing the items in this order. All objects will be returned expanded by default. """ @@ -59,7 +60,7 @@ class OrderCreateRequest(BaseModel): r"""Date and time when the order was placed. This datetime can be different from the datetime of the order object creation on Shippo.""" to_address: AddressCreateRequest - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" currency: Optional[str] = None r"""**Required if total_price is provided**
@@ -105,9 +106,42 @@ class OrderCreateRequest(BaseModel): r"""The unit used for weight.""" from_address: Optional[AddressCreateRequest] = None - r"""Address object of the sender / seller. Will be returned expanded by default..""" + r"""Address object of the sender / seller. Will be returned expanded by default..""" line_items: Optional[List[LineItemBase]] = None - r"""Array of line item objects representing the items in this order. + r"""Array of line item objects representing the items in this order. All objects will be returned expanded by default. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "currency", + "notes", + "order_number", + "order_status", + "shipping_cost", + "shipping_cost_currency", + "shipping_method", + "subtotal_price", + "total_price", + "total_tax", + "weight", + "weight_unit", + "from_address", + "line_items", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/orderpaginatedlist.py b/src/shippo/models/components/orderpaginatedlist.py index 8e0ab12c..45f5c1c3 100644 --- a/src/shippo/models/components/orderpaginatedlist.py +++ b/src/shippo/models/components/orderpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .order import Order, OrderTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class OrderPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Order]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/parcel.py b/src/shippo/models/components/parcel.py index b3c3d264..66330e86 100644 --- a/src/shippo/models/components/parcel.py +++ b/src/shippo/models/components/parcel.py @@ -7,7 +7,8 @@ from .weightunitenum import WeightUnitEnum from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -33,7 +34,7 @@ class ParcelTypedDict(TypedDict): r"""Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.""" extra: NotRequired[ParcelExtraTypedDict] r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: NotRequired[str] object_created: NotRequired[datetime] @@ -73,7 +74,7 @@ class Parcel(BaseModel): extra: Optional[ParcelExtra] = None r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: Optional[str] = None @@ -98,3 +99,31 @@ class Parcel(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "extra", + "metadata", + "object_created", + "object_id", + "object_owner", + "object_state", + "object_updated", + "template", + "test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/parcelcreatefromtemplaterequest.py b/src/shippo/models/components/parcelcreatefromtemplaterequest.py index 91056e47..7424595e 100644 --- a/src/shippo/models/components/parcelcreatefromtemplaterequest.py +++ b/src/shippo/models/components/parcelcreatefromtemplaterequest.py @@ -4,7 +4,8 @@ from .parcelextra import ParcelExtra, ParcelExtraTypedDict from .parceltemplateenumset import ParcelTemplateEnumSet, ParcelTemplateEnumSetTypedDict from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -18,7 +19,7 @@ class ParcelCreateFromTemplateRequestTypedDict(TypedDict): r"""If template is passed, `length`, `width`, `height`, and `distance_unit` are not required""" extra: NotRequired[ParcelExtraTypedDict] r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: NotRequired[str] @@ -35,7 +36,23 @@ class ParcelCreateFromTemplateRequest(BaseModel): extra: Optional[ParcelExtra] = None r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["extra", "metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/parcelcreaterequest.py b/src/shippo/models/components/parcelcreaterequest.py index abdfb9df..6365bf4a 100644 --- a/src/shippo/models/components/parcelcreaterequest.py +++ b/src/shippo/models/components/parcelcreaterequest.py @@ -4,7 +4,8 @@ from .distanceunitenum import DistanceUnitEnum from .parcelextra import ParcelExtra, ParcelExtraTypedDict from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -24,7 +25,7 @@ class ParcelCreateRequestTypedDict(TypedDict): r"""Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted.""" extra: NotRequired[ParcelExtraTypedDict] r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: NotRequired[str] @@ -50,7 +51,23 @@ class ParcelCreateRequest(BaseModel): extra: Optional[ParcelExtra] = None r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ metadata: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["extra", "metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/parcelextra.py b/src/shippo/models/components/parcelextra.py index 6192ec19..09f2fd70 100644 --- a/src/shippo/models/components/parcelextra.py +++ b/src/shippo/models/components/parcelextra.py @@ -4,39 +4,86 @@ from .cod import Cod, CodTypedDict from .parcelinsurance import ParcelInsurance, ParcelInsuranceTypedDict import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict class ParcelExtraTypedDict(TypedDict): r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ cod: NotRequired[CodTypedDict] r"""Specify collection on delivery details (UPS only).""" insurance: NotRequired[ParcelInsuranceTypedDict] - r"""To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" + r"""To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" reference_1: NotRequired[str] - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | + """ reference_2: NotRequired[str] - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ class ParcelExtra(BaseModel): r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment. - See the Parcel Extra table below for all available services. + The following values are supported for the `extra` field of the parcel object. """ cod: Annotated[Optional[Cod], pydantic.Field(alias="COD")] = None r"""Specify collection on delivery details (UPS only).""" insurance: Optional[ParcelInsurance] = None - r"""To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" + r"""To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" reference_1: Optional[str] = None - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | + """ reference_2: Optional[str] = None - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["COD", "insurance", "reference_1", "reference_2"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + ParcelExtra.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/parcelinsurance.py b/src/shippo/models/components/parcelinsurance.py index 4f237c79..e27d585b 100644 --- a/src/shippo/models/components/parcelinsurance.py +++ b/src/shippo/models/components/parcelinsurance.py @@ -2,7 +2,8 @@ from __future__ import annotations from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -16,7 +17,7 @@ class ParcelInsuranceProvider(str, Enum): class ParcelInsuranceTypedDict(TypedDict): - r"""To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" + r"""To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" amount: NotRequired[str] r"""Declared value of the goods you want to insure.""" @@ -29,7 +30,7 @@ class ParcelInsuranceTypedDict(TypedDict): class ParcelInsurance(BaseModel): - r"""To add insurace to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" + r"""To add insurance to your parcel, specify `amount`, `content` and `currency`.

If you do not want to add insurance to you parcel, do not set these parameters.""" amount: Optional[str] = None r"""Declared value of the goods you want to insure.""" @@ -42,3 +43,19 @@ class ParcelInsurance(BaseModel): provider: Optional[ParcelInsuranceProvider] = None r"""To have insurance cover provided by a carrier directly instead of Shippo's provider (XCover), set provider to `FEDEX`, `UPS`, or `ONTRAC`.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["amount", "content", "currency", "provider"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/parcelpaginatedlist.py b/src/shippo/models/components/parcelpaginatedlist.py index cc8a6f84..7d223a12 100644 --- a/src/shippo/models/components/parcelpaginatedlist.py +++ b/src/shippo/models/components/parcelpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .parcel import Parcel, ParcelTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class ParcelPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Parcel]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/pickup.py b/src/shippo/models/components/pickup.py index 59e2310e..929adbfe 100644 --- a/src/shippo/models/components/pickup.py +++ b/src/shippo/models/components/pickup.py @@ -4,7 +4,8 @@ from .location import Location, LocationTypedDict from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -21,7 +22,7 @@ class PickupStatus(str, Enum): class PickupTypedDict(TypedDict): carrier_account: str r"""The object ID of your USPS or DHL Express carrier account. - You can retrieve this from your Rate requests or our Carrier Accounts endpoint. + You can retrieve this from your Rate requests or our Carrier Accounts endpoint. """ location: LocationTypedDict r"""Location where the parcel(s) will be picked up.""" @@ -75,7 +76,7 @@ class PickupTypedDict(TypedDict): class Pickup(BaseModel): carrier_account: str r"""The object ID of your USPS or DHL Express carrier account. - You can retrieve this from your Rate requests or our Carrier Accounts endpoint. + You can retrieve this from your Rate requests or our Carrier Accounts endpoint. """ location: Location @@ -140,3 +141,34 @@ class Pickup(BaseModel): is_test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "metadata", + "object_created", + "object_id", + "object_updated", + "confirmed_start_time", + "confirmed_end_time", + "cancel_by_time", + "status", + "confirmation_code", + "timezone", + "messages", + "is_test", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/pickupbase.py b/src/shippo/models/components/pickupbase.py index acbee7a2..323961b2 100644 --- a/src/shippo/models/components/pickupbase.py +++ b/src/shippo/models/components/pickupbase.py @@ -3,7 +3,8 @@ from __future__ import annotations from .location import Location, LocationTypedDict from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -11,7 +12,7 @@ class PickupBaseTypedDict(TypedDict): carrier_account: str r"""The object ID of your USPS or DHL Express carrier account. - You can retrieve this from your Rate requests or our Carrier Accounts endpoint. + You can retrieve this from your Rate requests or our Carrier Accounts endpoint. """ location: LocationTypedDict r"""Location where the parcel(s) will be picked up.""" @@ -34,7 +35,7 @@ class PickupBaseTypedDict(TypedDict): class PickupBase(BaseModel): carrier_account: str r"""The object ID of your USPS or DHL Express carrier account. - You can retrieve this from your Rate requests or our Carrier Accounts endpoint. + You can retrieve this from your Rate requests or our Carrier Accounts endpoint. """ location: Location @@ -57,3 +58,19 @@ class PickupBase(BaseModel): r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/ponumber.py b/src/shippo/models/components/ponumber.py index 784de515..a2da5b21 100644 --- a/src/shippo/models/components/ponumber.py +++ b/src/shippo/models/components/ponumber.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -17,6 +18,11 @@ class PoNumberTypedDict(TypedDict): value: NotRequired[str] r"""Optional text to be printed on the shipping label for PO number. Up to 40 characters. If this is provided, reference_2 will be ignored. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | """ ref_sort: NotRequired[int] r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" @@ -34,7 +40,28 @@ class PoNumber(BaseModel): value: Optional[str] = None r"""Optional text to be printed on the shipping label for PO number. Up to 40 characters. If this is provided, reference_2 will be ignored. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | """ ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/rate.py b/src/shippo/models/components/rate.py index 79a5e5ed..4e40dc7d 100644 --- a/src/shippo/models/components/rate.py +++ b/src/shippo/models/components/rate.py @@ -8,7 +8,8 @@ ) from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -157,3 +158,31 @@ class Rate(BaseModel): zone: Optional[str] = None r"""The parcel's transit zone token. These tokens can vary depending on the provider.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "arrives_by", + "duration_terms", + "estimated_days", + "included_insurance_price", + "messages", + "provider_image_75", + "provider_image_200", + "test", + "zone", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/ratepaginatedlist.py b/src/shippo/models/components/ratepaginatedlist.py index 54f48394..4f87810c 100644 --- a/src/shippo/models/components/ratepaginatedlist.py +++ b/src/shippo/models/components/ratepaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .rate import Rate, RateTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class RatePaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Rate]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/refund.py b/src/shippo/models/components/refund.py index b0a3e179..a0858aa0 100644 --- a/src/shippo/models/components/refund.py +++ b/src/shippo/models/components/refund.py @@ -3,7 +3,8 @@ from __future__ import annotations from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -55,3 +56,29 @@ class Refund(BaseModel): transaction: Optional[str] = None r"""Object ID of the Transaction to be refunded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "object_created", + "object_id", + "object_owner", + "object_updated", + "status", + "test", + "transaction", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/refundpaginatedlist.py b/src/shippo/models/components/refundpaginatedlist.py index 30bbb4a5..27e9b148 100644 --- a/src/shippo/models/components/refundpaginatedlist.py +++ b/src/shippo/models/components/refundpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .refund import Refund, RefundTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class RefundPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Refund]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/refundrequestbody.py b/src/shippo/models/components/refundrequestbody.py index 75e578b1..5357da95 100644 --- a/src/shippo/models/components/refundrequestbody.py +++ b/src/shippo/models/components/refundrequestbody.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -16,3 +17,25 @@ class RefundRequestBody(BaseModel): transaction: str async_: Annotated[Optional[bool], pydantic.Field(alias="async")] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["async"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + RefundRequestBody.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/responsemessage.py b/src/shippo/models/components/responsemessage.py index 705a0ae8..45e36b5c 100644 --- a/src/shippo/models/components/responsemessage.py +++ b/src/shippo/models/components/responsemessage.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -32,3 +33,19 @@ class ResponseMessage(BaseModel): text: Optional[str] = None r"""Message content""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["source", "code", "text"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/rmanumber.py b/src/shippo/models/components/rmanumber.py index dee93401..d67e0dd2 100644 --- a/src/shippo/models/components/rmanumber.py +++ b/src/shippo/models/components/rmanumber.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -15,7 +16,13 @@ class RmaNumberTypedDict(TypedDict): this property. """ value: NotRequired[str] - r"""Optional text to be printed on the shipping label for RMA number. Up to 40 characters.""" + r"""Optional text to be printed on the shipping label for RMA number. Up to 40 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 20 characters | + """ ref_sort: NotRequired[int] r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" @@ -30,7 +37,29 @@ class RmaNumber(BaseModel): """ value: Optional[str] = None - r"""Optional text to be printed on the shipping label for RMA number. Up to 40 characters.""" + r"""Optional text to be printed on the shipping label for RMA number. Up to 40 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 20 characters | + """ ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicegroup.py b/src/shippo/models/components/servicegroup.py index 61ebf695..0dc310cf 100644 --- a/src/shippo/models/components/servicegroup.py +++ b/src/shippo/models/components/servicegroup.py @@ -6,7 +6,8 @@ ServiceGroupAccountAndServiceLevelTypedDict, ) from .servicegrouptypeenum import ServiceGroupTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -91,3 +92,28 @@ class ServiceGroup(BaseModel): is_active: Optional[bool] = None r"""True if the service group is enabled, false otherwise.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "flat_rate", + "flat_rate_currency", + "free_shipping_threshold_currency", + "free_shipping_threshold_min", + "rate_adjustment", + "is_active", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicegroupaccountandservicelevel.py b/src/shippo/models/components/servicegroupaccountandservicelevel.py index b84c0824..eab269f9 100644 --- a/src/shippo/models/components/servicegroupaccountandservicelevel.py +++ b/src/shippo/models/components/servicegroupaccountandservicelevel.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -11,7 +12,7 @@ class ServiceGroupAccountAndServiceLevelTypedDict(TypedDict): r"""ID of a Carrier Account object""" service_level_token: NotRequired[str] r"""Service level token, e.g. `usps_priority` or `fedex_ground`.
- See Service Levels. + See Service Levels. """ @@ -21,5 +22,21 @@ class ServiceGroupAccountAndServiceLevel(BaseModel): service_level_token: Optional[str] = None r"""Service level token, e.g. `usps_priority` or `fedex_ground`.
- See Service Levels. + See Service Levels. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["account_object_id", "service_level_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicegroupcreaterequest.py b/src/shippo/models/components/servicegroupcreaterequest.py index 3732af59..b273dfa3 100644 --- a/src/shippo/models/components/servicegroupcreaterequest.py +++ b/src/shippo/models/components/servicegroupcreaterequest.py @@ -6,7 +6,8 @@ ServiceGroupAccountAndServiceLevelTypedDict, ) from .servicegrouptypeenum import ServiceGroupTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -81,3 +82,27 @@ class ServiceGroupCreateRequest(BaseModel): rate_adjustment: Optional[int] = 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.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "flat_rate", + "flat_rate_currency", + "free_shipping_threshold_currency", + "free_shipping_threshold_min", + "rate_adjustment", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicegroupupdaterequest.py b/src/shippo/models/components/servicegroupupdaterequest.py index 47deca33..5361e78d 100644 --- a/src/shippo/models/components/servicegroupupdaterequest.py +++ b/src/shippo/models/components/servicegroupupdaterequest.py @@ -6,7 +6,8 @@ ServiceGroupAccountAndServiceLevelTypedDict, ) from .servicegrouptypeenum import ServiceGroupTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -91,3 +92,27 @@ class ServiceGroupUpdateRequest(BaseModel): rate_adjustment: Optional[int] = 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.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "flat_rate", + "flat_rate_currency", + "free_shipping_threshold_currency", + "free_shipping_threshold_min", + "rate_adjustment", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicelevel.py b/src/shippo/models/components/servicelevel.py index 05e1e637..525c4789 100644 --- a/src/shippo/models/components/servicelevel.py +++ b/src/shippo/models/components/servicelevel.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -22,7 +23,7 @@ class ServiceLevelTypedDict(TypedDict): r"""Further clarification of the service.""" token: NotRequired[str] r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ extended_token: NotRequired[str] r"""Unique, extended version of the Service Level \"token\". @@ -48,10 +49,26 @@ class ServiceLevel(BaseModel): token: Optional[str] = None r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ extended_token: Optional[str] = None r"""Unique, extended version of the Service Level \"token\". Guaranteed to be unique across all Service Levels, and may help offer insight into the specific Service Level it describes. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "terms", "token", "extended_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/servicelevelenumset.py b/src/shippo/models/components/servicelevelenumset.py index 908d3400..3985f0a4 100644 --- a/src/shippo/models/components/servicelevelenumset.py +++ b/src/shippo/models/components/servicelevelenumset.py @@ -33,7 +33,7 @@ from .servicelevelpostitalianeenum import ServiceLevelPostItalianeEnum from .servicelevelpurolatorenum import ServiceLevelPurolatorEnum from .servicelevelroyalmailenum import ServiceLevelRoyalMailEnum -from .servicelevelsendleenum import ServiceLevelSendleEnum +from .servicelevelroyalmailsfenum import ServiceLevelRoyalMailSFEnum from .servicelevelswyftenum import ServiceLevelSwyftEnum from .serviceleveludsenum import ServiceLevelUDSEnum from .servicelevelupsenum import ServiceLevelUPSEnum @@ -76,7 +76,7 @@ ServiceLevelPostItalianeEnum, ServiceLevelePostGlobalEnum, ServiceLevelRoyalMailEnum, - ServiceLevelSendleEnum, + ServiceLevelRoyalMailSFEnum, ServiceLevelOnTracEnum, ServiceLevelJitsuEnum, ServiceLevelLasershipEnum, @@ -121,7 +121,7 @@ ServiceLevelPostItalianeEnum, ServiceLevelePostGlobalEnum, ServiceLevelRoyalMailEnum, - ServiceLevelSendleEnum, + ServiceLevelRoyalMailSFEnum, ServiceLevelOnTracEnum, ServiceLevelJitsuEnum, ServiceLevelLasershipEnum, diff --git a/src/shippo/models/components/servicelevelroyalmailenum.py b/src/shippo/models/components/servicelevelroyalmailenum.py index e6e8cfc9..ebfa30e6 100644 --- a/src/shippo/models/components/servicelevelroyalmailenum.py +++ b/src/shippo/models/components/servicelevelroyalmailenum.py @@ -20,7 +20,7 @@ class ServiceLevelRoyalMailEnum(str, Enum): | royal_mail_standard_first_class | Standard First Class | royal_mail_standard_second_class | Standard Second Class | royal_mail_tracked_24_no_signature | Royal Mail Tracked 24 No Signature - | royal_mail_tracked_48_no_signature | Royal Mail Ttacked 48 No Signature + | royal_mail_tracked_48_no_signature | Royal Mail Tracked 48 No Signature | royal_mail_intl_bus_mail_lrg_ltr_zone_sort_pri | International Business Mail Large Letter Zone Sort Priority | royal_mail_intl_bus_parcels_tracked_zone_sort | International Business Parcels Tracked Zone Sort | royal_mail_intl_bus_parcels_tracked_country_priced | International Business Parcels Tracked Country Priced diff --git a/src/shippo/models/components/servicelevelroyalmailsfenum.py b/src/shippo/models/components/servicelevelroyalmailsfenum.py new file mode 100644 index 00000000..e5608a2d --- /dev/null +++ b/src/shippo/models/components/servicelevelroyalmailsfenum.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class ServiceLevelRoyalMailSFEnum(str, Enum): + r"""|Token | Service name| + |:---|:---| + | royal_mail_sf_tracked_48 | Royal Mail Tracked 48| + | royal_mail_sf_tracked_48_for_post_office_drop | Royal Mail Tracked 48 for Post Office Drop| + | royal_mail_sf_international_tracked | Royal Mail International Tracked | + | royal_mail_sf_tracked_48_with_signature_confirmation | Royal Mail Tracked 48 with Signature | + | royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation | Royal Mail Tracked 48 for Post Office Drop with Signature | + | royal_mail_sf_tracked_24 | Royal Mail Tracked 24 | + | royal_mail_sf_tracked_24_for_post_office_drop | Royal Mail Tracked 24 for Post Office Drop | + | royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation | Royal Mail Tracked 24 for Post Office Drop with Signature | + | royal_mail_sf_international_tracked_for_post_office_drop | Royal Mail International Tracked for Post Office Drop | + | royal_mail_sf_international_tracked_with_signature_confirmation | Royal Mail International Tracked with Signature | + | royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation | Royal Mail International Tracked for Post Office Drop with Signature | + + """ + + ROYAL_MAIL_SF_TRACKED_48 = "royal_mail_sf_tracked_48" + ROYAL_MAIL_SF_TRACKED_48_FOR_POST_OFFICE_DROP = ( + "royal_mail_sf_tracked_48_for_post_office_drop" + ) + ROYAL_MAIL_SF_INTERNATIONAL_TRACKED = "royal_mail_sf_international_tracked" + ROYAL_MAIL_SF_TRACKED_48_WITH_SIGNATURE_CONFIRMATION = ( + "royal_mail_sf_tracked_48_with_signature_confirmation" + ) + ROYAL_MAIL_SF_TRACKED_48_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION = ( + "royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation" + ) + ROYAL_MAIL_SF_TRACKED_24 = "royal_mail_sf_tracked_24" + ROYAL_MAIL_SF_TRACKED_24_FOR_POST_OFFICE_DROP = ( + "royal_mail_sf_tracked_24_for_post_office_drop" + ) + ROYAL_MAIL_SF_TRACKED_24_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION = ( + "royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation" + ) + ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_FOR_POST_OFFICE_DROP = ( + "royal_mail_sf_international_tracked_for_post_office_drop" + ) + ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_WITH_SIGNATURE_CONFIRMATION = ( + "royal_mail_sf_international_tracked_with_signature_confirmation" + ) + ROYAL_MAIL_SF_INTERNATIONAL_TRACKED_FOR_POST_OFFICE_DROP_WITH_SIGNATURE_CONFIRMATION = "royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation" diff --git a/src/shippo/models/components/servicelevelsendleenum.py b/src/shippo/models/components/servicelevelsendleenum.py deleted file mode 100644 index ccd42e48..00000000 --- a/src/shippo/models/components/servicelevelsendleenum.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from enum import Enum - - -class ServiceLevelSendleEnum(str, Enum): - r"""|Token | Service name| - |:---|:---| - | sendle_parcel | Sendle Parcel| - | sendle_standard_dropoff | Sendle Standard Dropoff| - - """ - - SENDLE_PARCEL = "sendle_parcel" - SENDLE_STANDARD_DROPOFF = "sendle_standard_dropoff" diff --git a/src/shippo/models/components/servicelevelwithparent.py b/src/shippo/models/components/servicelevelwithparent.py index 1eb745ad..e61be841 100644 --- a/src/shippo/models/components/servicelevelwithparent.py +++ b/src/shippo/models/components/servicelevelwithparent.py @@ -2,7 +2,8 @@ from __future__ import annotations from .servicelevel import ServiceLevel, ServiceLevelTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -19,7 +20,7 @@ class ServiceLevelWithParentTypedDict(TypedDict): r"""Further clarification of the service.""" token: NotRequired[str] r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ extended_token: NotRequired[str] r"""Unique, extended version of the Service Level \"token\". @@ -42,7 +43,7 @@ class ServiceLevelWithParent(BaseModel): token: Optional[str] = None r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. - See servicelevels. + See servicelevels. """ extended_token: Optional[str] = None @@ -51,3 +52,21 @@ class ServiceLevelWithParent(BaseModel): """ parent_servicelevel: Optional[ServiceLevel] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["name", "terms", "token", "extended_token", "parent_servicelevel"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/shipment.py b/src/shippo/models/components/shipment.py index a0021e31..c0e2819d 100644 --- a/src/shippo/models/components/shipment.py +++ b/src/shippo/models/components/shipment.py @@ -9,7 +9,8 @@ from .shipmentextra import ShipmentExtra, ShipmentExtraTypedDict from datetime import datetime from enum import Enum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -33,9 +34,9 @@ class ShipmentTypedDict(TypedDict): metadata: str r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object.""" address_from: AddressTypedDict - r"""Address object of the sender / seller. Will be returned expanded by default.""" + r"""Address object of the sender / seller. Will be returned expanded by default.""" address_to: AddressTypedDict - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" carrier_accounts: List[str] r"""An array of object_ids of the carrier account objects to be used for getting shipping rates for this shipment. If no carrier account object_ids are set in this field, Shippo will attempt to generate rates using all the @@ -87,10 +88,10 @@ class Shipment(BaseModel): r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object.""" address_from: Address - r"""Address object of the sender / seller. Will be returned expanded by default.""" + r"""Address object of the sender / seller. Will be returned expanded by default.""" address_to: Address - r"""Address object of the recipient / buyer. Will be returned expanded by default.""" + r"""Address object of the recipient / buyer. Will be returned expanded by default.""" carrier_accounts: List[str] r"""An array of object_ids of the carrier account objects to be used for getting shipping rates for this shipment. @@ -147,3 +148,21 @@ class Shipment(BaseModel): test: Optional[bool] = None r"""Indicates whether the object has been created in test mode.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["extra", "shipment_date", "address_return", "customs_declaration", "test"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/shipmentcreaterequest.py b/src/shippo/models/components/shipmentcreaterequest.py index 0d13e6eb..c63cc2df 100644 --- a/src/shippo/models/components/shipmentcreaterequest.py +++ b/src/shippo/models/components/shipmentcreaterequest.py @@ -13,7 +13,8 @@ from .parcelcreaterequest import ParcelCreateRequest, ParcelCreateRequestTypedDict from .shipmentextra import ShipmentExtra, ShipmentExtraTypedDict import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -74,6 +75,13 @@ class ShipmentCreateRequestTypedDict(TypedDict): address_from: ShipmentCreateRequestAddressFromTypedDict address_to: ShipmentCreateRequestAddressToTypedDict parcels: List[ShipmentCreateRequestParcelTypedDict] + r"""List of parcels to be shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 items | + """ extra: NotRequired[ShipmentExtraTypedDict] r"""An object holding optional extra services to be requested.""" metadata: NotRequired[str] @@ -87,7 +95,7 @@ class ShipmentCreateRequestTypedDict(TypedDict): customs_declaration: NotRequired[CustomsDeclarationUnionTypedDict] async_: NotRequired[bool] carrier_accounts: NotRequired[List[str]] - r"""List of Carrier Accounts `object_id`s used to filter + r"""List of Carrier Accounts `object_id`s used to filter the returned rates. If set, only rates from these carriers will be returned. """ @@ -98,6 +106,13 @@ class ShipmentCreateRequest(BaseModel): address_to: ShipmentCreateRequestAddressTo parcels: List[ShipmentCreateRequestParcel] + r"""List of parcels to be shipped. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 items | + """ extra: Optional[ShipmentExtra] = None r"""An object holding optional extra services to be requested.""" @@ -118,6 +133,38 @@ class ShipmentCreateRequest(BaseModel): async_: Annotated[Optional[bool], pydantic.Field(alias="async")] = None carrier_accounts: Optional[List[str]] = None - r"""List of Carrier Accounts `object_id`s used to filter + r"""List of Carrier Accounts `object_id`s used to filter the returned rates. If set, only rates from these carriers will be returned. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "extra", + "metadata", + "shipment_date", + "address_return", + "customs_declaration", + "async", + "carrier_accounts", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + ShipmentCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/shipmentextra.py b/src/shippo/models/components/shipmentextra.py index d6d0d21a..8ec5c633 100644 --- a/src/shippo/models/components/shipmentextra.py +++ b/src/shippo/models/components/shipmentextra.py @@ -20,7 +20,8 @@ from .upsreferencefields import UPSReferenceFields, UPSReferenceFieldsTypedDict from enum import Enum import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -172,9 +173,21 @@ class ShipmentExtraTypedDict(TypedDict): qr_code_requested: NotRequired[bool] r"""Request a QR code for a given transaction when creating a shipping label (USPS domestic and Evri UK only).""" reference_1: NotRequired[str] - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | + """ reference_2: NotRequired[str] - r"""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.""" + r"""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. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ request_retail_rates: NotRequired[bool] r"""Returns retail rates instead of account-based rates (UPS and FedEx only).""" return_service_type: NotRequired[ReturnServiceTypeTypedDict] @@ -191,6 +204,17 @@ class ShipmentExtraTypedDict(TypedDict): """ store_number: NotRequired[UPSReferenceFieldsTypedDict] transaction_reference_number: NotRequired[UPSReferenceFieldsTypedDict] + usmca_eligible: NotRequired[bool] + r"""UPS only. Request USMCA (United States-Mexico-Canada Agreement) preferential tariff treatment. + When enabled, it includes the USMCA eligibility declaration in customs documentation. + + Supported routes and value limits: + - USA/Canada → Mexico: ≤ $1,000 USD + - Canada/Mexico → USA: ≤ $2,500 USD + - USA/Mexico → Canada: ≤ $3,300 CAD + + Only for declaration-only shipments, full USMCA - FormType 04 (Certificate of Origin) is not supported. + """ class ShipmentExtra(BaseModel): @@ -315,10 +339,22 @@ class ShipmentExtra(BaseModel): r"""Request a QR code for a given transaction when creating a shipping label (USPS domestic and Evri UK only).""" reference_1: Optional[str] = None - r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters.""" + r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 40 characters (Express services); Max 30 characters (Ground services) | + """ reference_2: Optional[str] = None - r"""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.""" + r"""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. + + **Carrier-Specific Constraints:** + | Carrier | Constraints | + |:---|:---| + | FedEx | Max 30 characters | + """ request_retail_rates: Optional[bool] = None r"""Returns retail rates instead of account-based rates (UPS and FedEx only).""" @@ -344,3 +380,91 @@ class ShipmentExtra(BaseModel): store_number: Optional[UPSReferenceFields] = None transaction_reference_number: Optional[UPSReferenceFields] = None + + usmca_eligible: Optional[bool] = None + r"""UPS only. Request USMCA (United States-Mexico-Canada Agreement) preferential tariff treatment. + When enabled, it includes the USMCA eligibility declaration in customs documentation. + + Supported routes and value limits: + - USA/Canada → Mexico: ≤ $1,000 USD + - Canada/Mexico → USA: ≤ $2,500 USD + - USA/Mexico → Canada: ≤ $3,300 CAD + + Only for declaration-only shipments, full USMCA - FormType 04 (Certificate of Origin) is not supported. + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "accounts_receivable_customer_account", + "alcohol", + "ancillary_endorsement", + "appropriation_number", + "authority_to_leave", + "bill_of_lading_number", + "billing", + "bypass_address_validation", + "carbon_neutral", + "carrier_hub_id", + "carrier_hub_travel_time", + "COD", + "cod_number", + "container_type", + "critical_pull_time", + "customer_branch", + "customer_reference", + "dangerous_goods", + "dangerous_goods_code", + "dealer_order_number", + "delivery_instructions", + "dept_number", + "dry_ice", + "fda_product_code", + "fulfillment_center", + "insurance", + "invoice_number", + "is_return", + "lasership_attrs", + "lasership_declared_value", + "manifest_number", + "model_number", + "part_number", + "po_number", + "preferred_delivery_timeframe", + "premium", + "production_code", + "purchase_request_number", + "qr_code_requested", + "reference_1", + "reference_2", + "request_retail_rates", + "return_service_type", + "rma_number", + "saturday_delivery", + "salesperson_number", + "serial_number", + "signature_confirmation", + "store_number", + "transaction_reference_number", + "usmca_eligible", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + ShipmentExtra.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/shipmentpaginatedlist.py b/src/shippo/models/components/shipmentpaginatedlist.py index 86561ecb..b2d27288 100644 --- a/src/shippo/models/components/shipmentpaginatedlist.py +++ b/src/shippo/models/components/shipmentpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .shipment import Shipment, ShipmentTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class ShipmentPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Shipment]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/shippoaccount.py b/src/shippo/models/components/shippoaccount.py index c131c879..47e90da0 100644 --- a/src/shippo/models/components/shippoaccount.py +++ b/src/shippo/models/components/shippoaccount.py @@ -2,7 +2,8 @@ from __future__ import annotations from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -31,3 +32,21 @@ class ShippoAccount(BaseModel): object_id: Optional[str] = None object_updated: Optional[datetime] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["company_name", "object_created", "object_id", "object_updated"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/shippoaccountpaginatedlist.py b/src/shippo/models/components/shippoaccountpaginatedlist.py index ae7b10c1..f545f8db 100644 --- a/src/shippo/models/components/shippoaccountpaginatedlist.py +++ b/src/shippo/models/components/shippoaccountpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .shippoaccount import ShippoAccount, ShippoAccountTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class ShippoAccountPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[ShippoAccount]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/track.py b/src/shippo/models/components/track.py index 51b22452..688927d2 100644 --- a/src/shippo/models/components/track.py +++ b/src/shippo/models/components/track.py @@ -11,14 +11,15 @@ TrackingStatusLocationBaseTypedDict, ) from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict class TrackTypedDict(TypedDict): carrier: str - r"""Name of the carrier of the shipment to track. See Carriers.""" + r"""Name of the carrier of the shipment to track. See Carriers.""" messages: List[str] tracking_history: List[TrackingStatusTypedDict] r"""A list of tracking events, following the same structure as tracking_status. @@ -47,7 +48,7 @@ class TrackTypedDict(TypedDict): class Track(BaseModel): carrier: str - r"""Name of the carrier of the shipment to track. See Carriers.""" + r"""Name of the carrier of the shipment to track. See Carriers.""" messages: List[str] @@ -83,3 +84,30 @@ class Track(BaseModel): r"""The object_id of the transaction associated with this tracking object. This field is visible only to the object owner of the transaction. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "address_from", + "address_to", + "eta", + "metadata", + "original_eta", + "servicelevel", + "tracking_status", + "transaction", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/trackingstatus.py b/src/shippo/models/components/trackingstatus.py index 626f55e3..d075a1c7 100644 --- a/src/shippo/models/components/trackingstatus.py +++ b/src/shippo/models/components/trackingstatus.py @@ -11,7 +11,8 @@ TrackingStatusSubstatusTypedDict, ) from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -57,3 +58,19 @@ class TrackingStatus(BaseModel): status_date: Optional[datetime] = None r"""Date and time when the carrier scanned this tracking event. This is displayed in UTC.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location", "substatus", "status_date"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/trackingstatuslocationbase.py b/src/shippo/models/components/trackingstatuslocationbase.py index c5363544..ba3007d3 100644 --- a/src/shippo/models/components/trackingstatuslocationbase.py +++ b/src/shippo/models/components/trackingstatuslocationbase.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -21,3 +22,19 @@ class TrackingStatusLocationBase(BaseModel): state: Optional[str] = None zip: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["city", "country", "state", "zip"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/tracksrequest.py b/src/shippo/models/components/tracksrequest.py index 63c5c9b6..dbe86fad 100644 --- a/src/shippo/models/components/tracksrequest.py +++ b/src/shippo/models/components/tracksrequest.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -24,3 +25,19 @@ class TracksRequest(BaseModel): metadata: Optional[str] = None r"""A string of up to 100 characters that can be filled with any additional information you want to attach to the object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/transaction.py b/src/shippo/models/components/transaction.py index 273d208b..6e0c8d61 100644 --- a/src/shippo/models/components/transaction.py +++ b/src/shippo/models/components/transaction.py @@ -39,6 +39,22 @@ class CreatedBy(BaseModel): username: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["first_name", "last_name", "username"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + RateUnionTypedDict = TypeAliasType("RateUnionTypedDict", Union[CoreRateTypedDict, str]) r"""ID of the Rate object for which a Label has to be obtained. @@ -194,51 +210,48 @@ class Transaction(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "commercial_invoice_url", - "created_by", - "eta", - "label_file_type", - "label_url", - "messages", - "metadata", - "object_created", - "object_id", - "object_owner", - "object_state", - "object_updated", - "parcel", - "qr_code_url", - "rate", - "status", - "test", - "tracking_number", - "tracking_status", - "tracking_url_provider", - ] - nullable_fields = ["created_by"] - null_default_fields = [] - + optional_fields = set( + [ + "commercial_invoice_url", + "created_by", + "eta", + "label_file_type", + "label_url", + "messages", + "metadata", + "object_created", + "object_id", + "object_owner", + "object_state", + "object_updated", + "parcel", + "qr_code_url", + "rate", + "status", + "test", + "tracking_number", + "tracking_status", + "tracking_url_provider", + ] + ) + nullable_fields = set(["created_by"]) serialized = handler(self) - m = {} - for n, f in self.model_fields.items(): + for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/shippo/models/components/transactioncreaterequest.py b/src/shippo/models/components/transactioncreaterequest.py index 85036ec1..38f8bd0c 100644 --- a/src/shippo/models/components/transactioncreaterequest.py +++ b/src/shippo/models/components/transactioncreaterequest.py @@ -3,7 +3,8 @@ from __future__ import annotations from .labelfiletypeenum import LabelFileTypeEnum import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -32,3 +33,25 @@ class TransactionCreateRequest(BaseModel): metadata: Optional[str] = None order: Optional[str] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["async", "label_file_type", "metadata", "order"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TransactionCreateRequest.model_rebuild() +except NameError: + pass diff --git a/src/shippo/models/components/transactionpaginatedlist.py b/src/shippo/models/components/transactionpaginatedlist.py index acca0cd3..f4b70fbe 100644 --- a/src/shippo/models/components/transactionpaginatedlist.py +++ b/src/shippo/models/components/transactionpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .transaction import Transaction, TransactionTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -19,3 +20,19 @@ class TransactionPaginatedList(BaseModel): previous: Optional[str] = None results: Optional[List[Transaction]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/upsconnectexistingownaccountparameters.py b/src/shippo/models/components/upsconnectexistingownaccountparameters.py index aea15005..7a6a7cb2 100644 --- a/src/shippo/models/components/upsconnectexistingownaccountparameters.py +++ b/src/shippo/models/components/upsconnectexistingownaccountparameters.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -10,6 +11,13 @@ class UPSConnectExistingOwnAccountParametersTypedDict(TypedDict): r"""An array of additional parameters for the account, such as e.g. password or token. Please check the carrier accounts tutorial page for the parameters per carrier.
To protect account information, this field will be masked in any API response. + In the case of masked fields, they should be handled carefully. + + Fields also must consider: + - Not providing a *fields* in parameters will not result in a change to any configured value + - Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value + - Providing *field* with null will clear the configured value + - Providing *field* with any other value will change the configured value and may affect the behavior of the account. """ account_number: str @@ -52,6 +60,13 @@ class UPSConnectExistingOwnAccountParameters(BaseModel): r"""An array of additional parameters for the account, such as e.g. password or token. Please check the carrier accounts tutorial page for the parameters per carrier.
To protect account information, this field will be masked in any API response. + In the case of masked fields, they should be handled carefully. + + Fields also must consider: + - Not providing a *fields* in parameters will not result in a change to any configured value + - Providing a value in a *masked field* with ****** (exactly 6 asterisks) will not change the configured value + - Providing *field* with null will clear the configured value + - Providing *field* with any other value will change the configured value and may affect the behavior of the account. """ account_number: str @@ -109,3 +124,29 @@ class UPSConnectExistingOwnAccountParameters(BaseModel): invoice_value: Optional[str] = None r"""Only required if has_invoice is true. Max 16 digits before decimal and 2 digits after decimal""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "aia_country_iso2", + "billing_address_street2", + "currency_code", + "invoice_controlid", + "invoice_date", + "invoice_number", + "invoice_value", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/upsreferencefields.py b/src/shippo/models/components/upsreferencefields.py index 69e52438..9b078b0f 100644 --- a/src/shippo/models/components/upsreferencefields.py +++ b/src/shippo/models/components/upsreferencefields.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -24,3 +25,19 @@ class UPSReferenceFields(BaseModel): ref_sort: Optional[int] = None r"""Order UPS reference fields are printed on ZPL labels. For UPS shipments, if you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references using unique integers.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["prefix", "value", "ref_sort"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/userparceltemplate.py b/src/shippo/models/components/userparceltemplate.py index e30c105b..c14b7eb8 100644 --- a/src/shippo/models/components/userparceltemplate.py +++ b/src/shippo/models/components/userparceltemplate.py @@ -5,7 +5,8 @@ from .distanceunitenum import DistanceUnitEnum from .weightunitenum import WeightUnitEnum from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -71,3 +72,34 @@ class UserParcelTemplate(BaseModel): r"""Date and time of last update on User Parcel Template""" template: Optional[CarrierParcelTemplate] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "distance_unit", + "height", + "length", + "name", + "weight", + "weight_unit", + "width", + "object_created", + "object_id", + "object_owner", + "object_updated", + "template", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/userparceltemplatelist.py b/src/shippo/models/components/userparceltemplatelist.py index 88e228a7..abc68083 100644 --- a/src/shippo/models/components/userparceltemplatelist.py +++ b/src/shippo/models/components/userparceltemplatelist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .userparceltemplate import UserParcelTemplate, UserParcelTemplateTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -13,3 +14,19 @@ class UserParcelTemplateListTypedDict(TypedDict): class UserParcelTemplateList(BaseModel): results: Optional[List[UserParcelTemplate]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/userparceltemplateupdaterequest.py b/src/shippo/models/components/userparceltemplateupdaterequest.py index f8c14070..c3054ace 100644 --- a/src/shippo/models/components/userparceltemplateupdaterequest.py +++ b/src/shippo/models/components/userparceltemplateupdaterequest.py @@ -3,7 +3,8 @@ from __future__ import annotations from .distanceunitenum import DistanceUnitEnum from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -46,3 +47,19 @@ class UserParcelTemplateUpdateRequest(BaseModel): weight_unit: Optional[WeightUnitEnum] = None r"""The unit used for weight.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["weight", "weight_unit"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py b/src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py index 241fdc48..e515edb6 100644 --- a/src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py +++ b/src/shippo/models/components/userparceltemplatewithcarriertemplatecreaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -25,3 +26,19 @@ class UserParcelTemplateWithCarrierTemplateCreateRequest(BaseModel): weight_unit: Optional[WeightUnitEnum] = None r"""The unit used for weight.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["template", "weight", "weight_unit"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py b/src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py index 7f744faf..3a43b031 100644 --- a/src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py +++ b/src/shippo/models/components/userparceltemplatewithoutcarriertemplatecreaterequest.py @@ -3,7 +3,8 @@ from __future__ import annotations from .distanceunitenum import DistanceUnitEnum from .weightunitenum import WeightUnitEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -46,3 +47,19 @@ class UserParcelTemplateWithoutCarrierTemplateCreateRequest(BaseModel): weight_unit: Optional[WeightUnitEnum] = None r"""The unit used for weight.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["weight", "weight_unit"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhook.py b/src/shippo/models/components/webhook.py index 083485a2..7d8efc5c 100644 --- a/src/shippo/models/components/webhook.py +++ b/src/shippo/models/components/webhook.py @@ -2,7 +2,8 @@ from __future__ import annotations from datetime import datetime -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -50,3 +51,28 @@ class Webhook(BaseModel): object_owner: Optional[str] = None r"""Username of the user who created the webhook.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "active", + "is_test", + "object_created", + "object_id", + "object_updated", + "object_owner", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhookpaginatedlist.py b/src/shippo/models/components/webhookpaginatedlist.py index cc5a09f8..e8748764 100644 --- a/src/shippo/models/components/webhookpaginatedlist.py +++ b/src/shippo/models/components/webhookpaginatedlist.py @@ -2,7 +2,8 @@ from __future__ import annotations from .webhook import Webhook, WebhookTypedDict -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -22,3 +23,19 @@ class WebhookPaginatedList(BaseModel): count: Optional[int] = None results: Optional[List[Webhook]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next", "previous", "count", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhookpayload.py b/src/shippo/models/components/webhookpayload.py index 258cb7d7..7bcbf15b 100644 --- a/src/shippo/models/components/webhookpayload.py +++ b/src/shippo/models/components/webhookpayload.py @@ -21,6 +21,7 @@ WebhookPayloadTransactionTypedDict, ], ) +r"""The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration.""" WebhookPayload = Annotated[ @@ -33,3 +34,4 @@ ], Discriminator(lambda m: get_discriminator(m, "event", "event")), ] +r"""The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration.""" diff --git a/src/shippo/models/components/webhookpayloadbatch.py b/src/shippo/models/components/webhookpayloadbatch.py index 3ab0eb8b..e87de328 100644 --- a/src/shippo/models/components/webhookpayloadbatch.py +++ b/src/shippo/models/components/webhookpayloadbatch.py @@ -2,7 +2,8 @@ from __future__ import annotations from .webhookeventtypeenum import WebhookEventTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -29,3 +30,19 @@ class WebhookPayloadBatch(BaseModel): data: Optional[str] = None r"""A string containing the batch object ID, of the form 'batch {batchId} (created|processing complete)'.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "test", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhookpayloadtrack.py b/src/shippo/models/components/webhookpayloadtrack.py index 4a6aa323..c514ebf4 100644 --- a/src/shippo/models/components/webhookpayloadtrack.py +++ b/src/shippo/models/components/webhookpayloadtrack.py @@ -3,7 +3,8 @@ from __future__ import annotations from .track import Track, TrackTypedDict from .webhookeventtypeenum import WebhookEventTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -28,3 +29,19 @@ class WebhookPayloadTrack(BaseModel): r"""Determines whether the webhook is a test webhook or not.""" data: Optional[Track] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "test", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhookpayloadtransaction.py b/src/shippo/models/components/webhookpayloadtransaction.py index d0dee958..4fca88ee 100644 --- a/src/shippo/models/components/webhookpayloadtransaction.py +++ b/src/shippo/models/components/webhookpayloadtransaction.py @@ -3,7 +3,8 @@ from __future__ import annotations from .transaction import Transaction, TransactionTypedDict from .webhookeventtypeenum import WebhookEventTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -28,3 +29,19 @@ class WebhookPayloadTransaction(BaseModel): r"""Determines whether the webhook is a test webhook or not.""" data: Optional[Transaction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "test", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/components/webhookupdaterequest.py b/src/shippo/models/components/webhookupdaterequest.py index 94dceff2..fb30f051 100644 --- a/src/shippo/models/components/webhookupdaterequest.py +++ b/src/shippo/models/components/webhookupdaterequest.py @@ -2,7 +2,8 @@ from __future__ import annotations from .webhookeventtypeenum import WebhookEventTypeEnum -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -30,3 +31,19 @@ class WebhookUpdateRequest(BaseModel): is_test: Optional[bool] = None r"""Determines whether the webhook is a test webhook or not.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["active", "is_test"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/errors/__init__.py b/src/shippo/models/errors/__init__.py index 7f31aafd..d942d6fa 100644 --- a/src/shippo/models/errors/__init__.py +++ b/src/shippo/models/errors/__init__.py @@ -1,22 +1,54 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .initiateoauth2signin import ( - BadRequestError, - BadRequestErrorData, - NotFoundError, - NotFoundErrorData, - UnauthorizedError, - UnauthorizedErrorData, -) -from .sdkerror import SDKError +from .shippoerror import ShippoError +from typing import Any, TYPE_CHECKING +from shippo.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from .initiateoauth2signin import ( + BadRequestError, + BadRequestErrorData, + NotFoundError, + NotFoundErrorData, + UnauthorizedError, + UnauthorizedErrorData, + ) + from .no_response_error import NoResponseError + from .responsevalidationerror import ResponseValidationError + from .sdkerror import SDKError __all__ = [ "BadRequestError", "BadRequestErrorData", + "NoResponseError", "NotFoundError", "NotFoundErrorData", + "ResponseValidationError", "SDKError", + "ShippoError", "UnauthorizedError", "UnauthorizedErrorData", ] + +_dynamic_imports: dict[str, str] = { + "BadRequestError": ".initiateoauth2signin", + "BadRequestErrorData": ".initiateoauth2signin", + "NotFoundError": ".initiateoauth2signin", + "NotFoundErrorData": ".initiateoauth2signin", + "UnauthorizedError": ".initiateoauth2signin", + "UnauthorizedErrorData": ".initiateoauth2signin", + "NoResponseError": ".no_response_error", + "ResponseValidationError": ".responsevalidationerror", + "SDKError": ".sdkerror", +} + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) + + +def __dir__(): + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/shippo/models/errors/initiateoauth2signin.py b/src/shippo/models/errors/initiateoauth2signin.py index df6ce246..f6221602 100644 --- a/src/shippo/models/errors/initiateoauth2signin.py +++ b/src/shippo/models/errors/initiateoauth2signin.py @@ -1,60 +1,74 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from shippo import utils +from dataclasses import dataclass, field +import httpx +from shippo.models.errors import ShippoError from shippo.types import BaseModel from typing import Optional class NotFoundErrorData(BaseModel): title: Optional[str] = None - detail: Optional[str] = None -class NotFoundError(Exception): +@dataclass(unsafe_hash=True) +class NotFoundError(ShippoError): r"""Invalid carrier account provided by the user""" - data: NotFoundErrorData - - def __init__(self, data: NotFoundErrorData): - self.data = data + data: NotFoundErrorData = field(hash=False) - def __str__(self) -> str: - return utils.marshal_json(self.data, NotFoundErrorData) + def __init__( + self, + data: NotFoundErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) class UnauthorizedErrorData(BaseModel): title: Optional[str] = None - detail: Optional[str] = None -class UnauthorizedError(Exception): +@dataclass(unsafe_hash=True) +class UnauthorizedError(ShippoError): r"""Invalid ShippoToken or unsupported carrier account provided by the user""" - data: UnauthorizedErrorData - - def __init__(self, data: UnauthorizedErrorData): - self.data = data + data: UnauthorizedErrorData = field(hash=False) - def __str__(self) -> str: - return utils.marshal_json(self.data, UnauthorizedErrorData) + def __init__( + self, + data: UnauthorizedErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) class BadRequestErrorData(BaseModel): title: Optional[str] = None - detail: Optional[str] = None -class BadRequestError(Exception): +@dataclass(unsafe_hash=True) +class BadRequestError(ShippoError): r"""Invalid parameters provided by the user""" - data: BadRequestErrorData - - def __init__(self, data: BadRequestErrorData): - self.data = data - - def __str__(self) -> str: - return utils.marshal_json(self.data, BadRequestErrorData) + data: BadRequestErrorData = field(hash=False) + + def __init__( + self, + data: BadRequestErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + message = body or raw_response.text + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/src/shippo/models/errors/no_response_error.py b/src/shippo/models/errors/no_response_error.py new file mode 100644 index 00000000..1deab64b --- /dev/null +++ b/src/shippo/models/errors/no_response_error.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from dataclasses import dataclass + + +@dataclass(unsafe_hash=True) +class NoResponseError(Exception): + """Error raised when no HTTP response is received from the server.""" + + message: str + + def __init__(self, message: str = "No response received"): + object.__setattr__(self, "message", message) + super().__init__(message) + + def __str__(self): + return self.message diff --git a/src/shippo/models/errors/responsevalidationerror.py b/src/shippo/models/errors/responsevalidationerror.py new file mode 100644 index 00000000..405687f4 --- /dev/null +++ b/src/shippo/models/errors/responsevalidationerror.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass + +from shippo.models.errors import ShippoError + + +@dataclass(unsafe_hash=True) +class ResponseValidationError(ShippoError): + """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" + + def __init__( + self, + message: str, + raw_response: httpx.Response, + cause: Exception, + body: Optional[str] = None, + ): + message = f"{message}: {cause}" + super().__init__(message, raw_response, body) + + @property + def cause(self): + """Normally the Pydantic ValidationError""" + return self.__cause__ diff --git a/src/shippo/models/errors/sdkerror.py b/src/shippo/models/errors/sdkerror.py index 03216cbf..37cff16b 100644 --- a/src/shippo/models/errors/sdkerror.py +++ b/src/shippo/models/errors/sdkerror.py @@ -1,22 +1,40 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from dataclasses import dataclass -from typing import Optional import httpx +from typing import Optional +from dataclasses import dataclass + +from shippo.models.errors import ShippoError + +MAX_MESSAGE_LEN = 10_000 + + +@dataclass(unsafe_hash=True) +class SDKError(ShippoError): + """The fallback error class if no more specific error class is matched.""" + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + body_display = body or raw_response.text or '""' + if message: + message += ": " + message += f"Status {raw_response.status_code}" -@dataclass -class SDKError(Exception): - """Represents an error returned by the API.""" + headers = raw_response.headers + content_type = headers.get("content-type", '""') + if content_type != "application/json": + if " " in content_type: + content_type = f'"{content_type}"' + message += f" Content-Type {content_type}" - message: str - status_code: int = -1 - body: str = "" - raw_response: Optional[httpx.Response] = None + if len(body_display) > MAX_MESSAGE_LEN: + truncated = body_display[:MAX_MESSAGE_LEN] + remaining = len(body_display) - MAX_MESSAGE_LEN + body_display = f"{truncated}...and {remaining} more chars" - def __str__(self): - body = "" - if len(self.body) > 0: - body = f"\n{self.body}" + message += f". Body: {body_display}" + message = message.strip() - return f"{self.message}: Status {self.status_code}{body}" + super().__init__(message, raw_response, body) diff --git a/src/shippo/models/errors/shippoerror.py b/src/shippo/models/errors/shippoerror.py new file mode 100644 index 00000000..54e48029 --- /dev/null +++ b/src/shippo/models/errors/shippoerror.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import httpx +from typing import Optional +from dataclasses import dataclass, field + + +@dataclass(unsafe_hash=True) +class ShippoError(Exception): + """The base class for all HTTP error responses.""" + + message: str + status_code: int + body: str + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) + + def __init__( + self, message: str, raw_response: httpx.Response, body: Optional[str] = None + ): + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) + + def __str__(self): + return self.message diff --git a/src/shippo/models/internal/__init__.py b/src/shippo/models/internal/__init__.py index d49aa0f3..7aa1e937 100644 --- a/src/shippo/models/internal/__init__.py +++ b/src/shippo/models/internal/__init__.py @@ -1,6 +1,25 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .globals import Globals, GlobalsTypedDict +from typing import Any, TYPE_CHECKING +from shippo.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from .globals import Globals, GlobalsTypedDict __all__ = ["Globals", "GlobalsTypedDict"] + +_dynamic_imports: dict[str, str] = { + "Globals": ".globals", + "GlobalsTypedDict": ".globals", +} + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) + + +def __dir__(): + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/shippo/models/internal/globals.py b/src/shippo/models/internal/globals.py index 54dd243c..98652ec5 100644 --- a/src/shippo/models/internal/globals.py +++ b/src/shippo/models/internal/globals.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class Globals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/__init__.py b/src/shippo/models/operations/__init__.py index e69a5043..4df6313e 100644 --- a/src/shippo/models/operations/__init__.py +++ b/src/shippo/models/operations/__init__.py @@ -1,342 +1,346 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .addshipmentstobatch import ( - AddShipmentsToBatchGlobals, - AddShipmentsToBatchGlobalsTypedDict, - AddShipmentsToBatchRequest, - AddShipmentsToBatchRequestTypedDict, -) -from .createaddress import CreateAddressGlobals, CreateAddressGlobalsTypedDict -from .createbatch import CreateBatchGlobals, CreateBatchGlobalsTypedDict -from .createcarrieraccount import ( - CreateCarrierAccountGlobals, - CreateCarrierAccountGlobalsTypedDict, -) -from .createcustomsdeclaration import ( - CreateCustomsDeclarationGlobals, - CreateCustomsDeclarationGlobalsTypedDict, -) -from .createcustomsitem import ( - CreateCustomsItemGlobals, - CreateCustomsItemGlobalsTypedDict, -) -from .createliverate import CreateLiveRateGlobals, CreateLiveRateGlobalsTypedDict -from .createmanifest import CreateManifestGlobals, CreateManifestGlobalsTypedDict -from .createorder import CreateOrderGlobals, CreateOrderGlobalsTypedDict -from .createparcel import ( - CreateParcelGlobals, - CreateParcelGlobalsTypedDict, - CreateParcelRequest, - CreateParcelRequestTypedDict, -) -from .createpickup import CreatePickupGlobals, CreatePickupGlobalsTypedDict -from .createrefund import CreateRefundGlobals, CreateRefundGlobalsTypedDict -from .createservicegroup import ( - CreateServiceGroupGlobals, - CreateServiceGroupGlobalsTypedDict, -) -from .createshipment import CreateShipmentGlobals, CreateShipmentGlobalsTypedDict -from .createshippoaccount import ( - CreateShippoAccountGlobals, - CreateShippoAccountGlobalsTypedDict, -) -from .createtrack import CreateTrackGlobals, CreateTrackGlobalsTypedDict -from .createtransaction import ( - CreateTransactionGlobals, - CreateTransactionGlobalsTypedDict, - CreateTransactionRequest, - CreateTransactionRequestTypedDict, -) -from .createuserparceltemplate import ( - CreateUserParcelTemplateGlobals, - CreateUserParcelTemplateGlobalsTypedDict, -) -from .deletedefaultparceltemplate import ( - DeleteDefaultParcelTemplateGlobals, - DeleteDefaultParcelTemplateGlobalsTypedDict, - DeleteDefaultParcelTemplateRequest, - DeleteDefaultParcelTemplateRequestTypedDict, -) -from .deleteservicegroup import ( - DeleteServiceGroupGlobals, - DeleteServiceGroupGlobalsTypedDict, - DeleteServiceGroupRequest, - DeleteServiceGroupRequestTypedDict, -) -from .deleteuserparceltemplate import ( - DeleteUserParcelTemplateGlobals, - DeleteUserParcelTemplateGlobalsTypedDict, - DeleteUserParcelTemplateRequest, - DeleteUserParcelTemplateRequestTypedDict, -) -from .deletewebhook import DeleteWebhookRequest, DeleteWebhookRequestTypedDict -from .getaddress import ( - GetAddressGlobals, - GetAddressGlobalsTypedDict, - GetAddressRequest, - GetAddressRequestTypedDict, -) -from .getbatch import ( - GetBatchGlobals, - GetBatchGlobalsTypedDict, - GetBatchRequest, - GetBatchRequestTypedDict, -) -from .getcarrieraccount import ( - GetCarrierAccountGlobals, - GetCarrierAccountGlobalsTypedDict, - GetCarrierAccountRequest, - GetCarrierAccountRequestTypedDict, -) -from .getcarrierparceltemplate import ( - GetCarrierParcelTemplateGlobals, - GetCarrierParcelTemplateGlobalsTypedDict, - GetCarrierParcelTemplateRequest, - GetCarrierParcelTemplateRequestTypedDict, -) -from .getcarrierregistrationstatus import ( - Carrier, - GetCarrierRegistrationStatusGlobals, - GetCarrierRegistrationStatusGlobalsTypedDict, - GetCarrierRegistrationStatusRequest, - GetCarrierRegistrationStatusRequestTypedDict, -) -from .getcustomsdeclaration import ( - GetCustomsDeclarationGlobals, - GetCustomsDeclarationGlobalsTypedDict, - GetCustomsDeclarationRequest, - GetCustomsDeclarationRequestTypedDict, -) -from .getcustomsitem import ( - GetCustomsItemGlobals, - GetCustomsItemGlobalsTypedDict, - GetCustomsItemRequest, - GetCustomsItemRequestTypedDict, -) -from .getdefaultparceltemplate import ( - GetDefaultParcelTemplateGlobals, - GetDefaultParcelTemplateGlobalsTypedDict, - GetDefaultParcelTemplateRequest, - GetDefaultParcelTemplateRequestTypedDict, -) -from .getmanifest import ( - GetManifestGlobals, - GetManifestGlobalsTypedDict, - GetManifestRequest, - GetManifestRequestTypedDict, -) -from .getorder import ( - GetOrderGlobals, - GetOrderGlobalsTypedDict, - GetOrderRequest, - GetOrderRequestTypedDict, -) -from .getparcel import ( - GetParcelGlobals, - GetParcelGlobalsTypedDict, - GetParcelRequest, - GetParcelRequestTypedDict, -) -from .getrate import ( - GetRateGlobals, - GetRateGlobalsTypedDict, - GetRateRequest, - GetRateRequestTypedDict, -) -from .getrefund import ( - GetRefundGlobals, - GetRefundGlobalsTypedDict, - GetRefundRequest, - GetRefundRequestTypedDict, -) -from .getshipment import ( - GetShipmentGlobals, - GetShipmentGlobalsTypedDict, - GetShipmentRequest, - GetShipmentRequestTypedDict, -) -from .getshippoaccount import ( - GetShippoAccountGlobals, - GetShippoAccountGlobalsTypedDict, - GetShippoAccountRequest, - GetShippoAccountRequestTypedDict, -) -from .gettrack import ( - GetTrackGlobals, - GetTrackGlobalsTypedDict, - GetTrackRequest, - GetTrackRequestTypedDict, -) -from .gettransaction import ( - GetTransactionGlobals, - GetTransactionGlobalsTypedDict, - GetTransactionRequest, - GetTransactionRequestTypedDict, -) -from .getuserparceltemplate import ( - GetUserParcelTemplateGlobals, - GetUserParcelTemplateGlobalsTypedDict, - GetUserParcelTemplateRequest, - GetUserParcelTemplateRequestTypedDict, -) -from .getwebhook import GetWebhookRequest, GetWebhookRequestTypedDict -from .initiateoauth2signin import ( - InitiateOauth2SigninGlobals, - InitiateOauth2SigninGlobalsTypedDict, - InitiateOauth2SigninRequest, - InitiateOauth2SigninRequestTypedDict, - InitiateOauth2SigninResponse, - InitiateOauth2SigninResponseTypedDict, -) -from .listaddresses import ( - ListAddressesGlobals, - ListAddressesGlobalsTypedDict, - ListAddressesRequest, - ListAddressesRequestTypedDict, -) -from .listcarrieraccounts import ( - ListCarrierAccountsGlobals, - ListCarrierAccountsGlobalsTypedDict, - ListCarrierAccountsRequest, - ListCarrierAccountsRequestTypedDict, -) -from .listcarrierparceltemplates import ( - Include, - ListCarrierParcelTemplatesGlobals, - ListCarrierParcelTemplatesGlobalsTypedDict, - ListCarrierParcelTemplatesRequest, - ListCarrierParcelTemplatesRequestTypedDict, -) -from .listcustomsdeclarations import ( - ListCustomsDeclarationsGlobals, - ListCustomsDeclarationsGlobalsTypedDict, - ListCustomsDeclarationsRequest, - ListCustomsDeclarationsRequestTypedDict, -) -from .listcustomsitems import ( - ListCustomsItemsGlobals, - ListCustomsItemsGlobalsTypedDict, - ListCustomsItemsRequest, - ListCustomsItemsRequestTypedDict, -) -from .listmanifests import ( - ListManifestsGlobals, - ListManifestsGlobalsTypedDict, - ListManifestsRequest, - ListManifestsRequestTypedDict, -) -from .listorders import ( - ListOrdersGlobals, - ListOrdersGlobalsTypedDict, - ListOrdersRequest, - ListOrdersRequestTypedDict, -) -from .listparcels import ( - ListParcelsGlobals, - ListParcelsGlobalsTypedDict, - ListParcelsRequest, - ListParcelsRequestTypedDict, -) -from .listrefunds import ( - ListRefundsGlobals, - ListRefundsGlobalsTypedDict, - ListRefundsRequest, - ListRefundsRequestTypedDict, -) -from .listservicegroups import ( - ListServiceGroupsGlobals, - ListServiceGroupsGlobalsTypedDict, - ListServiceGroupsRequest, - ListServiceGroupsRequestTypedDict, -) -from .listshipmentrates import ( - ListShipmentRatesGlobals, - ListShipmentRatesGlobalsTypedDict, - ListShipmentRatesRequest, - ListShipmentRatesRequestTypedDict, -) -from .listshipmentratesbycurrencycode import ( - ListShipmentRatesByCurrencyCodeGlobals, - ListShipmentRatesByCurrencyCodeGlobalsTypedDict, - ListShipmentRatesByCurrencyCodeRequest, - ListShipmentRatesByCurrencyCodeRequestTypedDict, -) -from .listshipments import ( - ListShipmentsGlobals, - ListShipmentsGlobalsTypedDict, - ListShipmentsRequest, - ListShipmentsRequestTypedDict, -) -from .listshippoaccounts import ( - ListShippoAccountsGlobals, - ListShippoAccountsGlobalsTypedDict, - ListShippoAccountsRequest, - ListShippoAccountsRequestTypedDict, -) -from .listtransactions import ( - ListTransactionsGlobals, - ListTransactionsGlobalsTypedDict, - ListTransactionsRequest, - ListTransactionsRequestTypedDict, -) -from .listuserparceltemplates import ( - ListUserParcelTemplatesGlobals, - ListUserParcelTemplatesGlobalsTypedDict, - ListUserParcelTemplatesRequest, - ListUserParcelTemplatesRequestTypedDict, -) -from .purchasebatch import ( - PurchaseBatchGlobals, - PurchaseBatchGlobalsTypedDict, - PurchaseBatchRequest, - PurchaseBatchRequestTypedDict, -) -from .registercarrieraccount import ( - RegisterCarrierAccountGlobals, - RegisterCarrierAccountGlobalsTypedDict, - RegisterCarrierAccountRequest, - RegisterCarrierAccountRequestTypedDict, -) -from .removeshipmentsfrombatch import ( - RemoveShipmentsFromBatchGlobals, - RemoveShipmentsFromBatchGlobalsTypedDict, - RemoveShipmentsFromBatchRequest, - RemoveShipmentsFromBatchRequestTypedDict, -) -from .updatecarrieraccount import ( - UpdateCarrierAccountGlobals, - UpdateCarrierAccountGlobalsTypedDict, - UpdateCarrierAccountRequest, - UpdateCarrierAccountRequestTypedDict, -) -from .updatedefaultparceltemplate import ( - UpdateDefaultParcelTemplateGlobals, - UpdateDefaultParcelTemplateGlobalsTypedDict, -) -from .updateservicegroup import ( - UpdateServiceGroupGlobals, - UpdateServiceGroupGlobalsTypedDict, -) -from .updateshippoaccount import ( - UpdateShippoAccountGlobals, - UpdateShippoAccountGlobalsTypedDict, - UpdateShippoAccountRequest, - UpdateShippoAccountRequestTypedDict, -) -from .updateuserparceltemplate import ( - UpdateUserParcelTemplateGlobals, - UpdateUserParcelTemplateGlobalsTypedDict, - UpdateUserParcelTemplateRequest, - UpdateUserParcelTemplateRequestTypedDict, -) -from .updatewebhook import UpdateWebhookRequest, UpdateWebhookRequestTypedDict -from .validateaddress import ( - ValidateAddressGlobals, - ValidateAddressGlobalsTypedDict, - ValidateAddressRequest, - ValidateAddressRequestTypedDict, -) +from typing import Any, TYPE_CHECKING +from shippo.utils.dynamic_imports import lazy_getattr, lazy_dir + +if TYPE_CHECKING: + from .addshipmentstobatch import ( + AddShipmentsToBatchGlobals, + AddShipmentsToBatchGlobalsTypedDict, + AddShipmentsToBatchRequest, + AddShipmentsToBatchRequestTypedDict, + ) + from .createaddress import CreateAddressGlobals, CreateAddressGlobalsTypedDict + from .createbatch import CreateBatchGlobals, CreateBatchGlobalsTypedDict + from .createcarrieraccount import ( + CreateCarrierAccountGlobals, + CreateCarrierAccountGlobalsTypedDict, + ) + from .createcustomsdeclaration import ( + CreateCustomsDeclarationGlobals, + CreateCustomsDeclarationGlobalsTypedDict, + ) + from .createcustomsitem import ( + CreateCustomsItemGlobals, + CreateCustomsItemGlobalsTypedDict, + ) + from .createliverate import CreateLiveRateGlobals, CreateLiveRateGlobalsTypedDict + from .createmanifest import CreateManifestGlobals, CreateManifestGlobalsTypedDict + from .createorder import CreateOrderGlobals, CreateOrderGlobalsTypedDict + from .createparcel import ( + CreateParcelGlobals, + CreateParcelGlobalsTypedDict, + CreateParcelRequest, + CreateParcelRequestTypedDict, + ) + from .createpickup import CreatePickupGlobals, CreatePickupGlobalsTypedDict + from .createrefund import CreateRefundGlobals, CreateRefundGlobalsTypedDict + from .createservicegroup import ( + CreateServiceGroupGlobals, + CreateServiceGroupGlobalsTypedDict, + ) + from .createshipment import CreateShipmentGlobals, CreateShipmentGlobalsTypedDict + from .createshippoaccount import ( + CreateShippoAccountGlobals, + CreateShippoAccountGlobalsTypedDict, + ) + from .createtrack import CreateTrackGlobals, CreateTrackGlobalsTypedDict + from .createtransaction import ( + CreateTransactionGlobals, + CreateTransactionGlobalsTypedDict, + CreateTransactionRequest, + CreateTransactionRequestTypedDict, + ) + from .createuserparceltemplate import ( + CreateUserParcelTemplateGlobals, + CreateUserParcelTemplateGlobalsTypedDict, + ) + from .deletedefaultparceltemplate import ( + DeleteDefaultParcelTemplateGlobals, + DeleteDefaultParcelTemplateGlobalsTypedDict, + DeleteDefaultParcelTemplateRequest, + DeleteDefaultParcelTemplateRequestTypedDict, + ) + from .deleteservicegroup import ( + DeleteServiceGroupGlobals, + DeleteServiceGroupGlobalsTypedDict, + DeleteServiceGroupRequest, + DeleteServiceGroupRequestTypedDict, + ) + from .deleteuserparceltemplate import ( + DeleteUserParcelTemplateGlobals, + DeleteUserParcelTemplateGlobalsTypedDict, + DeleteUserParcelTemplateRequest, + DeleteUserParcelTemplateRequestTypedDict, + ) + from .deletewebhook import DeleteWebhookRequest, DeleteWebhookRequestTypedDict + from .getaddress import ( + GetAddressGlobals, + GetAddressGlobalsTypedDict, + GetAddressRequest, + GetAddressRequestTypedDict, + ) + from .getbatch import ( + GetBatchGlobals, + GetBatchGlobalsTypedDict, + GetBatchRequest, + GetBatchRequestTypedDict, + ) + from .getcarrieraccount import ( + GetCarrierAccountGlobals, + GetCarrierAccountGlobalsTypedDict, + GetCarrierAccountRequest, + GetCarrierAccountRequestTypedDict, + ) + from .getcarrierparceltemplate import ( + GetCarrierParcelTemplateGlobals, + GetCarrierParcelTemplateGlobalsTypedDict, + GetCarrierParcelTemplateRequest, + GetCarrierParcelTemplateRequestTypedDict, + ) + from .getcarrierregistrationstatus import ( + Carrier, + GetCarrierRegistrationStatusGlobals, + GetCarrierRegistrationStatusGlobalsTypedDict, + GetCarrierRegistrationStatusRequest, + GetCarrierRegistrationStatusRequestTypedDict, + ) + from .getcustomsdeclaration import ( + GetCustomsDeclarationGlobals, + GetCustomsDeclarationGlobalsTypedDict, + GetCustomsDeclarationRequest, + GetCustomsDeclarationRequestTypedDict, + ) + from .getcustomsitem import ( + GetCustomsItemGlobals, + GetCustomsItemGlobalsTypedDict, + GetCustomsItemRequest, + GetCustomsItemRequestTypedDict, + ) + from .getdefaultparceltemplate import ( + GetDefaultParcelTemplateGlobals, + GetDefaultParcelTemplateGlobalsTypedDict, + GetDefaultParcelTemplateRequest, + GetDefaultParcelTemplateRequestTypedDict, + ) + from .getmanifest import ( + GetManifestGlobals, + GetManifestGlobalsTypedDict, + GetManifestRequest, + GetManifestRequestTypedDict, + ) + from .getorder import ( + GetOrderGlobals, + GetOrderGlobalsTypedDict, + GetOrderRequest, + GetOrderRequestTypedDict, + ) + from .getparcel import ( + GetParcelGlobals, + GetParcelGlobalsTypedDict, + GetParcelRequest, + GetParcelRequestTypedDict, + ) + from .getrate import ( + GetRateGlobals, + GetRateGlobalsTypedDict, + GetRateRequest, + GetRateRequestTypedDict, + ) + from .getrefund import ( + GetRefundGlobals, + GetRefundGlobalsTypedDict, + GetRefundRequest, + GetRefundRequestTypedDict, + ) + from .getshipment import ( + GetShipmentGlobals, + GetShipmentGlobalsTypedDict, + GetShipmentRequest, + GetShipmentRequestTypedDict, + ) + from .getshippoaccount import ( + GetShippoAccountGlobals, + GetShippoAccountGlobalsTypedDict, + GetShippoAccountRequest, + GetShippoAccountRequestTypedDict, + ) + from .gettrack import ( + GetTrackGlobals, + GetTrackGlobalsTypedDict, + GetTrackRequest, + GetTrackRequestTypedDict, + ) + from .gettransaction import ( + GetTransactionGlobals, + GetTransactionGlobalsTypedDict, + GetTransactionRequest, + GetTransactionRequestTypedDict, + ) + from .getuserparceltemplate import ( + GetUserParcelTemplateGlobals, + GetUserParcelTemplateGlobalsTypedDict, + GetUserParcelTemplateRequest, + GetUserParcelTemplateRequestTypedDict, + ) + from .getwebhook import GetWebhookRequest, GetWebhookRequestTypedDict + from .initiateoauth2signin import ( + InitiateOauth2SigninGlobals, + InitiateOauth2SigninGlobalsTypedDict, + InitiateOauth2SigninRequest, + InitiateOauth2SigninRequestTypedDict, + InitiateOauth2SigninResponse, + InitiateOauth2SigninResponseTypedDict, + ) + from .listaddresses import ( + ListAddressesGlobals, + ListAddressesGlobalsTypedDict, + ListAddressesRequest, + ListAddressesRequestTypedDict, + ) + from .listcarrieraccounts import ( + ListCarrierAccountsGlobals, + ListCarrierAccountsGlobalsTypedDict, + ListCarrierAccountsRequest, + ListCarrierAccountsRequestTypedDict, + ) + from .listcarrierparceltemplates import ( + Include, + ListCarrierParcelTemplatesGlobals, + ListCarrierParcelTemplatesGlobalsTypedDict, + ListCarrierParcelTemplatesRequest, + ListCarrierParcelTemplatesRequestTypedDict, + ) + from .listcustomsdeclarations import ( + ListCustomsDeclarationsGlobals, + ListCustomsDeclarationsGlobalsTypedDict, + ListCustomsDeclarationsRequest, + ListCustomsDeclarationsRequestTypedDict, + ) + from .listcustomsitems import ( + ListCustomsItemsGlobals, + ListCustomsItemsGlobalsTypedDict, + ListCustomsItemsRequest, + ListCustomsItemsRequestTypedDict, + ) + from .listmanifests import ( + ListManifestsGlobals, + ListManifestsGlobalsTypedDict, + ListManifestsRequest, + ListManifestsRequestTypedDict, + ) + from .listorders import ( + ListOrdersGlobals, + ListOrdersGlobalsTypedDict, + ListOrdersRequest, + ListOrdersRequestTypedDict, + ) + from .listparcels import ( + ListParcelsGlobals, + ListParcelsGlobalsTypedDict, + ListParcelsRequest, + ListParcelsRequestTypedDict, + ) + from .listrefunds import ( + ListRefundsGlobals, + ListRefundsGlobalsTypedDict, + ListRefundsRequest, + ListRefundsRequestTypedDict, + ) + from .listservicegroups import ( + ListServiceGroupsGlobals, + ListServiceGroupsGlobalsTypedDict, + ListServiceGroupsRequest, + ListServiceGroupsRequestTypedDict, + ) + from .listshipmentrates import ( + ListShipmentRatesGlobals, + ListShipmentRatesGlobalsTypedDict, + ListShipmentRatesRequest, + ListShipmentRatesRequestTypedDict, + ) + from .listshipmentratesbycurrencycode import ( + ListShipmentRatesByCurrencyCodeGlobals, + ListShipmentRatesByCurrencyCodeGlobalsTypedDict, + ListShipmentRatesByCurrencyCodeRequest, + ListShipmentRatesByCurrencyCodeRequestTypedDict, + ) + from .listshipments import ( + ListShipmentsGlobals, + ListShipmentsGlobalsTypedDict, + ListShipmentsRequest, + ListShipmentsRequestTypedDict, + ) + from .listshippoaccounts import ( + ListShippoAccountsGlobals, + ListShippoAccountsGlobalsTypedDict, + ListShippoAccountsRequest, + ListShippoAccountsRequestTypedDict, + ) + from .listtransactions import ( + ListTransactionsGlobals, + ListTransactionsGlobalsTypedDict, + ListTransactionsRequest, + ListTransactionsRequestTypedDict, + ) + from .listuserparceltemplates import ( + ListUserParcelTemplatesGlobals, + ListUserParcelTemplatesGlobalsTypedDict, + ListUserParcelTemplatesRequest, + ListUserParcelTemplatesRequestTypedDict, + ) + from .purchasebatch import ( + PurchaseBatchGlobals, + PurchaseBatchGlobalsTypedDict, + PurchaseBatchRequest, + PurchaseBatchRequestTypedDict, + ) + from .registercarrieraccount import ( + RegisterCarrierAccountGlobals, + RegisterCarrierAccountGlobalsTypedDict, + RegisterCarrierAccountRequest, + RegisterCarrierAccountRequestTypedDict, + ) + from .removeshipmentsfrombatch import ( + RemoveShipmentsFromBatchGlobals, + RemoveShipmentsFromBatchGlobalsTypedDict, + RemoveShipmentsFromBatchRequest, + RemoveShipmentsFromBatchRequestTypedDict, + ) + from .updatecarrieraccount import ( + UpdateCarrierAccountGlobals, + UpdateCarrierAccountGlobalsTypedDict, + UpdateCarrierAccountRequest, + UpdateCarrierAccountRequestTypedDict, + ) + from .updatedefaultparceltemplate import ( + UpdateDefaultParcelTemplateGlobals, + UpdateDefaultParcelTemplateGlobalsTypedDict, + ) + from .updateservicegroup import ( + UpdateServiceGroupGlobals, + UpdateServiceGroupGlobalsTypedDict, + ) + from .updateshippoaccount import ( + UpdateShippoAccountGlobals, + UpdateShippoAccountGlobalsTypedDict, + UpdateShippoAccountRequest, + UpdateShippoAccountRequestTypedDict, + ) + from .updateuserparceltemplate import ( + UpdateUserParcelTemplateGlobals, + UpdateUserParcelTemplateGlobalsTypedDict, + UpdateUserParcelTemplateRequest, + UpdateUserParcelTemplateRequestTypedDict, + ) + from .updatewebhook import UpdateWebhookRequest, UpdateWebhookRequestTypedDict + from .validateaddress import ( + ValidateAddressGlobals, + ValidateAddressGlobalsTypedDict, + ValidateAddressRequest, + ValidateAddressRequestTypedDict, + ) __all__ = [ "AddShipmentsToBatchGlobals", @@ -576,3 +580,252 @@ "ValidateAddressRequest", "ValidateAddressRequestTypedDict", ] + +_dynamic_imports: dict[str, str] = { + "AddShipmentsToBatchGlobals": ".addshipmentstobatch", + "AddShipmentsToBatchGlobalsTypedDict": ".addshipmentstobatch", + "AddShipmentsToBatchRequest": ".addshipmentstobatch", + "AddShipmentsToBatchRequestTypedDict": ".addshipmentstobatch", + "CreateAddressGlobals": ".createaddress", + "CreateAddressGlobalsTypedDict": ".createaddress", + "CreateBatchGlobals": ".createbatch", + "CreateBatchGlobalsTypedDict": ".createbatch", + "CreateCarrierAccountGlobals": ".createcarrieraccount", + "CreateCarrierAccountGlobalsTypedDict": ".createcarrieraccount", + "CreateCustomsDeclarationGlobals": ".createcustomsdeclaration", + "CreateCustomsDeclarationGlobalsTypedDict": ".createcustomsdeclaration", + "CreateCustomsItemGlobals": ".createcustomsitem", + "CreateCustomsItemGlobalsTypedDict": ".createcustomsitem", + "CreateLiveRateGlobals": ".createliverate", + "CreateLiveRateGlobalsTypedDict": ".createliverate", + "CreateManifestGlobals": ".createmanifest", + "CreateManifestGlobalsTypedDict": ".createmanifest", + "CreateOrderGlobals": ".createorder", + "CreateOrderGlobalsTypedDict": ".createorder", + "CreateParcelGlobals": ".createparcel", + "CreateParcelGlobalsTypedDict": ".createparcel", + "CreateParcelRequest": ".createparcel", + "CreateParcelRequestTypedDict": ".createparcel", + "CreatePickupGlobals": ".createpickup", + "CreatePickupGlobalsTypedDict": ".createpickup", + "CreateRefundGlobals": ".createrefund", + "CreateRefundGlobalsTypedDict": ".createrefund", + "CreateServiceGroupGlobals": ".createservicegroup", + "CreateServiceGroupGlobalsTypedDict": ".createservicegroup", + "CreateShipmentGlobals": ".createshipment", + "CreateShipmentGlobalsTypedDict": ".createshipment", + "CreateShippoAccountGlobals": ".createshippoaccount", + "CreateShippoAccountGlobalsTypedDict": ".createshippoaccount", + "CreateTrackGlobals": ".createtrack", + "CreateTrackGlobalsTypedDict": ".createtrack", + "CreateTransactionGlobals": ".createtransaction", + "CreateTransactionGlobalsTypedDict": ".createtransaction", + "CreateTransactionRequest": ".createtransaction", + "CreateTransactionRequestTypedDict": ".createtransaction", + "CreateUserParcelTemplateGlobals": ".createuserparceltemplate", + "CreateUserParcelTemplateGlobalsTypedDict": ".createuserparceltemplate", + "DeleteDefaultParcelTemplateGlobals": ".deletedefaultparceltemplate", + "DeleteDefaultParcelTemplateGlobalsTypedDict": ".deletedefaultparceltemplate", + "DeleteDefaultParcelTemplateRequest": ".deletedefaultparceltemplate", + "DeleteDefaultParcelTemplateRequestTypedDict": ".deletedefaultparceltemplate", + "DeleteServiceGroupGlobals": ".deleteservicegroup", + "DeleteServiceGroupGlobalsTypedDict": ".deleteservicegroup", + "DeleteServiceGroupRequest": ".deleteservicegroup", + "DeleteServiceGroupRequestTypedDict": ".deleteservicegroup", + "DeleteUserParcelTemplateGlobals": ".deleteuserparceltemplate", + "DeleteUserParcelTemplateGlobalsTypedDict": ".deleteuserparceltemplate", + "DeleteUserParcelTemplateRequest": ".deleteuserparceltemplate", + "DeleteUserParcelTemplateRequestTypedDict": ".deleteuserparceltemplate", + "DeleteWebhookRequest": ".deletewebhook", + "DeleteWebhookRequestTypedDict": ".deletewebhook", + "GetAddressGlobals": ".getaddress", + "GetAddressGlobalsTypedDict": ".getaddress", + "GetAddressRequest": ".getaddress", + "GetAddressRequestTypedDict": ".getaddress", + "GetBatchGlobals": ".getbatch", + "GetBatchGlobalsTypedDict": ".getbatch", + "GetBatchRequest": ".getbatch", + "GetBatchRequestTypedDict": ".getbatch", + "GetCarrierAccountGlobals": ".getcarrieraccount", + "GetCarrierAccountGlobalsTypedDict": ".getcarrieraccount", + "GetCarrierAccountRequest": ".getcarrieraccount", + "GetCarrierAccountRequestTypedDict": ".getcarrieraccount", + "GetCarrierParcelTemplateGlobals": ".getcarrierparceltemplate", + "GetCarrierParcelTemplateGlobalsTypedDict": ".getcarrierparceltemplate", + "GetCarrierParcelTemplateRequest": ".getcarrierparceltemplate", + "GetCarrierParcelTemplateRequestTypedDict": ".getcarrierparceltemplate", + "Carrier": ".getcarrierregistrationstatus", + "GetCarrierRegistrationStatusGlobals": ".getcarrierregistrationstatus", + "GetCarrierRegistrationStatusGlobalsTypedDict": ".getcarrierregistrationstatus", + "GetCarrierRegistrationStatusRequest": ".getcarrierregistrationstatus", + "GetCarrierRegistrationStatusRequestTypedDict": ".getcarrierregistrationstatus", + "GetCustomsDeclarationGlobals": ".getcustomsdeclaration", + "GetCustomsDeclarationGlobalsTypedDict": ".getcustomsdeclaration", + "GetCustomsDeclarationRequest": ".getcustomsdeclaration", + "GetCustomsDeclarationRequestTypedDict": ".getcustomsdeclaration", + "GetCustomsItemGlobals": ".getcustomsitem", + "GetCustomsItemGlobalsTypedDict": ".getcustomsitem", + "GetCustomsItemRequest": ".getcustomsitem", + "GetCustomsItemRequestTypedDict": ".getcustomsitem", + "GetDefaultParcelTemplateGlobals": ".getdefaultparceltemplate", + "GetDefaultParcelTemplateGlobalsTypedDict": ".getdefaultparceltemplate", + "GetDefaultParcelTemplateRequest": ".getdefaultparceltemplate", + "GetDefaultParcelTemplateRequestTypedDict": ".getdefaultparceltemplate", + "GetManifestGlobals": ".getmanifest", + "GetManifestGlobalsTypedDict": ".getmanifest", + "GetManifestRequest": ".getmanifest", + "GetManifestRequestTypedDict": ".getmanifest", + "GetOrderGlobals": ".getorder", + "GetOrderGlobalsTypedDict": ".getorder", + "GetOrderRequest": ".getorder", + "GetOrderRequestTypedDict": ".getorder", + "GetParcelGlobals": ".getparcel", + "GetParcelGlobalsTypedDict": ".getparcel", + "GetParcelRequest": ".getparcel", + "GetParcelRequestTypedDict": ".getparcel", + "GetRateGlobals": ".getrate", + "GetRateGlobalsTypedDict": ".getrate", + "GetRateRequest": ".getrate", + "GetRateRequestTypedDict": ".getrate", + "GetRefundGlobals": ".getrefund", + "GetRefundGlobalsTypedDict": ".getrefund", + "GetRefundRequest": ".getrefund", + "GetRefundRequestTypedDict": ".getrefund", + "GetShipmentGlobals": ".getshipment", + "GetShipmentGlobalsTypedDict": ".getshipment", + "GetShipmentRequest": ".getshipment", + "GetShipmentRequestTypedDict": ".getshipment", + "GetShippoAccountGlobals": ".getshippoaccount", + "GetShippoAccountGlobalsTypedDict": ".getshippoaccount", + "GetShippoAccountRequest": ".getshippoaccount", + "GetShippoAccountRequestTypedDict": ".getshippoaccount", + "GetTrackGlobals": ".gettrack", + "GetTrackGlobalsTypedDict": ".gettrack", + "GetTrackRequest": ".gettrack", + "GetTrackRequestTypedDict": ".gettrack", + "GetTransactionGlobals": ".gettransaction", + "GetTransactionGlobalsTypedDict": ".gettransaction", + "GetTransactionRequest": ".gettransaction", + "GetTransactionRequestTypedDict": ".gettransaction", + "GetUserParcelTemplateGlobals": ".getuserparceltemplate", + "GetUserParcelTemplateGlobalsTypedDict": ".getuserparceltemplate", + "GetUserParcelTemplateRequest": ".getuserparceltemplate", + "GetUserParcelTemplateRequestTypedDict": ".getuserparceltemplate", + "GetWebhookRequest": ".getwebhook", + "GetWebhookRequestTypedDict": ".getwebhook", + "InitiateOauth2SigninGlobals": ".initiateoauth2signin", + "InitiateOauth2SigninGlobalsTypedDict": ".initiateoauth2signin", + "InitiateOauth2SigninRequest": ".initiateoauth2signin", + "InitiateOauth2SigninRequestTypedDict": ".initiateoauth2signin", + "InitiateOauth2SigninResponse": ".initiateoauth2signin", + "InitiateOauth2SigninResponseTypedDict": ".initiateoauth2signin", + "ListAddressesGlobals": ".listaddresses", + "ListAddressesGlobalsTypedDict": ".listaddresses", + "ListAddressesRequest": ".listaddresses", + "ListAddressesRequestTypedDict": ".listaddresses", + "ListCarrierAccountsGlobals": ".listcarrieraccounts", + "ListCarrierAccountsGlobalsTypedDict": ".listcarrieraccounts", + "ListCarrierAccountsRequest": ".listcarrieraccounts", + "ListCarrierAccountsRequestTypedDict": ".listcarrieraccounts", + "Include": ".listcarrierparceltemplates", + "ListCarrierParcelTemplatesGlobals": ".listcarrierparceltemplates", + "ListCarrierParcelTemplatesGlobalsTypedDict": ".listcarrierparceltemplates", + "ListCarrierParcelTemplatesRequest": ".listcarrierparceltemplates", + "ListCarrierParcelTemplatesRequestTypedDict": ".listcarrierparceltemplates", + "ListCustomsDeclarationsGlobals": ".listcustomsdeclarations", + "ListCustomsDeclarationsGlobalsTypedDict": ".listcustomsdeclarations", + "ListCustomsDeclarationsRequest": ".listcustomsdeclarations", + "ListCustomsDeclarationsRequestTypedDict": ".listcustomsdeclarations", + "ListCustomsItemsGlobals": ".listcustomsitems", + "ListCustomsItemsGlobalsTypedDict": ".listcustomsitems", + "ListCustomsItemsRequest": ".listcustomsitems", + "ListCustomsItemsRequestTypedDict": ".listcustomsitems", + "ListManifestsGlobals": ".listmanifests", + "ListManifestsGlobalsTypedDict": ".listmanifests", + "ListManifestsRequest": ".listmanifests", + "ListManifestsRequestTypedDict": ".listmanifests", + "ListOrdersGlobals": ".listorders", + "ListOrdersGlobalsTypedDict": ".listorders", + "ListOrdersRequest": ".listorders", + "ListOrdersRequestTypedDict": ".listorders", + "ListParcelsGlobals": ".listparcels", + "ListParcelsGlobalsTypedDict": ".listparcels", + "ListParcelsRequest": ".listparcels", + "ListParcelsRequestTypedDict": ".listparcels", + "ListRefundsGlobals": ".listrefunds", + "ListRefundsGlobalsTypedDict": ".listrefunds", + "ListRefundsRequest": ".listrefunds", + "ListRefundsRequestTypedDict": ".listrefunds", + "ListServiceGroupsGlobals": ".listservicegroups", + "ListServiceGroupsGlobalsTypedDict": ".listservicegroups", + "ListServiceGroupsRequest": ".listservicegroups", + "ListServiceGroupsRequestTypedDict": ".listservicegroups", + "ListShipmentRatesGlobals": ".listshipmentrates", + "ListShipmentRatesGlobalsTypedDict": ".listshipmentrates", + "ListShipmentRatesRequest": ".listshipmentrates", + "ListShipmentRatesRequestTypedDict": ".listshipmentrates", + "ListShipmentRatesByCurrencyCodeGlobals": ".listshipmentratesbycurrencycode", + "ListShipmentRatesByCurrencyCodeGlobalsTypedDict": ".listshipmentratesbycurrencycode", + "ListShipmentRatesByCurrencyCodeRequest": ".listshipmentratesbycurrencycode", + "ListShipmentRatesByCurrencyCodeRequestTypedDict": ".listshipmentratesbycurrencycode", + "ListShipmentsGlobals": ".listshipments", + "ListShipmentsGlobalsTypedDict": ".listshipments", + "ListShipmentsRequest": ".listshipments", + "ListShipmentsRequestTypedDict": ".listshipments", + "ListShippoAccountsGlobals": ".listshippoaccounts", + "ListShippoAccountsGlobalsTypedDict": ".listshippoaccounts", + "ListShippoAccountsRequest": ".listshippoaccounts", + "ListShippoAccountsRequestTypedDict": ".listshippoaccounts", + "ListTransactionsGlobals": ".listtransactions", + "ListTransactionsGlobalsTypedDict": ".listtransactions", + "ListTransactionsRequest": ".listtransactions", + "ListTransactionsRequestTypedDict": ".listtransactions", + "ListUserParcelTemplatesGlobals": ".listuserparceltemplates", + "ListUserParcelTemplatesGlobalsTypedDict": ".listuserparceltemplates", + "ListUserParcelTemplatesRequest": ".listuserparceltemplates", + "ListUserParcelTemplatesRequestTypedDict": ".listuserparceltemplates", + "PurchaseBatchGlobals": ".purchasebatch", + "PurchaseBatchGlobalsTypedDict": ".purchasebatch", + "PurchaseBatchRequest": ".purchasebatch", + "PurchaseBatchRequestTypedDict": ".purchasebatch", + "RegisterCarrierAccountGlobals": ".registercarrieraccount", + "RegisterCarrierAccountGlobalsTypedDict": ".registercarrieraccount", + "RegisterCarrierAccountRequest": ".registercarrieraccount", + "RegisterCarrierAccountRequestTypedDict": ".registercarrieraccount", + "RemoveShipmentsFromBatchGlobals": ".removeshipmentsfrombatch", + "RemoveShipmentsFromBatchGlobalsTypedDict": ".removeshipmentsfrombatch", + "RemoveShipmentsFromBatchRequest": ".removeshipmentsfrombatch", + "RemoveShipmentsFromBatchRequestTypedDict": ".removeshipmentsfrombatch", + "UpdateCarrierAccountGlobals": ".updatecarrieraccount", + "UpdateCarrierAccountGlobalsTypedDict": ".updatecarrieraccount", + "UpdateCarrierAccountRequest": ".updatecarrieraccount", + "UpdateCarrierAccountRequestTypedDict": ".updatecarrieraccount", + "UpdateDefaultParcelTemplateGlobals": ".updatedefaultparceltemplate", + "UpdateDefaultParcelTemplateGlobalsTypedDict": ".updatedefaultparceltemplate", + "UpdateServiceGroupGlobals": ".updateservicegroup", + "UpdateServiceGroupGlobalsTypedDict": ".updateservicegroup", + "UpdateShippoAccountGlobals": ".updateshippoaccount", + "UpdateShippoAccountGlobalsTypedDict": ".updateshippoaccount", + "UpdateShippoAccountRequest": ".updateshippoaccount", + "UpdateShippoAccountRequestTypedDict": ".updateshippoaccount", + "UpdateUserParcelTemplateGlobals": ".updateuserparceltemplate", + "UpdateUserParcelTemplateGlobalsTypedDict": ".updateuserparceltemplate", + "UpdateUserParcelTemplateRequest": ".updateuserparceltemplate", + "UpdateUserParcelTemplateRequestTypedDict": ".updateuserparceltemplate", + "UpdateWebhookRequest": ".updatewebhook", + "UpdateWebhookRequestTypedDict": ".updatewebhook", + "ValidateAddressGlobals": ".validateaddress", + "ValidateAddressGlobalsTypedDict": ".validateaddress", + "ValidateAddressRequest": ".validateaddress", + "ValidateAddressRequestTypedDict": ".validateaddress", +} + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) + + +def __dir__(): + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/shippo/models/operations/addshipmentstobatch.py b/src/shippo/models/operations/addshipmentstobatch.py index 161d1d4e..21669c8b 100644 --- a/src/shippo/models/operations/addshipmentstobatch.py +++ b/src/shippo/models/operations/addshipmentstobatch.py @@ -2,10 +2,11 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( batchshipmentcreaterequest as components_batchshipmentcreaterequest, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -29,6 +30,22 @@ class AddShipmentsToBatchGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class AddShipmentsToBatchRequestTypedDict(TypedDict): batch_id: str diff --git a/src/shippo/models/operations/createaddress.py b/src/shippo/models/operations/createaddress.py index 9aa72f6f..84100a40 100644 --- a/src/shippo/models/operations/createaddress.py +++ b/src/shippo/models/operations/createaddress.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateAddressGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createbatch.py b/src/shippo/models/operations/createbatch.py index 7cc94155..269de731 100644 --- a/src/shippo/models/operations/createbatch.py +++ b/src/shippo/models/operations/createbatch.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateBatchGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createcarrieraccount.py b/src/shippo/models/operations/createcarrieraccount.py index e1826637..4302f6c8 100644 --- a/src/shippo/models/operations/createcarrieraccount.py +++ b/src/shippo/models/operations/createcarrieraccount.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateCarrierAccountGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createcustomsdeclaration.py b/src/shippo/models/operations/createcustomsdeclaration.py index ff0e908a..28caaa6f 100644 --- a/src/shippo/models/operations/createcustomsdeclaration.py +++ b/src/shippo/models/operations/createcustomsdeclaration.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateCustomsDeclarationGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createcustomsitem.py b/src/shippo/models/operations/createcustomsitem.py index e2b80222..4d1c266c 100644 --- a/src/shippo/models/operations/createcustomsitem.py +++ b/src/shippo/models/operations/createcustomsitem.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateCustomsItemGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createliverate.py b/src/shippo/models/operations/createliverate.py index 5c0fa6fc..f46f3905 100644 --- a/src/shippo/models/operations/createliverate.py +++ b/src/shippo/models/operations/createliverate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateLiveRateGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createmanifest.py b/src/shippo/models/operations/createmanifest.py index fe0abc52..7b4ff07d 100644 --- a/src/shippo/models/operations/createmanifest.py +++ b/src/shippo/models/operations/createmanifest.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateManifestGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createorder.py b/src/shippo/models/operations/createorder.py index 9927686f..68787327 100644 --- a/src/shippo/models/operations/createorder.py +++ b/src/shippo/models/operations/createorder.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateOrderGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createparcel.py b/src/shippo/models/operations/createparcel.py index 99f4941f..36fc0b5b 100644 --- a/src/shippo/models/operations/createparcel.py +++ b/src/shippo/models/operations/createparcel.py @@ -2,11 +2,12 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( parcelcreatefromtemplaterequest as components_parcelcreatefromtemplaterequest, parcelcreaterequest as components_parcelcreaterequest, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -25,6 +26,22 @@ class CreateParcelGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + CreateParcelRequestTypedDict = TypeAliasType( "CreateParcelRequestTypedDict", diff --git a/src/shippo/models/operations/createpickup.py b/src/shippo/models/operations/createpickup.py index 567b16ec..0a997af9 100644 --- a/src/shippo/models/operations/createpickup.py +++ b/src/shippo/models/operations/createpickup.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreatePickupGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createrefund.py b/src/shippo/models/operations/createrefund.py index 866222a6..7f76457a 100644 --- a/src/shippo/models/operations/createrefund.py +++ b/src/shippo/models/operations/createrefund.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateRefundGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createservicegroup.py b/src/shippo/models/operations/createservicegroup.py index 03bc33b4..69545d28 100644 --- a/src/shippo/models/operations/createservicegroup.py +++ b/src/shippo/models/operations/createservicegroup.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateServiceGroupGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createshipment.py b/src/shippo/models/operations/createshipment.py index cd07c324..c7dfab76 100644 --- a/src/shippo/models/operations/createshipment.py +++ b/src/shippo/models/operations/createshipment.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateShipmentGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createshippoaccount.py b/src/shippo/models/operations/createshippoaccount.py index 0d2cc454..8e34a95e 100644 --- a/src/shippo/models/operations/createshippoaccount.py +++ b/src/shippo/models/operations/createshippoaccount.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateShippoAccountGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createtrack.py b/src/shippo/models/operations/createtrack.py index 1d174540..85827d7f 100644 --- a/src/shippo/models/operations/createtrack.py +++ b/src/shippo/models/operations/createtrack.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateTrackGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/createtransaction.py b/src/shippo/models/operations/createtransaction.py index 444ed0f9..ba77f37c 100644 --- a/src/shippo/models/operations/createtransaction.py +++ b/src/shippo/models/operations/createtransaction.py @@ -2,11 +2,12 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( instanttransactioncreaterequest as components_instanttransactioncreaterequest, transactioncreaterequest as components_transactioncreaterequest, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -25,6 +26,22 @@ class CreateTransactionGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + CreateTransactionRequestTypedDict = TypeAliasType( "CreateTransactionRequestTypedDict", diff --git a/src/shippo/models/operations/createuserparceltemplate.py b/src/shippo/models/operations/createuserparceltemplate.py index 3ed06905..fcf3d8ba 100644 --- a/src/shippo/models/operations/createuserparceltemplate.py +++ b/src/shippo/models/operations/createuserparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class CreateUserParcelTemplateGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/deletedefaultparceltemplate.py b/src/shippo/models/operations/deletedefaultparceltemplate.py index 19d61f55..63bd4884 100644 --- a/src/shippo/models/operations/deletedefaultparceltemplate.py +++ b/src/shippo/models/operations/deletedefaultparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class DeleteDefaultParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteDefaultParcelTemplateRequestTypedDict(TypedDict): pass diff --git a/src/shippo/models/operations/deleteservicegroup.py b/src/shippo/models/operations/deleteservicegroup.py index f923419d..d0f20e6a 100644 --- a/src/shippo/models/operations/deleteservicegroup.py +++ b/src/shippo/models/operations/deleteservicegroup.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class DeleteServiceGroupGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteServiceGroupRequestTypedDict(TypedDict): service_group_id: str diff --git a/src/shippo/models/operations/deleteuserparceltemplate.py b/src/shippo/models/operations/deleteuserparceltemplate.py index b1a9f4e9..e59ca8d2 100644 --- a/src/shippo/models/operations/deleteuserparceltemplate.py +++ b/src/shippo/models/operations/deleteuserparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class DeleteUserParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteUserParcelTemplateRequestTypedDict(TypedDict): user_parcel_template_object_id: str diff --git a/src/shippo/models/operations/getaddress.py b/src/shippo/models/operations/getaddress.py index 829d19f3..571ac360 100644 --- a/src/shippo/models/operations/getaddress.py +++ b/src/shippo/models/operations/getaddress.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetAddressGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAddressRequestTypedDict(TypedDict): address_id: str diff --git a/src/shippo/models/operations/getbatch.py b/src/shippo/models/operations/getbatch.py index 639b23ff..cef8164a 100644 --- a/src/shippo/models/operations/getbatch.py +++ b/src/shippo/models/operations/getbatch.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class GetBatchGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetBatchRequestTypedDict(TypedDict): batch_id: str @@ -55,3 +72,19 @@ class GetBatchRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 5 r"""The number of results to return per page (max 100, default 5)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/getcarrieraccount.py b/src/shippo/models/operations/getcarrieraccount.py index 39462144..3a4d8240 100644 --- a/src/shippo/models/operations/getcarrieraccount.py +++ b/src/shippo/models/operations/getcarrieraccount.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetCarrierAccountGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetCarrierAccountRequestTypedDict(TypedDict): carrier_account_id: str diff --git a/src/shippo/models/operations/getcarrierparceltemplate.py b/src/shippo/models/operations/getcarrierparceltemplate.py index 4abc3a23..5b86214e 100644 --- a/src/shippo/models/operations/getcarrierparceltemplate.py +++ b/src/shippo/models/operations/getcarrierparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetCarrierParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetCarrierParcelTemplateRequestTypedDict(TypedDict): carrier_parcel_template_token: str diff --git a/src/shippo/models/operations/getcarrierregistrationstatus.py b/src/shippo/models/operations/getcarrierregistrationstatus.py index 4fe72649..d82b59da 100644 --- a/src/shippo/models/operations/getcarrierregistrationstatus.py +++ b/src/shippo/models/operations/getcarrierregistrationstatus.py @@ -3,7 +3,8 @@ from __future__ import annotations from enum import Enum import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +23,22 @@ class GetCarrierRegistrationStatusGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Carrier(str, Enum): r"""filter by specific carrier""" diff --git a/src/shippo/models/operations/getcustomsdeclaration.py b/src/shippo/models/operations/getcustomsdeclaration.py index 1db07f49..2ff6da8a 100644 --- a/src/shippo/models/operations/getcustomsdeclaration.py +++ b/src/shippo/models/operations/getcustomsdeclaration.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class GetCustomsDeclarationGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetCustomsDeclarationRequestTypedDict(TypedDict): customs_declaration_id: str @@ -47,3 +64,19 @@ class GetCustomsDeclarationRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 1 r"""The page number you want to select""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/getcustomsitem.py b/src/shippo/models/operations/getcustomsitem.py index 2e2244c8..bc5232a8 100644 --- a/src/shippo/models/operations/getcustomsitem.py +++ b/src/shippo/models/operations/getcustomsitem.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class GetCustomsItemGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetCustomsItemRequestTypedDict(TypedDict): customs_item_id: str @@ -47,3 +64,19 @@ class GetCustomsItemRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 1 r"""The page number you want to select""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/getdefaultparceltemplate.py b/src/shippo/models/operations/getdefaultparceltemplate.py index 6b86c77c..ba69dd9a 100644 --- a/src/shippo/models/operations/getdefaultparceltemplate.py +++ b/src/shippo/models/operations/getdefaultparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetDefaultParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetDefaultParcelTemplateRequestTypedDict(TypedDict): pass diff --git a/src/shippo/models/operations/getmanifest.py b/src/shippo/models/operations/getmanifest.py index 2bcebc31..196ed14b 100644 --- a/src/shippo/models/operations/getmanifest.py +++ b/src/shippo/models/operations/getmanifest.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetManifestGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetManifestRequestTypedDict(TypedDict): manifest_id: str diff --git a/src/shippo/models/operations/getorder.py b/src/shippo/models/operations/getorder.py index 10926aa2..68875a17 100644 --- a/src/shippo/models/operations/getorder.py +++ b/src/shippo/models/operations/getorder.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetOrderGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetOrderRequestTypedDict(TypedDict): order_id: str diff --git a/src/shippo/models/operations/getparcel.py b/src/shippo/models/operations/getparcel.py index 1ca59e7d..a76038ce 100644 --- a/src/shippo/models/operations/getparcel.py +++ b/src/shippo/models/operations/getparcel.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetParcelGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetParcelRequestTypedDict(TypedDict): parcel_id: str diff --git a/src/shippo/models/operations/getrate.py b/src/shippo/models/operations/getrate.py index 659b12d2..5ad713d7 100644 --- a/src/shippo/models/operations/getrate.py +++ b/src/shippo/models/operations/getrate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetRateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetRateRequestTypedDict(TypedDict): rate_id: str diff --git a/src/shippo/models/operations/getrefund.py b/src/shippo/models/operations/getrefund.py index bf63e28a..6ee226f5 100644 --- a/src/shippo/models/operations/getrefund.py +++ b/src/shippo/models/operations/getrefund.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetRefundGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetRefundRequestTypedDict(TypedDict): refund_id: str diff --git a/src/shippo/models/operations/getshipment.py b/src/shippo/models/operations/getshipment.py index 002d774f..638ba7a3 100644 --- a/src/shippo/models/operations/getshipment.py +++ b/src/shippo/models/operations/getshipment.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetShipmentGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetShipmentRequestTypedDict(TypedDict): shipment_id: str diff --git a/src/shippo/models/operations/getshippoaccount.py b/src/shippo/models/operations/getshippoaccount.py index c2bc0b13..de58306f 100644 --- a/src/shippo/models/operations/getshippoaccount.py +++ b/src/shippo/models/operations/getshippoaccount.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetShippoAccountGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetShippoAccountRequestTypedDict(TypedDict): shippo_account_id: str diff --git a/src/shippo/models/operations/gettrack.py b/src/shippo/models/operations/gettrack.py index b1359f38..54126eb9 100644 --- a/src/shippo/models/operations/gettrack.py +++ b/src/shippo/models/operations/gettrack.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetTrackGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetTrackRequestTypedDict(TypedDict): tracking_number: str diff --git a/src/shippo/models/operations/gettransaction.py b/src/shippo/models/operations/gettransaction.py index aaec9ebc..0def76dc 100644 --- a/src/shippo/models/operations/gettransaction.py +++ b/src/shippo/models/operations/gettransaction.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetTransactionGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetTransactionRequestTypedDict(TypedDict): transaction_id: str diff --git a/src/shippo/models/operations/getuserparceltemplate.py b/src/shippo/models/operations/getuserparceltemplate.py index b7dc9fd9..fa6a1f95 100644 --- a/src/shippo/models/operations/getuserparceltemplate.py +++ b/src/shippo/models/operations/getuserparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetUserParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetUserParcelTemplateRequestTypedDict(TypedDict): user_parcel_template_object_id: str diff --git a/src/shippo/models/operations/initiateoauth2signin.py b/src/shippo/models/operations/initiateoauth2signin.py index 0adb6df9..08b118eb 100644 --- a/src/shippo/models/operations/initiateoauth2signin.py +++ b/src/shippo/models/operations/initiateoauth2signin.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class InitiateOauth2SigninGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class InitiateOauth2SigninRequestTypedDict(TypedDict): carrier_account_object_id: str @@ -55,6 +72,22 @@ class InitiateOauth2SigninRequest(BaseModel): ] = None r"""A random string generated by the consuming application and included in the request to prevent CSRF attacks. The consuming application checks that the same value is returned after the user authorizes Shippo.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["state"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class InitiateOauth2SigninResponseTypedDict(TypedDict): headers: Dict[str, List[str]] diff --git a/src/shippo/models/operations/listaddresses.py b/src/shippo/models/operations/listaddresses.py index efcf8069..f7c169bd 100644 --- a/src/shippo/models/operations/listaddresses.py +++ b/src/shippo/models/operations/listaddresses.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListAddressesGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListAddressesRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListAddressesRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 5 r"""The number of results to return per page (max 100, default 5)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listcarrieraccounts.py b/src/shippo/models/operations/listcarrieraccounts.py index fbc11061..f7c3eed8 100644 --- a/src/shippo/models/operations/listcarrieraccounts.py +++ b/src/shippo/models/operations/listcarrieraccounts.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import carriersenum as components_carriersenum -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +23,22 @@ class ListCarrierAccountsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListCarrierAccountsRequestTypedDict(TypedDict): service_levels: NotRequired[bool] @@ -66,3 +83,21 @@ class ListCarrierAccountsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 5 r"""The number of results to return per page (max 100, default 5)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["service_levels", "carrier", "account_id", "page", "results"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listcarrierparceltemplates.py b/src/shippo/models/operations/listcarrierparceltemplates.py index b61288b8..631e39cd 100644 --- a/src/shippo/models/operations/listcarrierparceltemplates.py +++ b/src/shippo/models/operations/listcarrierparceltemplates.py @@ -3,7 +3,8 @@ from __future__ import annotations from enum import Enum import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -22,6 +23,22 @@ class ListCarrierParcelTemplatesGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Include(str, Enum): r"""filter by user or enabled""" @@ -50,3 +67,19 @@ class ListCarrierParcelTemplatesRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""filter by specific carrier""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["include", "carrier"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listcustomsdeclarations.py b/src/shippo/models/operations/listcustomsdeclarations.py index a53a71ba..8916ece4 100644 --- a/src/shippo/models/operations/listcustomsdeclarations.py +++ b/src/shippo/models/operations/listcustomsdeclarations.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListCustomsDeclarationsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListCustomsDeclarationsRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListCustomsDeclarationsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 5 r"""The number of results to return per page (max 100, default 5)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listcustomsitems.py b/src/shippo/models/operations/listcustomsitems.py index b4d4d962..328cff28 100644 --- a/src/shippo/models/operations/listcustomsitems.py +++ b/src/shippo/models/operations/listcustomsitems.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListCustomsItemsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListCustomsItemsRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListCustomsItemsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listmanifests.py b/src/shippo/models/operations/listmanifests.py index 589f6a8a..1d52ea9d 100644 --- a/src/shippo/models/operations/listmanifests.py +++ b/src/shippo/models/operations/listmanifests.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListManifestsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListManifestsRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListManifestsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 5 r"""The number of results to return per page (max 100, default 5)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listorders.py b/src/shippo/models/operations/listorders.py index 7dbb68b3..a571032a 100644 --- a/src/shippo/models/operations/listorders.py +++ b/src/shippo/models/operations/listorders.py @@ -2,11 +2,12 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( ordershopappenum as components_ordershopappenum, orderstatusenum as components_orderstatusenum, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import List, Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,6 +26,22 @@ class ListOrdersGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListOrdersRequestTypedDict(TypedDict): page: NotRequired[int] @@ -86,3 +103,21 @@ class ListOrdersRequest(BaseModel): r"""Filter orders created before the input date and time (ISO 8601 UTC format). This is based on the `placed_at` field, meaning when the order has been placed, not when the order object was created. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["page", "results", "order_status[]", "shop_app", "start_date", "end_date"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listparcels.py b/src/shippo/models/operations/listparcels.py index 21b3993a..32b0878d 100644 --- a/src/shippo/models/operations/listparcels.py +++ b/src/shippo/models/operations/listparcels.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListParcelsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListParcelsRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListParcelsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listrefunds.py b/src/shippo/models/operations/listrefunds.py index b438589b..e00e7db1 100644 --- a/src/shippo/models/operations/listrefunds.py +++ b/src/shippo/models/operations/listrefunds.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListRefundsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListRefundsRequestTypedDict(TypedDict): pass diff --git a/src/shippo/models/operations/listservicegroups.py b/src/shippo/models/operations/listservicegroups.py index d4aae047..32e2bd61 100644 --- a/src/shippo/models/operations/listservicegroups.py +++ b/src/shippo/models/operations/listservicegroups.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListServiceGroupsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListServiceGroupsRequestTypedDict(TypedDict): pass diff --git a/src/shippo/models/operations/listshipmentrates.py b/src/shippo/models/operations/listshipmentrates.py index f3af5194..9023fc6f 100644 --- a/src/shippo/models/operations/listshipmentrates.py +++ b/src/shippo/models/operations/listshipmentrates.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class ListShipmentRatesGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListShipmentRatesRequestTypedDict(TypedDict): shipment_id: str @@ -55,3 +72,19 @@ class ListShipmentRatesRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listshipmentratesbycurrencycode.py b/src/shippo/models/operations/listshipmentratesbycurrencycode.py index 58d4a44e..5f80a3b9 100644 --- a/src/shippo/models/operations/listshipmentratesbycurrencycode.py +++ b/src/shippo/models/operations/listshipmentratesbycurrencycode.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class ListShipmentRatesByCurrencyCodeGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListShipmentRatesByCurrencyCodeRequestTypedDict(TypedDict): shipment_id: str @@ -64,3 +81,19 @@ class ListShipmentRatesByCurrencyCodeRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listshipments.py b/src/shippo/models/operations/listshipments.py index a45ccf53..b01b05dc 100644 --- a/src/shippo/models/operations/listshipments.py +++ b/src/shippo/models/operations/listshipments.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListShipmentsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListShipmentsRequestTypedDict(TypedDict): page_token: NotRequired[str] @@ -81,3 +98,29 @@ class ListShipmentsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = None r"""Object(s) created lesser than or equal to a provided date and time.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "page_token", + "page", + "results", + "object_created_gt", + "object_created_gte", + "object_created_lt", + "object_created_lte", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listshippoaccounts.py b/src/shippo/models/operations/listshippoaccounts.py index cf8ddb68..8f39bf1b 100644 --- a/src/shippo/models/operations/listshippoaccounts.py +++ b/src/shippo/models/operations/listshippoaccounts.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListShippoAccountsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListShippoAccountsRequestTypedDict(TypedDict): page: NotRequired[int] @@ -41,3 +58,19 @@ class ListShippoAccountsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listtransactions.py b/src/shippo/models/operations/listtransactions.py index e4cd731e..767293e4 100644 --- a/src/shippo/models/operations/listtransactions.py +++ b/src/shippo/models/operations/listtransactions.py @@ -2,11 +2,12 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( trackingstatusenum as components_trackingstatusenum, transactionstatusenum as components_transactionstatusenum, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,6 +26,22 @@ class ListTransactionsGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListTransactionsRequestTypedDict(TypedDict): rate: NotRequired[str] @@ -69,3 +86,21 @@ class ListTransactionsRequest(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 25 r"""The number of results to return per page (max 100)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["rate", "object_status", "tracking_status", "page", "results"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/listuserparceltemplates.py b/src/shippo/models/operations/listuserparceltemplates.py index fc957bd6..b9ba3b08 100644 --- a/src/shippo/models/operations/listuserparceltemplates.py +++ b/src/shippo/models/operations/listuserparceltemplates.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ListUserParcelTemplatesGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ListUserParcelTemplatesRequestTypedDict(TypedDict): pass diff --git a/src/shippo/models/operations/purchasebatch.py b/src/shippo/models/operations/purchasebatch.py index eecc218e..b1cc2f09 100644 --- a/src/shippo/models/operations/purchasebatch.py +++ b/src/shippo/models/operations/purchasebatch.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class PurchaseBatchGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PurchaseBatchRequestTypedDict(TypedDict): batch_id: str diff --git a/src/shippo/models/operations/registercarrieraccount.py b/src/shippo/models/operations/registercarrieraccount.py index 8135dc2a..c1c0bb21 100644 --- a/src/shippo/models/operations/registercarrieraccount.py +++ b/src/shippo/models/operations/registercarrieraccount.py @@ -2,7 +2,7 @@ from __future__ import annotations import pydantic -from pydantic import Discriminator, Tag +from pydantic import Field, model_serializer from shippo.models.components import ( carrieraccountcanadapostcreaterequest as components_carrieraccountcanadapostcreaterequest, carrieraccountchronopostcreaterequest as components_carrieraccountchronopostcreaterequest, @@ -16,12 +16,13 @@ carrieraccounthermesukcreaterequest as components_carrieraccounthermesukcreaterequest, carrieraccountmondialrelaycreaterequest as components_carrieraccountmondialrelaycreaterequest, carrieraccountposteitalianecreaterequest as components_carrieraccountposteitalianecreaterequest, - carrieraccountsendlecreaterequest as components_carrieraccountsendlecreaterequest, + carrieraccountroyalmailcreaterequest as components_carrieraccountroyalmailcreaterequest, + carrieraccountroyalmailsfcreaterequest as components_carrieraccountroyalmailsfcreaterequest, carrieraccountupscreaterequest as components_carrieraccountupscreaterequest, carrieraccountuspscreaterequest as components_carrieraccountuspscreaterequest, ) -from shippo.types import BaseModel -from shippo.utils import FieldMetadata, HeaderMetadata, get_discriminator +from shippo.types import BaseModel, UNSET_SENTINEL +from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -39,6 +40,22 @@ class RegisterCarrierAccountGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + RegisterCarrierAccountRequestTypedDict = TypeAliasType( "RegisterCarrierAccountRequestTypedDict", @@ -57,7 +74,8 @@ class RegisterCarrierAccountGlobals(BaseModel): components_carrieraccountposteitalianecreaterequest.CarrierAccountPosteItalianeCreateRequestTypedDict, components_carrieraccountupscreaterequest.CarrierAccountUPSCreateRequestTypedDict, components_carrieraccountuspscreaterequest.CarrierAccountUSPSCreateRequestTypedDict, - components_carrieraccountsendlecreaterequest.CarrierAccountSendleCreateRequestTypedDict, + components_carrieraccountroyalmailcreaterequest.CarrierAccountRoyalMailCreateRequestTypedDict, + components_carrieraccountroyalmailsfcreaterequest.CarrierAccountRoyalMailSfCreateRequestTypedDict, ], ) r"""The body of the request.""" @@ -65,67 +83,23 @@ class RegisterCarrierAccountGlobals(BaseModel): RegisterCarrierAccountRequest = Annotated[ Union[ - Annotated[ - components_carrieraccountcanadapostcreaterequest.CarrierAccountCanadaPostCreateRequest, - Tag("canada_post"), - ], - Annotated[ - components_carrieraccountchronopostcreaterequest.CarrierAccountChronopostCreateRequest, - Tag("chronopost"), - ], - Annotated[ - components_carrieraccountcolissimocreaterequest.CarrierAccountColissimoCreateRequest, - Tag("colissimo"), - ], - Annotated[ - components_carrieraccountcorreoscreaterequest.CarrierAccountCorreosCreateRequest, - Tag("correos"), - ], - Annotated[ - components_carrieraccountdeutschepostcreaterequest.CarrierAccountDeutschePostCreateRequest, - Tag("deutsche_post"), - ], - Annotated[ - components_carrieraccountdhlexpresscreaterequest.CarrierAccountDHLExpressCreateRequest, - Tag("dhl_express"), - ], - Annotated[ - components_carrieraccountdpddecreaterequest.CarrierAccountDpdDeCreateRequest, - Tag("dpd_de"), - ], - Annotated[ - components_carrieraccountdpdukcreaterequest.CarrierAccountDPDUKCreateRequest, - Tag("dpd_uk"), - ], - Annotated[ - components_carrieraccountfedexcreaterequest.CarrierAccountFedExCreateRequest, - Tag("fedex"), - ], - Annotated[ - components_carrieraccounthermesukcreaterequest.CarrierAccountHermesUKCreateRequest, - Tag("hermes_uk"), - ], - Annotated[ - components_carrieraccountmondialrelaycreaterequest.CarrierAccountMondialRelayCreateRequest, - Tag("mondial_relay"), - ], - Annotated[ - components_carrieraccountposteitalianecreaterequest.CarrierAccountPosteItalianeCreateRequest, - Tag("poste_italiane"), - ], - Annotated[ - components_carrieraccountupscreaterequest.CarrierAccountUPSCreateRequest, - Tag("ups"), - ], - Annotated[ - components_carrieraccountuspscreaterequest.CarrierAccountUSPSCreateRequest, - Tag("usps"), - ], - Annotated[ - components_carrieraccountsendlecreaterequest.CarrierAccountSendleCreateRequest, - Tag("sendle"), - ], + components_carrieraccountcanadapostcreaterequest.CarrierAccountCanadaPostCreateRequest, + components_carrieraccountchronopostcreaterequest.CarrierAccountChronopostCreateRequest, + components_carrieraccountcolissimocreaterequest.CarrierAccountColissimoCreateRequest, + components_carrieraccountcorreoscreaterequest.CarrierAccountCorreosCreateRequest, + components_carrieraccountdeutschepostcreaterequest.CarrierAccountDeutschePostCreateRequest, + components_carrieraccountdhlexpresscreaterequest.CarrierAccountDHLExpressCreateRequest, + components_carrieraccountdpddecreaterequest.CarrierAccountDpdDeCreateRequest, + components_carrieraccountdpdukcreaterequest.CarrierAccountDPDUKCreateRequest, + components_carrieraccountfedexcreaterequest.CarrierAccountFedExCreateRequest, + components_carrieraccounthermesukcreaterequest.CarrierAccountHermesUKCreateRequest, + components_carrieraccountmondialrelaycreaterequest.CarrierAccountMondialRelayCreateRequest, + components_carrieraccountposteitalianecreaterequest.CarrierAccountPosteItalianeCreateRequest, + components_carrieraccountupscreaterequest.CarrierAccountUPSCreateRequest, + components_carrieraccountuspscreaterequest.CarrierAccountUSPSCreateRequest, + components_carrieraccountroyalmailcreaterequest.CarrierAccountRoyalMailCreateRequest, + components_carrieraccountroyalmailsfcreaterequest.CarrierAccountRoyalMailSfCreateRequest, ], - Discriminator(lambda m: get_discriminator(m, "carrier", "carrier")), + Field(discriminator="CARRIER"), ] r"""The body of the request.""" diff --git a/src/shippo/models/operations/removeshipmentsfrombatch.py b/src/shippo/models/operations/removeshipmentsfrombatch.py index 619974fb..d381e798 100644 --- a/src/shippo/models/operations/removeshipmentsfrombatch.py +++ b/src/shippo/models/operations/removeshipmentsfrombatch.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -26,6 +27,22 @@ class RemoveShipmentsFromBatchGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class RemoveShipmentsFromBatchRequestTypedDict(TypedDict): batch_id: str diff --git a/src/shippo/models/operations/updatecarrieraccount.py b/src/shippo/models/operations/updatecarrieraccount.py index 92b0c024..79276ced 100644 --- a/src/shippo/models/operations/updatecarrieraccount.py +++ b/src/shippo/models/operations/updatecarrieraccount.py @@ -2,8 +2,9 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import carrieraccountbase as components_carrieraccountbase -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -27,6 +28,22 @@ class UpdateCarrierAccountGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class UpdateCarrierAccountRequestTypedDict(TypedDict): carrier_account_id: str @@ -50,3 +67,19 @@ class UpdateCarrierAccountRequest(BaseModel): FieldMetadata(request=RequestMetadata(media_type="application/json")), ] = None r"""Examples.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["CarrierAccountBase"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/updatedefaultparceltemplate.py b/src/shippo/models/operations/updatedefaultparceltemplate.py index 2fcf438a..81c87b83 100644 --- a/src/shippo/models/operations/updatedefaultparceltemplate.py +++ b/src/shippo/models/operations/updatedefaultparceltemplate.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class UpdateDefaultParcelTemplateGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/updateservicegroup.py b/src/shippo/models/operations/updateservicegroup.py index 8fb8767e..68aef9a4 100644 --- a/src/shippo/models/operations/updateservicegroup.py +++ b/src/shippo/models/operations/updateservicegroup.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class UpdateServiceGroupGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/updateshippoaccount.py b/src/shippo/models/operations/updateshippoaccount.py index 93a94eab..c383a0b4 100644 --- a/src/shippo/models/operations/updateshippoaccount.py +++ b/src/shippo/models/operations/updateshippoaccount.py @@ -2,10 +2,11 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( shippoaccountupdaterequest as components_shippoaccountupdaterequest, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -29,6 +30,22 @@ class UpdateShippoAccountGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class UpdateShippoAccountRequestTypedDict(TypedDict): shippo_account_id: str @@ -50,3 +67,19 @@ class UpdateShippoAccountRequest(BaseModel): Optional[components_shippoaccountupdaterequest.ShippoAccountUpdateRequest], FieldMetadata(request=RequestMetadata(media_type="application/json")), ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ShippoAccountUpdateRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/updateuserparceltemplate.py b/src/shippo/models/operations/updateuserparceltemplate.py index c7215978..1f586dc2 100644 --- a/src/shippo/models/operations/updateuserparceltemplate.py +++ b/src/shippo/models/operations/updateuserparceltemplate.py @@ -2,10 +2,11 @@ from __future__ import annotations import pydantic +from pydantic import model_serializer from shippo.models.components import ( userparceltemplateupdaterequest as components_userparceltemplateupdaterequest, ) -from shippo.types import BaseModel +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import ( FieldMetadata, HeaderMetadata, @@ -29,6 +30,22 @@ class UpdateUserParcelTemplateGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class UpdateUserParcelTemplateRequestTypedDict(TypedDict): user_parcel_template_object_id: str @@ -52,3 +69,19 @@ class UpdateUserParcelTemplateRequest(BaseModel): ], FieldMetadata(request=RequestMetadata(media_type="application/json")), ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["UserParcelTemplateUpdateRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/shippo/models/operations/validateaddress.py b/src/shippo/models/operations/validateaddress.py index 181193db..3b289d5f 100644 --- a/src/shippo/models/operations/validateaddress.py +++ b/src/shippo/models/operations/validateaddress.py @@ -2,7 +2,8 @@ from __future__ import annotations import pydantic -from shippo.types import BaseModel +from pydantic import model_serializer +from shippo.types import BaseModel, UNSET_SENTINEL from shippo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class ValidateAddressGlobals(BaseModel): ] = None r"""Optional string used to pick a non-default API version to use. See our API version guide.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["SHIPPO-API-VERSION"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class ValidateAddressRequestTypedDict(TypedDict): address_id: str diff --git a/src/shippo/orders.py b/src/shippo/orders.py index 20b43ee8..0b87fb15 100644 --- a/src/shippo/orders.py +++ b/src/shippo/orders.py @@ -5,6 +5,7 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast @@ -13,15 +14,6 @@ class Orders(BaseSDK): Use the orders object to load orders from your system to the Shippo dashboard. You can use the orders object to create, retrieve, list, and manage orders programmatically. You can also retrieve shipping rates, purchase labels, and track shipments for each order. - - - # Line Item -

-
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource - in the future. Currently it's a nested object within the order resource.

-

- A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. - """ def list( @@ -34,7 +26,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.OrderPaginatedList]: + ) -> components.OrderPaginatedList: r"""List all orders Returns a list of all order objects. @@ -75,6 +67,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -88,9 +81,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListOrders", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -99,28 +93,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.OrderPaginatedList] - ) + return unmarshal_json_response(components.OrderPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -132,7 +113,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.OrderPaginatedList]: + ) -> components.OrderPaginatedList: r"""List all orders Returns a list of all order objects. @@ -173,6 +154,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -186,9 +168,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListOrders", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -197,28 +180,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.OrderPaginatedList] - ) + return unmarshal_json_response(components.OrderPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -230,7 +200,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Order]: + ) -> components.Order: r"""Create a new order Creates a new order object. @@ -274,6 +244,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.OrderCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -287,9 +258,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateOrder", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -298,26 +270,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Order]) + return unmarshal_json_response(components.Order, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -329,7 +290,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Order]: + ) -> components.Order: r"""Create a new order Creates a new order object. @@ -373,6 +334,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.OrderCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -386,9 +348,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateOrder", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -397,26 +360,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Order]) + return unmarshal_json_response(components.Order, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -426,7 +378,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Order]: + ) -> components.Order: r"""Retrieve an order Retrieves an existing order using an object ID. @@ -467,6 +419,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -480,9 +433,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetOrder", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -491,26 +445,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Order]) + return unmarshal_json_response(components.Order, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -520,7 +463,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Order]: + ) -> components.Order: r"""Retrieve an order Retrieves an existing order using an object ID. @@ -561,6 +504,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -574,9 +518,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetOrder", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -585,23 +530,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Order]) + return unmarshal_json_response(components.Order, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/parcels.py b/src/shippo/parcels.py index 221601ea..460eea3c 100644 --- a/src/shippo/parcels.py +++ b/src/shippo/parcels.py @@ -5,17 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Parcels(BaseSDK): - r"""A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates. - - - # Parcel Extras - The following values are supported for the `extra` field of the parcel object. - - """ + r"""A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates.""" def list( self, @@ -26,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ParcelPaginatedList]: + ) -> components.ParcelPaginatedList: r"""List all parcels Returns a list of all parcel objects. @@ -69,6 +64,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -82,9 +78,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListParcels", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -93,28 +90,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ParcelPaginatedList] - ) + return unmarshal_json_response(components.ParcelPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -125,7 +109,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ParcelPaginatedList]: + ) -> components.ParcelPaginatedList: r"""List all parcels Returns a list of all parcel objects. @@ -168,6 +152,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -181,9 +166,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListParcels", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -192,28 +178,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ParcelPaginatedList] - ) + return unmarshal_json_response(components.ParcelPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -225,7 +198,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Parcel]: + ) -> components.Parcel: r"""Create a new parcel Creates a new parcel object. @@ -269,6 +242,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.CreateParcelRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -282,9 +256,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateParcel", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -293,26 +268,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Parcel]) + return unmarshal_json_response(components.Parcel, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -324,7 +288,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Parcel]: + ) -> components.Parcel: r"""Create a new parcel Creates a new parcel object. @@ -368,6 +332,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.CreateParcelRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -381,9 +346,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateParcel", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -392,26 +358,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Parcel]) + return unmarshal_json_response(components.Parcel, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -421,7 +376,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Parcel]: + ) -> components.Parcel: r"""Retrieve an existing parcel Returns parcel details using an existing parcel object ID (this will not return parcel details associated with un-purchased shipment/rate parcel object IDs). @@ -462,6 +417,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -475,9 +431,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetParcel", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -486,26 +443,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Parcel]) + return unmarshal_json_response(components.Parcel, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -515,7 +461,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Parcel]: + ) -> components.Parcel: r"""Retrieve an existing parcel Returns parcel details using an existing parcel object ID (this will not return parcel details associated with un-purchased shipment/rate parcel object IDs). @@ -556,6 +502,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -569,9 +516,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetParcel", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -580,23 +528,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Parcel]) + return unmarshal_json_response(components.Parcel, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/pickups.py b/src/shippo/pickups.py index 99def699..d77cc55e 100644 --- a/src/shippo/pickups.py +++ b/src/shippo/pickups.py @@ -5,13 +5,13 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Pickups(BaseSDK): r"""A pickup is when you schedule a carrier to collect a package for delivery. Use Shippo’s pickups endpoint to schedule pickups with USPS and DHL Express for eligible shipments that you have already created. - """ def create( @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Pickup]: + ) -> components.Pickup: r"""Create a pickup Creates a pickup object. This request is for a carrier to come to a specified location to take a package for shipping. @@ -66,6 +66,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.PickupBase ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -79,9 +80,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreatePickup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -90,26 +92,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Pickup]) + return unmarshal_json_response(components.Pickup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -119,7 +110,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Pickup]: + ) -> components.Pickup: r"""Create a pickup Creates a pickup object. This request is for a carrier to come to a specified location to take a package for shipping. @@ -163,6 +154,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.PickupBase ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -176,9 +168,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreatePickup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -187,23 +180,12 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Pickup]) + return unmarshal_json_response(components.Pickup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/rates.py b/src/shippo/rates.py index 00fb6c77..ced912e3 100644 --- a/src/shippo/rates.py +++ b/src/shippo/rates.py @@ -5,13 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Rates(BaseSDK): - r"""A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time. - - """ + r"""A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time.""" def get( self, @@ -21,7 +20,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Rate]: + ) -> components.Rate: r"""Retrieve a rate Returns an existing rate using a rate object ID. @@ -62,6 +61,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -75,9 +75,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetRate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -86,26 +87,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Rate]) + return unmarshal_json_response(components.Rate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -115,7 +105,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Rate]: + ) -> components.Rate: r"""Retrieve a rate Returns an existing rate using a rate object ID. @@ -156,6 +146,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -169,9 +160,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetRate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -180,26 +172,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Rate]) + return unmarshal_json_response(components.Rate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def list_shipment_rates( self, @@ -211,7 +192,7 @@ def list_shipment_rates( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RatePaginatedList]: + ) -> components.RatePaginatedList: r"""Retrieve shipment rates Returns a paginated list of rates associated with a shipment @@ -256,6 +237,7 @@ def list_shipment_rates( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -269,9 +251,10 @@ def list_shipment_rates( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipmentRates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -280,28 +263,15 @@ def list_shipment_rates( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RatePaginatedList] - ) + return unmarshal_json_response(components.RatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_shipment_rates_async( self, @@ -313,7 +283,7 @@ async def list_shipment_rates_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RatePaginatedList]: + ) -> components.RatePaginatedList: r"""Retrieve shipment rates Returns a paginated list of rates associated with a shipment @@ -358,6 +328,7 @@ async def list_shipment_rates_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -371,9 +342,10 @@ async def list_shipment_rates_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipmentRates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -382,28 +354,15 @@ async def list_shipment_rates_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RatePaginatedList] - ) + return unmarshal_json_response(components.RatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def list_shipment_rates_by_currency_code( self, @@ -416,7 +375,7 @@ def list_shipment_rates_by_currency_code( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RatePaginatedList]: + ) -> components.RatePaginatedList: r"""Retrieve shipment rates in currency Returns all available shipping rates for a shipment object. @@ -465,6 +424,7 @@ def list_shipment_rates_by_currency_code( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -478,9 +438,10 @@ def list_shipment_rates_by_currency_code( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipmentRatesByCurrencyCode", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -489,28 +450,15 @@ def list_shipment_rates_by_currency_code( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RatePaginatedList] - ) + return unmarshal_json_response(components.RatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_shipment_rates_by_currency_code_async( self, @@ -523,7 +471,7 @@ async def list_shipment_rates_by_currency_code_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RatePaginatedList]: + ) -> components.RatePaginatedList: r"""Retrieve shipment rates in currency Returns all available shipping rates for a shipment object. @@ -572,6 +520,7 @@ async def list_shipment_rates_by_currency_code_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -585,9 +534,10 @@ async def list_shipment_rates_by_currency_code_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipmentRatesByCurrencyCode", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -596,25 +546,12 @@ async def list_shipment_rates_by_currency_code_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RatePaginatedList] - ) + return unmarshal_json_response(components.RatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/rates_at_checkout.py b/src/shippo/rates_at_checkout.py index 42ba2100..0b33eb27 100644 --- a/src/shippo/rates_at_checkout.py +++ b/src/shippo/rates_at_checkout.py @@ -5,19 +5,19 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class RatesAtCheckout(BaseSDK): r"""Rates at checkout is a tool for merchants to display up-to-date shipping estimates based on what's in their customers cart and where they’re shipping to. Merchants set up curated shipping options for customers in the checkout flow based on data in the shopping cart. The request must include the **to** address and item information. Optional fields are the **from** address and package information. If the optional fields are not included, the service will use the default address and/or package configured for rates at checkout. The response is a list of shipping options based on the Service Group configuration. - (see Service Group configuration for details). - + (see Service Group configuration for details). + # Default Parcel Template Assign one of your user parcel templates to be the default used when generating Live Rates. This template will be used by default when generating Live Rates, unless you explicitly provide a parcel in the Live Rates request. - """ def create( @@ -30,7 +30,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.LiveRatePaginatedList]: + ) -> components.LiveRatePaginatedList: r"""Generate a live rates request Initiates a live rates request. Include either the object ID for @@ -77,6 +77,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.LiveRateCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -90,9 +91,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateLiveRate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -101,28 +103,15 @@ def create( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.LiveRatePaginatedList] - ) + return unmarshal_json_response(components.LiveRatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -134,7 +123,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.LiveRatePaginatedList]: + ) -> components.LiveRatePaginatedList: r"""Generate a live rates request Initiates a live rates request. Include either the object ID for @@ -181,6 +170,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.LiveRateCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -194,9 +184,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateLiveRate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -205,28 +196,15 @@ async def create_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.LiveRatePaginatedList] - ) + return unmarshal_json_response(components.LiveRatePaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get_default_parcel_template( self, @@ -239,7 +217,7 @@ def get_default_parcel_template( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.DefaultParcelTemplate]: + ) -> components.DefaultParcelTemplate: r"""Show current default parcel template Retrieve and display the currently configured default parcel template for live rates. @@ -282,6 +260,7 @@ def get_default_parcel_template( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -295,9 +274,10 @@ def get_default_parcel_template( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -306,28 +286,15 @@ def get_default_parcel_template( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.DefaultParcelTemplate] - ) + return unmarshal_json_response(components.DefaultParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_default_parcel_template_async( self, @@ -340,7 +307,7 @@ async def get_default_parcel_template_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.DefaultParcelTemplate]: + ) -> components.DefaultParcelTemplate: r"""Show current default parcel template Retrieve and display the currently configured default parcel template for live rates. @@ -383,6 +350,7 @@ async def get_default_parcel_template_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -396,9 +364,10 @@ async def get_default_parcel_template_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -407,28 +376,15 @@ async def get_default_parcel_template_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.DefaultParcelTemplate] - ) + return unmarshal_json_response(components.DefaultParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def update_default_parcel_template( self, @@ -443,7 +399,7 @@ def update_default_parcel_template( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.DefaultParcelTemplate]: + ) -> components.DefaultParcelTemplate: r"""Update default parcel template Update the currently configured default parcel template for live rates. The object_id in the request payload should identify the user parcel template to be the new default. @@ -493,6 +449,7 @@ def update_default_parcel_template( "json", Optional[components.DefaultParcelTemplateUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -506,9 +463,10 @@ def update_default_parcel_template( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -517,28 +475,15 @@ def update_default_parcel_template( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.DefaultParcelTemplate] - ) + return unmarshal_json_response(components.DefaultParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def update_default_parcel_template_async( self, @@ -553,7 +498,7 @@ async def update_default_parcel_template_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.DefaultParcelTemplate]: + ) -> components.DefaultParcelTemplate: r"""Update default parcel template Update the currently configured default parcel template for live rates. The object_id in the request payload should identify the user parcel template to be the new default. @@ -603,6 +548,7 @@ async def update_default_parcel_template_async( "json", Optional[components.DefaultParcelTemplateUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -616,9 +562,10 @@ async def update_default_parcel_template_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -627,28 +574,15 @@ async def update_default_parcel_template_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.DefaultParcelTemplate] - ) + return unmarshal_json_response(components.DefaultParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def delete_default_parcel_template( self, @@ -704,6 +638,7 @@ def delete_default_parcel_template( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -717,9 +652,10 @@ def delete_default_parcel_template( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -731,23 +667,12 @@ def delete_default_parcel_template( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def delete_default_parcel_template_async( self, @@ -803,6 +728,7 @@ async def delete_default_parcel_template_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -816,9 +742,10 @@ async def delete_default_parcel_template_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteDefaultParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -830,20 +757,9 @@ async def delete_default_parcel_template_async( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/refunds.py b/src/shippo/refunds.py index 92830460..a0496ae1 100644 --- a/src/shippo/refunds.py +++ b/src/shippo/refunds.py @@ -5,13 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Refunds(BaseSDK): - r"""Refunds are reimbursements for successfully created but unused shipping labels or other charges. - - """ + r"""Refunds are reimbursements for successfully created but unused shipping labels or other charges.""" def create( self, @@ -23,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Refund]: + ) -> components.Refund: r"""Create a refund Creates a new refund object. @@ -67,6 +66,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.RefundRequestBody ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -80,9 +80,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateRefund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -91,26 +92,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Refund]) + return unmarshal_json_response(components.Refund, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -122,7 +112,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Refund]: + ) -> components.Refund: r"""Create a refund Creates a new refund object. @@ -166,6 +156,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.RefundRequestBody ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -179,9 +170,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateRefund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -190,26 +182,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Refund]) + return unmarshal_json_response(components.Refund, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def list( self, @@ -221,7 +202,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RefundPaginatedList]: + ) -> components.RefundPaginatedList: r"""List all refunds Returns a list all refund objects. @@ -262,6 +243,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -275,9 +257,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListRefunds", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -286,28 +269,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RefundPaginatedList] - ) + return unmarshal_json_response(components.RefundPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -319,7 +289,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.RefundPaginatedList]: + ) -> components.RefundPaginatedList: r"""List all refunds Returns a list all refund objects. @@ -360,6 +330,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -373,9 +344,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListRefunds", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -384,28 +356,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.RefundPaginatedList] - ) + return unmarshal_json_response(components.RefundPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -415,7 +374,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Refund]: + ) -> components.Refund: r"""Retrieve a refund Returns an existing rate using a rate object ID. @@ -456,6 +415,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -469,9 +429,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetRefund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -480,26 +441,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Refund]) + return unmarshal_json_response(components.Refund, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -509,7 +459,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Refund]: + ) -> components.Refund: r"""Retrieve a refund Returns an existing rate using a rate object ID. @@ -550,6 +500,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -563,9 +514,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetRefund", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -574,23 +526,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Refund]) + return unmarshal_json_response(components.Refund, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/sdk.py b/src/shippo/sdk.py index 259c3955..32c342c6 100644 --- a/src/shippo/sdk.py +++ b/src/shippo/sdk.py @@ -6,146 +6,95 @@ from .utils.logger import Logger, get_default_logger from .utils.retries import RetryConfig import httpx +import importlib from shippo import utils from shippo._hooks import SDKHooks -from shippo.addresses import Addresses -from shippo.batches import Batches -from shippo.carrier_accounts import CarrierAccounts -from shippo.carrier_parcel_templates import CarrierParcelTemplates -from shippo.customs_declarations import CustomsDeclarations -from shippo.customs_items import CustomsItems -from shippo.manifests import Manifests from shippo.models import components, internal -from shippo.orders import Orders -from shippo.parcels import Parcels -from shippo.pickups import Pickups -from shippo.rates import Rates -from shippo.rates_at_checkout import RatesAtCheckout -from shippo.refunds import Refunds -from shippo.service_groups import ServiceGroups -from shippo.shipments import Shipments -from shippo.shippo_accounts import ShippoAccounts -from shippo.tracking_status import TrackingStatus -from shippo.transactions import Transactions from shippo.types import OptionalNullable, UNSET -from shippo.user_parcel_templates import UserParcelTemplates -from shippo.webhooks import Webhooks -from typing import Any, Callable, Dict, Optional, Union, cast +import sys +from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union, cast import weakref +if TYPE_CHECKING: + from shippo.addresses import Addresses + from shippo.batches import Batches + from shippo.carrier_accounts import CarrierAccounts + from shippo.carrier_parcel_templates import CarrierParcelTemplates + from shippo.customs_declarations import CustomsDeclarations + from shippo.customs_items import CustomsItems + from shippo.manifests import Manifests + from shippo.orders import Orders + from shippo.parcels import Parcels + from shippo.pickups import Pickups + from shippo.rates import Rates + from shippo.rates_at_checkout import RatesAtCheckout + from shippo.refunds import Refunds + from shippo.service_groups import ServiceGroups + from shippo.shipments import Shipments + from shippo.shippo_accounts import ShippoAccounts + from shippo.tracking_status import TrackingStatus + from shippo.transactions import Transactions + from shippo.user_parcel_templates import UserParcelTemplates + from shippo.webhooks import Webhooks + class Shippo(BaseSDK): r"""Shippo external API.: Use this API to integrate with the Shippo service""" - addresses: Addresses - r"""Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels. - - """ - batches: Batches - r"""A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels. - - - # Batch Shipment - The batch shipment object is a wrapper around a shipment object, which include shipment-specific information - for batch processing. - - Note: batch shipments can only be created on the batch endpoint, either when creating a batch object or by through - the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint - - """ - carrier_accounts: CarrierAccounts - r"""Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers. - - - """ - customs_declarations: CustomsDeclarations + addresses: "Addresses" + r"""Addresses are the locations a parcel is being shipped **from** and **to**. They represent company and residential places. Among other things, you can use address objects to create shipments, calculate shipping rates, and purchase shipping labels.""" + batches: "Batches" + r"""A batch is a technique for creating multiple labels at once. Use the batch object to create and purchase many shipments in two API calls. After creating the batch, retrieve the batch to verify that all shipments are valid. You can add and remove shipments after you have created the batch. When all shipments are valid you can purchase the batch and retrieve all the shipping labels.""" + carrier_accounts: "CarrierAccounts" + r"""Carriers are the companies who deliver your package. Shippo uses Carrier account objects as credentials to retrieve shipping rates and purchase labels from shipping Carriers.""" + customs_declarations: "CustomsDeclarations" r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - - """ - customs_items: CustomsItems - r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments. - """ - rates_at_checkout: RatesAtCheckout + customs_items: "CustomsItems" + r"""Customs declarations are relevant information, including one or multiple customs items, you need to provide for customs clearance for your international shipments.""" + rates_at_checkout: "RatesAtCheckout" r"""Rates at checkout is a tool for merchants to display up-to-date shipping estimates based on what's in their customers cart and where they’re shipping to. Merchants set up curated shipping options for customers in the checkout flow based on data in the shopping cart. The request must include the **to** address and item information. Optional fields are the **from** address and package information. If the optional fields are not included, the service will use the default address and/or package configured for rates at checkout. The response is a list of shipping options based on the Service Group configuration. - (see Service Group configuration for details). - + (see Service Group configuration for details). + # Default Parcel Template Assign one of your user parcel templates to be the default used when generating Live Rates. This template will be used by default when generating Live Rates, unless you explicitly provide a parcel in the Live Rates request. - """ - manifests: Manifests + manifests: "Manifests" r"""A manifest is a single-page document with a barcode that carriers can scan to accept all packages into transit without the need to scan each item individually. They are close-outs of shipping labels of a certain day. Some carriers require manifests to process the shipments. - - - - # Manifest Errors - The following codes and messages are the possible errors that may occur when creating Manifests. - """ - orders: Orders + orders: "Orders" r"""An order is a request from a customer to purchase goods from a merchant. Use the orders object to load orders from your system to the Shippo dashboard. You can use the orders object to create, retrieve, list, and manage orders programmatically. You can also retrieve shipping rates, purchase labels, and track shipments for each order. - - - # Line Item -

-
Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource - in the future. Currently it's a nested object within the order resource.

-

- A line item is an individual object in an order. For example, if your order contains a t-shirt, shorts, and a jacket, each item is represented by a line item. - - """ - carrier_parcel_templates: CarrierParcelTemplates - r"""A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight. - - - """ - parcels: Parcels - r"""A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates. - - - # Parcel Extras - The following values are supported for the `extra` field of the parcel object. - """ - pickups: Pickups + carrier_parcel_templates: "CarrierParcelTemplates" + r"""A carrier parcel template represents a package used for shipping that has preset dimensions defined by a carrier. Some examples of a carrier parcel template include USPS Flat Rate Box and Fedex Small Pak. When using a carrier parcel template, the rates returned may be limited to the carrier that provides the box. You can create user parcel templates using a carrier parcel template. Shippo takes the dimensions of the carrier parcel template but you must configure the weight.""" + parcels: "Parcels" + r"""A parcel is an item you are shipping. The parcel object includes details about its physical make-up of the parcel. It includes dimensions and weight that Shippo uses to calculate rates.""" + pickups: "Pickups" r"""A pickup is when you schedule a carrier to collect a package for delivery. Use Shippo’s pickups endpoint to schedule pickups with USPS and DHL Express for eligible shipments that you have already created. - - """ - rates: Rates - r"""A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time. - """ - refunds: Refunds - r"""Refunds are reimbursements for successfully created but unused shipping labels or other charges. - - """ - service_groups: ServiceGroups + rates: "Rates" + r"""A rate is the cost to ship a parcel from a carrier. The rate object details the service level including the cost and transit time.""" + refunds: "Refunds" + r"""Refunds are reimbursements for successfully created but unused shipping labels or other charges.""" + service_groups: "ServiceGroups" r"""A service group is a set of service levels grouped together. Rates at checkout uses services groups to present available shipping options to customers in their shopping basket. - - """ - shipments: Shipments - r"""A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label. - - - # Shipment Extras - The following values are supported for the `extra` field of the shipment object. - """ - tracking_status: TrackingStatus + shipments: "Shipments" + r"""A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label.""" + tracking_status: "TrackingStatus" r"""


If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment - from the Transaction object. + from the Transaction object.

A tracking status of a package is an indication of current location of a package in the supply chain. For example, sorting, warehousing, or out for delivery. Use the tracking status object to track the location of your shipments. @@ -153,43 +102,60 @@ class Shippo(BaseSDK): predefined tokens for testing different tracking statuses. You can find more information in our Tracking tutorial on how to do this, and what the payloads look like. - - """ - transactions: Transactions - r"""A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx. - """ - user_parcel_templates: UserParcelTemplates + transactions: "Transactions" + r"""A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx.""" + user_parcel_templates: "UserParcelTemplates" r"""A user parcel template represents a package used for shipping that has preset dimensions and attributes defined by you. They are useful for capturing attributes of parcel-types you frequently use for shipping, allowing them to be defined once and then used for many shipments. These parcel templates can also be used for live rates. User parcel templates can also be created using a carrier parcel template, where the dimensions will be copied from the carrier presets, but the weight can be configured by you. - """ - shippo_accounts: ShippoAccounts + shippo_accounts: "ShippoAccounts" r"""Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts. Managed Shippo Accounts are headless accounts that represent your customers. They are opaque to your end customers, meaning customers do not need to create their own Shippo login or have a billing relationship with Shippo. They can be used by marketplaces, e-commerce platforms, and third-party logistics providers who want to offer, seamless, built-in shipping functionality to their customers. See our guide for more details. - - """ - 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. - """ + 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.""" + _sub_sdk_map = { + "addresses": ("shippo.addresses", "Addresses"), + "batches": ("shippo.batches", "Batches"), + "carrier_accounts": ("shippo.carrier_accounts", "CarrierAccounts"), + "customs_declarations": ("shippo.customs_declarations", "CustomsDeclarations"), + "customs_items": ("shippo.customs_items", "CustomsItems"), + "rates_at_checkout": ("shippo.rates_at_checkout", "RatesAtCheckout"), + "manifests": ("shippo.manifests", "Manifests"), + "orders": ("shippo.orders", "Orders"), + "carrier_parcel_templates": ( + "shippo.carrier_parcel_templates", + "CarrierParcelTemplates", + ), + "parcels": ("shippo.parcels", "Parcels"), + "pickups": ("shippo.pickups", "Pickups"), + "rates": ("shippo.rates", "Rates"), + "refunds": ("shippo.refunds", "Refunds"), + "service_groups": ("shippo.service_groups", "ServiceGroups"), + "shipments": ("shippo.shipments", "Shipments"), + "tracking_status": ("shippo.tracking_status", "TrackingStatus"), + "transactions": ("shippo.transactions", "Transactions"), + "user_parcel_templates": ( + "shippo.user_parcel_templates", + "UserParcelTemplates", + ), + "shippo_accounts": ("shippo.shippo_accounts", "ShippoAccounts"), + "webhooks": ("shippo.webhooks", "Webhooks"), + } def __init__( self, api_key_header: Union[str, Callable[[], str]], shippo_api_version: Optional[str] = None, server_idx: Optional[int] = None, - server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, + server_url: Optional[str] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, @@ -210,7 +176,7 @@ def __init__( """ client_supplied = True if client is None: - client = httpx.Client() + client = httpx.Client(follow_redirects=True) client_supplied = False assert issubclass( @@ -219,7 +185,7 @@ def __init__( async_client_supplied = True if async_client is None: - async_client = httpx.AsyncClient() + async_client = httpx.AsyncClient(follow_redirects=True) async_client_supplied = False if debug_logger is None: @@ -261,10 +227,14 @@ def __init__( timeout_ms=timeout_ms, debug_logger=debug_logger, ), + parent_ref=self, ) hooks = SDKHooks() + # pylint: disable=protected-access + self.sdk_configuration.__dict__["_hooks"] = hooks + current_server_url, *_ = self.sdk_configuration.get_server_details() server_url, self.sdk_configuration.client = hooks.sdk_init( current_server_url, client @@ -272,9 +242,6 @@ def __init__( if current_server_url != server_url: self.sdk_configuration.server_url = server_url - # pylint: disable=protected-access - self.sdk_configuration.__dict__["_hooks"] = hooks - weakref.finalize( self, close_clients, @@ -285,29 +252,43 @@ def __init__( self.sdk_configuration.async_client_supplied, ) - self._init_sdks() - - def _init_sdks(self): - self.addresses = Addresses(self.sdk_configuration) - self.batches = Batches(self.sdk_configuration) - self.carrier_accounts = CarrierAccounts(self.sdk_configuration) - self.customs_declarations = CustomsDeclarations(self.sdk_configuration) - self.customs_items = CustomsItems(self.sdk_configuration) - self.rates_at_checkout = RatesAtCheckout(self.sdk_configuration) - self.manifests = Manifests(self.sdk_configuration) - self.orders = Orders(self.sdk_configuration) - self.carrier_parcel_templates = CarrierParcelTemplates(self.sdk_configuration) - self.parcels = Parcels(self.sdk_configuration) - self.pickups = Pickups(self.sdk_configuration) - self.rates = Rates(self.sdk_configuration) - self.refunds = Refunds(self.sdk_configuration) - self.service_groups = ServiceGroups(self.sdk_configuration) - self.shipments = Shipments(self.sdk_configuration) - self.tracking_status = TrackingStatus(self.sdk_configuration) - self.transactions = Transactions(self.sdk_configuration) - self.user_parcel_templates = UserParcelTemplates(self.sdk_configuration) - self.shippo_accounts = ShippoAccounts(self.sdk_configuration) - self.webhooks = Webhooks(self.sdk_configuration) + def dynamic_import(self, modname, retries=3): + for attempt in range(retries): + try: + return importlib.import_module(modname) + except KeyError: + # Clear any half-initialized module and retry + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + def __getattr__(self, name: str): + if name in self._sub_sdk_map: + module_path, class_name = self._sub_sdk_map[name] + try: + module = self.dynamic_import(module_path) + klass = getattr(module, class_name) + instance = klass(self.sdk_configuration, parent_ref=self) + setattr(self, name, instance) + return instance + except ImportError as e: + raise AttributeError( + f"Failed to import module {module_path} for attribute {name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to find class {class_name} in module {module_path} for attribute {name}: {e}" + ) from e + + raise AttributeError( + f"'{type(self).__name__}' object has no attribute '{name}'" + ) + + def __dir__(self): + default_attrs = list(super().__dir__()) + lazy_attrs = list(self._sub_sdk_map.keys()) + return sorted(list(set(default_attrs + lazy_attrs))) def __enter__(self): return self diff --git a/src/shippo/sdkconfiguration.py b/src/shippo/sdkconfiguration.py index 9fc0d400..a8bca348 100644 --- a/src/shippo/sdkconfiguration.py +++ b/src/shippo/sdkconfiguration.py @@ -1,6 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from ._hooks import SDKHooks from ._version import ( __gen_version__, __openapi_doc_version__, @@ -43,9 +42,6 @@ class SDKConfiguration: retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None - def __post_init__(self): - self._hooks = SDKHooks() - def get_server_details(self) -> Tuple[str, Dict[str, str]]: if self.server_url is not None and self.server_url: return remove_suffix(self.server_url, "/"), {} @@ -53,6 +49,3 @@ def get_server_details(self) -> Tuple[str, Dict[str, str]]: self.server_idx = 0 return SERVERS[self.server_idx], {} - - def get_hooks(self) -> SDKHooks: - return self._hooks diff --git a/src/shippo/service_groups.py b/src/shippo/service_groups.py index 95e3e885..3a46cc7d 100644 --- a/src/shippo/service_groups.py +++ b/src/shippo/service_groups.py @@ -5,13 +5,13 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import List, Mapping, Optional, Union, cast class ServiceGroups(BaseSDK): r"""A service group is a set of service levels grouped together. Rates at checkout uses services groups to present available shipping options to customers in their shopping basket. - """ def list( @@ -25,7 +25,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[components.ServiceGroup]]: + ) -> List[components.ServiceGroup]: r"""List all service groups Returns a list of service group objects. @@ -66,6 +66,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -79,9 +80,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListServiceGroups", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -90,28 +92,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[List[components.ServiceGroup]] - ) + return unmarshal_json_response(List[components.ServiceGroup], http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -124,7 +113,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[components.ServiceGroup]]: + ) -> List[components.ServiceGroup]: r"""List all service groups Returns a list of service group objects. @@ -165,6 +154,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -178,9 +168,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListServiceGroups", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -189,28 +180,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[List[components.ServiceGroup]] - ) + return unmarshal_json_response(List[components.ServiceGroup], http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -223,7 +201,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ServiceGroup]: + ) -> components.ServiceGroup: r"""Create a new service group Creates a new service group. @@ -267,6 +245,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ServiceGroupCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -280,9 +259,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -291,28 +271,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ServiceGroup] - ) + return unmarshal_json_response(components.ServiceGroup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -325,7 +292,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ServiceGroup]: + ) -> components.ServiceGroup: r"""Create a new service group Creates a new service group. @@ -369,6 +336,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ServiceGroupCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -382,9 +350,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -393,28 +362,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ServiceGroup] - ) + return unmarshal_json_response(components.ServiceGroup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def update( self, @@ -429,7 +385,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ServiceGroup]: + ) -> components.ServiceGroup: r"""Update an existing service group Updates an existing service group object.
The object_id cannot be updated as it is the unique identifier for the object. @@ -479,6 +435,7 @@ def update( "json", Optional[components.ServiceGroupUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -492,9 +449,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -503,28 +461,15 @@ def update( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ServiceGroup] - ) + return unmarshal_json_response(components.ServiceGroup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def update_async( self, @@ -539,7 +484,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ServiceGroup]: + ) -> components.ServiceGroup: r"""Update an existing service group Updates an existing service group object.
The object_id cannot be updated as it is the unique identifier for the object. @@ -589,6 +534,7 @@ async def update_async( "json", Optional[components.ServiceGroupUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -602,9 +548,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -613,28 +560,15 @@ async def update_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ServiceGroup] - ) + return unmarshal_json_response(components.ServiceGroup, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def delete( self, @@ -685,6 +619,7 @@ def delete( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -698,9 +633,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -712,23 +648,12 @@ def delete( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def delete_async( self, @@ -779,6 +704,7 @@ async def delete_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -792,9 +718,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteServiceGroup", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -806,20 +733,9 @@ async def delete_async( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/shipments.py b/src/shippo/shipments.py index 183a3d2c..f1f3a7e6 100644 --- a/src/shippo/shipments.py +++ b/src/shippo/shipments.py @@ -5,17 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Shipments(BaseSDK): - r"""A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label. - - - # Shipment Extras - The following values are supported for the `extra` field of the shipment object. - - """ + r"""A shipment is the act of transporting goods. A shipment object contains **to** and **from** addresses, and the parcel details that you are shipping. You can use the shipment object to retrieve shipping rates and purchase a shipping label.""" def list( self, @@ -27,7 +22,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShipmentPaginatedList]: + ) -> components.ShipmentPaginatedList: r"""List all shipments Returns a list of all shipment objects.

@@ -85,6 +80,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -98,9 +94,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -109,28 +106,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShipmentPaginatedList] - ) + return unmarshal_json_response(components.ShipmentPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -142,7 +126,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShipmentPaginatedList]: + ) -> components.ShipmentPaginatedList: r"""List all shipments Returns a list of all shipment objects.

@@ -200,6 +184,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -213,9 +198,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShipments", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -224,28 +210,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShipmentPaginatedList] - ) + return unmarshal_json_response(components.ShipmentPaginatedList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -257,7 +230,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Shipment]: + ) -> components.Shipment: r"""Create a new shipment Creates a new shipment object. @@ -301,6 +274,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ShipmentCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -314,9 +288,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateShipment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -325,26 +300,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Shipment]) + return unmarshal_json_response(components.Shipment, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -356,7 +320,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Shipment]: + ) -> components.Shipment: r"""Create a new shipment Creates a new shipment object. @@ -400,6 +364,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ShipmentCreateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -413,9 +378,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateShipment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -424,26 +390,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Shipment]) + return unmarshal_json_response(components.Shipment, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -453,7 +408,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Shipment]: + ) -> components.Shipment: r"""Retrieve a shipment Returns an existing shipment using an object ID @@ -494,6 +449,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -507,9 +463,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetShipment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -518,26 +475,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Shipment]) + return unmarshal_json_response(components.Shipment, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -547,7 +493,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Shipment]: + ) -> components.Shipment: r"""Retrieve a shipment Returns an existing shipment using an object ID @@ -588,6 +534,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -601,9 +548,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetShipment", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -612,23 +560,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Shipment]) + return unmarshal_json_response(components.Shipment, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/shippo_accounts.py b/src/shippo/shippo_accounts.py index 954d6254..b91f9618 100644 --- a/src/shippo/shippo_accounts.py +++ b/src/shippo/shippo_accounts.py @@ -5,6 +5,7 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast @@ -12,7 +13,6 @@ class ShippoAccounts(BaseSDK): r"""Shippo Accounts are used by Shippo Platform Accounts to create and manage Managed Shippo Accounts. Managed Shippo Accounts are headless accounts that represent your customers. They are opaque to your end customers, meaning customers do not need to create their own Shippo login or have a billing relationship with Shippo. They can be used by marketplaces, e-commerce platforms, and third-party logistics providers who want to offer, seamless, built-in shipping functionality to their customers. See our guide for more details. - """ def list( @@ -24,7 +24,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccountPaginatedList]: + ) -> components.ShippoAccountPaginatedList: r"""List all Shippo Accounts Returns a list of Shippo Managed Accounts objects. @@ -67,6 +67,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -80,9 +81,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShippoAccounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -91,28 +93,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccountPaginatedList] + return unmarshal_json_response( + components.ShippoAccountPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -123,7 +114,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccountPaginatedList]: + ) -> components.ShippoAccountPaginatedList: r"""List all Shippo Accounts Returns a list of Shippo Managed Accounts objects. @@ -166,6 +157,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -179,9 +171,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListShippoAccounts", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -190,28 +183,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccountPaginatedList] + return unmarshal_json_response( + components.ShippoAccountPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -224,7 +206,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Create a Shippo Account Creates a new Shippo Managed Account. @@ -268,6 +250,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ShippoAccountUpdateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -281,9 +264,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -292,28 +276,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -326,7 +297,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Create a Shippo Account Creates a new Shippo Managed Account. @@ -370,6 +341,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ShippoAccountUpdateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -383,9 +355,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -394,28 +367,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -425,7 +385,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Retrieve a Shippo Account Returns a Shippo Managed Account using an object ID. @@ -466,6 +426,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -479,9 +440,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -490,28 +452,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -521,7 +470,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Retrieve a Shippo Account Returns a Shippo Managed Account using an object ID. @@ -562,6 +511,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -575,9 +525,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -586,28 +537,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def update( self, @@ -623,7 +561,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Update a Shippo Account Updates a Shippo Managed Account using an object ID. @@ -670,12 +608,13 @@ def update( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.shippo_account_update_request, + request.shippo_account_update_request if request is not None else None, False, True, "json", Optional[components.ShippoAccountUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -689,9 +628,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -700,28 +640,15 @@ def update( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def update_async( self, @@ -737,7 +664,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.ShippoAccount]: + ) -> components.ShippoAccount: r"""Update a Shippo Account Updates a Shippo Managed Account using an object ID. @@ -784,12 +711,13 @@ async def update_async( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.shippo_account_update_request, + request.shippo_account_update_request if request is not None else None, False, True, "json", Optional[components.ShippoAccountUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -803,9 +731,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateShippoAccount", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -814,25 +743,12 @@ async def update_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.ShippoAccount] - ) + return unmarshal_json_response(components.ShippoAccount, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/tracking_status.py b/src/shippo/tracking_status.py index 8c7e9799..d1f05001 100644 --- a/src/shippo/tracking_status.py +++ b/src/shippo/tracking_status.py @@ -5,13 +5,14 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class TrackingStatus(BaseSDK): r"""


If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment - from the Transaction object. + from the Transaction object.

A tracking status of a package is an indication of current location of a package in the supply chain. For example, sorting, warehousing, or out for delivery. Use the tracking status object to track the location of your shipments. @@ -19,7 +20,6 @@ class TrackingStatus(BaseSDK): predefined tokens for testing different tracking statuses. You can find more information in our Tracking tutorial on how to do this, and what the payloads look like. - """ def create( @@ -30,7 +30,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Track]: + ) -> components.Track: r"""Register a tracking webhook Registers a webhook that will send HTTP notifications to you when the status of your tracked package changes. For more details on creating a webhook, see our guides on Webhooks and Tracking. @@ -74,6 +74,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TracksRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -87,9 +88,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateTrack", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -98,26 +100,15 @@ def create( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Track]) + return unmarshal_json_response(components.Track, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -127,7 +118,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Track]: + ) -> components.Track: r"""Register a tracking webhook Registers a webhook that will send HTTP notifications to you when the status of your tracked package changes. For more details on creating a webhook, see our guides on Webhooks and Tracking. @@ -171,6 +162,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TracksRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -184,9 +176,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateTrack", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -195,26 +188,15 @@ async def create_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Track]) + return unmarshal_json_response(components.Track, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -225,7 +207,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Track]: + ) -> components.Track: r"""Get a tracking status Returns the tracking status of a shipment using a carrier name and a tracking number. @@ -268,6 +250,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -281,9 +264,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetTrack", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -292,26 +276,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Track]) + return unmarshal_json_response(components.Track, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -322,7 +295,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Track]: + ) -> components.Track: r"""Get a tracking status Returns the tracking status of a shipment using a carrier name and a tracking number. @@ -365,6 +338,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -378,9 +352,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetTrack", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -389,23 +364,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Track]) + return unmarshal_json_response(components.Track, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/transactions.py b/src/shippo/transactions.py index ae8bbe6a..0d6ebf1c 100644 --- a/src/shippo/transactions.py +++ b/src/shippo/transactions.py @@ -5,13 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Transactions(BaseSDK): - r"""A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx. - - """ + r"""A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and used them to ship a parcel with a carrier, such as USPS or FedEx.""" def list( self, @@ -24,7 +23,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.TransactionPaginatedList]: + ) -> components.TransactionPaginatedList: r"""List all shipping labels Returns a list of all transaction objects. @@ -65,6 +64,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -78,9 +78,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListTransactions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -89,28 +90,17 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.TransactionPaginatedList] + return unmarshal_json_response( + components.TransactionPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -123,7 +113,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.TransactionPaginatedList]: + ) -> components.TransactionPaginatedList: r"""List all shipping labels Returns a list of all transaction objects. @@ -164,6 +154,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -177,9 +168,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListTransactions", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -188,28 +180,17 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.TransactionPaginatedList] + return unmarshal_json_response( + components.TransactionPaginatedList, http_res ) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -222,7 +203,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Transaction]: + ) -> components.Transaction: r"""Create a shipping label Creates a new transaction object and purchases the shipping label using a rate object that has previously been created.
OR
Creates a new transaction object and purchases the shipping label instantly using shipment details, an existing carrier account, and an existing service level token. @@ -266,6 +247,7 @@ def create( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.CreateTransactionRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -279,9 +261,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateTransaction", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -290,26 +273,15 @@ def create( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Transaction]) + return unmarshal_json_response(components.Transaction, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -322,7 +294,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Transaction]: + ) -> components.Transaction: r"""Create a shipping label Creates a new transaction object and purchases the shipping label using a rate object that has previously been created.
OR
Creates a new transaction object and purchases the shipping label instantly using shipment details, an existing carrier account, and an existing service level token. @@ -366,6 +338,7 @@ async def create_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", operations.CreateTransactionRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -379,9 +352,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateTransaction", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -390,26 +364,15 @@ async def create_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Transaction]) + return unmarshal_json_response(components.Transaction, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -419,7 +382,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Transaction]: + ) -> components.Transaction: r"""Retrieve a shipping label Returns an existing transaction using an object ID. @@ -460,6 +423,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -473,9 +437,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetTransaction", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -484,26 +449,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Transaction]) + return unmarshal_json_response(components.Transaction, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -513,7 +467,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Transaction]: + ) -> components.Transaction: r"""Retrieve a shipping label Returns an existing transaction using an object ID. @@ -554,6 +508,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -567,9 +522,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetTransaction", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -578,23 +534,12 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Transaction]) + return unmarshal_json_response(components.Transaction, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/types/basemodel.py b/src/shippo/types/basemodel.py index a6187efa..a9a640a1 100644 --- a/src/shippo/types/basemodel.py +++ b/src/shippo/types/basemodel.py @@ -2,7 +2,8 @@ from pydantic import ConfigDict, model_serializer from pydantic import BaseModel as PydanticBaseModel -from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, NewType +from pydantic_core import core_schema +from typing import TYPE_CHECKING, Any, Literal, Optional, TypeVar, Union from typing_extensions import TypeAliasType, TypeAlias @@ -35,5 +36,42 @@ def __bool__(self) -> Literal[False]: "OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,) ) -UnrecognizedInt = NewType("UnrecognizedInt", int) -UnrecognizedStr = NewType("UnrecognizedStr", str) + +class UnrecognizedStr(str): + @classmethod + def __get_pydantic_core_schema__(cls, _source_type: Any, _handler: Any) -> core_schema.CoreSchema: + # Make UnrecognizedStr only work in lax mode, not strict mode + # This makes it a "fallback" option when more specific types (like Literals) don't match + def validate_lax(v: Any) -> 'UnrecognizedStr': + if isinstance(v, cls): + return v + return cls(str(v)) + + # Use lax_or_strict_schema where strict always fails + # This forces Pydantic to prefer other union members in strict mode + # and only fall back to UnrecognizedStr in lax mode + return core_schema.lax_or_strict_schema( + lax_schema=core_schema.chain_schema([ + core_schema.str_schema(), + core_schema.no_info_plain_validator_function(validate_lax) + ]), + strict_schema=core_schema.none_schema(), # Always fails in strict mode + ) + + +class UnrecognizedInt(int): + @classmethod + def __get_pydantic_core_schema__(cls, _source_type: Any, _handler: Any) -> core_schema.CoreSchema: + # Make UnrecognizedInt only work in lax mode, not strict mode + # This makes it a "fallback" option when more specific types (like Literals) don't match + def validate_lax(v: Any) -> 'UnrecognizedInt': + if isinstance(v, cls): + return v + return cls(int(v)) + return core_schema.lax_or_strict_schema( + lax_schema=core_schema.chain_schema([ + core_schema.int_schema(), + core_schema.no_info_plain_validator_function(validate_lax) + ]), + strict_schema=core_schema.none_schema(), # Always fails in strict mode + ) diff --git a/src/shippo/user_parcel_templates.py b/src/shippo/user_parcel_templates.py index aa5c67d9..9417c130 100644 --- a/src/shippo/user_parcel_templates.py +++ b/src/shippo/user_parcel_templates.py @@ -5,6 +5,7 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast @@ -15,7 +16,6 @@ class UserParcelTemplates(BaseSDK): User parcel templates can also be created using a carrier parcel template, where the dimensions will be copied from the carrier presets, but the weight can be configured by you. - """ def list( @@ -29,7 +29,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplateList]: + ) -> components.UserParcelTemplateList: r"""List all user parcel templates Returns a list all of all user parcel template objects. @@ -72,6 +72,7 @@ def list( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -85,9 +86,10 @@ def list( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListUserParcelTemplates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -96,28 +98,15 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplateList] - ) + return unmarshal_json_response(components.UserParcelTemplateList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def list_async( self, @@ -130,7 +119,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplateList]: + ) -> components.UserParcelTemplateList: r"""List all user parcel templates Returns a list all of all user parcel template objects. @@ -173,6 +162,7 @@ async def list_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -186,9 +176,10 @@ async def list_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="ListUserParcelTemplates", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -197,28 +188,15 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplateList] - ) + return unmarshal_json_response(components.UserParcelTemplateList, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def create( self, @@ -231,13 +209,13 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Create a new user parcel template Creates a new user parcel template.
You can choose to create a parcel template using a preset carrier template as a starting point, or you can create an entirely custom one. To use a preset carrier template, - pass in a unique template token from this list + pass in a unique template token from this list plus the weight fields (**weight** and **weight_unit**). Otherwise, omit the template field and pass the other fields, for the weight, length, height, and depth, as well as their units.\" @@ -287,6 +265,7 @@ def create( "json", components.UserParcelTemplateCreateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -300,9 +279,10 @@ def create( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -311,28 +291,15 @@ def create( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def create_async( self, @@ -345,13 +312,13 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Create a new user parcel template Creates a new user parcel template.
You can choose to create a parcel template using a preset carrier template as a starting point, or you can create an entirely custom one. To use a preset carrier template, - pass in a unique template token from this list + pass in a unique template token from this list plus the weight fields (**weight** and **weight_unit**). Otherwise, omit the template field and pass the other fields, for the weight, length, height, and depth, as well as their units.\" @@ -401,6 +368,7 @@ async def create_async( "json", components.UserParcelTemplateCreateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -414,9 +382,10 @@ async def create_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="CreateUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -425,28 +394,15 @@ async def create_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def delete( self, @@ -497,6 +453,7 @@ def delete( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -510,9 +467,10 @@ def delete( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -524,23 +482,12 @@ def delete( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def delete_async( self, @@ -591,6 +538,7 @@ async def delete_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -604,9 +552,10 @@ async def delete_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="DeleteUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -618,23 +567,12 @@ async def delete_async( return if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def get( self, @@ -644,7 +582,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Retrieves a user parcel template Returns the parcel template information for a specific user parcel @@ -686,6 +624,7 @@ def get( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -699,9 +638,10 @@ def get( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -710,28 +650,15 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def get_async( self, @@ -741,7 +668,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Retrieves a user parcel template Returns the parcel template information for a specific user parcel @@ -783,6 +710,7 @@ async def get_async( shippo_api_version=self.sdk_configuration.globals.shippo_api_version, ), security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -796,9 +724,10 @@ async def get_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="GetUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -807,28 +736,15 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) def update( self, @@ -844,7 +760,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Update an existing user parcel template Updates an existing user parcel template. @@ -891,12 +807,15 @@ def update( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.user_parcel_template_update_request, + request.user_parcel_template_update_request + if request is not None + else None, False, True, "json", Optional[components.UserParcelTemplateUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -910,9 +829,10 @@ def update( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -921,28 +841,15 @@ def update( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) async def update_async( self, @@ -958,7 +865,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.UserParcelTemplate]: + ) -> components.UserParcelTemplate: r"""Update an existing user parcel template Updates an existing user parcel template. @@ -1005,12 +912,15 @@ async def update_async( ), security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.user_parcel_template_update_request, + request.user_parcel_template_update_request + if request is not None + else None, False, True, "json", Optional[components.UserParcelTemplateUpdateRequest], ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -1024,9 +934,10 @@ async def update_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="UpdateUserParcelTemplate", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -1035,25 +946,12 @@ async def update_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.UserParcelTemplate] - ) + return unmarshal_json_response(components.UserParcelTemplate, http_res) if utils.match_response(http_res, ["400", "4XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/shippo/utils/__init__.py b/src/shippo/utils/__init__.py index 3cded8fe..0498cb8d 100644 --- a/src/shippo/utils/__init__.py +++ b/src/shippo/utils/__init__.py @@ -1,50 +1,64 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from .annotations import get_discriminator -from .enums import OpenEnumMeta -from .headers import get_headers, get_response_headers -from .metadata import ( - FieldMetadata, - find_metadata, - FormMetadata, - HeaderMetadata, - MultipartFormMetadata, - PathParamMetadata, - QueryParamMetadata, - RequestMetadata, - SecurityMetadata, -) -from .queryparams import get_query_params -from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig -from .requestbodies import serialize_request_body, SerializedRequestBody -from .security import get_security -from .serializers import ( - get_pydantic_model, - marshal_json, - unmarshal, - unmarshal_json, - serialize_decimal, - serialize_float, - serialize_int, - stream_to_text, - stream_to_text_async, - stream_to_bytes, - stream_to_bytes_async, - validate_const, - validate_decimal, - validate_float, - validate_int, - validate_open_enum, -) -from .url import generate_url, template_url, remove_suffix -from .values import ( - get_global_from_env, - match_content_type, - match_status_codes, - match_response, - cast_partial, -) -from .logger import Logger, get_body_content, get_default_logger +from typing import Any, TYPE_CHECKING, Callable, TypeVar +import asyncio + +from .dynamic_imports import lazy_getattr, lazy_dir + +_T = TypeVar("_T") + + +async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: + """Run a synchronous function in a thread pool to avoid blocking the event loop.""" + return await asyncio.to_thread(func, *args) + + +if TYPE_CHECKING: + from .annotations import get_discriminator + from .datetimes import parse_datetime + from .enums import OpenEnumMeta + from .headers import get_headers, get_response_headers + from .metadata import ( + FieldMetadata, + find_metadata, + FormMetadata, + HeaderMetadata, + MultipartFormMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, + SecurityMetadata, + ) + from .queryparams import get_query_params + from .retries import BackoffStrategy, Retries, retry, retry_async, RetryConfig + from .requestbodies import serialize_request_body, SerializedRequestBody + from .security import get_security + from .serializers import ( + get_pydantic_model, + marshal_json, + unmarshal, + unmarshal_json, + serialize_decimal, + serialize_float, + serialize_int, + stream_to_text, + stream_to_text_async, + stream_to_bytes, + stream_to_bytes_async, + validate_const, + validate_decimal, + validate_float, + validate_int, + ) + from .url import generate_url, template_url, remove_suffix + from .values import ( + get_global_from_env, + match_content_type, + match_status_codes, + match_response, + cast_partial, + ) + from .logger import Logger, get_body_content, get_default_logger __all__ = [ "BackoffStrategy", @@ -55,6 +69,7 @@ "get_body_content", "get_default_logger", "get_discriminator", + "parse_datetime", "get_global_from_env", "get_headers", "get_pydantic_model", @@ -94,6 +109,67 @@ "validate_const", "validate_float", "validate_int", - "validate_open_enum", "cast_partial", ] + +_dynamic_imports: dict[str, str] = { + "BackoffStrategy": ".retries", + "FieldMetadata": ".metadata", + "find_metadata": ".metadata", + "FormMetadata": ".metadata", + "generate_url": ".url", + "get_body_content": ".logger", + "get_default_logger": ".logger", + "get_discriminator": ".annotations", + "parse_datetime": ".datetimes", + "get_global_from_env": ".values", + "get_headers": ".headers", + "get_pydantic_model": ".serializers", + "get_query_params": ".queryparams", + "get_response_headers": ".headers", + "get_security": ".security", + "HeaderMetadata": ".metadata", + "Logger": ".logger", + "marshal_json": ".serializers", + "match_content_type": ".values", + "match_status_codes": ".values", + "match_response": ".values", + "MultipartFormMetadata": ".metadata", + "OpenEnumMeta": ".enums", + "PathParamMetadata": ".metadata", + "QueryParamMetadata": ".metadata", + "remove_suffix": ".url", + "Retries": ".retries", + "retry": ".retries", + "retry_async": ".retries", + "RetryConfig": ".retries", + "RequestMetadata": ".metadata", + "SecurityMetadata": ".metadata", + "serialize_decimal": ".serializers", + "serialize_float": ".serializers", + "serialize_int": ".serializers", + "serialize_request_body": ".requestbodies", + "SerializedRequestBody": ".requestbodies", + "stream_to_text": ".serializers", + "stream_to_text_async": ".serializers", + "stream_to_bytes": ".serializers", + "stream_to_bytes_async": ".serializers", + "template_url": ".url", + "unmarshal": ".serializers", + "unmarshal_json": ".serializers", + "validate_decimal": ".serializers", + "validate_const": ".serializers", + "validate_float": ".serializers", + "validate_int": ".serializers", + "cast_partial": ".values", +} + + +def __getattr__(attr_name: str) -> Any: + return lazy_getattr( + attr_name, package=__package__, dynamic_imports=_dynamic_imports + ) + + +def __dir__(): + return lazy_dir(dynamic_imports=_dynamic_imports) diff --git a/src/shippo/utils/annotations.py b/src/shippo/utils/annotations.py index 387874ed..12e0aa4f 100644 --- a/src/shippo/utils/annotations.py +++ b/src/shippo/utils/annotations.py @@ -3,6 +3,7 @@ from enum import Enum from typing import Any, Optional + def get_discriminator(model: Any, fieldname: str, key: str) -> str: """ Recursively search for the discriminator attribute in a model. @@ -25,31 +26,54 @@ def get_field_discriminator(field: Any) -> Optional[str]: if isinstance(field, dict): if key in field: - return f'{field[key]}' + return f"{field[key]}" if hasattr(field, fieldname): attr = getattr(field, fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" if hasattr(field, upper_fieldname): attr = getattr(field, upper_fieldname) if isinstance(attr, Enum): - return f'{attr.value}' - return f'{attr}' + return f"{attr.value}" + return f"{attr}" return None + def search_nested_discriminator(obj: Any) -> Optional[str]: + """Recursively search for discriminator in nested structures.""" + # First try direct field lookup + discriminator = get_field_discriminator(obj) + if discriminator is not None: + return discriminator + + # If it's a dict, search in nested values + if isinstance(obj, dict): + for value in obj.values(): + if isinstance(value, list): + # Search in list items + for item in value: + nested_discriminator = search_nested_discriminator(item) + if nested_discriminator is not None: + return nested_discriminator + elif isinstance(value, dict): + # Search in nested dict + nested_discriminator = search_nested_discriminator(value) + if nested_discriminator is not None: + return nested_discriminator + + return None if isinstance(model, list): for field in model: - discriminator = get_field_discriminator(field) + discriminator = search_nested_discriminator(field) if discriminator is not None: return discriminator - discriminator = get_field_discriminator(model) + discriminator = search_nested_discriminator(model) if discriminator is not None: return discriminator - raise ValueError(f'Could not find discriminator field {fieldname} in {model}') + raise ValueError(f"Could not find discriminator field {fieldname} in {model}") diff --git a/src/shippo/utils/datetimes.py b/src/shippo/utils/datetimes.py new file mode 100644 index 00000000..a6c52cd6 --- /dev/null +++ b/src/shippo/utils/datetimes.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from datetime import datetime +import sys + + +def parse_datetime(datetime_string: str) -> datetime: + """ + Convert a RFC 3339 / ISO 8601 formatted string into a datetime object. + Python versions 3.11 and later support parsing RFC 3339 directly with + datetime.fromisoformat(), but for earlier versions, this function + encapsulates the necessary extra logic. + """ + # Python 3.11 and later can parse RFC 3339 directly + if sys.version_info >= (3, 11): + return datetime.fromisoformat(datetime_string) + + # For Python 3.10 and earlier, a common ValueError is trailing 'Z' suffix, + # so fix that upfront. + if datetime_string.endswith("Z"): + datetime_string = datetime_string[:-1] + "+00:00" + + return datetime.fromisoformat(datetime_string) diff --git a/src/shippo/utils/dynamic_imports.py b/src/shippo/utils/dynamic_imports.py new file mode 100644 index 00000000..673edf82 --- /dev/null +++ b/src/shippo/utils/dynamic_imports.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from importlib import import_module +import builtins +import sys + + +def dynamic_import(package, modname, retries=3): + """Import a module relative to package, retrying on KeyError from half-initialized modules.""" + for attempt in range(retries): + try: + return import_module(modname, package) + except KeyError: + sys.modules.pop(modname, None) + if attempt == retries - 1: + break + raise KeyError(f"Failed to import module '{modname}' after {retries} attempts") + + +def lazy_getattr(attr_name, *, package, dynamic_imports, sub_packages=None): + """Module-level __getattr__ that lazily loads from a dynamic_imports mapping. + + Args: + attr_name: The attribute being looked up. + package: The caller's __package__ (for relative imports). + dynamic_imports: Dict mapping attribute names to relative module paths. + sub_packages: Optional list of subpackage names to lazy-load. + """ + module_name = dynamic_imports.get(attr_name) + if module_name is not None: + try: + module = dynamic_import(package, module_name) + return getattr(module, attr_name) + except ImportError as e: + raise ImportError( + f"Failed to import {attr_name} from {module_name}: {e}" + ) from e + except AttributeError as e: + raise AttributeError( + f"Failed to get {attr_name} from {module_name}: {e}" + ) from e + + if sub_packages and attr_name in sub_packages: + return import_module(f".{attr_name}", package) + + raise AttributeError(f"module '{package}' has no attribute '{attr_name}'") + + +def lazy_dir(*, dynamic_imports, sub_packages=None): + """Module-level __dir__ that lists lazily-loadable attributes.""" + lazy_attrs = builtins.list(dynamic_imports.keys()) + if sub_packages: + lazy_attrs.extend(sub_packages) + return builtins.sorted(lazy_attrs) diff --git a/src/shippo/utils/enums.py b/src/shippo/utils/enums.py index c650b10c..3324e1bc 100644 --- a/src/shippo/utils/enums.py +++ b/src/shippo/utils/enums.py @@ -1,34 +1,134 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" import enum +import sys +from typing import Any + +from pydantic_core import core_schema class OpenEnumMeta(enum.EnumMeta): - def __call__( - cls, value, names=None, *, module=None, qualname=None, type=None, start=1 - ): - # The `type` kwarg also happens to be a built-in that pylint flags as - # redeclared. Safe to ignore this lint rule with this scope. - # pylint: disable=redefined-builtin - - if names is not None: - return super().__call__( - value, - names=names, - module=module, - qualname=qualname, - type=type, - start=start, + # The __call__ method `boundary` kwarg was added in 3.11 and must be present + # for pyright. Refer also: https://github.com/pylint-dev/pylint/issues/9622 + # pylint: disable=unexpected-keyword-arg + # The __call__ method `values` varg must be named for pyright. + # pylint: disable=keyword-arg-before-vararg + + if sys.version_info >= (3, 11): + def __call__( + cls, value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin + + if names is not None: + return super().__call__( + value, + names=names, + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + except ValueError: + return value + else: + def __call__( + cls, value, names=None, *, module=None, qualname=None, type=None, start=1 + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin + + if names is not None: + return super().__call__( + value, + names=names, + module=module, + qualname=qualname, + type=type, + start=start, + ) + + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + module=module, + qualname=qualname, + type=type, + start=start, + ) + except ValueError: + return value + + def __new__(mcs, name, bases, namespace, **kwargs): + cls = super().__new__(mcs, name, bases, namespace, **kwargs) + + # Add __get_pydantic_core_schema__ to make open enums work correctly + # in union discrimination. In strict mode (used by Pydantic for unions), + # only known enum values match. In lax mode, unknown values are accepted. + def __get_pydantic_core_schema__( + cls_inner: Any, _source_type: Any, _handler: Any + ) -> core_schema.CoreSchema: + # Create a validator that only accepts known enum values (for strict mode) + def validate_strict(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + # Use the parent EnumMeta's __call__ which raises ValueError for unknown values + return enum.EnumMeta.__call__(cls_inner, v) + + # Create a lax validator that accepts unknown values + def validate_lax(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + try: + return enum.EnumMeta.__call__(cls_inner, v) + except ValueError: + # Return the raw value for unknown enum values + return v + + # Determine the base type schema (str or int) + is_int_enum = False + for base in cls_inner.__mro__: + if base is int: + is_int_enum = True + break + if base is str: + break + + base_schema = ( + core_schema.int_schema() + if is_int_enum + else core_schema.str_schema() ) - try: - return super().__call__( - value, - names=names, # pyright: ignore[reportArgumentType] - module=module, - qualname=qualname, - type=type, - start=start, + # Use lax_or_strict_schema: + # - strict mode: only known enum values match (raises ValueError for unknown) + # - lax mode: accept any value, return enum member or raw value + return core_schema.lax_or_strict_schema( + lax_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_lax)] + ), + strict_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_strict)] + ), ) - except ValueError: - return value + + setattr(cls, "__get_pydantic_core_schema__", classmethod(__get_pydantic_core_schema__)) + return cls diff --git a/src/shippo/utils/eventstreaming.py b/src/shippo/utils/eventstreaming.py index 74a63f75..3bdcd6d3 100644 --- a/src/shippo/utils/eventstreaming.py +++ b/src/shippo/utils/eventstreaming.py @@ -2,7 +2,9 @@ import re import json +from dataclasses import dataclass, asdict from typing import ( + Any, Callable, Generic, TypeVar, @@ -17,86 +19,117 @@ class EventStream(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] + _closed: bool def __init__( self, response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) + self.client_ref = client_ref + self._closed = False def __iter__(self): return self def __next__(self): + if self._closed: + raise StopIteration return next(self.generator) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self._closed = True self.response.close() class EventStreamAsync(Generic[T]): + # Holds a reference to the SDK client to avoid it being garbage collected + # and cause termination of the underlying httpx client. + client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] + _closed: bool def __init__( self, response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) + self.client_ref = client_ref + self._closed = False def __aiter__(self): return self async def __anext__(self): + if self._closed: + raise StopAsyncIteration return await self.generator.__anext__() async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + self._closed = True await self.response.aclose() +@dataclass class ServerEvent: id: Optional[str] = None event: Optional[str] = None - data: Optional[str] = None + data: Any = None retry: Optional[int] = None MESSAGE_BOUNDARIES = [ b"\r\n\r\n", - b"\n\n", + b"\r\n\r", + b"\r\n\n", + b"\r\r\n", + b"\n\r\n", b"\r\r", + b"\n\r", + b"\n\n", ] +UTF8_BOM = b"\xef\xbb\xbf" + async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None async for chunk in response.aiter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -111,15 +144,30 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event + if discard: + await response.aclose() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event @@ -128,17 +176,14 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None for chunk in response.iter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -153,22 +198,42 @@ def stream_events( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event + if discard: + response.close() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) if event is not None: yield event def _parse_event( - raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None -) -> Tuple[Optional[T], bool]: + *, + raw: bytearray, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + event_id: Optional[str] = None, + data_required: bool = True, +) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) publish = False @@ -179,13 +244,16 @@ def _parse_event( continue delim = line.find(":") - if delim <= 0: + if delim == 0: continue - field = line[0:delim] - value = line[delim + 1 :] if delim < len(line) - 1 else "" - if len(value) and value[0] == " ": - value = value[1:] + field = line + value = "" + if delim > 0: + field = line[0:delim] + value = line[delim + 1 :] if delim < len(line) - 1 else "" + if len(value) and value[0] == " ": + value = value[1:] if field == "event": event.event = value @@ -194,37 +262,40 @@ def _parse_event( data += value + "\n" publish = True elif field == "id": - event.id = value publish = True + if "\x00" not in value: + event_id = value elif field == "retry": - event.retry = int(value) if value.isdigit() else None + if value.isdigit(): + event.retry = int(value) publish = True + event.id = event_id + if sentinel and data == f"{sentinel}\n": - return None, True + return None, True, event_id + + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id if data: data = data[:-1] - event.data = data - - data_is_primitive = ( - data.isnumeric() or data == "true" or data == "false" or data == "null" - ) - data_is_json = ( - data.startswith("{") or data.startswith("[") or data.startswith('"') - ) - - if data_is_primitive or data_is_json: - try: - event.data = json.loads(data) - except Exception: - pass + try: + event.data = json.loads(data) + except json.JSONDecodeError: + event.data = data out = None if publish: - out = decoder(json.dumps(event.__dict__)) - - return out, False + out_dict = { + k: v + for k, v in asdict(event).items() + if v is not None or (k == "data" and data) + } + out = decoder(json.dumps(out_dict)) + + return out, False, event_id def _peek_sequence(position: int, buffer: bytearray, sequence: bytes): diff --git a/src/shippo/utils/forms.py b/src/shippo/utils/forms.py index 0472aba8..f961e76b 100644 --- a/src/shippo/utils/forms.py +++ b/src/shippo/utils/forms.py @@ -86,11 +86,39 @@ def _populate_form( return form +def _extract_file_properties(file_obj: Any) -> Tuple[str, Any, Any]: + """Extract file name, content, and content type from a file object.""" + file_fields: Dict[str, FieldInfo] = file_obj.__class__.model_fields + + file_name = "" + content = None + content_type = None + + for file_field_name in file_fields: + file_field = file_fields[file_field_name] + + file_metadata = find_field_metadata(file_field, MultipartFormMetadata) + if file_metadata is None: + continue + + if file_metadata.content: + content = getattr(file_obj, file_field_name, None) + elif file_field_name == "content_type": + content_type = getattr(file_obj, file_field_name, None) + else: + file_name = getattr(file_obj, file_field_name) + + if file_name == "" or content is None: + raise ValueError("invalid multipart/form-data file") + + return file_name, content, content_type + + def serialize_multipart_form( media_type: str, request: Any -) -> Tuple[str, Dict[str, Any], Dict[str, Any]]: +) -> Tuple[str, Dict[str, Any], List[Tuple[str, Any]]]: form: Dict[str, Any] = {} - files: Dict[str, Any] = {} + files: List[Tuple[str, Any]] = [] if not isinstance(request, BaseModel): raise TypeError("invalid request body type") @@ -112,38 +140,41 @@ def serialize_multipart_form( f_name = field.alias if field.alias else name if field_metadata.file: - file_fields: Dict[str, FieldInfo] = val.__class__.model_fields - - file_name = "" - content = None - content_type = None + if isinstance(val, List): + # Handle array of files + array_field_name = f_name + "[]" + for file_obj in val: + if not _is_set(file_obj): + continue - for file_field_name in file_fields: - file_field = file_fields[file_field_name] + file_name, content, content_type = _extract_file_properties( + file_obj + ) - file_metadata = find_field_metadata(file_field, MultipartFormMetadata) - if file_metadata is None: - continue + if content_type is not None: + files.append( + (array_field_name, (file_name, content, content_type)) + ) + else: + files.append((array_field_name, (file_name, content))) + else: + # Handle single file + file_name, content, content_type = _extract_file_properties(val) - if file_metadata.content: - content = getattr(val, file_field_name, None) - elif file_field_name == "content_type": - content_type = getattr(val, file_field_name, None) + if content_type is not None: + files.append((f_name, (file_name, content, content_type))) else: - file_name = getattr(val, file_field_name) - - if file_name == "" or content is None: - raise ValueError("invalid multipart/form-data file") - - if content_type is not None: - files[f_name] = (file_name, content, content_type) - else: - files[f_name] = (file_name, content) + files.append((f_name, (file_name, content))) elif field_metadata.json: - files[f_name] = ( - None, - marshal_json(val, request_field_types[name]), - "application/json", + files.append( + ( + f_name, + ( + None, + marshal_json(val, request_field_types[name]), + "application/json", + ), + ) ) else: if isinstance(val, List): @@ -154,7 +185,8 @@ def serialize_multipart_form( continue values.append(_val_to_string(value)) - form[f_name + "[]"] = values + array_field_name = f_name + "[]" + form[array_field_name] = values else: form[f_name] = _val_to_string(val) return media_type, form, files diff --git a/src/shippo/utils/queryparams.py b/src/shippo/utils/queryparams.py index 37a6e7f9..c04e0db8 100644 --- a/src/shippo/utils/queryparams.py +++ b/src/shippo/utils/queryparams.py @@ -27,12 +27,13 @@ def get_query_params( query_params: Any, gbls: Optional[Any] = None, + allow_empty_value: Optional[List[str]] = None, ) -> Dict[str, List[str]]: params: Dict[str, List[str]] = {} - globals_already_populated = _populate_query_params(query_params, gbls, params, []) + globals_already_populated = _populate_query_params(query_params, gbls, params, [], allow_empty_value) if _is_set(gbls): - _populate_query_params(gbls, None, params, globals_already_populated) + _populate_query_params(gbls, None, params, globals_already_populated, allow_empty_value) return params @@ -42,6 +43,7 @@ def _populate_query_params( gbls: Any, query_param_values: Dict[str, List[str]], skip_fields: List[str], + allow_empty_value: Optional[List[str]] = None, ) -> List[str]: globals_already_populated: List[str] = [] @@ -69,6 +71,16 @@ def _populate_query_params( globals_already_populated.append(name) f_name = field.alias if field.alias is not None else name + + allow_empty_set = set(allow_empty_value or []) + should_include_empty = f_name in allow_empty_set and ( + value is None or value == [] or value == "" + ) + + if should_include_empty: + query_param_values[f_name] = [""] + continue + serialization = metadata.serialization if serialization is not None: serialized_parms = _get_serialized_params( diff --git a/src/shippo/utils/requestbodies.py b/src/shippo/utils/requestbodies.py index d5240dd5..1de32b6d 100644 --- a/src/shippo/utils/requestbodies.py +++ b/src/shippo/utils/requestbodies.py @@ -44,15 +44,15 @@ def serialize_request_body( serialized_request_body = SerializedRequestBody(media_type) - if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None: + if re.match(r"^(application|text)\/([^+]+\+)*json.*", media_type) is not None: serialized_request_body.content = marshal_json(request_body, request_body_type) - elif re.match(r"multipart\/.*", media_type) is not None: + elif re.match(r"^multipart\/.*", media_type) is not None: ( serialized_request_body.media_type, serialized_request_body.data, serialized_request_body.files, ) = serialize_multipart_form(media_type, request_body) - elif re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None: + elif re.match(r"^application\/x-www-form-urlencoded.*", media_type) is not None: serialized_request_body.data = serialize_form_data(request_body) elif isinstance(request_body, (bytes, bytearray, io.BytesIO, io.BufferedReader)): serialized_request_body.content = request_body diff --git a/src/shippo/utils/retries.py b/src/shippo/utils/retries.py index 4d608671..af07d4e9 100644 --- a/src/shippo/utils/retries.py +++ b/src/shippo/utils/retries.py @@ -3,7 +3,9 @@ import asyncio import random import time -from typing import List +from datetime import datetime +from email.utils import parsedate_to_datetime +from typing import List, Optional import httpx @@ -51,9 +53,11 @@ def __init__(self, config: RetryConfig, status_codes: List[str]): class TemporaryError(Exception): response: httpx.Response + retry_after: Optional[int] def __init__(self, response: httpx.Response): self.response = response + self.retry_after = _parse_retry_after_header(response) class PermanentError(Exception): @@ -63,6 +67,62 @@ def __init__(self, inner: Exception): self.inner = inner +def _parse_retry_after_header(response: httpx.Response) -> Optional[int]: + """Parse Retry-After header from response. + + Returns: + Retry interval in milliseconds, or None if header is missing or invalid. + """ + retry_after_header = response.headers.get("retry-after") + if not retry_after_header: + return None + + try: + seconds = float(retry_after_header) + return round(seconds * 1000) + except ValueError: + pass + + try: + retry_date = parsedate_to_datetime(retry_after_header) + delta = (retry_date - datetime.now(retry_date.tzinfo)).total_seconds() + return round(max(0, delta) * 1000) + except (ValueError, TypeError): + pass + + return None + + +def _get_sleep_interval( + exception: Exception, + initial_interval: int, + max_interval: int, + exponent: float, + retries: int, +) -> float: + """Get sleep interval for retry with exponential backoff. + + Args: + exception: The exception that triggered the retry. + initial_interval: Initial retry interval in milliseconds. + max_interval: Maximum retry interval in milliseconds. + exponent: Base for exponential backoff calculation. + retries: Current retry attempt count. + + Returns: + Sleep interval in seconds. + """ + if ( + isinstance(exception, TemporaryError) + and exception.retry_after is not None + and exception.retry_after > 0 + ): + return exception.retry_after / 1000 + + sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) + return min(sleep, max_interval / 1000) + + def retry(func, retries: Retries): if retries.config.strategy == "backoff": @@ -84,12 +144,7 @@ def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise @@ -133,12 +188,7 @@ async def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except httpx.ConnectError as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception - except httpx.TimeoutException as exception: + except (httpx.NetworkError, httpx.TimeoutException) as exception: if retries.config.retry_connection_errors: raise @@ -183,8 +233,10 @@ def retry_with_backoff( return exception.response raise - sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) - sleep = min(sleep, max_interval / 1000) + + sleep = _get_sleep_interval( + exception, initial_interval, max_interval, exponent, retries + ) time.sleep(sleep) retries += 1 @@ -211,7 +263,9 @@ async def retry_with_backoff_async( return exception.response raise - sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1) - sleep = min(sleep, max_interval / 1000) + + sleep = _get_sleep_interval( + exception, initial_interval, max_interval, exponent, retries + ) await asyncio.sleep(sleep) retries += 1 diff --git a/src/shippo/utils/security.py b/src/shippo/utils/security.py index 295a3f40..17996bd5 100644 --- a/src/shippo/utils/security.py +++ b/src/shippo/utils/security.py @@ -135,6 +135,8 @@ def _parse_security_scheme_value( elif scheme_type == "http": if sub_type == "bearer": headers[header_name] = _apply_bearer(value) + elif sub_type == "basic": + headers[header_name] = value elif sub_type == "custom": return else: diff --git a/src/shippo/utils/serializers.py b/src/shippo/utils/serializers.py index baa41fbd..14321eb4 100644 --- a/src/shippo/utils/serializers.py +++ b/src/shippo/utils/serializers.py @@ -1,13 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from decimal import Decimal +import functools import json -from typing import Any, Dict, List, Union, get_args -import httpx +import typing +from typing import Any, Dict, List, Tuple, Union, get_args +import typing_extensions from typing_extensions import get_origin + +import httpx from pydantic import ConfigDict, create_model from pydantic_core import from_json -from typing_inspection.typing_objects import is_union from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset @@ -99,26 +102,6 @@ def validate_int(b): return int(b) -def validate_open_enum(is_int: bool): - def validate(e): - if e is None: - return None - - if isinstance(e, Unset): - return e - - if is_int: - if not isinstance(e, int): - raise ValueError("Expected int") - else: - if not isinstance(e, str): - raise ValueError("Expected string") - - return e - - return validate - - def validate_const(v): def validate(c): # Optional[T] is a Union[T, None] @@ -185,6 +168,15 @@ def is_nullable(field): return False +def is_union(obj: object) -> bool: + """ + Returns True if the given object is a typing.Union or typing_extensions.Union. + """ + return any( + obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union") + ) + + def stream_to_text(stream: httpx.Response) -> str: return "".join(stream.iter_text()) @@ -217,3 +209,21 @@ def _contains_pydantic_model(data: Any) -> bool: return any(_contains_pydantic_model(value) for value in data.values()) return False + + +@functools.cache +def _get_typing_objects_by_name_of(name: str) -> Tuple[Any, ...]: + """ + Get typing objects by name from typing and typing_extensions. + Reference: https://typing-extensions.readthedocs.io/en/latest/#runtime-use-of-types + """ + result = tuple( + getattr(module, name) + for module in (typing, typing_extensions) + if hasattr(module, name) + ) + if not result: + raise ValueError( + f"Neither typing nor typing_extensions has an object called {name!r}" + ) + return result diff --git a/src/shippo/utils/unmarshal_json_response.py b/src/shippo/utils/unmarshal_json_response.py new file mode 100644 index 00000000..b1891105 --- /dev/null +++ b/src/shippo/utils/unmarshal_json_response.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from typing import Any, Optional, Type, TypeVar, overload + +import httpx + +from .serializers import unmarshal_json +from shippo.models import errors + +T = TypeVar("T") + + +@overload +def unmarshal_json_response( + typ: Type[T], http_res: httpx.Response, body: Optional[str] = None +) -> T: ... + + +@overload +def unmarshal_json_response( + typ: Any, http_res: httpx.Response, body: Optional[str] = None +) -> Any: ... + + +def unmarshal_json_response( + typ: Any, http_res: httpx.Response, body: Optional[str] = None +) -> Any: + if body is None: + body = http_res.text + try: + return unmarshal_json(body, typ) + except Exception as e: + raise errors.ResponseValidationError( + "Response validation failed", + http_res, + e, + body, + ) from e diff --git a/src/shippo/webhooks.py b/src/shippo/webhooks.py index 63d428a5..7d3d797e 100644 --- a/src/shippo/webhooks.py +++ b/src/shippo/webhooks.py @@ -5,17 +5,12 @@ from shippo._hooks import HookContext from shippo.models import components, errors, operations from shippo.types import BaseModel, OptionalNullable, UNSET +from shippo.utils.unmarshal_json_response import unmarshal_json_response from typing import Mapping, Optional, Union, cast class Webhooks(BaseSDK): - 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. - - """ + 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.""" def create_webhook( self, @@ -27,7 +22,7 @@ def create_webhook( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Create a new webhook Creates a new webhook to send notifications to a URL when a specific event occurs. @@ -68,6 +63,7 @@ def create_webhook( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.WebhookUpdateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -81,9 +77,10 @@ def create_webhook( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="createWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -92,26 +89,15 @@ def create_webhook( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def create_webhook_async( self, @@ -123,7 +109,7 @@ async def create_webhook_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Create a new webhook Creates a new webhook to send notifications to a URL when a specific event occurs. @@ -164,6 +150,7 @@ async def create_webhook_async( get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.WebhookUpdateRequest ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -177,9 +164,10 @@ async def create_webhook_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="createWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -188,26 +176,15 @@ async def create_webhook_async( ) if utils.match_response(http_res, "201", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def list_webhooks( self, @@ -216,7 +193,7 @@ def list_webhooks( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.WebhookPaginatedList]: + ) -> components.WebhookPaginatedList: r"""List all webhooks Returns a list of all webhooks you have created. @@ -248,6 +225,7 @@ def list_webhooks( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -261,9 +239,10 @@ def list_webhooks( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="listWebhooks", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -272,28 +251,15 @@ def list_webhooks( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.WebhookPaginatedList] - ) + return unmarshal_json_response(components.WebhookPaginatedList, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def list_webhooks_async( self, @@ -302,7 +268,7 @@ async def list_webhooks_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.WebhookPaginatedList]: + ) -> components.WebhookPaginatedList: r"""List all webhooks Returns a list of all webhooks you have created. @@ -334,6 +300,7 @@ async def list_webhooks_async( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -347,9 +314,10 @@ async def list_webhooks_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="listWebhooks", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -358,28 +326,15 @@ async def list_webhooks_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json( - http_res.text, Optional[components.WebhookPaginatedList] - ) + return unmarshal_json_response(components.WebhookPaginatedList, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def get_webhook( self, @@ -389,7 +344,7 @@ def get_webhook( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Retrieve a specific webhook Returns the details of a specific webhook using the webhook object ID. @@ -427,6 +382,7 @@ def get_webhook( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -440,9 +396,10 @@ def get_webhook( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="getWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -451,26 +408,15 @@ def get_webhook( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def get_webhook_async( self, @@ -480,7 +426,7 @@ async def get_webhook_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Retrieve a specific webhook Returns the details of a specific webhook using the webhook object ID. @@ -518,6 +464,7 @@ async def get_webhook_async( accept_header_value="application/json", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -531,9 +478,10 @@ async def get_webhook_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="getWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -542,26 +490,15 @@ async def get_webhook_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def update_webhook( self, @@ -574,7 +511,7 @@ def update_webhook( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Update an existing webhook Updates an existing webhook using the webhook object ID. @@ -623,6 +560,7 @@ def update_webhook( "json", components.WebhookUpdateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -636,9 +574,10 @@ def update_webhook( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="updateWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -647,26 +586,15 @@ def update_webhook( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def update_webhook_async( self, @@ -679,7 +607,7 @@ async def update_webhook_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[components.Webhook]: + ) -> components.Webhook: r"""Update an existing webhook Updates an existing webhook using the webhook object ID. @@ -728,6 +656,7 @@ async def update_webhook_async( "json", components.WebhookUpdateRequest, ), + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -741,9 +670,10 @@ async def update_webhook_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="updateWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -752,26 +682,15 @@ async def update_webhook_async( ) if utils.match_response(http_res, "200", "application/json"): - return utils.unmarshal_json(http_res.text, Optional[components.Webhook]) + return unmarshal_json_response(components.Webhook, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) def delete_webhook( self, @@ -819,6 +738,7 @@ def delete_webhook( accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -832,9 +752,10 @@ def delete_webhook( http_res = self.do_request( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="deleteWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -846,23 +767,12 @@ def delete_webhook( return if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) async def delete_webhook_async( self, @@ -910,6 +820,7 @@ async def delete_webhook_async( accept_header_value="*/*", http_headers=http_headers, security=self.sdk_configuration.security, + allow_empty_value=None, timeout_ms=timeout_ms, ) @@ -923,9 +834,10 @@ async def delete_webhook_async( http_res = await self.do_request_async( hook_ctx=HookContext( + config=self.sdk_configuration, base_url=base_url or "", operation_id="deleteWebhook", - oauth2_scopes=[], + oauth2_scopes=None, security_source=self.sdk_configuration.security, ), request=req, @@ -937,20 +849,9 @@ async def delete_webhook_async( return if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) if utils.match_response(http_res, "5XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - "API error occurred", http_res.status_code, http_res_text, http_res - ) - - content_type = http_res.headers.get("Content-Type") - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError( - f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", - http_res.status_code, - http_res_text, - http_res, - ) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res)