prices

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package prices provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Index

Constants

View Source
const (
	OAuthScopes = "OAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewPostBaseRatesSearchRequest

func NewPostBaseRatesSearchRequest(server string, body PostBaseRatesSearchJSONRequestBody) (*http.Request, error)

NewPostBaseRatesSearchRequest calls the generic PostBaseRatesSearch builder with application/json body

func NewPostBaseRatesSearchRequestWithBody

func NewPostBaseRatesSearchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostBaseRatesSearchRequestWithBody generates requests for PostBaseRatesSearch with any type of body

func NewPostExtraServiceRatesSearchRequest

func NewPostExtraServiceRatesSearchRequest(server string, body PostExtraServiceRatesSearchJSONRequestBody) (*http.Request, error)

NewPostExtraServiceRatesSearchRequest calls the generic PostExtraServiceRatesSearch builder with application/json body

func NewPostExtraServiceRatesSearchRequestWithBody

func NewPostExtraServiceRatesSearchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostExtraServiceRatesSearchRequestWithBody generates requests for PostExtraServiceRatesSearch with any type of body

func NewPostLetterRatesSearchRequest

func NewPostLetterRatesSearchRequest(server string, body PostLetterRatesSearchJSONRequestBody) (*http.Request, error)

NewPostLetterRatesSearchRequest calls the generic PostLetterRatesSearch builder with application/json body

func NewPostLetterRatesSearchRequestWithBody

func NewPostLetterRatesSearchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostLetterRatesSearchRequestWithBody generates requests for PostLetterRatesSearch with any type of body

func NewPostRateListRequest

func NewPostRateListRequest(server string, body PostRateListJSONRequestBody) (*http.Request, error)

NewPostRateListRequest calls the generic PostRateList builder with application/json body

func NewPostRateListRequestWithBody

func NewPostRateListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostRateListRequestWithBody generates requests for PostRateList with any type of body

func NewPostTotalRatesSearchRequest

func NewPostTotalRatesSearchRequest(server string, body PostTotalRatesSearchJSONRequestBody) (*http.Request, error)

NewPostTotalRatesSearchRequest calls the generic PostTotalRatesSearch builder with application/json body

func NewPostTotalRatesSearchRequestWithBody

func NewPostTotalRatesSearchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostTotalRatesSearchRequestWithBody generates requests for PostTotalRatesSearch with any type of body

Types

type BaseRateDetails

type BaseRateDetails struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// Description The description of the price.
	Description *string `json:"description,omitempty"`

	// DestinationEntryFacilityType Destination Entry Facility type for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	//
	// * `NONE` - None, translates to PTR code `N`
	// * `AREA_DISTRIBUTION_CENTER` - Area Distribution Center, translates to PTR code `A`
	// * `AUXILIARY_SERVICE_FACILITY` - Auxiliary Service Facility, translates to PTR code `F`
	// * `DESTINATION_DELIVERY_UNIT` - Destination Delivery Unit, translates to PTR code `D`
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Destination Network Distribution Center, translates to PTR code `B`
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Destination Sectional Center Facility, translates to PTR code `S`
	// * `DESTINATION_SERVICE_HUB` - Destination Service Hub, translates to PTR code `H`
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Destination Regional Processing Distribution Center, translates to PTR code `B`
	//
	// Note:
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType *BaseRateDetailsDestinationEntryFacilityType `json:"destinationEntryFacilityType,omitempty"`

	// DimWeight The calculated dimensional weight for the package based on user provided dimensions. The greater of dimWeight and weight will be used to calculated the rate.
	DimWeight *float64 `json:"dimWeight,omitempty"`

	// EndDate Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
	EndDate *string `json:"endDate,omitempty"`

	// Fees The fees associated with the package.
	Fees *[]struct {
		// SKU The pricing SKU for the fee.
		SKU *string `json:"SKU,omitempty"`

		// Name The name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float64 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// MailClass The mail class of the price.
	MailClass *string `json:"mailClass,omitempty"`

	// Price The postage price.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price applied.
	//  * Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL',  'CONTRACT' & 'NSA' (deprecated)
	//  * Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS', 'CONTRACT' & 'NSA' (deprecated)
	PriceType *BaseRateDetailsPriceType `json:"priceType,omitempty"`

	// ProcessingCategory Processing category for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	//
	// * `CARDS` - Cards, translates to PTR code `0`
	// * `LETTERS` - Letters, translates to PTR code `1`
	// * `FLATS` - Flats, translates to PTR code `2`
	// * `MACHINABLE` - Machinable Parcel, translates to PTR code `3`
	// * `IRREGULAR` - Irregular Parcel, translates to PTR code `4`
	// * `NON_MACHINABLE` - Non-machinable parcel, translates to PTR code `5`
	// * `NONSTANDARD` - Nonstandard parcel, translates to PTR code `5`
	// * `CATALOGS` - Catalogs, translates to PTR code `C`
	// * `OPEN_AND_DISTRIBUTE` - Open and Distribute, translates to PTR code `O`
	// * `RETURNS` - Returns, translates to PTR code `R`
	// * `SOFT_PACK_MACHINABLE` - Soft Pack Machinable, translates to PTR code `S`
	// * `SOFT_PACK_NON_MACHINABLE` - Soft Package Non-machinable, translates to PTR code `T`
	//
	// Note:
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory *BaseRateDetailsProcessingCategory `json:"processingCategory,omitempty"`

	// ProductDefinition A business friendly description for a product that can be displayed to a customer on a shipping portal
	ProductDefinition *string `json:"productDefinition,omitempty"`

	// ProductName A business friendly name for a product that can be displayed to a customer on a shipping portal
	ProductName *string `json:"productName,omitempty"`

	// RateIndicator Two-digit rate indicator code for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	RateIndicator *string `json:"rateIndicator,omitempty"`

	// StartDate Effective start date of the rate.
	StartDate *openapi_types.Date `json:"startDate,omitempty"`

	// Warnings A list of warnings associated with the rate calculation.
	Warnings *WarningsList `json:"warnings,omitempty"`

	// Weight The calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate.
	Weight *float64 `json:"weight,omitempty"`

	// Zone Indicates the calculated zone between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, and `weight`.
	Zone                 *string                `json:"zone,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

BaseRateDetails defines model for BaseRateDetails.

func (BaseRateDetails) Get

func (a BaseRateDetails) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for BaseRateDetails. Returns the specified element and whether it was found

func (BaseRateDetails) MarshalJSON

func (a BaseRateDetails) MarshalJSON() ([]byte, error)

Override default JSON handling for BaseRateDetails to handle AdditionalProperties

func (*BaseRateDetails) Set

func (a *BaseRateDetails) Set(fieldName string, value interface{})

Setter for additional properties for BaseRateDetails

func (*BaseRateDetails) UnmarshalJSON

func (a *BaseRateDetails) UnmarshalJSON(b []byte) error

Override default JSON handling for BaseRateDetails to handle AdditionalProperties

type BaseRateDetailsDestinationEntryFacilityType

type BaseRateDetailsDestinationEntryFacilityType string

BaseRateDetailsDestinationEntryFacilityType Destination Entry Facility type for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.

* `NONE` - None, translates to PTR code `N` * `AREA_DISTRIBUTION_CENTER` - Area Distribution Center, translates to PTR code `A` * `AUXILIARY_SERVICE_FACILITY` - Auxiliary Service Facility, translates to PTR code `F` * `DESTINATION_DELIVERY_UNIT` - Destination Delivery Unit, translates to PTR code `D` * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Destination Network Distribution Center, translates to PTR code `B` * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Destination Sectional Center Facility, translates to PTR code `S` * `DESTINATION_SERVICE_HUB` - Destination Service Hub, translates to PTR code `H` * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Destination Regional Processing Distribution Center, translates to PTR code `B`

Note: * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	BaseRateDetailsDestinationEntryFacilityTypeAREADISTRIBUTIONCENTER                          BaseRateDetailsDestinationEntryFacilityType = "AREA_DISTRIBUTION_CENTER"
	BaseRateDetailsDestinationEntryFacilityTypeAUXILIARYSERVICEFACILITY                        BaseRateDetailsDestinationEntryFacilityType = "AUXILIARY_SERVICE_FACILITY"
	BaseRateDetailsDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT                         BaseRateDetailsDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	BaseRateDetailsDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER            BaseRateDetailsDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	BaseRateDetailsDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER BaseRateDetailsDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	BaseRateDetailsDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY              BaseRateDetailsDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	BaseRateDetailsDestinationEntryFacilityTypeDESTINATIONSERVICEHUB                           BaseRateDetailsDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	BaseRateDetailsDestinationEntryFacilityTypeNONE                                            BaseRateDetailsDestinationEntryFacilityType = "NONE"
)

Defines values for BaseRateDetailsDestinationEntryFacilityType.

type BaseRateDetailsPriceType

type BaseRateDetailsPriceType string

BaseRateDetailsPriceType The type of price applied.

  • Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL', 'CONTRACT' & 'NSA' (deprecated)
  • Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS', 'CONTRACT' & 'NSA' (deprecated)
const (
	BaseRateDetailsPriceTypeCOMMERCIAL     BaseRateDetailsPriceType = "COMMERCIAL"
	BaseRateDetailsPriceTypeCOMMERCIALBASE BaseRateDetailsPriceType = "COMMERCIAL_BASE"
	BaseRateDetailsPriceTypeCOMMERCIALPLUS BaseRateDetailsPriceType = "COMMERCIAL_PLUS"
	BaseRateDetailsPriceTypeCONTRACT       BaseRateDetailsPriceType = "CONTRACT"
	BaseRateDetailsPriceTypeNSA            BaseRateDetailsPriceType = "NSA"
	BaseRateDetailsPriceTypeRETAIL         BaseRateDetailsPriceType = "RETAIL"
)

Defines values for BaseRateDetailsPriceType.

type BaseRateDetailsProcessingCategory

type BaseRateDetailsProcessingCategory string

BaseRateDetailsProcessingCategory Processing category for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.

* `CARDS` - Cards, translates to PTR code `0` * `LETTERS` - Letters, translates to PTR code `1` * `FLATS` - Flats, translates to PTR code `2` * `MACHINABLE` - Machinable Parcel, translates to PTR code `3` * `IRREGULAR` - Irregular Parcel, translates to PTR code `4` * `NON_MACHINABLE` - Non-machinable parcel, translates to PTR code `5` * `NONSTANDARD` - Nonstandard parcel, translates to PTR code `5` * `CATALOGS` - Catalogs, translates to PTR code `C` * `OPEN_AND_DISTRIBUTE` - Open and Distribute, translates to PTR code `O` * `RETURNS` - Returns, translates to PTR code `R` * `SOFT_PACK_MACHINABLE` - Soft Pack Machinable, translates to PTR code `S` * `SOFT_PACK_NON_MACHINABLE` - Soft Package Non-machinable, translates to PTR code `T`

Note: * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	BaseRateDetailsProcessingCategoryCARDS                 BaseRateDetailsProcessingCategory = "CARDS"
	BaseRateDetailsProcessingCategoryCATALOGS              BaseRateDetailsProcessingCategory = "CATALOGS"
	BaseRateDetailsProcessingCategoryFLATS                 BaseRateDetailsProcessingCategory = "FLATS"
	BaseRateDetailsProcessingCategoryIRREGULAR             BaseRateDetailsProcessingCategory = "IRREGULAR"
	BaseRateDetailsProcessingCategoryLETTERS               BaseRateDetailsProcessingCategory = "LETTERS"
	BaseRateDetailsProcessingCategoryMACHINABLE            BaseRateDetailsProcessingCategory = "MACHINABLE"
	BaseRateDetailsProcessingCategoryNONMACHINABLE         BaseRateDetailsProcessingCategory = "NON_MACHINABLE"
	BaseRateDetailsProcessingCategoryNONSTANDARD           BaseRateDetailsProcessingCategory = "NONSTANDARD"
	BaseRateDetailsProcessingCategoryOPENANDDISTRIBUTE     BaseRateDetailsProcessingCategory = "OPEN_AND_DISTRIBUTE"
	BaseRateDetailsProcessingCategoryRETURNS               BaseRateDetailsProcessingCategory = "RETURNS"
	BaseRateDetailsProcessingCategorySOFTPACKMACHINABLE    BaseRateDetailsProcessingCategory = "SOFT_PACK_MACHINABLE"
	BaseRateDetailsProcessingCategorySOFTPACKNONMACHINABLE BaseRateDetailsProcessingCategory = "SOFT_PACK_NON_MACHINABLE"
)

Defines values for BaseRateDetailsProcessingCategory.

type BaseRateOption

type BaseRateOption struct {
	// Rates List of base rate details associated with the shipment.
	Rates *[]BaseRateDetails `json:"rates,omitempty"`

	// TotalBasePrice The total price, including the rate, fees and pound postage.
	TotalBasePrice *float64 `json:"totalBasePrice,omitempty"`
}

BaseRateOption The prices that match the search criteria.

type BaseRatesQuery

type BaseRatesQuery struct {
	// AccountNumber The Enterprise Payment Account, Permit number, PC Postage meter number, or Mailer ID associated with a contract.
	AccountNumber *string `json:"accountNumber,omitempty"`

	// AccountType The type of payment account linked to a contract rate.
	//
	// Note:
	// - `METER` pricing is only available to PC Postage providers.
	// - `MID` pricing is only available for return mail classes.
	AccountType *BaseRatesQueryAccountType `json:"accountType,omitempty"`

	// DestinationEntryFacilityType Types of Facilities:
	// * `NONE` - Translate to Destination Rate Indicator N
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S
	// * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D
	// * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B
	//
	// Note:
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType BaseRatesQueryDestinationEntryFacilityType `json:"destinationEntryFacilityType"`

	// DestinationZIPCode This is destination ZIP Code™ for the package.
	DestinationZIPCode string `json:"destinationZIPCode"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height This is the package height in inches.
	Height Height `json:"height"`

	// Length This is the package length in inches.  The maximum dimension is always length.
	Length Length `json:"length"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	MailClass MailClass `json:"mailClass"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// OriginZIPCode This is the originating ZIP Code™ for the package.
	OriginZIPCode string `json:"originZIPCode"`

	// PriceType The type of price applied.
	//
	// Notes:
	//  * The `priceType` of `NSA` is deprecated.  `CONTRACT` should be used for non-published pricing.
	//  * If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
	//  * When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing.  If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
	PriceType PriceType `json:"priceType"`

	// ProcessingCategory USPS categorizes parcels into one of two mail processing categories: MACHINABLE or NONSTANDARD.
	// These categories are based on the physical dimensions of the piece, regardless of the placement (orientation) of the delivery address on the piece.
	// For more information see [Domestic Mail Manual (DMM)](https://pe.usps.com/DMM300/201.htm).
	//
	// Machinable letter-size mail is:
	//
	// * Not less than 5 inches long, 3-1/2 inches high, and 0.007-inch thick. For pieces more than 4-1/4 inches high or 6 inches long, or both, the minimum thickness is 0.009.(Pieces not meeting the 0.009 thickness are non-machinable letters under 2.1.)
	// * Not more than 11-1/2 inches long, or more than 6-1/8 inches high, or greater than 1/4-inch thick.
	// * Rectangular, with four square corners and parallel opposite sides. Letter-size, card-type mailpieces made of cardstock may have finished corners that do not exceed a radius of 0.125 inch (1/8 inch) unless prepared as Customized Market Mail under 243.9.0. See Exhibit 1.1.1.
	// * Within an aspect ratio (length divided by height) of 1.3 to 2.5, inclusive.
	// * Subject to additional dimensional restrictions in 3.0, depending on mailpiece design.
	//
	// Flat-size mail must have the following characteristics:
	//
	// * Be more than 11-1/2 inches long, or more than 6-1/8 inches high, or more than 1/4 inch thick, other than automation flats under 6.0 or as allowed for USPS® Marketing Mail pieces with simplified addresses under 5.2.2. Mailpieces other than automation flats or USPS® Marketing Mail pieces with simplified addresses that are 1/4 inch thick or less must be at least 3-1/2 inches high and at least 5 inches long and be at least 0.007 inch thick.
	// * Be not more than 15 inches long or more than 12 inches high or more than 3/4 inch thick, except for:
	// * Periodicals non-machinable flat-size pieces mailed as specified in 207.26.0. They must not be more than 1–1/4 inches thick.
	// * Polywrapped flats, with selvage that extends beyond the contents, up to a maximum length of 15-3/4 inches or a maximum height of 12-1/2 inches. The enclosed contents must not be longer than 15 inches or higher than 12 inches.
	// * Co-mailed polywrapped flats mailed as specified in Customer Support Ruling PS-346, with selvage that extends beyond the contents, up to a maximum height of 12-7/8 inches. The enclosed contents must not be higher than 12 inches.
	// * Be rectangular with four square corners or with finished corners that do not exceed a radius of 0.125 inch (1/8 inch) unless prepared as Customized Market Mail under 9.0.
	// * Be categorized as a catalog.
	// * Other size or weight standards may apply to mail addressed to certain APOs and FPOs, and mail sent by the Department of State to U.S. government personnel abroad.
	//
	// Note:
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory BaseRatesQueryProcessingCategory `json:"processingCategory"`

	// RateIndicator Rate ingredient to determine pricing categorization for calculating the price
	//
	// Note:
	//   * Effective 07/12/2026:  Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported.  The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10.  For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).
	//
	// Rate indicator list:
	// * 3D - 3-Digit
	// * 3N - 3-Digit Dimensional Rectangular
	// * 3R - 3-Digit Dimensional Nonrectangular
	// * 5D - 5-Digit
	// * BA - Basic
	// * BB - Mixed NDC
	// * BM - NDC
	// * C1 - Cubic Pricing Tier 1
	// * C2 - Cubic Pricing Tier 2
	// * C3 - Cubic Pricing Tier 3
	// * C4 - Cubic Pricing Tier 4
	// * C5 - Cubic Pricing Tier 5
	// * CP - Cubic Parcel
	// * CM - USPS Connect Local® Mail
	// * DC - NDC
	// * DE - SCF
	// * DF - 5-Digit
	// * DN - Dimensional Nonrectangular
	// * DR - Dimensional Rectangular
	// * E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee
	// * E6 - Priority Mail Express Legal Flat Rate Envelope
	// * E7 - Priority Mail Express Legal Flat Rate Envelope Sunday / Holiday
	// * FA - Legal Flat Rate Envelope
	// * FB - Medium Flat Rate Box/Large Flat Rate Bag
	// * FE - Flat Rate Envelope
	// * FP - Padded Flat Rate Envelope
	// * FS - Small Flat Rate Box
	// * LC - USPS Connect® Local Single Piece
	// * LF - USPS Connect® Local Flat Rate Box
	// * LL - USPS Connect® Local Large Flat Rate Bag
	// * LO - USPS Connect® Local Oversized
	// * LS - USPS Connect® Local Small Flat Rate Bag
	// * NN - Non-Presorted Nonprofit
	// * NP - Non-Presorted
	// * O1 - Full Tray Box
	// * O2 - Half Tray Box
	// * O3 - EMM Tray Box
	// * O4 - Flat Tub Tray Box
	// * O5 - Surface Transported Pallet
	// * O6 - Full Pallet Box
	// * O7 - Half Pallet Box
	// * OS - Oversized
	// * PN - Presorted Nonprofit
	// * P5 - Cubic Soft Pack Tier 1
	// * P6 - Cubic Soft Pack Tier 2
	// * P7 - Cubic Soft Pack Tier 3
	// * P8 - Cubic Soft Pack Tier 4
	// * P9 - Cubic Soft Pack Tier 5
	// * Q6 - Cubic Soft Pack Tier 6
	// * Q7 - Cubic Soft Pack Tier 7
	// * Q8 - Cubic Soft Pack Tier 8
	// * Q9 - Cubic Soft Pack Tier 9
	// * Q0 - Cubic Soft Pack Tier 10
	// * PA - Priority Mail Express Single Piece
	// * PL - Large Flat Rate Box
	// * PM - Large Flat Rate Box APO/FPO/DPO
	// * PR - Presorted
	// * SB - Small Flat Rate Bag
	// * SN - SCF Dimensional Nonrectangular
	// * SP - Single Piece
	// * SR - SCF Dimensional Rectangular
	RateIndicator BaseRatesQueryRateIndicator `json:"rateIndicator"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
	Weight WeightPounds `json:"weight"`

	// Width This is the package width in inches.  The second longest dimension is always width.
	Width Width `json:"width"`
}

BaseRatesQuery Package rate ingredients used to calculate base prices.

type BaseRatesQueryAccountType

type BaseRatesQueryAccountType string

BaseRatesQueryAccountType The type of payment account linked to a contract rate.

Note: - `METER` pricing is only available to PC Postage providers. - `MID` pricing is only available for return mail classes.

const (
	BaseRatesQueryAccountTypeEPS    BaseRatesQueryAccountType = "EPS"
	BaseRatesQueryAccountTypeMETER  BaseRatesQueryAccountType = "METER"
	BaseRatesQueryAccountTypeMID    BaseRatesQueryAccountType = "MID"
	BaseRatesQueryAccountTypePERMIT BaseRatesQueryAccountType = "PERMIT"
)

Defines values for BaseRatesQueryAccountType.

type BaseRatesQueryDestinationEntryFacilityType

type BaseRatesQueryDestinationEntryFacilityType string

BaseRatesQueryDestinationEntryFacilityType Types of Facilities: * `NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B

Note: * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	BaseRatesQueryDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT                         BaseRatesQueryDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	BaseRatesQueryDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER            BaseRatesQueryDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	BaseRatesQueryDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER BaseRatesQueryDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	BaseRatesQueryDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY              BaseRatesQueryDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	BaseRatesQueryDestinationEntryFacilityTypeDESTINATIONSERVICEHUB                           BaseRatesQueryDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	BaseRatesQueryDestinationEntryFacilityTypeNONE                                            BaseRatesQueryDestinationEntryFacilityType = "NONE"
)

Defines values for BaseRatesQueryDestinationEntryFacilityType.

type BaseRatesQueryProcessingCategory

type BaseRatesQueryProcessingCategory string

BaseRatesQueryProcessingCategory USPS categorizes parcels into one of two mail processing categories: MACHINABLE or NONSTANDARD. These categories are based on the physical dimensions of the piece, regardless of the placement (orientation) of the delivery address on the piece. For more information see [Domestic Mail Manual (DMM)](https://pe.usps.com/DMM300/201.htm).

Machinable letter-size mail is:

* Not less than 5 inches long, 3-1/2 inches high, and 0.007-inch thick. For pieces more than 4-1/4 inches high or 6 inches long, or both, the minimum thickness is 0.009.(Pieces not meeting the 0.009 thickness are non-machinable letters under 2.1.) * Not more than 11-1/2 inches long, or more than 6-1/8 inches high, or greater than 1/4-inch thick. * Rectangular, with four square corners and parallel opposite sides. Letter-size, card-type mailpieces made of cardstock may have finished corners that do not exceed a radius of 0.125 inch (1/8 inch) unless prepared as Customized Market Mail under 243.9.0. See Exhibit 1.1.1. * Within an aspect ratio (length divided by height) of 1.3 to 2.5, inclusive. * Subject to additional dimensional restrictions in 3.0, depending on mailpiece design.

Flat-size mail must have the following characteristics:

* Be more than 11-1/2 inches long, or more than 6-1/8 inches high, or more than 1/4 inch thick, other than automation flats under 6.0 or as allowed for USPS® Marketing Mail pieces with simplified addresses under 5.2.2. Mailpieces other than automation flats or USPS® Marketing Mail pieces with simplified addresses that are 1/4 inch thick or less must be at least 3-1/2 inches high and at least 5 inches long and be at least 0.007 inch thick. * Be not more than 15 inches long or more than 12 inches high or more than 3/4 inch thick, except for: * Periodicals non-machinable flat-size pieces mailed as specified in 207.26.0. They must not be more than 1–1/4 inches thick. * Polywrapped flats, with selvage that extends beyond the contents, up to a maximum length of 15-3/4 inches or a maximum height of 12-1/2 inches. The enclosed contents must not be longer than 15 inches or higher than 12 inches. * Co-mailed polywrapped flats mailed as specified in Customer Support Ruling PS-346, with selvage that extends beyond the contents, up to a maximum height of 12-7/8 inches. The enclosed contents must not be higher than 12 inches. * Be rectangular with four square corners or with finished corners that do not exceed a radius of 0.125 inch (1/8 inch) unless prepared as Customized Market Mail under 9.0. * Be categorized as a catalog. * Other size or weight standards may apply to mail addressed to certain APOs and FPOs, and mail sent by the Department of State to U.S. government personnel abroad.

Note: * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	BaseRatesQueryProcessingCategoryFLATS         BaseRatesQueryProcessingCategory = "FLATS"
	BaseRatesQueryProcessingCategoryIRREGULAR     BaseRatesQueryProcessingCategory = "IRREGULAR"
	BaseRatesQueryProcessingCategoryLETTERS       BaseRatesQueryProcessingCategory = "LETTERS"
	BaseRatesQueryProcessingCategoryMACHINABLE    BaseRatesQueryProcessingCategory = "MACHINABLE"
	BaseRatesQueryProcessingCategoryNONMACHINABLE BaseRatesQueryProcessingCategory = "NON_MACHINABLE"
	BaseRatesQueryProcessingCategoryNONSTANDARD   BaseRatesQueryProcessingCategory = "NONSTANDARD"
)

Defines values for BaseRatesQueryProcessingCategory.

type BaseRatesQueryRateIndicator

type BaseRatesQueryRateIndicator string

BaseRatesQueryRateIndicator Rate ingredient to determine pricing categorization for calculating the price

Note:

  • Effective 07/12/2026: Rate indicators `Q6`, `Q7`, `Q8`, `Q9`, and `Q0` are no longer supported. The dimensions for Cubic Soft Pack tiers `P5`, `P6`, `P7`, `P8`, and `P9` will be updated to include the dimensions for Tiers 6-10. For updated tiers and more information, please view the [Postal Bulletin](https://about.usps.com/postal-bulletin/2026/pb22705/html/updt_001.htm).

Rate indicator list: * 3D - 3-Digit * 3N - 3-Digit Dimensional Rectangular * 3R - 3-Digit Dimensional Nonrectangular * 5D - 5-Digit * BA - Basic * BB - Mixed NDC * BM - NDC * C1 - Cubic Pricing Tier 1 * C2 - Cubic Pricing Tier 2 * C3 - Cubic Pricing Tier 3 * C4 - Cubic Pricing Tier 4 * C5 - Cubic Pricing Tier 5 * CP - Cubic Parcel * CM - USPS Connect Local® Mail * DC - NDC * DE - SCF * DF - 5-Digit * DN - Dimensional Nonrectangular * DR - Dimensional Rectangular * E4 - Priority Mail Express Flat Rate Envelope - Post Office To Addressee * E6 - Priority Mail Express Legal Flat Rate Envelope * E7 - Priority Mail Express Legal Flat Rate Envelope Sunday / Holiday * FA - Legal Flat Rate Envelope * FB - Medium Flat Rate Box/Large Flat Rate Bag * FE - Flat Rate Envelope * FP - Padded Flat Rate Envelope * FS - Small Flat Rate Box * LC - USPS Connect® Local Single Piece * LF - USPS Connect® Local Flat Rate Box * LL - USPS Connect® Local Large Flat Rate Bag * LO - USPS Connect® Local Oversized * LS - USPS Connect® Local Small Flat Rate Bag * NN - Non-Presorted Nonprofit * NP - Non-Presorted * O1 - Full Tray Box * O2 - Half Tray Box * O3 - EMM Tray Box * O4 - Flat Tub Tray Box * O5 - Surface Transported Pallet * O6 - Full Pallet Box * O7 - Half Pallet Box * OS - Oversized * PN - Presorted Nonprofit * P5 - Cubic Soft Pack Tier 1 * P6 - Cubic Soft Pack Tier 2 * P7 - Cubic Soft Pack Tier 3 * P8 - Cubic Soft Pack Tier 4 * P9 - Cubic Soft Pack Tier 5 * Q6 - Cubic Soft Pack Tier 6 * Q7 - Cubic Soft Pack Tier 7 * Q8 - Cubic Soft Pack Tier 8 * Q9 - Cubic Soft Pack Tier 9 * Q0 - Cubic Soft Pack Tier 10 * PA - Priority Mail Express Single Piece * PL - Large Flat Rate Box * PM - Large Flat Rate Box APO/FPO/DPO * PR - Presorted * SB - Small Flat Rate Bag * SN - SCF Dimensional Nonrectangular * SP - Single Piece * SR - SCF Dimensional Rectangular

const (
	BA  BaseRatesQueryRateIndicator = "BA"
	BB  BaseRatesQueryRateIndicator = "BB"
	BM  BaseRatesQueryRateIndicator = "BM"
	C1  BaseRatesQueryRateIndicator = "C1"
	C2  BaseRatesQueryRateIndicator = "C2"
	C3  BaseRatesQueryRateIndicator = "C3"
	C4  BaseRatesQueryRateIndicator = "C4"
	C5  BaseRatesQueryRateIndicator = "C5"
	CM  BaseRatesQueryRateIndicator = "CM"
	CP  BaseRatesQueryRateIndicator = "CP"
	DC  BaseRatesQueryRateIndicator = "DC"
	DE  BaseRatesQueryRateIndicator = "DE"
	DF  BaseRatesQueryRateIndicator = "DF"
	DN  BaseRatesQueryRateIndicator = "DN"
	DR  BaseRatesQueryRateIndicator = "DR"
	E4  BaseRatesQueryRateIndicator = "E4"
	E6  BaseRatesQueryRateIndicator = "E6"
	E7  BaseRatesQueryRateIndicator = "E7"
	FA  BaseRatesQueryRateIndicator = "FA"
	FB  BaseRatesQueryRateIndicator = "FB"
	FE  BaseRatesQueryRateIndicator = "FE"
	FP  BaseRatesQueryRateIndicator = "FP"
	FS  BaseRatesQueryRateIndicator = "FS"
	LC  BaseRatesQueryRateIndicator = "LC"
	LF  BaseRatesQueryRateIndicator = "LF"
	LL  BaseRatesQueryRateIndicator = "LL"
	LO  BaseRatesQueryRateIndicator = "LO"
	LS  BaseRatesQueryRateIndicator = "LS"
	N3D BaseRatesQueryRateIndicator = "3D"
	N3N BaseRatesQueryRateIndicator = "3N"
	N3R BaseRatesQueryRateIndicator = "3R"
	N5D BaseRatesQueryRateIndicator = "5D"
	NN  BaseRatesQueryRateIndicator = "NN"
	NP  BaseRatesQueryRateIndicator = "NP"
	O1  BaseRatesQueryRateIndicator = "O1"
	O2  BaseRatesQueryRateIndicator = "O2"
	O3  BaseRatesQueryRateIndicator = "O3"
	O4  BaseRatesQueryRateIndicator = "O4"
	O5  BaseRatesQueryRateIndicator = "O5"
	O6  BaseRatesQueryRateIndicator = "O6"
	O7  BaseRatesQueryRateIndicator = "O7"
	OS  BaseRatesQueryRateIndicator = "OS"
	P5  BaseRatesQueryRateIndicator = "P5"
	P6  BaseRatesQueryRateIndicator = "P6"
	P7  BaseRatesQueryRateIndicator = "P7"
	P8  BaseRatesQueryRateIndicator = "P8"
	P9  BaseRatesQueryRateIndicator = "P9"
	PA  BaseRatesQueryRateIndicator = "PA"
	PL  BaseRatesQueryRateIndicator = "PL"
	PM  BaseRatesQueryRateIndicator = "PM"
	PN  BaseRatesQueryRateIndicator = "PN"
	PR  BaseRatesQueryRateIndicator = "PR"
	Q0  BaseRatesQueryRateIndicator = "Q0"
	Q6  BaseRatesQueryRateIndicator = "Q6"
	Q7  BaseRatesQueryRateIndicator = "Q7"
	Q8  BaseRatesQueryRateIndicator = "Q8"
	Q9  BaseRatesQueryRateIndicator = "Q9"
	SB  BaseRatesQueryRateIndicator = "SB"
	SN  BaseRatesQueryRateIndicator = "SN"
	SP  BaseRatesQueryRateIndicator = "SP"
	SR  BaseRatesQueryRateIndicator = "SR"
)

Defines values for BaseRatesQueryRateIndicator.

type BaseRatesQueryResult

type BaseRatesQueryResult struct {
	// RateOptions The prices that match the search criteria.
	RateOptions *RateOptions `json:"rateOptions,omitempty"`
}

BaseRatesQueryResult A list of rate options based on the search criteria.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) PostBaseRatesSearch

func (c *Client) PostBaseRatesSearch(ctx context.Context, body PostBaseRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostBaseRatesSearchWithBody

func (c *Client) PostBaseRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostExtraServiceRatesSearch

func (c *Client) PostExtraServiceRatesSearch(ctx context.Context, body PostExtraServiceRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostExtraServiceRatesSearchWithBody

func (c *Client) PostExtraServiceRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLetterRatesSearch

func (c *Client) PostLetterRatesSearch(ctx context.Context, body PostLetterRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostLetterRatesSearchWithBody

func (c *Client) PostLetterRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostRateList

func (c *Client) PostRateList(ctx context.Context, body PostRateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostRateListWithBody

func (c *Client) PostRateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTotalRatesSearch

func (c *Client) PostTotalRatesSearch(ctx context.Context, body PostTotalRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostTotalRatesSearchWithBody

func (c *Client) PostTotalRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// PostRateListWithBody request with any body
	PostRateListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostRateList(ctx context.Context, body PostRateListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostBaseRatesSearchWithBody request with any body
	PostBaseRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostBaseRatesSearch(ctx context.Context, body PostBaseRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostExtraServiceRatesSearchWithBody request with any body
	PostExtraServiceRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostExtraServiceRatesSearch(ctx context.Context, body PostExtraServiceRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostLetterRatesSearchWithBody request with any body
	PostLetterRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostLetterRatesSearch(ctx context.Context, body PostLetterRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostTotalRatesSearchWithBody request with any body
	PostTotalRatesSearchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostTotalRatesSearch(ctx context.Context, body PostTotalRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) PostBaseRatesSearchWithBodyWithResponse

func (c *ClientWithResponses) PostBaseRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBaseRatesSearchResponse, error)

PostBaseRatesSearchWithBodyWithResponse request with arbitrary body returning *PostBaseRatesSearchResponse

func (*ClientWithResponses) PostBaseRatesSearchWithResponse

func (c *ClientWithResponses) PostBaseRatesSearchWithResponse(ctx context.Context, body PostBaseRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostBaseRatesSearchResponse, error)

func (*ClientWithResponses) PostExtraServiceRatesSearchWithBodyWithResponse

func (c *ClientWithResponses) PostExtraServiceRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostExtraServiceRatesSearchResponse, error)

PostExtraServiceRatesSearchWithBodyWithResponse request with arbitrary body returning *PostExtraServiceRatesSearchResponse

func (*ClientWithResponses) PostExtraServiceRatesSearchWithResponse

func (c *ClientWithResponses) PostExtraServiceRatesSearchWithResponse(ctx context.Context, body PostExtraServiceRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostExtraServiceRatesSearchResponse, error)

func (*ClientWithResponses) PostLetterRatesSearchWithBodyWithResponse

func (c *ClientWithResponses) PostLetterRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLetterRatesSearchResponse, error)

PostLetterRatesSearchWithBodyWithResponse request with arbitrary body returning *PostLetterRatesSearchResponse

func (*ClientWithResponses) PostLetterRatesSearchWithResponse

func (c *ClientWithResponses) PostLetterRatesSearchWithResponse(ctx context.Context, body PostLetterRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLetterRatesSearchResponse, error)

func (*ClientWithResponses) PostRateListWithBodyWithResponse

func (c *ClientWithResponses) PostRateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRateListResponse, error)

PostRateListWithBodyWithResponse request with arbitrary body returning *PostRateListResponse

func (*ClientWithResponses) PostRateListWithResponse

func (c *ClientWithResponses) PostRateListWithResponse(ctx context.Context, body PostRateListJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRateListResponse, error)

func (*ClientWithResponses) PostTotalRatesSearchWithBodyWithResponse

func (c *ClientWithResponses) PostTotalRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTotalRatesSearchResponse, error)

PostTotalRatesSearchWithBodyWithResponse request with arbitrary body returning *PostTotalRatesSearchResponse

func (*ClientWithResponses) PostTotalRatesSearchWithResponse

func (c *ClientWithResponses) PostTotalRatesSearchWithResponse(ctx context.Context, body PostTotalRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTotalRatesSearchResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostRateListWithBodyWithResponse request with any body
	PostRateListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostRateListResponse, error)

	PostRateListWithResponse(ctx context.Context, body PostRateListJSONRequestBody, reqEditors ...RequestEditorFn) (*PostRateListResponse, error)

	// PostBaseRatesSearchWithBodyWithResponse request with any body
	PostBaseRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostBaseRatesSearchResponse, error)

	PostBaseRatesSearchWithResponse(ctx context.Context, body PostBaseRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostBaseRatesSearchResponse, error)

	// PostExtraServiceRatesSearchWithBodyWithResponse request with any body
	PostExtraServiceRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostExtraServiceRatesSearchResponse, error)

	PostExtraServiceRatesSearchWithResponse(ctx context.Context, body PostExtraServiceRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostExtraServiceRatesSearchResponse, error)

	// PostLetterRatesSearchWithBodyWithResponse request with any body
	PostLetterRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLetterRatesSearchResponse, error)

	PostLetterRatesSearchWithResponse(ctx context.Context, body PostLetterRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLetterRatesSearchResponse, error)

	// PostTotalRatesSearchWithBodyWithResponse request with any body
	PostTotalRatesSearchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTotalRatesSearchResponse, error)

	PostTotalRatesSearchWithResponse(ctx context.Context, body PostTotalRatesSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTotalRatesSearchResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type DestinationZIPCode

type DestinationZIPCode = string

DestinationZIPCode The destination ZIP code for the package.

type ErrorMessage

type ErrorMessage struct {
	// ApiVersion The version of the API that was used and that raised the error.
	ApiVersion *string `json:"apiVersion,omitempty"`

	// Error The high-level error that has occurred as indicated by the status code.
	Error                *ErrorMessage_Error    `json:"error,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage Standard error message response.

func (ErrorMessage) Get

func (a ErrorMessage) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage. Returns the specified element and whether it was found

func (ErrorMessage) MarshalJSON

func (a ErrorMessage) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage to handle AdditionalProperties

func (*ErrorMessage) Set

func (a *ErrorMessage) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage

func (*ErrorMessage) UnmarshalJSON

func (a *ErrorMessage) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage to handle AdditionalProperties

type ErrorMessage_Error

type ErrorMessage_Error struct {
	// Code The error status code that has been returned in response to the request.
	Code *string `json:"code,omitempty"`

	// Errors Additional information regarding the error that was received.
	Errors *[]ErrorMessage_Error_Errors_Item `json:"errors,omitempty"`

	// Message A human-readable message describing the error.
	Message              *string                `json:"message,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error The high-level error that has occurred as indicated by the status code.

func (ErrorMessage_Error) Get

func (a ErrorMessage_Error) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error. Returns the specified element and whether it was found

func (ErrorMessage_Error) MarshalJSON

func (a ErrorMessage_Error) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties

func (*ErrorMessage_Error) Set

func (a *ErrorMessage_Error) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error

func (*ErrorMessage_Error) UnmarshalJSON

func (a *ErrorMessage_Error) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties

type ErrorMessage_Error_Errors_Item

type ErrorMessage_Error_Errors_Item struct {
	// Code An internal subordinate code used for error diagnosis.
	Code *string `json:"code,omitempty"`

	// Detail A human-readable description of the error that occurred.
	Detail *string `json:"detail,omitempty"`

	// Source The element that is suspected of originating the error.  Helps to pinpoint the problem.
	Source *ErrorMessage_Error_Errors_Source `json:"source,omitempty"`

	// Status The status code response returned to the client.
	Status *string `json:"status,omitempty"`

	// Title A human-readable title that identifies the error.
	Title                *string                `json:"title,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error_Errors_Item defines model for ErrorMessage.Error.Errors.Item.

func (ErrorMessage_Error_Errors_Item) Get

func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error_Errors_Item. Returns the specified element and whether it was found

func (ErrorMessage_Error_Errors_Item) MarshalJSON

func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties

func (*ErrorMessage_Error_Errors_Item) Set

func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error_Errors_Item

func (*ErrorMessage_Error_Errors_Item) UnmarshalJSON

func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties

type ErrorMessage_Error_Errors_Source

type ErrorMessage_Error_Errors_Source struct {
	// Example An example of a valid value for the input parameter.
	Example *string `json:"example,omitempty"`

	// Parameter The input in the request which caused an error.
	Parameter            *string                `json:"parameter,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ErrorMessage_Error_Errors_Source The element that is suspected of originating the error. Helps to pinpoint the problem.

func (ErrorMessage_Error_Errors_Source) Get

func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ErrorMessage_Error_Errors_Source. Returns the specified element and whether it was found

func (ErrorMessage_Error_Errors_Source) MarshalJSON

func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)

Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties

func (*ErrorMessage_Error_Errors_Source) Set

func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})

Setter for additional properties for ErrorMessage_Error_Errors_Source

func (*ErrorMessage_Error_Errors_Source) UnmarshalJSON

func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error

Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties

type ExtraService

type ExtraService int

ExtraService Extra Service Code requested. * 415 - USPS Label Delivery * 480 - Tracking Plus 6 Months * 481 - Tracking Plus 1 Year * 482 - Tracking Plus 3 Years * 483 - Tracking Plus 5 Years * 484 - Tracking Plus 7 Years * 485 - Tracking Plus 10 Years * 486 - Tracking Plus Signature 3 Years * 487 - Tracking Plus Signature 5 Years * 488 - Tracking Plus Signature 7 Years * 489 - Tracking Plus Signature 10 Years * 498 - PO Box Locker – Stocking Fee (NSA Only) * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only) * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only) * 502 - PO Box Locker – Local Delivery Fee (NSA Only) * 810 - HAZMAT Air Eligible Ethanol Package * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package * 812 - HAZMAT Class 3 – Flammable Liquid Package * 813 - HAZMAT Class 7 - Radioactive Materials Package * 814 - HAZMAT Class 8 - Corrosive Materials Package * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package * 818 - HAZMAT Class 9 - Lithium batteries, marked package * 819 - HAZMAT Class 9 - Dry Ice Package * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package * 821 - HAZMAT Class 9 - Magnetized Materials Package * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package * 823 - HAZMAT Division 5.1 - Oxidizers Package * 824 - HAZMAT Division 5.2 - Organic Peroxides Package * 825 - HAZMAT Division 6.1 – Toxic Materials Package * 826 - HAZMAT Division 6.2 – Infectious Substances Package * 827 - HAZMAT Excepted Quantity Provision Package * 828 - HAZMAT Ground Only * 829 - HAZMAT ID8000 Consumer Commodity Package * 830 - HAZMAT Lighters Package * 831 - HAZMAT LTD QTY Ground Package * 832 - HAZMAT Small Quantity Provision Package * 853 - Perishable Material * 856 - Live Animals Transportation Fee * 857 - Hazardous Material * 858 - Cremated Remains * 910 - Certified Mail * 911 - Certified Mail Restricted Delivery * 912 - Certified Mail Adult Signature Required * 913 - Certified Mail Adult Signature Restricted Delivery * 915 - Collect on Delivery (COD) * 917 - COD Restricted Delivery * 920 - USPS Tracking * 921 - Signature Confirmation * 922 - Adult Signature Required 21 or Over * 923 - Adult Signature Restricted Delivery 21 or Over * 924 - Signature Confirmation Restricted Delivery * 925 - Priority Mail Express Merchandise Insurance * 930 - Insurance <= $500 * 931 - Insurance > $500 * 934 - Insurance Restricted Delivery * 940 - Registered Mail * 941 - Registered Mail Restricted Delivery * 955 - Return Receipt * 957 - Return Receipt Electronic * 972 - Live Animal and Perishable Handling Fee * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only) * 984 - Parcel Locker Delivery * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only) * 991 - Sunday Delivery

<b>Note:</b> Entering a single extra service will be removed in the next major revision.

const (
	ExtraServiceN415 ExtraService = 415
	ExtraServiceN480 ExtraService = 480
	ExtraServiceN481 ExtraService = 481
	ExtraServiceN482 ExtraService = 482
	ExtraServiceN483 ExtraService = 483
	ExtraServiceN484 ExtraService = 484
	ExtraServiceN485 ExtraService = 485
	ExtraServiceN486 ExtraService = 486
	ExtraServiceN487 ExtraService = 487
	ExtraServiceN488 ExtraService = 488
	ExtraServiceN489 ExtraService = 489
	ExtraServiceN498 ExtraService = 498
	ExtraServiceN500 ExtraService = 500
	ExtraServiceN501 ExtraService = 501
	ExtraServiceN502 ExtraService = 502
	ExtraServiceN810 ExtraService = 810
	ExtraServiceN811 ExtraService = 811
	ExtraServiceN812 ExtraService = 812
	ExtraServiceN813 ExtraService = 813
	ExtraServiceN814 ExtraService = 814
	ExtraServiceN815 ExtraService = 815
	ExtraServiceN816 ExtraService = 816
	ExtraServiceN817 ExtraService = 817
	ExtraServiceN818 ExtraService = 818
	ExtraServiceN819 ExtraService = 819
	ExtraServiceN820 ExtraService = 820
	ExtraServiceN821 ExtraService = 821
	ExtraServiceN822 ExtraService = 822
	ExtraServiceN823 ExtraService = 823
	ExtraServiceN824 ExtraService = 824
	ExtraServiceN825 ExtraService = 825
	ExtraServiceN826 ExtraService = 826
	ExtraServiceN827 ExtraService = 827
	ExtraServiceN828 ExtraService = 828
	ExtraServiceN829 ExtraService = 829
	ExtraServiceN830 ExtraService = 830
	ExtraServiceN831 ExtraService = 831
	ExtraServiceN832 ExtraService = 832
	ExtraServiceN853 ExtraService = 853
	ExtraServiceN856 ExtraService = 856
	ExtraServiceN857 ExtraService = 857
	ExtraServiceN858 ExtraService = 858
	ExtraServiceN910 ExtraService = 910
	ExtraServiceN911 ExtraService = 911
	ExtraServiceN912 ExtraService = 912
	ExtraServiceN913 ExtraService = 913
	ExtraServiceN915 ExtraService = 915
	ExtraServiceN917 ExtraService = 917
	ExtraServiceN920 ExtraService = 920
	ExtraServiceN921 ExtraService = 921
	ExtraServiceN922 ExtraService = 922
	ExtraServiceN923 ExtraService = 923
	ExtraServiceN924 ExtraService = 924
	ExtraServiceN925 ExtraService = 925
	ExtraServiceN930 ExtraService = 930
	ExtraServiceN931 ExtraService = 931
	ExtraServiceN934 ExtraService = 934
	ExtraServiceN940 ExtraService = 940
	ExtraServiceN941 ExtraService = 941
	ExtraServiceN955 ExtraService = 955
	ExtraServiceN957 ExtraService = 957
	ExtraServiceN972 ExtraService = 972
	ExtraServiceN981 ExtraService = 981
	ExtraServiceN984 ExtraService = 984
	ExtraServiceN986 ExtraService = 986
	ExtraServiceN991 ExtraService = 991
)

Defines values for ExtraService.

type ExtraServiceRateDetails

type ExtraServiceRateDetails = []struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// ExtraService Number associated with the extra service
	ExtraService *string `json:"extraService,omitempty"`

	// Name Name of the extra service.
	Name *string `json:"name,omitempty"`

	// Price The postage rate.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price applied (Retail, Commercial, Contract, NSA (deprecated)).
	PriceType *ExtraServiceRateDetailsPriceType `json:"priceType,omitempty"`

	// Warnings A list of warnings associated with the rate calculation.
	Warnings *WarningsList `json:"warnings,omitempty"`
}

ExtraServiceRateDetails The extra service rate details that match the search criteria.

type ExtraServiceRateDetailsPriceType

type ExtraServiceRateDetailsPriceType string

ExtraServiceRateDetailsPriceType The type of price applied (Retail, Commercial, Contract, NSA (deprecated)).

const (
	ExtraServiceRateDetailsPriceTypeCOMMERCIAL ExtraServiceRateDetailsPriceType = "COMMERCIAL"
	ExtraServiceRateDetailsPriceTypeCONTRACT   ExtraServiceRateDetailsPriceType = "CONTRACT"
	ExtraServiceRateDetailsPriceTypeNSA        ExtraServiceRateDetailsPriceType = "NSA"
	ExtraServiceRateDetailsPriceTypeRETAIL     ExtraServiceRateDetailsPriceType = "RETAIL"
)

Defines values for ExtraServiceRateDetailsPriceType.

type ExtraServiceRateQuery

type ExtraServiceRateQuery struct {
	// AccountNumber The Enterprise Payment Account, Permit number, PC Postage meter number, or Mailer ID associated with a contract.
	AccountNumber *string `json:"accountNumber,omitempty"`

	// AccountType The type of payment account linked to a contract rate.
	//
	// Note:
	// - `METER` pricing is only available to PC Postage providers.
	// - `MID` pricing is only available for return mail classes.
	AccountType *ExtraServiceRateQueryAccountType `json:"accountType,omitempty"`

	// DestinationZIPCode The destination ZIP code for the package.
	DestinationZIPCode *string `json:"destinationZIPCode,omitempty"`

	// ExtraServices Extra Service Codes requested.
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 498 - PO Box Locker – Stocking Fee (NSA Only)
	// * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only)
	// * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only)
	// * 502 - PO Box Locker – Local Delivery Fee (NSA Only)
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 853 - Perishable Material
	// * 856 - Live Animals Transportation Fee
	// * 857 - Hazardous Material
	// * 858 - Cremated Remains
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 915 - Collect on Delivery (COD)
	// * 917 - COD Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 940 - Registered Mail
	// * 941 - Registered Mail Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 972 - Live Animal and Perishable Handling Fee
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 984 - Parcel Locker Delivery
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// <b>Note:</b> Entering a single extra service will be removed in the next major revision.
	ExtraServices *ExtraServices `json:"extraServices,omitempty"`

	// ItemValue The value of the item. Required for Insurance and Collect On Delivery.  The price for Insurance, Registered Mail, and Collect On Delivery extra services will vary based on this value.
	ItemValue *float64 `json:"itemValue,omitempty"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	MailClass MailClass `json:"mailClass"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// OriginZIPCode The originating ZIP code for the package.
	OriginZIPCode *string `json:"originZIPCode,omitempty"`

	// PriceType The type of price applied.
	//
	// Notes:
	//  * The `priceType` of `NSA` is deprecated.  `CONTRACT` should be used for non-published pricing.
	//  * If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
	//  * When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing.  If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
	PriceType PriceType `json:"priceType"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
	Weight *WeightPounds `json:"weight,omitempty"`
}

ExtraServiceRateQuery Search parameters for an extra service price.

type ExtraServiceRateQueryAccountType

type ExtraServiceRateQueryAccountType string

ExtraServiceRateQueryAccountType The type of payment account linked to a contract rate.

Note: - `METER` pricing is only available to PC Postage providers. - `MID` pricing is only available for return mail classes.

const (
	ExtraServiceRateQueryAccountTypeEPS    ExtraServiceRateQueryAccountType = "EPS"
	ExtraServiceRateQueryAccountTypeMETER  ExtraServiceRateQueryAccountType = "METER"
	ExtraServiceRateQueryAccountTypeMID    ExtraServiceRateQueryAccountType = "MID"
	ExtraServiceRateQueryAccountTypePERMIT ExtraServiceRateQueryAccountType = "PERMIT"
)

Defines values for ExtraServiceRateQueryAccountType.

type ExtraServiceRateQueryWithSingleExtraService

type ExtraServiceRateQueryWithSingleExtraService struct {
	// AccountNumber The Enterprise Payment Account, Permit number or PC Postage meter number associated with a contract.
	AccountNumber *string `json:"accountNumber,omitempty"`

	// AccountType The type of payment account linked to a contract rate.
	AccountType *ExtraServiceRateQueryWithSingleExtraServiceAccountType `json:"accountType,omitempty"`

	// DestinationZIPCode The destination ZIP code for the package.
	DestinationZIPCode *string `json:"destinationZIPCode,omitempty"`

	// ExtraServices Extra Service Code requested.
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 498 - PO Box Locker – Stocking Fee (NSA Only)
	// * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only)
	// * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only)
	// * 502 - PO Box Locker – Local Delivery Fee (NSA Only)
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 853 - Perishable Material
	// * 856 - Live Animals Transportation Fee
	// * 857 - Hazardous Material
	// * 858 - Cremated Remains
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 915 - Collect on Delivery (COD)
	// * 917 - COD Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 940 - Registered Mail
	// * 941 - Registered Mail Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 972 - Live Animal and Perishable Handling Fee
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 984 - Parcel Locker Delivery
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	//
	// <b>Note:</b> Entering a single extra service will be removed in the next major revision.
	ExtraServices *ExtraService `json:"extraServices,omitempty"`

	// ItemValue The value of the item. Required for Insurance and Collect On Delivery.  The price for Insurance, Registered Mail, and Collect On Delivery extra services will vary based on this value.
	ItemValue *float64 `json:"itemValue,omitempty"`

	// MailClass The mail service requested.
	//
	// Note:
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`.
	// - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	MailClass MailClass `json:"mailClass"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// OriginZIPCode The originating ZIP code for the package.
	OriginZIPCode *string `json:"originZIPCode,omitempty"`

	// PriceType The type of price applied.
	//
	// Notes:
	//  * The `priceType` of `NSA` is deprecated.  `CONTRACT` should be used for non-published pricing.
	//  * If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
	//  * When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing.  If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
	PriceType PriceType `json:"priceType"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
	Weight *WeightPounds `json:"weight,omitempty"`
}

ExtraServiceRateQueryWithSingleExtraService Search parameters for an extra service price.

type ExtraServiceRateQueryWithSingleExtraServiceAccountType

type ExtraServiceRateQueryWithSingleExtraServiceAccountType string

ExtraServiceRateQueryWithSingleExtraServiceAccountType The type of payment account linked to a contract rate.

const (
	ExtraServiceRateQueryWithSingleExtraServiceAccountTypeEPS    ExtraServiceRateQueryWithSingleExtraServiceAccountType = "EPS"
	ExtraServiceRateQueryWithSingleExtraServiceAccountTypeMETER  ExtraServiceRateQueryWithSingleExtraServiceAccountType = "METER"
	ExtraServiceRateQueryWithSingleExtraServiceAccountTypePERMIT ExtraServiceRateQueryWithSingleExtraServiceAccountType = "PERMIT"
)

Defines values for ExtraServiceRateQueryWithSingleExtraServiceAccountType.

type ExtraServices

type ExtraServices = []ExtraService

ExtraServices Extra Service Codes requested. * 415 - USPS Label Delivery * 480 - Tracking Plus 6 Months * 481 - Tracking Plus 1 Year * 482 - Tracking Plus 3 Years * 483 - Tracking Plus 5 Years * 484 - Tracking Plus 7 Years * 485 - Tracking Plus 10 Years * 486 - Tracking Plus Signature 3 Years * 487 - Tracking Plus Signature 5 Years * 488 - Tracking Plus Signature 7 Years * 489 - Tracking Plus Signature 10 Years * 498 - PO Box Locker – Stocking Fee (NSA Only) * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only) * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only) * 502 - PO Box Locker – Local Delivery Fee (NSA Only) * 810 - HAZMAT Air Eligible Ethanol Package * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package * 812 - HAZMAT Class 3 – Flammable Liquid Package * 813 - HAZMAT Class 7 - Radioactive Materials Package * 814 - HAZMAT Class 8 - Corrosive Materials Package * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package * 818 - HAZMAT Class 9 - Lithium batteries, marked package * 819 - HAZMAT Class 9 - Dry Ice Package * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package * 821 - HAZMAT Class 9 - Magnetized Materials Package * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package * 823 - HAZMAT Division 5.1 - Oxidizers Package * 824 - HAZMAT Division 5.2 - Organic Peroxides Package * 825 - HAZMAT Division 6.1 – Toxic Materials Package * 826 - HAZMAT Division 6.2 – Infectious Substances Package * 827 - HAZMAT Excepted Quantity Provision Package * 828 - HAZMAT Ground Only * 829 - HAZMAT ID8000 Consumer Commodity Package * 830 - HAZMAT Lighters Package * 831 - HAZMAT LTD QTY Ground Package * 832 - HAZMAT Small Quantity Provision Package * 853 - Perishable Material * 856 - Live Animals Transportation Fee * 857 - Hazardous Material * 858 - Cremated Remains * 910 - Certified Mail * 911 - Certified Mail Restricted Delivery * 912 - Certified Mail Adult Signature Required * 913 - Certified Mail Adult Signature Restricted Delivery * 915 - Collect on Delivery (COD) * 917 - COD Restricted Delivery * 920 - USPS Tracking * 921 - Signature Confirmation * 922 - Adult Signature Required 21 or Over * 923 - Adult Signature Restricted Delivery 21 or Over * 924 - Signature Confirmation Restricted Delivery * 925 - Priority Mail Express Merchandise Insurance * 930 - Insurance <= $500 * 931 - Insurance > $500 * 934 - Insurance Restricted Delivery * 940 - Registered Mail * 941 - Registered Mail Restricted Delivery * 955 - Return Receipt * 957 - Return Receipt Electronic * 972 - Live Animal and Perishable Handling Fee * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only) * 984 - Parcel Locker Delivery * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only) * 991 - Sunday Delivery

<b>Note:</b> Entering a single extra service will be removed in the next major revision.

type Height

type Height = float64

Height This is the package height in inches.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Length

type Length = float64

Length This is the package length in inches. The maximum dimension is always length.

type LetterRateDetail

type LetterRateDetail struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// Description The description of the price.
	Description *string `json:"description,omitempty"`

	// EndDate Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
	EndDate *string `json:"endDate,omitempty"`

	// ExtraServices The extra service rate details that match the search criteria.
	ExtraServices *ExtraServiceRateDetails `json:"extraServices,omitempty"`

	// Fees The fees associated with the package.
	Fees *[]struct {
		// SKU The pricing SKU for the fee.
		SKU *string `json:"SKU,omitempty"`

		// Name The name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float64 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// MailClass The mail class of the price.
	MailClass *LetterRateDetailMailClass `json:"mailClass,omitempty"`

	// Price The postage price.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price type applied (Retail).
	PriceType *LetterRateDetailPriceType `json:"priceType,omitempty"`

	// StartDate Effective start date of the rate.
	StartDate *openapi_types.Date `json:"startDate,omitempty"`

	// Weight The calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate.
	Weight               *float64               `json:"weight,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

LetterRateDetail Informative details about the price.

func (LetterRateDetail) Get

func (a LetterRateDetail) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for LetterRateDetail. Returns the specified element and whether it was found

func (LetterRateDetail) MarshalJSON

func (a LetterRateDetail) MarshalJSON() ([]byte, error)

Override default JSON handling for LetterRateDetail to handle AdditionalProperties

func (*LetterRateDetail) Set

func (a *LetterRateDetail) Set(fieldName string, value interface{})

Setter for additional properties for LetterRateDetail

func (*LetterRateDetail) UnmarshalJSON

func (a *LetterRateDetail) UnmarshalJSON(b []byte) error

Override default JSON handling for LetterRateDetail to handle AdditionalProperties

type LetterRateDetailMailClass

type LetterRateDetailMailClass string

LetterRateDetailMailClass The mail class of the price.

const (
	LetterRateDetailMailClassFIRSTCLASSMAIL LetterRateDetailMailClass = "FIRST-CLASS_MAIL"
)

Defines values for LetterRateDetailMailClass.

type LetterRateDetailPriceType

type LetterRateDetailPriceType string

LetterRateDetailPriceType The type of price type applied (Retail).

const (
	LetterRateDetailPriceTypeRETAIL LetterRateDetailPriceType = "RETAIL"
)

Defines values for LetterRateDetailPriceType.

type LetterRatesOption

type LetterRatesOption struct {
	// Rates List of letter rate details associated with the shipment.
	Rates *[]LettersRateDetails `json:"rates,omitempty"`

	// TotalBasePrice The total price, including the rate and fees.
	TotalBasePrice *float64 `json:"totalBasePrice,omitempty"`
}

LetterRatesOption The prices that match the search criteria.

type LetterRatesQuery

type LetterRatesQuery struct {
	// ExtraServices Extra Service Code requested.
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 930 - Insurance <=$500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 940 - Registered Mail
	// * 941 - Registered Mail Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 985 - Hold for Pickup
	ExtraServices *[]LetterRatesQueryExtraServices `json:"extraServices,omitempty"`

	// Height The letter/flat/card height measured in inches.  The height is the dimension perpendicular to the length.
	Height float64 `json:"height"`

	// ItemValue The value of the item. Required for Insurance.  The price for Insurance and Registered Mail extra services will vary based on this value.
	ItemValue *float64 `json:"itemValue,omitempty"`

	// Length The letter/flat/card length measured in inches.  For  `LETTERS` and `CARDS` the length is the dimension parallel to the delivery address as read. For  `FLATS` the length is the longest dimension.
	Length float64 `json:"length"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// NonMachinableIndicators Set of boolean indicators used to determine whether a letter/flat/card qualifies as nonmachinable.
	NonMachinableIndicators *struct {
		// HasClosureDevices Does the letter/flat/card have clasps, strings, buttons, or similar closure devices.
		HasClosureDevices *bool `json:"hasClosureDevices,omitempty"`

		// HasLooseItems Does the letter/flat/card contain items such as pens, pencils, keys, or coins that cause the thickness of the mailpiece to be uneven; or loose keys or coins or similar objects not affixed to the contents within the mailpiece. Loose items may cause a letter to be nonmailable when mailed in paper envelopes; (see [DMM 601.3.3](https://pe.usps.com/text/dmm300/601.htm#ep1196660)).
		HasLooseItems *bool `json:"hasLooseItems,omitempty"`

		// IsBooklet Is the letter/flat/card a booklet that is not prepared according to [DMM 201.3.16](https://pe.usps.com/text/dmm300/201.htm#ep1092751).
		IsBooklet *bool `json:"isBooklet,omitempty"`

		// IsPolybagged Is the letter/flat/card polybagged, polywrapped, enclosed in any plastic material, or has an exterior surface made of a material that is not paper. Windows in envelopes made of paper do not make mailpieces nonmachinable. Attachments allowable under applicable eligibility standards do not make mailpieces nonmachinable.
		IsPolybagged *bool `json:"isPolybagged,omitempty"`

		// IsRigid Is the letter/flat/card too rigid (does not bend easily when subjected to a transport belt tension of 40 pounds around an 11-inch diameter turn).
		IsRigid *bool `json:"isRigid,omitempty"`

		// IsSelfMailer Is the letter/flat/card a self-mailer that is not prepared according to [DMM 201.3.14](https://pe.usps.com/text/dmm300/201.htm#ep1079302).
		IsSelfMailer *bool `json:"isSelfMailer,omitempty"`
	} `json:"nonMachinableIndicators,omitempty"`

	// ProcessingCategory * LETTERS
	//
	//   To be eligible for mailing at the price for letters, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.
	//
	//   For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).
	//
	// * FLATS
	//
	//   The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:
	//
	//     * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
	//     * Be no more than 12 inches high x 15 inches long x ¾ inch thick.
	//
	//   For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).
	//
	// * CARDS
	//
	//   To be eligible for mailing at the price for postcards, a piece must be:
	//     * Rectangular
	//     * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
	//     * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.
	//
	//   For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
	ProcessingCategory LetterRatesQueryProcessingCategory `json:"processingCategory"`

	// Thickness The letter/flat/card thickness measured in inches. The minimum dimension is always the thickness.
	Thickness float64 `json:"thickness"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in ounces.
	Weight WeightOunces `json:"weight"`
}

LetterRatesQuery Letter rate ingredients for calculating base prices.

type LetterRatesQueryExtraServices

type LetterRatesQueryExtraServices int

LetterRatesQueryExtraServices defines model for LetterRatesQuery.ExtraServices.

const (
	LetterRatesQueryExtraServicesN910 LetterRatesQueryExtraServices = 910
	LetterRatesQueryExtraServicesN911 LetterRatesQueryExtraServices = 911
	LetterRatesQueryExtraServicesN930 LetterRatesQueryExtraServices = 930
	LetterRatesQueryExtraServicesN931 LetterRatesQueryExtraServices = 931
	LetterRatesQueryExtraServicesN934 LetterRatesQueryExtraServices = 934
	LetterRatesQueryExtraServicesN940 LetterRatesQueryExtraServices = 940
	LetterRatesQueryExtraServicesN941 LetterRatesQueryExtraServices = 941
	LetterRatesQueryExtraServicesN955 LetterRatesQueryExtraServices = 955
	LetterRatesQueryExtraServicesN957 LetterRatesQueryExtraServices = 957
	LetterRatesQueryExtraServicesN985 LetterRatesQueryExtraServices = 985
)

Defines values for LetterRatesQueryExtraServices.

type LetterRatesQueryProcessingCategory

type LetterRatesQueryProcessingCategory string

LetterRatesQueryProcessingCategory * LETTERS

To be eligible for mailing at the price for letters, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 6-1/8 inches high x 11-1/2 inches long x 1/4 inch thick.

For additional information on letters, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Letters).

* FLATS

The Postal Service uses the word "flats" to refer to large envelopes, newsletters, and magazines. The words large envelopes and flats are used interchangeably. Whatever you call them, flats must:

  * Have one dimension that is greater than 6-1/8 inches high OR 11-½ inches long OR ¼ inch thick.
  * Be no more than 12 inches high x 15 inches long x ¾ inch thick.

For additional information on flats, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Flats).

* CARDS

To be eligible for mailing at the price for postcards, a piece must be:
  * Rectangular
  * At least 3-1/2 inches high x 5 inches long x 0.007 inch thick.
  * No more than 4-1/4 inches high x 6 inches long x 0.016 inch thick.

For additional information on postcards, please refer to the [Postal Explorer](https://pe.usps.com/businessmail101?ViewName=Cards).
const (
	LetterRatesQueryProcessingCategoryCARDS   LetterRatesQueryProcessingCategory = "CARDS"
	LetterRatesQueryProcessingCategoryFLATS   LetterRatesQueryProcessingCategory = "FLATS"
	LetterRatesQueryProcessingCategoryLETTERS LetterRatesQueryProcessingCategory = "LETTERS"
)

Defines values for LetterRatesQueryProcessingCategory.

type LettersRateDetails

type LettersRateDetails struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// Description The description of the price.
	Description *string `json:"description,omitempty"`

	// EndDate Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
	EndDate *string `json:"endDate,omitempty"`

	// ExtraServices The extra service rate details that match the search criteria.
	ExtraServices *ExtraServiceRateDetails `json:"extraServices,omitempty"`

	// Fees The fees associated with the package.
	Fees *[]struct {
		// SKU The pricing SKU for the fee.
		SKU *string `json:"SKU,omitempty"`

		// Name The name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float64 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// MailClass The mail class of the price.
	MailClass *LettersRateDetailsMailClass `json:"mailClass,omitempty"`

	// Price The postage price.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price type applied (Retail).
	PriceType *LettersRateDetailsPriceType `json:"priceType,omitempty"`

	// StartDate Effective start date of the rate.
	StartDate *openapi_types.Date `json:"startDate,omitempty"`

	// Warnings List of warnings
	Warnings *[]string `json:"warnings,omitempty"`

	// Weight The calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate.
	Weight               *float64               `json:"weight,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

LettersRateDetails defines model for LettersRateDetails.

func (LettersRateDetails) Get

func (a LettersRateDetails) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for LettersRateDetails. Returns the specified element and whether it was found

func (LettersRateDetails) MarshalJSON

func (a LettersRateDetails) MarshalJSON() ([]byte, error)

Override default JSON handling for LettersRateDetails to handle AdditionalProperties

func (*LettersRateDetails) Set

func (a *LettersRateDetails) Set(fieldName string, value interface{})

Setter for additional properties for LettersRateDetails

func (*LettersRateDetails) UnmarshalJSON

func (a *LettersRateDetails) UnmarshalJSON(b []byte) error

Override default JSON handling for LettersRateDetails to handle AdditionalProperties

type LettersRateDetailsMailClass

type LettersRateDetailsMailClass string

LettersRateDetailsMailClass The mail class of the price.

const (
	LettersRateDetailsMailClassFIRSTCLASSMAIL LettersRateDetailsMailClass = "FIRST-CLASS_MAIL"
)

Defines values for LettersRateDetailsMailClass.

type LettersRateDetailsPriceType

type LettersRateDetailsPriceType string

LettersRateDetailsPriceType The type of price type applied (Retail).

const (
	LettersRateDetailsPriceTypeRETAIL LettersRateDetailsPriceType = "RETAIL"
)

Defines values for LettersRateDetailsPriceType.

type MailClass

type MailClass string

MailClass The mail service requested.

Note: - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`. - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`. - `FIRST-CLASS_PACKAGE_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`. - `GROUND_RETURN_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE_RETURN_SERVICE`. - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used. - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service. For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).

const (
	MailClassBOUNDPRINTEDMATTER               MailClass = "BOUND_PRINTED_MATTER"
	MailClassFIRSTCLASSPACKAGERETURNSERVICE   MailClass = "FIRST-CLASS_PACKAGE_RETURN_SERVICE"
	MailClassFIRSTCLASSPACKAGESERVICE         MailClass = "FIRST-CLASS_PACKAGE_SERVICE"
	MailClassGROUNDRETURNSERVICE              MailClass = "GROUND_RETURN_SERVICE"
	MailClassLIBRARYMAIL                      MailClass = "LIBRARY_MAIL"
	MailClassMARKETINGMAILPARCELS             MailClass = "MARKETING_MAIL_PARCELS"
	MailClassMEDIAMAIL                        MailClass = "MEDIA_MAIL"
	MailClassPARCELSELECT                     MailClass = "PARCEL_SELECT"
	MailClassPARCELSELECTLIGHTWEIGHT          MailClass = "PARCEL_SELECT_LIGHTWEIGHT"
	MailClassPRIORITYMAIL                     MailClass = "PRIORITY_MAIL"
	MailClassPRIORITYMAILEXPRESS              MailClass = "PRIORITY_MAIL_EXPRESS"
	MailClassPRIORITYMAILEXPRESSRETURNSERVICE MailClass = "PRIORITY_MAIL_EXPRESS_RETURN_SERVICE"
	MailClassPRIORITYMAILRETURNSERVICE        MailClass = "PRIORITY_MAIL_RETURN_SERVICE"
	MailClassUSPSCONNECTLOCAL                 MailClass = "USPS_CONNECT_LOCAL"
	MailClassUSPSCONNECTMAIL                  MailClass = "USPS_CONNECT_MAIL"
	MailClassUSPSCONNECTREGIONAL              MailClass = "USPS_CONNECT_REGIONAL"
	MailClassUSPSGROUNDADVANTAGE              MailClass = "USPS_GROUND_ADVANTAGE"
	MailClassUSPSGROUNDADVANTAGERETURNSERVICE MailClass = "USPS_GROUND_ADVANTAGE_RETURN_SERVICE"
	MailClassUSPSRETAILGROUND                 MailClass = "USPS_RETAIL_GROUND"
)

Defines values for MailClass.

type MailClassOutboundOnly

type MailClassOutboundOnly string

MailClassOutboundOnly The mail service requested.

Note:
- A single mail class option is deprecated and will be removed in the next major revision.  This attribute will be replaced with the list of mail classes.
- `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`
- `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
- `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used
const (
	MailClassOutboundOnlyALL                      MailClassOutboundOnly = "ALL"
	MailClassOutboundOnlyBOUNDPRINTEDMATTER       MailClassOutboundOnly = "BOUND_PRINTED_MATTER"
	MailClassOutboundOnlyFIRSTCLASSPACKAGESERVICE MailClassOutboundOnly = "FIRST-CLASS_PACKAGE_SERVICE"
	MailClassOutboundOnlyLIBRARYMAIL              MailClassOutboundOnly = "LIBRARY_MAIL"
	MailClassOutboundOnlyMARKETINGMAILPARCELS     MailClassOutboundOnly = "MARKETING_MAIL_PARCELS"
	MailClassOutboundOnlyMEDIAMAIL                MailClassOutboundOnly = "MEDIA_MAIL"
	MailClassOutboundOnlyPARCELSELECT             MailClassOutboundOnly = "PARCEL_SELECT"
	MailClassOutboundOnlyPARCELSELECTLIGHTWEIGHT  MailClassOutboundOnly = "PARCEL_SELECT_LIGHTWEIGHT"
	MailClassOutboundOnlyPRIORITYMAIL             MailClassOutboundOnly = "PRIORITY_MAIL"
	MailClassOutboundOnlyPRIORITYMAILEXPRESS      MailClassOutboundOnly = "PRIORITY_MAIL_EXPRESS"
	MailClassOutboundOnlyUSPSCONNECTLOCAL         MailClassOutboundOnly = "USPS_CONNECT_LOCAL"
	MailClassOutboundOnlyUSPSCONNECTMAIL          MailClassOutboundOnly = "USPS_CONNECT_MAIL"
	MailClassOutboundOnlyUSPSCONNECTREGIONAL      MailClassOutboundOnly = "USPS_CONNECT_REGIONAL"
	MailClassOutboundOnlyUSPSGROUNDADVANTAGE      MailClassOutboundOnly = "USPS_GROUND_ADVANTAGE"
	MailClassOutboundOnlyUSPSRETAILGROUND         MailClassOutboundOnly = "USPS_RETAIL_GROUND"
)

Defines values for MailClassOutboundOnly.

type MailClassesOutboundOnly

type MailClassesOutboundOnly = []MailClassOutboundOnly

MailClassesOutboundOnly A list of mail classes.

Note: - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`. - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`. - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used. - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service. For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services). - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.

type MailingDate

type MailingDate = openapi_types.Date

MailingDate The date the package or letter/flat/card will be mailed.

The mailing date may be today plus 0 to 7 days in advance.

Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

type OriginZIPCode

type OriginZIPCode = string

OriginZIPCode The originating ZIP code for the package.

type PostBaseRatesSearchJSONRequestBody

type PostBaseRatesSearchJSONRequestBody = BaseRatesQuery

PostBaseRatesSearchJSONRequestBody defines body for PostBaseRatesSearch for application/json ContentType.

type PostBaseRatesSearchResponse

type PostBaseRatesSearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BaseRateOption
	XML200       *BaseRateOption
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON404      *ErrorMessage
	XML404       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostBaseRatesSearchResponse

func ParsePostBaseRatesSearchResponse(rsp *http.Response) (*PostBaseRatesSearchResponse, error)

ParsePostBaseRatesSearchResponse parses an HTTP response from a PostBaseRatesSearchWithResponse call

func (PostBaseRatesSearchResponse) Status

Status returns HTTPResponse.Status

func (PostBaseRatesSearchResponse) StatusCode

func (r PostBaseRatesSearchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostExtraServiceRatesSearchJSONBody

type PostExtraServiceRatesSearchJSONBody struct {
	// contains filtered or unexported fields
}

PostExtraServiceRatesSearchJSONBody defines parameters for PostExtraServiceRatesSearch.

type PostExtraServiceRatesSearchJSONRequestBody

type PostExtraServiceRatesSearchJSONRequestBody PostExtraServiceRatesSearchJSONBody

PostExtraServiceRatesSearchJSONRequestBody defines body for PostExtraServiceRatesSearch for application/json ContentType.

type PostExtraServiceRatesSearchResponse

type PostExtraServiceRatesSearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ExtraServiceRateDetails
	XML200       *ExtraServiceRateDetails
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON404      *ErrorMessage
	XML404       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostExtraServiceRatesSearchResponse

func ParsePostExtraServiceRatesSearchResponse(rsp *http.Response) (*PostExtraServiceRatesSearchResponse, error)

ParsePostExtraServiceRatesSearchResponse parses an HTTP response from a PostExtraServiceRatesSearchWithResponse call

func (PostExtraServiceRatesSearchResponse) Status

Status returns HTTPResponse.Status

func (PostExtraServiceRatesSearchResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostLetterRatesSearchJSONRequestBody

type PostLetterRatesSearchJSONRequestBody = LetterRatesQuery

PostLetterRatesSearchJSONRequestBody defines body for PostLetterRatesSearch for application/json ContentType.

type PostLetterRatesSearchResponse

type PostLetterRatesSearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LetterRatesOption
	XML200       *LetterRatesOption
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON404      *ErrorMessage
	XML404       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostLetterRatesSearchResponse

func ParsePostLetterRatesSearchResponse(rsp *http.Response) (*PostLetterRatesSearchResponse, error)

ParsePostLetterRatesSearchResponse parses an HTTP response from a PostLetterRatesSearchWithResponse call

func (PostLetterRatesSearchResponse) Status

Status returns HTTPResponse.Status

func (PostLetterRatesSearchResponse) StatusCode

func (r PostLetterRatesSearchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostRateListJSONRequestBody

type PostRateListJSONRequestBody = RateListQuery

PostRateListJSONRequestBody defines body for PostRateList for application/json ContentType.

type PostRateListResponse

type PostRateListResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BaseRatesQueryResult
	XML200       *BaseRatesQueryResult
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON404      *ErrorMessage
	XML404       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostRateListResponse

func ParsePostRateListResponse(rsp *http.Response) (*PostRateListResponse, error)

ParsePostRateListResponse parses an HTTP response from a PostRateListWithResponse call

func (PostRateListResponse) Status

func (r PostRateListResponse) Status() string

Status returns HTTPResponse.Status

func (PostRateListResponse) StatusCode

func (r PostRateListResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostTotalRatesSearchJSONRequestBody

type PostTotalRatesSearchJSONRequestBody = TotalRatesQuery

PostTotalRatesSearchJSONRequestBody defines body for PostTotalRatesSearch for application/json ContentType.

type PostTotalRatesSearchResponse

type PostTotalRatesSearchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TotalRatesQueryResult
	XML200       *TotalRatesQueryResult
	JSON400      *ErrorMessage
	XML400       *ErrorMessage
	JSON401      *ErrorMessage
	XML401       *ErrorMessage
	JSON403      *ErrorMessage
	XML403       *ErrorMessage
	JSON404      *ErrorMessage
	XML404       *ErrorMessage
	JSON429      *ErrorMessage
	XML429       *ErrorMessage
	JSON503      *ErrorMessage
	XML503       *ErrorMessage
}

func ParsePostTotalRatesSearchResponse

func ParsePostTotalRatesSearchResponse(rsp *http.Response) (*PostTotalRatesSearchResponse, error)

ParsePostTotalRatesSearchResponse parses an HTTP response from a PostTotalRatesSearchWithResponse call

func (PostTotalRatesSearchResponse) Status

Status returns HTTPResponse.Status

func (PostTotalRatesSearchResponse) StatusCode

func (r PostTotalRatesSearchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PriceType

type PriceType string

PriceType The type of price applied.

Notes:

  • The `priceType` of `NSA` is deprecated. `CONTRACT` should be used for non-published pricing.
  • If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
  • When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing. If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
const (
	PriceTypeCOMMERCIAL PriceType = "COMMERCIAL"
	PriceTypeCONTRACT   PriceType = "CONTRACT"
	PriceTypeNSA        PriceType = "NSA"
	PriceTypeRETAIL     PriceType = "RETAIL"
)

Defines values for PriceType.

type RateDetails

type RateDetails struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// Description The description of the price.
	Description *string `json:"description,omitempty"`

	// DestinationEntryFacilityType Destination Entry Facility type for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	//
	// * `NONE` - None, translates to PTR code `N`
	// * `AREA_DISTRIBUTION_CENTER` - Area Distribution Center, translates to PTR code `A`
	// * `AUXILIARY_SERVICE_FACILITY` - Auxiliary Service Facility, translates to PTR code `F`
	// * `DESTINATION_DELIVERY_UNIT` - Destination Delivery Unit, translates to PTR code `D`
	// * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Destination Network Distribution Center, translates to PTR code `B`
	// * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Destination Sectional Center Facility, translates to PTR code `S`
	// * `DESTINATION_SERVICE_HUB` - Destination Service Hub, translates to PTR code `H`
	// * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Destination Regional Processing Distribution Center, translates to PTR code `B`
	//
	// Note:
	// * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible.
	// * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
	DestinationEntryFacilityType *RateDetailsDestinationEntryFacilityType `json:"destinationEntryFacilityType,omitempty"`

	// DimWeight The calculated dimensional weight for the package based on user provided dimensions. The greater of dimWeight and weight will be used to calculated the rate.
	DimWeight *float64 `json:"dimWeight,omitempty"`

	// EndDate Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
	EndDate *string `json:"endDate,omitempty"`

	// Fees The fees associated with the package.
	Fees *[]struct {
		// SKU The pricing SKU for the fee.
		SKU *string `json:"SKU,omitempty"`

		// Name The name of the fee.
		Name *string `json:"name,omitempty"`

		// Price The price for the fee.
		Price *float64 `json:"price,omitempty"`
	} `json:"fees,omitempty"`

	// MailClass The mail class of the price.
	MailClass *string `json:"mailClass,omitempty"`

	// Price The postage price.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price applied.
	//  * Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL',  'CONTRACT' & 'NSA' (deprecated)
	//  * Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS', 'CONTRACT' & 'NSA' (deprecated)
	PriceType *RateDetailsPriceType `json:"priceType,omitempty"`

	// ProcessingCategory Processing category for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	//
	// * `CARDS` - Cards, translates to PTR code `0`
	// * `LETTERS` - Letters, translates to PTR code `1`
	// * `FLATS` - Flats, translates to PTR code `2`
	// * `MACHINABLE` - Machinable Parcel, translates to PTR code `3`
	// * `IRREGULAR` - Irregular Parcel, translates to PTR code `4`
	// * `NON_MACHINABLE` - Non-machinable parcel, translates to PTR code `5`
	// * `NONSTANDARD` - Nonstandard parcel, translates to PTR code `5`
	// * `CATALOGS` - Catalogs, translates to PTR code `C`
	// * `OPEN_AND_DISTRIBUTE` - Open and Distribute, translates to PTR code `O`
	// * `RETURNS` - Returns, translates to PTR code `R`
	// * `SOFT_PACK_MACHINABLE` - Soft Pack Machinable, translates to PTR code `S`
	// * `SOFT_PACK_NON_MACHINABLE` - Soft Package Non-machinable, translates to PTR code `T`
	//
	// Note:
	// * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
	ProcessingCategory *RateDetailsProcessingCategory `json:"processingCategory,omitempty"`

	// ProductDefinition A business friendly description for a product that can be displayed to a customer on a shipping portal
	ProductDefinition *string `json:"productDefinition,omitempty"`

	// ProductName A business friendly name for a product that can be displayed to a customer on a shipping portal
	ProductName *string `json:"productName,omitempty"`

	// RateIndicator Two-digit rate indicator code for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.
	RateIndicator *string `json:"rateIndicator,omitempty"`

	// StartDate Effective start date of the rate.
	StartDate *openapi_types.Date `json:"startDate,omitempty"`

	// Weight The calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate.
	Weight *float64 `json:"weight,omitempty"`

	// Zone Indicates the calculated zone between the provided `originZIPCode` and `destinationZIPCode` for a given `mailClass`, `mailingDate`, and `weight`.
	Zone                 *string                `json:"zone,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

RateDetails Informative details about the price.

func (RateDetails) Get

func (a RateDetails) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for RateDetails. Returns the specified element and whether it was found

func (RateDetails) MarshalJSON

func (a RateDetails) MarshalJSON() ([]byte, error)

Override default JSON handling for RateDetails to handle AdditionalProperties

func (*RateDetails) Set

func (a *RateDetails) Set(fieldName string, value interface{})

Setter for additional properties for RateDetails

func (*RateDetails) UnmarshalJSON

func (a *RateDetails) UnmarshalJSON(b []byte) error

Override default JSON handling for RateDetails to handle AdditionalProperties

type RateDetailsDestinationEntryFacilityType

type RateDetailsDestinationEntryFacilityType string

RateDetailsDestinationEntryFacilityType Destination Entry Facility type for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.

* `NONE` - None, translates to PTR code `N` * `AREA_DISTRIBUTION_CENTER` - Area Distribution Center, translates to PTR code `A` * `AUXILIARY_SERVICE_FACILITY` - Auxiliary Service Facility, translates to PTR code `F` * `DESTINATION_DELIVERY_UNIT` - Destination Delivery Unit, translates to PTR code `D` * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Destination Network Distribution Center, translates to PTR code `B` * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Destination Sectional Center Facility, translates to PTR code `S` * `DESTINATION_SERVICE_HUB` - Destination Service Hub, translates to PTR code `H` * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Destination Regional Processing Distribution Center, translates to PTR code `B`

Note: * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.

const (
	AREADISTRIBUTIONCENTER                          RateDetailsDestinationEntryFacilityType = "AREA_DISTRIBUTION_CENTER"
	AUXILIARYSERVICEFACILITY                        RateDetailsDestinationEntryFacilityType = "AUXILIARY_SERVICE_FACILITY"
	DESTINATIONDELIVERYUNIT                         RateDetailsDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT"
	DESTINATIONNETWORKDISTRIBUTIONCENTER            RateDetailsDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER"
	DESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER RateDetailsDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER"
	DESTINATIONSECTIONALCENTERFACILITY              RateDetailsDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY"
	DESTINATIONSERVICEHUB                           RateDetailsDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB"
	NONE                                            RateDetailsDestinationEntryFacilityType = "NONE"
)

Defines values for RateDetailsDestinationEntryFacilityType.

type RateDetailsPriceType

type RateDetailsPriceType string

RateDetailsPriceType The type of price applied.

  • Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL', 'CONTRACT' & 'NSA' (deprecated)
  • Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS', 'CONTRACT' & 'NSA' (deprecated)
const (
	RateDetailsPriceTypeCOMMERCIAL     RateDetailsPriceType = "COMMERCIAL"
	RateDetailsPriceTypeCOMMERCIALBASE RateDetailsPriceType = "COMMERCIAL_BASE"
	RateDetailsPriceTypeCOMMERCIALPLUS RateDetailsPriceType = "COMMERCIAL_PLUS"
	RateDetailsPriceTypeCONTRACT       RateDetailsPriceType = "CONTRACT"
	RateDetailsPriceTypeNSA            RateDetailsPriceType = "NSA"
	RateDetailsPriceTypeRETAIL         RateDetailsPriceType = "RETAIL"
)

Defines values for RateDetailsPriceType.

type RateDetailsProcessingCategory

type RateDetailsProcessingCategory string

RateDetailsProcessingCategory Processing category for the provided rate, this value can be used in the labels API to ensure the provided rate is applied.

* `CARDS` - Cards, translates to PTR code `0` * `LETTERS` - Letters, translates to PTR code `1` * `FLATS` - Flats, translates to PTR code `2` * `MACHINABLE` - Machinable Parcel, translates to PTR code `3` * `IRREGULAR` - Irregular Parcel, translates to PTR code `4` * `NON_MACHINABLE` - Non-machinable parcel, translates to PTR code `5` * `NONSTANDARD` - Nonstandard parcel, translates to PTR code `5` * `CATALOGS` - Catalogs, translates to PTR code `C` * `OPEN_AND_DISTRIBUTE` - Open and Distribute, translates to PTR code `O` * `RETURNS` - Returns, translates to PTR code `R` * `SOFT_PACK_MACHINABLE` - Soft Pack Machinable, translates to PTR code `S` * `SOFT_PACK_NON_MACHINABLE` - Soft Package Non-machinable, translates to PTR code `T`

Note: * `IRREGULAR` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025. * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.

const (
	RateDetailsProcessingCategoryCARDS                 RateDetailsProcessingCategory = "CARDS"
	RateDetailsProcessingCategoryCATALOGS              RateDetailsProcessingCategory = "CATALOGS"
	RateDetailsProcessingCategoryFLATS                 RateDetailsProcessingCategory = "FLATS"
	RateDetailsProcessingCategoryIRREGULAR             RateDetailsProcessingCategory = "IRREGULAR"
	RateDetailsProcessingCategoryLETTERS               RateDetailsProcessingCategory = "LETTERS"
	RateDetailsProcessingCategoryMACHINABLE            RateDetailsProcessingCategory = "MACHINABLE"
	RateDetailsProcessingCategoryNONMACHINABLE         RateDetailsProcessingCategory = "NON_MACHINABLE"
	RateDetailsProcessingCategoryNONSTANDARD           RateDetailsProcessingCategory = "NONSTANDARD"
	RateDetailsProcessingCategoryOPENANDDISTRIBUTE     RateDetailsProcessingCategory = "OPEN_AND_DISTRIBUTE"
	RateDetailsProcessingCategoryRETURNS               RateDetailsProcessingCategory = "RETURNS"
	RateDetailsProcessingCategorySOFTPACKMACHINABLE    RateDetailsProcessingCategory = "SOFT_PACK_MACHINABLE"
	RateDetailsProcessingCategorySOFTPACKNONMACHINABLE RateDetailsProcessingCategory = "SOFT_PACK_NON_MACHINABLE"
)

Defines values for RateDetailsProcessingCategory.

type RateListQuery

type RateListQuery struct {
	// AccountNumber The Enterprise Payment Account, Permit number or PC Postage meter number associated with a contract.
	AccountNumber *string `json:"accountNumber,omitempty"`

	// AccountType The type of payment account linked to a contract rate.
	AccountType *RateListQueryAccountType `json:"accountType,omitempty"`

	// DestinationZIPCode The destination ZIP code for the package.
	DestinationZIPCode DestinationZIPCode `json:"destinationZIPCode"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height This is the package height in inches.
	Height Height `json:"height"`

	// Length This is the package length in inches.  The maximum dimension is always length.
	Length Length `json:"length"`

	// MailClass The mail service requested.
	//
	//  Note:
	//  - A single mail class option is deprecated and will be removed in the next major revision.  This attribute will be replaced with the list of mail classes.
	//  - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`
	//  - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
	//  - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	MailClass *MailClassOutboundOnly `json:"mailClass,omitempty"`

	// MailClasses A list of mail classes.
	//
	// Note:
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	// - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.
	MailClasses *MailClassesOutboundOnly `json:"mailClasses,omitempty"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// OriginZIPCode The originating ZIP code for the package.
	OriginZIPCode OriginZIPCode `json:"originZIPCode"`

	// PriceType The type of price applied.
	//
	// Notes:
	//  * The `priceType` of `NSA` is deprecated.  `CONTRACT` should be used for non-published pricing.
	//  * If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
	//  * When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing.  If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
	PriceType *PriceType `json:"priceType,omitempty"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
	Weight WeightPounds `json:"weight"`

	// Width This is the package width in inches.  The second longest dimension is always width.
	Width Width `json:"width"`
}

RateListQuery Informative details about all possible prices based on the ingredients.

type RateListQueryAccountType

type RateListQueryAccountType string

RateListQueryAccountType The type of payment account linked to a contract rate.

const (
	RateListQueryAccountTypeEPS    RateListQueryAccountType = "EPS"
	RateListQueryAccountTypeMETER  RateListQueryAccountType = "METER"
	RateListQueryAccountTypePERMIT RateListQueryAccountType = "PERMIT"
)

Defines values for RateListQueryAccountType.

type RateOption

type RateOption struct {
	// Rates List of rate details
	Rates *[]RateDetails `json:"rates,omitempty"`

	// TotalBasePrice The total price, including the rate, fees and pound postage.
	TotalBasePrice       *float64               `json:"totalBasePrice,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

RateOption The prices that match the search criteria.

func (RateOption) Get

func (a RateOption) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for RateOption. Returns the specified element and whether it was found

func (RateOption) MarshalJSON

func (a RateOption) MarshalJSON() ([]byte, error)

Override default JSON handling for RateOption to handle AdditionalProperties

func (*RateOption) Set

func (a *RateOption) Set(fieldName string, value interface{})

Setter for additional properties for RateOption

func (*RateOption) UnmarshalJSON

func (a *RateOption) UnmarshalJSON(b []byte) error

Override default JSON handling for RateOption to handle AdditionalProperties

type RateOptions

type RateOptions = []RateOption

RateOptions The prices that match the search criteria.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type TotalRatesExtraServiceRateDetails

type TotalRatesExtraServiceRateDetails struct {
	// SKU The stock keeping unit for the designated rate.
	SKU *string `json:"SKU,omitempty"`

	// ExtraService Number associated with the extra service
	ExtraService *string `json:"extraService,omitempty"`

	// Name Name of the extra service.
	Name *string `json:"name,omitempty"`

	// Price The postage rate.
	Price *float64 `json:"price,omitempty"`

	// PriceType The type of price applied (Retail, Commercial, Contract, NSA (deprecated)).
	PriceType *TotalRatesExtraServiceRateDetailsPriceType `json:"priceType,omitempty"`

	// Warnings A list of warnings associated with the rate calculation.
	Warnings *WarningsList `json:"warnings,omitempty"`
}

TotalRatesExtraServiceRateDetails The extra service rate details that match the search criteria.

type TotalRatesExtraServiceRateDetailsPriceType

type TotalRatesExtraServiceRateDetailsPriceType string

TotalRatesExtraServiceRateDetailsPriceType The type of price applied (Retail, Commercial, Contract, NSA (deprecated)).

Defines values for TotalRatesExtraServiceRateDetailsPriceType.

type TotalRatesExtraServices

type TotalRatesExtraServices = []ExtraService

TotalRatesExtraServices Extra Service Codes requested. If omitted, all available extra services will be returned. To narrow the results, provide a specific set of extra service codes. For convenience, use `986` for `PRIORITY_MAIL_EXPRESS` or `920` for all other `mailClasses`. * 415 - USPS Label Delivery * 480 - Tracking Plus 6 Months * 481 - Tracking Plus 1 Year * 482 - Tracking Plus 3 Years * 483 - Tracking Plus 5 Years * 484 - Tracking Plus 7 Years * 485 - Tracking Plus 10 Years * 486 - Tracking Plus Signature 3 Years * 487 - Tracking Plus Signature 5 Years * 488 - Tracking Plus Signature 7 Years * 489 - Tracking Plus Signature 10 Years * 498 - PO Box Locker – Stocking Fee (NSA Only) * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only) * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only) * 502 - PO Box Locker – Local Delivery Fee (NSA Only) * 810 - HAZMAT Air Eligible Ethanol Package * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package * 812 - HAZMAT Class 3 – Flammable Liquid Package * 813 - HAZMAT Class 7 - Radioactive Materials Package * 814 - HAZMAT Class 8 - Corrosive Materials Package * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package * 818 - HAZMAT Class 9 - Lithium batteries, marked package * 819 - HAZMAT Class 9 - Dry Ice Package * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package * 821 - HAZMAT Class 9 - Magnetized Materials Package * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package * 823 - HAZMAT Division 5.1 - Oxidizers Package * 824 - HAZMAT Division 5.2 - Organic Peroxides Package * 825 - HAZMAT Division 6.1 – Toxic Materials Package * 826 - HAZMAT Division 6.2 – Infectious Substances Package * 827 - HAZMAT Excepted Quantity Provision Package * 828 - HAZMAT Ground Only * 829 - HAZMAT ID8000 Consumer Commodity Package * 830 - HAZMAT Lighters Package * 831 - HAZMAT LTD QTY Ground Package * 832 - HAZMAT Small Quantity Provision Package * 853 - Perishable Material * 856 - Live Animals Transportation Fee * 857 - Hazardous Material * 858 - Cremated Remains * 910 - Certified Mail * 911 - Certified Mail Restricted Delivery * 912 - Certified Mail Adult Signature Required * 913 - Certified Mail Adult Signature Restricted Delivery * 915 - Collect on Delivery (COD) * 917 - COD Restricted Delivery * 920 - USPS Tracking * 921 - Signature Confirmation * 922 - Adult Signature Required 21 or Over * 923 - Adult Signature Restricted Delivery 21 or Over * 924 - Signature Confirmation Restricted Delivery * 925 - Priority Mail Express Merchandise Insurance * 930 - Insurance <= $500 * 931 - Insurance > $500 * 934 - Insurance Restricted Delivery * 940 - Registered Mail * 941 - Registered Mail Restricted Delivery * 955 - Return Receipt * 957 - Return Receipt Electronic * 972 - Live Animal and Perishable Handling Fee * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only) * 984 - Parcel Locker Delivery * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only) * 991 - Sunday Delivery

type TotalRatesQuery

type TotalRatesQuery struct {
	// AccountNumber The Enterprise Payment Account, Permit number or PC Postage meter number associated with a contract.
	AccountNumber *string `json:"accountNumber,omitempty"`

	// AccountType The type of payment account linked to a contract rate.
	AccountType *TotalRatesQueryAccountType `json:"accountType,omitempty"`

	// DestinationZIPCode The destination ZIP code for the package.
	DestinationZIPCode DestinationZIPCode `json:"destinationZIPCode"`

	// ExtraServices Extra Service Codes requested. If omitted, all available extra services will be returned. To narrow the results, provide a specific set of extra service codes. For convenience, use `986` for `PRIORITY_MAIL_EXPRESS` or `920` for all other `mailClasses`.
	// * 415 - USPS Label Delivery
	// * 480 - Tracking Plus 6 Months
	// * 481 - Tracking Plus 1 Year
	// * 482 - Tracking Plus 3 Years
	// * 483 - Tracking Plus 5 Years
	// * 484 - Tracking Plus 7 Years
	// * 485 - Tracking Plus 10 Years
	// * 486 - Tracking Plus Signature 3 Years
	// * 487 - Tracking Plus Signature 5 Years
	// * 488 - Tracking Plus Signature 7 Years
	// * 489 - Tracking Plus Signature 10 Years
	// * 498 - PO Box Locker – Stocking Fee (NSA Only)
	// * 500 - PO Box Locker – Self-Service Pickup Fee (NSA Only)
	// * 501 - PO Box Locker – Clerk-Assisted Pickup Fee (NSA Only)
	// * 502 - PO Box Locker – Local Delivery Fee (NSA Only)
	// * 810 - HAZMAT Air Eligible Ethanol Package
	// * 811 - HAZMAT Class 1 - Toy Propellant/Safety Fuse Package
	// * 812 - HAZMAT Class 3 – Flammable Liquid Package
	// * 813 - HAZMAT Class 7 - Radioactive Materials Package
	// * 814 - HAZMAT Class 8 - Corrosive Materials Package
	// * 815 - HAZMAT Class 8 - Nonspillable Wet Battery Package
	// * 816 - HAZMAT Class 9 - Lithium Battery Marked - Ground Only Package
	// * 817 - HAZMAT Class 9 - Lithium Battery - Returns Package
	// * 818 - HAZMAT Class 9 - Lithium batteries, marked package
	// * 819 - HAZMAT Class 9 - Dry Ice Package
	// * 820 - HAZMAT Class 9 - Lithium batteries, unmarked package
	// * 821 - HAZMAT Class 9 - Magnetized Materials Package
	// * 822 - HAZMAT Division 4.1 – Flammable Solids or Safety Matches Package
	// * 823 - HAZMAT Division 5.1 - Oxidizers Package
	// * 824 - HAZMAT Division 5.2 - Organic Peroxides Package
	// * 825 - HAZMAT Division 6.1 – Toxic Materials Package
	// * 826 - HAZMAT Division 6.2 – Infectious Substances Package
	// * 827 - HAZMAT Excepted Quantity Provision Package
	// * 828 - HAZMAT Ground Only
	// * 829 - HAZMAT ID8000 Consumer Commodity Package
	// * 830 - HAZMAT Lighters Package
	// * 831 - HAZMAT LTD QTY Ground Package
	// * 832 - HAZMAT Small Quantity Provision Package
	// * 853 - Perishable Material
	// * 856 - Live Animals Transportation Fee
	// * 857 - Hazardous Material
	// * 858 - Cremated Remains
	// * 910 - Certified Mail
	// * 911 - Certified Mail Restricted Delivery
	// * 912 - Certified Mail Adult Signature Required
	// * 913 - Certified Mail Adult Signature Restricted Delivery
	// * 915 - Collect on Delivery (COD)
	// * 917 - COD Restricted Delivery
	// * 920 - USPS Tracking
	// * 921 - Signature Confirmation
	// * 922 - Adult Signature Required 21 or Over
	// * 923 - Adult Signature Restricted Delivery 21 or Over
	// * 924 - Signature Confirmation Restricted Delivery
	// * 925 - Priority Mail Express Merchandise Insurance
	// * 930 - Insurance <= $500
	// * 931 - Insurance > $500
	// * 934 - Insurance Restricted Delivery
	// * 940 - Registered Mail
	// * 941 - Registered Mail Restricted Delivery
	// * 955 - Return Receipt
	// * 957 - Return Receipt Electronic
	// * 972 - Live Animal and Perishable Handling Fee
	// * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)
	// * 984 - Parcel Locker Delivery
	// * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)
	// * 991 - Sunday Delivery
	ExtraServices *TotalRatesExtraServices `json:"extraServices,omitempty"`

	// HasNonstandardCharacteristics Package is nonstandard. Nonstandard packages include cylindrical tubes and rolls, certain high-density items, cartons containing more than 24 ounces of liquids in one or more glass containers, cartons containing 1 gallon or more of liquid in metal or plastic containers, and items in [201.7.6.2](https://pe.usps.com/text/dmm300/201.htm#7.6.2).
	HasNonstandardCharacteristics *bool `json:"hasNonstandardCharacteristics,omitempty"`

	// Height This is the package height in inches.
	Height Height `json:"height"`

	// ItemValue The value of the item. Required for Insurance and Collect On Delivery.  The price for Insurance, Registered Mail, and Collect On Delivery extra services will vary based on this value.
	ItemValue *float64 `json:"itemValue,omitempty"`

	// Length This is the package length in inches.  The maximum dimension is always length.
	Length Length `json:"length"`

	// MailClass The mail service requested.
	//
	//  Note:
	//  - A single mail class option is deprecated and will be removed in the next major revision.  This attribute will be replaced with the list of mail classes.
	//  - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`
	//  - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`
	//  - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	MailClass *MailClassOutboundOnly `json:"mailClass,omitempty"`

	// MailClasses A list of mail classes.
	//
	// Note:
	// - `PARCEL_SELECT_LIGHTWEIGHT` is deprecated and will convert to `PARCEL_SELECT`.
	// - `FIRST-CLASS_PACKAGE_SERVICE` is deprecated and will convert to `USPS_GROUND_ADVANTAGE`.
	// - `USPS_RETAIL_GROUND` is no longer supported and will return a 400 if used.
	// - Certain mail classes, such as `MEDIA_MAIL`, `BOUND_PRINTED_MATTER`, and `LIBRARY_MAIL`, have eligibility rules on what can be mailed using that service.  For more details on these mail classes, please visit [What are Package Services?](https://faq.usps.com/s/article/What-are-Package-Services).
	// - The Heavy Printed Matter product is supported with `MARKETING_MAIL_PARCELS`. To create Heavy Printed Matter labels, the `rateIndicator` should be set to `PR` or `NP` for Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter or to `PN` or `NN` for Nonprofit Presorted or Nonpresorted USPS Marketing Mail Parcels Heavy Printed Matter respectively.
	MailClasses *MailClassesOutboundOnly `json:"mailClasses,omitempty"`

	// MailingDate The date the package or letter/flat/card will be mailed.
	//
	// The mailing date may be today plus 0 to 7 days in advance.
	//
	// Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	MailingDate *MailingDate `json:"mailingDate,omitempty"`

	// OriginZIPCode The originating ZIP code for the package.
	OriginZIPCode OriginZIPCode `json:"originZIPCode"`

	// PriceType The type of price applied.
	//
	// Notes:
	//  * The `priceType` of `NSA` is deprecated.  `CONTRACT` should be used for non-published pricing.
	//  * If an `accountNumber` is provided, it overrides the requested `priceType` and the response will return `CONTRACT` rates (if they exist for that account).
	//  * When priceType is `CONTRACT`, `accountType` and `accountNumber` are required to return the correct pricing.  If `accountType` and `accountNumber` are not provided, published `COMMERCIAL` rates may be returned instead.
	PriceType *PriceType `json:"priceType,omitempty"`

	// Weight This is the calculated weight for the package based on user input.  The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.
	Weight WeightPounds `json:"weight"`

	// Width This is the package width in inches.  The second longest dimension is always width.
	Width Width `json:"width"`
}

TotalRatesQuery defines model for TotalRatesQuery.

type TotalRatesQueryAccountType

type TotalRatesQueryAccountType string

TotalRatesQueryAccountType The type of payment account linked to a contract rate.

const (
	EPS    TotalRatesQueryAccountType = "EPS"
	METER  TotalRatesQueryAccountType = "METER"
	PERMIT TotalRatesQueryAccountType = "PERMIT"
)

Defines values for TotalRatesQueryAccountType.

type TotalRatesQueryResult

type TotalRatesQueryResult struct {
	// RateOptions List of total rate details
	RateOptions *[]TotalRatesQueryResult_RateOptions_Item `json:"rateOptions,omitempty"`
}

TotalRatesQueryResult A list of rate options including applicable extra services.

type TotalRatesQueryResult_RateOptions_Item

type TotalRatesQueryResult_RateOptions_Item struct {
	// ExtraServices List of extra services associated with the shipment.
	ExtraServices *[]TotalRatesExtraServiceRateDetails `json:"extraServices,omitempty"`

	// Rates List of rate details
	Rates *[]RateDetails `json:"rates,omitempty"`

	// TotalBasePrice The total price, including the rate, fees and pound postage.
	TotalBasePrice *float64 `json:"totalBasePrice,omitempty"`

	// TotalPrice The total price, including the `totalBasePrice` and all extra service prices.
	//
	// Note: This field is only returned when `extraServices` are passed in the request.
	TotalPrice           *float32               `json:"totalPrice,omitempty"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

TotalRatesQueryResult_RateOptions_Item defines model for TotalRatesQueryResult.rateOptions.Item.

func (TotalRatesQueryResult_RateOptions_Item) Get

func (a TotalRatesQueryResult_RateOptions_Item) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for TotalRatesQueryResult_RateOptions_Item. Returns the specified element and whether it was found

func (TotalRatesQueryResult_RateOptions_Item) MarshalJSON

func (a TotalRatesQueryResult_RateOptions_Item) MarshalJSON() ([]byte, error)

Override default JSON handling for TotalRatesQueryResult_RateOptions_Item to handle AdditionalProperties

func (*TotalRatesQueryResult_RateOptions_Item) Set

func (a *TotalRatesQueryResult_RateOptions_Item) Set(fieldName string, value interface{})

Setter for additional properties for TotalRatesQueryResult_RateOptions_Item

func (*TotalRatesQueryResult_RateOptions_Item) UnmarshalJSON

func (a *TotalRatesQueryResult_RateOptions_Item) UnmarshalJSON(b []byte) error

Override default JSON handling for TotalRatesQueryResult_RateOptions_Item to handle AdditionalProperties

type WarningsList

type WarningsList = []struct {
	// WarningCode Code representing the type of warning.
	WarningCode *string `json:"warningCode,omitempty"`

	// WarningDescription Description of the warning.
	WarningDescription *string `json:"warningDescription,omitempty"`
}

WarningsList A list of warnings associated with the rate calculation.

type WeightOunces

type WeightOunces = float64

WeightOunces This is the calculated weight for the package based on user input. The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in ounces.

type WeightPounds

type WeightPounds = float64

WeightPounds This is the calculated weight for the package based on user input. The greater of dimWeight and weight will be used to calculated the rate. Weight unit of measurement is in pounds.

type Width

type Width = float64

Width This is the package width in inches. The second longest dimension is always width.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL