Documentation
¶
Overview ¶
Package containers 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
- func NewDeleteContainersWithContainerIdRequest(server string, containerId string) (*http.Request, error)
- func NewDeleteContainersWithContainerIdWithPackagesRequest(server string, containerId string, trackingNumber string) (*http.Request, error)
- func NewPostContainersRequest(server string, body PostContainersJSONRequestBody) (*http.Request, error)
- func NewPostContainersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostContainersWithContainerIdRequest(server string, containerId string, ...) (*http.Request, error)
- func NewPostContainersWithContainerIdRequestWithBody(server string, containerId string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostManifestRequest(server string, body PostManifestJSONRequestBody) (*http.Request, error)
- func NewPostManifestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Address
- type AllowManifestedLabels
- type Client
- func (c *Client) DeleteContainersWithContainerId(ctx context.Context, containerId string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteContainersWithContainerIdWithPackages(ctx context.Context, containerId string, trackingNumber string, ...) (*http.Response, error)
- func (c *Client) PostContainers(ctx context.Context, body PostContainersJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostContainersWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostContainersWithContainerId(ctx context.Context, containerId string, ...) (*http.Response, error)
- func (c *Client) PostContainersWithContainerIdWithBody(ctx context.Context, containerId string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostManifest(ctx context.Context, body PostManifestJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostManifestWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteContainersWithContainerIdWithPackagesWithResponse(ctx context.Context, containerId string, trackingNumber string, ...) (*DeleteContainersWithContainerIdWithPackagesResponse, error)
- func (c *ClientWithResponses) DeleteContainersWithContainerIdWithResponse(ctx context.Context, containerId string, reqEditors ...RequestEditorFn) (*DeleteContainersWithContainerIdResponse, error)
- func (c *ClientWithResponses) PostContainersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostContainersResponse, error)
- func (c *ClientWithResponses) PostContainersWithContainerIdWithBodyWithResponse(ctx context.Context, containerId string, contentType string, body io.Reader, ...) (*PostContainersWithContainerIdResponse, error)
- func (c *ClientWithResponses) PostContainersWithContainerIdWithResponse(ctx context.Context, containerId string, ...) (*PostContainersWithContainerIdResponse, error)
- func (c *ClientWithResponses) PostContainersWithResponse(ctx context.Context, body PostContainersJSONRequestBody, ...) (*PostContainersResponse, error)
- func (c *ClientWithResponses) PostManifestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostManifestResponse, error)
- func (c *ClientWithResponses) PostManifestWithResponse(ctx context.Context, body PostManifestJSONRequestBody, ...) (*PostManifestResponse, error)
- type ClientWithResponsesInterface
- type Container
- type ContainerContainerTopology
- type ContainerDestinationEntryFacilityType
- type ContainerIDPackagesBody
- type ContainerMailClass
- type ContainerProcessingCategory
- type ContainerSortType
- type ContainerWarnings
- type DeleteContainersWithContainerIdResponse
- type DeleteContainersWithContainerIdWithPackagesResponse
- type DomesticAddress
- type ErrorMessage
- type ErrorMessageError
- type ErrorMessageErrorErrors
- type ErrorMessageErrorSource
- type FacilityNASS
- type HttpRequestDoer
- type ImageInfo
- type ImageInfoImageType
- type ImageInfoLabelType
- type MailingDate
- type MailingDateOptions
- type MailingDateTime
- type Manifest
- type OriginFacility
- func (t OriginFacility) AsFacilityNASS() (FacilityNASS, error)
- func (t *OriginFacility) FromFacilityNASS(v FacilityNASS) error
- func (t OriginFacility) MarshalJSON() ([]byte, error)
- func (t *OriginFacility) MergeFacilityNASS(v FacilityNASS) error
- func (t *OriginFacility) UnmarshalJSON(b []byte) error
- type PostContainersJSONRequestBody
- type PostContainersResponse
- type PostContainersWithContainerIdJSONRequestBody
- type PostContainersWithContainerIdResponse
- type PostManifestJSONRequestBody
- type PostManifestResponse
- type RequestEditorFn
Constants ¶
const (
OAuthScopes = "OAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewDeleteContainersWithContainerIdRequest ¶
func NewDeleteContainersWithContainerIdRequest(server string, containerId string) (*http.Request, error)
NewDeleteContainersWithContainerIdRequest generates requests for DeleteContainersWithContainerId
func NewDeleteContainersWithContainerIdWithPackagesRequest ¶
func NewDeleteContainersWithContainerIdWithPackagesRequest(server string, containerId string, trackingNumber string) (*http.Request, error)
NewDeleteContainersWithContainerIdWithPackagesRequest generates requests for DeleteContainersWithContainerIdWithPackages
func NewPostContainersRequest ¶
func NewPostContainersRequest(server string, body PostContainersJSONRequestBody) (*http.Request, error)
NewPostContainersRequest calls the generic PostContainers builder with application/json body
func NewPostContainersRequestWithBody ¶
func NewPostContainersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostContainersRequestWithBody generates requests for PostContainers with any type of body
func NewPostContainersWithContainerIdRequest ¶
func NewPostContainersWithContainerIdRequest(server string, containerId string, body PostContainersWithContainerIdJSONRequestBody) (*http.Request, error)
NewPostContainersWithContainerIdRequest calls the generic PostContainersWithContainerId builder with application/json body
func NewPostContainersWithContainerIdRequestWithBody ¶
func NewPostContainersWithContainerIdRequestWithBody(server string, containerId string, contentType string, body io.Reader) (*http.Request, error)
NewPostContainersWithContainerIdRequestWithBody generates requests for PostContainersWithContainerId with any type of body
func NewPostManifestRequest ¶
func NewPostManifestRequest(server string, body PostManifestJSONRequestBody) (*http.Request, error)
NewPostManifestRequest calls the generic PostManifest builder with application/json body
Types ¶
type Address ¶
type Address struct {
// CityAbbreviation This is the abbreviation of the city name for the address.
CityAbbreviation *string `json:"cityAbbreviation,omitempty"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `json:"secondaryAddress,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress *string `json:"streetAddress,omitempty"`
// StreetAddressAbbreviation This is the abbreviation of the street address line for the address.
StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Address Address fields standard to all locations.
func (Address) Get ¶
Getter for additional properties for Address. Returns the specified element and whether it was found
func (Address) MarshalJSON ¶
Override default JSON handling for Address to handle AdditionalProperties
func (*Address) UnmarshalJSON ¶
Override default JSON handling for Address to handle AdditionalProperties
type AllowManifestedLabels ¶
type AllowManifestedLabels = bool
AllowManifestedLabels Allow labels that have manifested to be added to the container.
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) DeleteContainersWithContainerId ¶
func (*Client) DeleteContainersWithContainerIdWithPackages ¶
func (*Client) PostContainers ¶
func (c *Client) PostContainers(ctx context.Context, body PostContainersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostContainersWithBody ¶
func (*Client) PostContainersWithContainerId ¶
func (c *Client) PostContainersWithContainerId(ctx context.Context, containerId string, body PostContainersWithContainerIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostContainersWithContainerIdWithBody ¶
func (*Client) PostManifest ¶
func (c *Client) PostManifest(ctx context.Context, body PostManifestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// PostContainersWithBody request with any body
PostContainersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostContainers(ctx context.Context, body PostContainersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostManifestWithBody request with any body
PostManifestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostManifest(ctx context.Context, body PostManifestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteContainersWithContainerId request
DeleteContainersWithContainerId(ctx context.Context, containerId string, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostContainersWithContainerIdWithBody request with any body
PostContainersWithContainerIdWithBody(ctx context.Context, containerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostContainersWithContainerId(ctx context.Context, containerId string, body PostContainersWithContainerIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteContainersWithContainerIdWithPackages request
DeleteContainersWithContainerIdWithPackages(ctx context.Context, containerId string, trackingNumber string, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
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) DeleteContainersWithContainerIdWithPackagesWithResponse ¶
func (c *ClientWithResponses) DeleteContainersWithContainerIdWithPackagesWithResponse(ctx context.Context, containerId string, trackingNumber string, reqEditors ...RequestEditorFn) (*DeleteContainersWithContainerIdWithPackagesResponse, error)
DeleteContainersWithContainerIdWithPackagesWithResponse request returning *DeleteContainersWithContainerIdWithPackagesResponse
func (*ClientWithResponses) DeleteContainersWithContainerIdWithResponse ¶
func (c *ClientWithResponses) DeleteContainersWithContainerIdWithResponse(ctx context.Context, containerId string, reqEditors ...RequestEditorFn) (*DeleteContainersWithContainerIdResponse, error)
DeleteContainersWithContainerIdWithResponse request returning *DeleteContainersWithContainerIdResponse
func (*ClientWithResponses) PostContainersWithBodyWithResponse ¶
func (c *ClientWithResponses) PostContainersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostContainersResponse, error)
PostContainersWithBodyWithResponse request with arbitrary body returning *PostContainersResponse
func (*ClientWithResponses) PostContainersWithContainerIdWithBodyWithResponse ¶
func (c *ClientWithResponses) PostContainersWithContainerIdWithBodyWithResponse(ctx context.Context, containerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostContainersWithContainerIdResponse, error)
PostContainersWithContainerIdWithBodyWithResponse request with arbitrary body returning *PostContainersWithContainerIdResponse
func (*ClientWithResponses) PostContainersWithContainerIdWithResponse ¶
func (c *ClientWithResponses) PostContainersWithContainerIdWithResponse(ctx context.Context, containerId string, body PostContainersWithContainerIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostContainersWithContainerIdResponse, error)
func (*ClientWithResponses) PostContainersWithResponse ¶
func (c *ClientWithResponses) PostContainersWithResponse(ctx context.Context, body PostContainersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostContainersResponse, error)
func (*ClientWithResponses) PostManifestWithBodyWithResponse ¶
func (c *ClientWithResponses) PostManifestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostManifestResponse, error)
PostManifestWithBodyWithResponse request with arbitrary body returning *PostManifestResponse
func (*ClientWithResponses) PostManifestWithResponse ¶
func (c *ClientWithResponses) PostManifestWithResponse(ctx context.Context, body PostManifestJSONRequestBody, reqEditors ...RequestEditorFn) (*PostManifestResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostContainersWithBodyWithResponse request with any body
PostContainersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostContainersResponse, error)
PostContainersWithResponse(ctx context.Context, body PostContainersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostContainersResponse, error)
// PostManifestWithBodyWithResponse request with any body
PostManifestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostManifestResponse, error)
PostManifestWithResponse(ctx context.Context, body PostManifestJSONRequestBody, reqEditors ...RequestEditorFn) (*PostManifestResponse, error)
// DeleteContainersWithContainerIdWithResponse request
DeleteContainersWithContainerIdWithResponse(ctx context.Context, containerId string, reqEditors ...RequestEditorFn) (*DeleteContainersWithContainerIdResponse, error)
// PostContainersWithContainerIdWithBodyWithResponse request with any body
PostContainersWithContainerIdWithBodyWithResponse(ctx context.Context, containerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostContainersWithContainerIdResponse, error)
PostContainersWithContainerIdWithResponse(ctx context.Context, containerId string, body PostContainersWithContainerIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PostContainersWithContainerIdResponse, error)
// DeleteContainersWithContainerIdWithPackagesWithResponse request
DeleteContainersWithContainerIdWithPackagesWithResponse(ctx context.Context, containerId string, trackingNumber string, reqEditors ...RequestEditorFn) (*DeleteContainersWithContainerIdWithPackagesResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Container ¶
type Container struct {
// MID Mailer Identifier to use to create the container barcode.
MID string `json:"MID"`
// AllowManifestedLabels Allow labels that have manifested to be added to the container.
AllowManifestedLabels *AllowManifestedLabels `json:"allowManifestedLabels,omitempty"`
// ContainerID Unique identifier for a container
ContainerID *string `json:"containerID,omitempty"`
ContainerTopology *ContainerContainerTopology `json:"containerTopology,omitempty"`
// DestinationEntryFacilityType The facility type where the container will be sent to.
//
// `NONE` is the only `destinationEntryFacilityType` available for `mailClass` `PRIORITY_MAIL` and `USPS_GROUND_ADVANTAGE`.
//
// `NONE` cannot be used as a `destinationEntryFacilityType` for `mailClass` `PARCEL_SELECT`.
//
// 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 ContainerDestinationEntryFacilityType `json:"destinationEntryFacilityType"`
// DestinationZIPCode A 5-digit ZIP Code serviced by the `destinationEntryFacilityType` the container is being sent to. This is used to identify the Destination Entry Facility. Required when `mailClass` is `PARCEL_SELECT`.
DestinationZIPCode *string `json:"destinationZIPCode,omitempty"`
// ImageInfo Additional details used to determine how to generate the label image.
ImageInfo *ImageInfo `json:"imageInfo,omitempty"`
// MailClass The mail class of the items enclosed in the container. Only one mail class can be nested in a single container.
MailClass ContainerMailClass `json:"mailClass"`
// MailerName Name of the firm/business that is shipping the container.
MailerName string `json:"mailerName"`
// MailingDate The mailing date for when the container will be shipped, when
// included in the request all packages nested to the container will be
// updated to align with the associated mailingDate. The mailing date may
// be today plus 0 to 7 days in advance. If it is not provided it will
// be set as today.
MailingDate *MailingDateOptions `json:"mailingDate,omitempty"`
OriginAddress DomesticAddress `json:"originAddress"`
// OriginFacility Used to specify the facility for origin entry in place of assignment through `originAddress.ZIPCode`. The mapped facility will be printed on the 99M label. Can only be used with `mailClass` of `PRIORITY_MAIL` or `USPS_GROUND_ADVANTAGE`.
OriginFacility *OriginFacility `json:"originFacility,omitempty"`
// ProcessingCategory The type of packages that will be nested to the container. `MIXED` is only available for `DESTINATION_DELIVERY_UNIT` and `DESTINATION_SERVICE_HUB` containers.
//
// Note:
// * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
ProcessingCategory ContainerProcessingCategory `json:"processingCategory"`
// SortType The sort type of the container being shipped.
SortType ContainerSortType `json:"sortType"`
// TrackingNumbers List of tracking numbers for the packages that are in the container.
TrackingNumbers *[]string `json:"trackingNumbers,omitempty"`
Warnings *[]ContainerWarnings `json:"warnings,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
Container containers
func (Container) Get ¶
Getter for additional properties for Container. Returns the specified element and whether it was found
func (Container) MarshalJSON ¶
Override default JSON handling for Container to handle AdditionalProperties
func (*Container) UnmarshalJSON ¶
Override default JSON handling for Container to handle AdditionalProperties
type ContainerContainerTopology ¶
type ContainerContainerTopology string
ContainerContainerTopology defines model for Container.ContainerTopology.
const (
NESTED ContainerContainerTopology = "NESTED"
)
Defines values for ContainerContainerTopology.
type ContainerDestinationEntryFacilityType ¶
type ContainerDestinationEntryFacilityType string
ContainerDestinationEntryFacilityType The facility type where the container will be sent to.
`NONE` is the only `destinationEntryFacilityType` available for `mailClass` `PRIORITY_MAIL` and `USPS_GROUND_ADVANTAGE`.
`NONE` cannot be used as a `destinationEntryFacilityType` for `mailClass` `PARCEL_SELECT`.
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 ( ContainerDestinationEntryFacilityTypeDESTINATIONDELIVERYUNIT ContainerDestinationEntryFacilityType = "DESTINATION_DELIVERY_UNIT" ContainerDestinationEntryFacilityTypeDESTINATIONNETWORKDISTRIBUTIONCENTER ContainerDestinationEntryFacilityType = "DESTINATION_NETWORK_DISTRIBUTION_CENTER" ContainerDestinationEntryFacilityTypeDESTINATIONREGIONALPROCESSINGDISTRIBUTIONCENTER ContainerDestinationEntryFacilityType = "DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER" ContainerDestinationEntryFacilityTypeDESTINATIONSECTIONALCENTERFACILITY ContainerDestinationEntryFacilityType = "DESTINATION_SECTIONAL_CENTER_FACILITY" ContainerDestinationEntryFacilityTypeDESTINATIONSERVICEHUB ContainerDestinationEntryFacilityType = "DESTINATION_SERVICE_HUB" ContainerDestinationEntryFacilityTypeNONE ContainerDestinationEntryFacilityType = "NONE" )
Defines values for ContainerDestinationEntryFacilityType.
type ContainerIDPackagesBody ¶
type ContainerIDPackagesBody struct {
// AllowManifestedLabels Allow labels that have manifested to be added to the container.
AllowManifestedLabels *AllowManifestedLabels `json:"allowManifestedLabels,omitempty"`
// TrackingNumbers List of tracking numbers for the packages that are in the container.
TrackingNumbers *[]string `json:"trackingNumbers,omitempty"`
}
ContainerIDPackagesBody defines model for ContainerIDPackagesBody.
type ContainerMailClass ¶
type ContainerMailClass string
ContainerMailClass The mail class of the items enclosed in the container. Only one mail class can be nested in a single container.
const ( PARCELSELECT ContainerMailClass = "PARCEL_SELECT" PRIORITYMAIL ContainerMailClass = "PRIORITY_MAIL" USPSGROUNDADVANTAGE ContainerMailClass = "USPS_GROUND_ADVANTAGE" )
Defines values for ContainerMailClass.
type ContainerProcessingCategory ¶
type ContainerProcessingCategory string
ContainerProcessingCategory The type of packages that will be nested to the container. `MIXED` is only available for `DESTINATION_DELIVERY_UNIT` and `DESTINATION_SERVICE_HUB` containers.
Note: * `NON_MACHINABLE` is deprecated and will convert to `NONSTANDARD` as of 01/19/2025.
const ( MACHINABLE ContainerProcessingCategory = "MACHINABLE" MIXED ContainerProcessingCategory = "MIXED" NONMACHINABLE ContainerProcessingCategory = "NON_MACHINABLE" NONSTANDARD ContainerProcessingCategory = "NONSTANDARD" )
Defines values for ContainerProcessingCategory.
type ContainerSortType ¶
type ContainerSortType string
ContainerSortType The sort type of the container being shipped.
const ( PALLET ContainerSortType = "PALLET" SACK ContainerSortType = "SACK" TRUCKBEDLOAD ContainerSortType = "TRUCK_BEDLOAD" )
Defines values for ContainerSortType.
type ContainerWarnings ¶
type ContainerWarnings struct {
WarningCode *string `json:"warningCode,omitempty"`
WarningDescription *string `json:"warningDescription,omitempty"`
}
ContainerWarnings defines model for ContainerWarnings.
type DeleteContainersWithContainerIdResponse ¶
type DeleteContainersWithContainerIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParseDeleteContainersWithContainerIdResponse ¶
func ParseDeleteContainersWithContainerIdResponse(rsp *http.Response) (*DeleteContainersWithContainerIdResponse, error)
ParseDeleteContainersWithContainerIdResponse parses an HTTP response from a DeleteContainersWithContainerIdWithResponse call
func (DeleteContainersWithContainerIdResponse) Status ¶
func (r DeleteContainersWithContainerIdResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteContainersWithContainerIdResponse) StatusCode ¶
func (r DeleteContainersWithContainerIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteContainersWithContainerIdWithPackagesResponse ¶
type DeleteContainersWithContainerIdWithPackagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParseDeleteContainersWithContainerIdWithPackagesResponse ¶
func ParseDeleteContainersWithContainerIdWithPackagesResponse(rsp *http.Response) (*DeleteContainersWithContainerIdWithPackagesResponse, error)
ParseDeleteContainersWithContainerIdWithPackagesResponse parses an HTTP response from a DeleteContainersWithContainerIdWithPackagesWithResponse call
func (DeleteContainersWithContainerIdWithPackagesResponse) Status ¶
func (r DeleteContainersWithContainerIdWithPackagesResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteContainersWithContainerIdWithPackagesResponse) StatusCode ¶
func (r DeleteContainersWithContainerIdWithPackagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DomesticAddress ¶
type DomesticAddress struct {
// ZIPCode This is the 5-digit ZIP code. When `mailClass` is `PRIORITY_MAIL` or `USPS_GROUND_ADVANTAGE`, the `ZIPCode` will be used to determine the origin entry facility.
ZIPCode *string `json:"ZIPCode,omitempty"`
// ZIPPlus4 This is the ZIP+4 extension.
ZIPPlus4 *string `json:"ZIPPlus4"`
// City This is the city name of the address.
City *string `json:"city,omitempty"`
// CityAbbreviation This is the abbreviation of the city name for the address.
CityAbbreviation *string `json:"cityAbbreviation,omitempty"`
// SecondaryAddress The secondary unit designator, such as apartment(APT) or suite(STE) number, defining the exact location of the address within a building. For more information please see [Postal Explorer](https://pe.usps.com/text/pub28/28c2_003.htm).
SecondaryAddress *string `json:"secondaryAddress,omitempty"`
// State This is two-character state code of the address.
State *string `json:"state,omitempty"`
// StreetAddress The number of a building along with the name of the road or street on which it is located.
StreetAddress *string `json:"streetAddress,omitempty"`
// StreetAddressAbbreviation This is the abbreviation of the street address line for the address.
StreetAddressAbbreviation *string `json:"streetAddressAbbreviation,omitempty"`
// Urbanization An area, sector, or residential development within a geographic area (typically used for addresses in Puerto Rico)
Urbanization *string `json:"urbanization,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
DomesticAddress defines model for DomesticAddress.
func (DomesticAddress) Get ¶
func (a DomesticAddress) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for DomesticAddress. Returns the specified element and whether it was found
func (DomesticAddress) MarshalJSON ¶
func (a DomesticAddress) MarshalJSON() ([]byte, error)
Override default JSON handling for DomesticAddress to handle AdditionalProperties
func (*DomesticAddress) Set ¶
func (a *DomesticAddress) Set(fieldName string, value interface{})
Setter for additional properties for DomesticAddress
func (*DomesticAddress) UnmarshalJSON ¶
func (a *DomesticAddress) UnmarshalJSON(b []byte) error
Override default JSON handling for DomesticAddress to handle AdditionalProperties
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 *ErrorMessageError `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 ErrorMessageError ¶
type ErrorMessageError struct {
// Code The error status code that has been returned in response to the request.
Code *string `json:"code,omitempty"`
Errors *[]ErrorMessageErrorErrors `json:"errors,omitempty"`
// Message A human-readable message describing the error.
Message *string `json:"message,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessageError The high-level error that has occurred as indicated by the status code.
func (ErrorMessageError) Get ¶
func (a ErrorMessageError) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessageError. Returns the specified element and whether it was found
func (ErrorMessageError) MarshalJSON ¶
func (a ErrorMessageError) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessageError to handle AdditionalProperties
func (*ErrorMessageError) Set ¶
func (a *ErrorMessageError) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessageError
func (*ErrorMessageError) UnmarshalJSON ¶
func (a *ErrorMessageError) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessageError to handle AdditionalProperties
type ErrorMessageErrorErrors ¶
type ErrorMessageErrorErrors 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 *ErrorMessageErrorSource `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:"-"`
}
ErrorMessageErrorErrors defines model for ErrorMessageErrorErrors.
func (ErrorMessageErrorErrors) Get ¶
func (a ErrorMessageErrorErrors) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessageErrorErrors. Returns the specified element and whether it was found
func (ErrorMessageErrorErrors) MarshalJSON ¶
func (a ErrorMessageErrorErrors) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessageErrorErrors to handle AdditionalProperties
func (*ErrorMessageErrorErrors) Set ¶
func (a *ErrorMessageErrorErrors) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessageErrorErrors
func (*ErrorMessageErrorErrors) UnmarshalJSON ¶
func (a *ErrorMessageErrorErrors) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessageErrorErrors to handle AdditionalProperties
type ErrorMessageErrorSource ¶
type ErrorMessageErrorSource 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:"-"`
}
ErrorMessageErrorSource The element that is suspected of originating the error. Helps to pinpoint the problem.
func (ErrorMessageErrorSource) Get ¶
func (a ErrorMessageErrorSource) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessageErrorSource. Returns the specified element and whether it was found
func (ErrorMessageErrorSource) MarshalJSON ¶
func (a ErrorMessageErrorSource) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessageErrorSource to handle AdditionalProperties
func (*ErrorMessageErrorSource) Set ¶
func (a *ErrorMessageErrorSource) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessageErrorSource
func (*ErrorMessageErrorSource) UnmarshalJSON ¶
func (a *ErrorMessageErrorSource) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessageErrorSource to handle AdditionalProperties
type FacilityNASS ¶
type FacilityNASS = string
FacilityNASS NASS Code of the Facility for Mail Entry.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImageInfo ¶
type ImageInfo struct {
// AddZPLComments Applicable only when `imageType` is `ZPL203DPI` or `ZPL300DPI`. When `addZPLComments` is `true`, comments will be visible within the ZPL text response to the user to denote different sections of their label. When `addZPLComments` is `false`, no comments will be included in the ZPL text response. This will be ignored for any other `imageType`.
//
// Example of a ZPL comment:
// `^FX Start of label. 123e4567-e89b-12d3-a456-426614174000 ^FS`
AddZPLComments *bool `json:"addZPLComments,omitempty"`
// ImageType The type of label image requested. If omitted then the default image type is PDF.
//
// Note:
// - When using `ZPL203DPI` or `ZPL300DPI` the image returned will be rotated 90 degrees and be 4x6 inches, instead of 6x4 inches.
ImageType *ImageInfoImageType `json:"imageType,omitempty"`
// LabelType Ability to select the label image size. If omitted then the default label size is 6X4LABEL.
// * '6X4LABEL'
LabelType *ImageInfoLabelType `json:"labelType,omitempty"`
}
ImageInfo Additional details used to determine how to generate the label image.
type ImageInfoImageType ¶
type ImageInfoImageType string
ImageInfoImageType The type of label image requested. If omitted then the default image type is PDF.
Note: - When using `ZPL203DPI` or `ZPL300DPI` the image returned will be rotated 90 degrees and be 4x6 inches, instead of 6x4 inches.
const ( ImageInfoImageTypeGIF ImageInfoImageType = "GIF" ImageInfoImageTypeJPG ImageInfoImageType = "JPG" ImageInfoImageTypeNONE ImageInfoImageType = "NONE" ImageInfoImageTypePDF ImageInfoImageType = "PDF" ImageInfoImageTypePNG ImageInfoImageType = "PNG" ImageInfoImageTypeSVG ImageInfoImageType = "SVG" ImageInfoImageTypeTIFF ImageInfoImageType = "TIFF" ImageInfoImageTypeZPL203DPI ImageInfoImageType = "ZPL203DPI" ImageInfoImageTypeZPL300DPI ImageInfoImageType = "ZPL300DPI" )
Defines values for ImageInfoImageType.
type ImageInfoLabelType ¶
type ImageInfoLabelType string
ImageInfoLabelType Ability to select the label image size. If omitted then the default label size is 6X4LABEL.
- '6X4LABEL'
const (
N6X4LABEL ImageInfoLabelType = "6X4LABEL"
)
Defines values for ImageInfoLabelType.
type MailingDate ¶
type MailingDate = openapi_types.Date
MailingDate The date package 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 MailingDateOptions ¶
type MailingDateOptions = string
MailingDateOptions The mailing date for when the container will be shipped, when included in the request all packages nested to the container will be updated to align with the associated mailingDate. The mailing date may be today plus 0 to 7 days in advance. If it is not provided it will be set as today.
type MailingDateTime ¶
MailingDateTime The date and time a package will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the date-time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
type Manifest ¶
type Manifest struct {
Containers []string `json:"containers"`
// MailingDate The mailing date for when the container will be shipped, when
// included in the request all packages nested to the container will be
// updated to align with the associated mailingDate. The mailing date may
// be today plus 0 to 7 days in advance. If it is not provided it will
// be set as today.
MailingDate *MailingDateOptions `json:"mailingDate,omitempty"`
}
Manifest defines model for Manifest.
type OriginFacility ¶
type OriginFacility struct {
// contains filtered or unexported fields
}
OriginFacility Used to specify the facility for origin entry in place of assignment through `originAddress.ZIPCode`. The mapped facility will be printed on the 99M label. Can only be used with `mailClass` of `PRIORITY_MAIL` or `USPS_GROUND_ADVANTAGE`.
func (OriginFacility) AsFacilityNASS ¶
func (t OriginFacility) AsFacilityNASS() (FacilityNASS, error)
AsFacilityNASS returns the union data inside the OriginFacility as a FacilityNASS
func (*OriginFacility) FromFacilityNASS ¶
func (t *OriginFacility) FromFacilityNASS(v FacilityNASS) error
FromFacilityNASS overwrites any union data inside the OriginFacility as the provided FacilityNASS
func (OriginFacility) MarshalJSON ¶
func (t OriginFacility) MarshalJSON() ([]byte, error)
func (*OriginFacility) MergeFacilityNASS ¶
func (t *OriginFacility) MergeFacilityNASS(v FacilityNASS) error
MergeFacilityNASS performs a merge with any union data inside the OriginFacility, using the provided FacilityNASS
func (*OriginFacility) UnmarshalJSON ¶
func (t *OriginFacility) UnmarshalJSON(b []byte) error
type PostContainersJSONRequestBody ¶
type PostContainersJSONRequestBody = Container
PostContainersJSONRequestBody defines body for PostContainers for application/json ContentType.
type PostContainersResponse ¶
type PostContainersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParsePostContainersResponse ¶
func ParsePostContainersResponse(rsp *http.Response) (*PostContainersResponse, error)
ParsePostContainersResponse parses an HTTP response from a PostContainersWithResponse call
func (PostContainersResponse) Status ¶
func (r PostContainersResponse) Status() string
Status returns HTTPResponse.Status
func (PostContainersResponse) StatusCode ¶
func (r PostContainersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostContainersWithContainerIdJSONRequestBody ¶
type PostContainersWithContainerIdJSONRequestBody = ContainerIDPackagesBody
PostContainersWithContainerIdJSONRequestBody defines body for PostContainersWithContainerId for application/json ContentType.
type PostContainersWithContainerIdResponse ¶
type PostContainersWithContainerIdResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Container
XML200 *Container
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParsePostContainersWithContainerIdResponse ¶
func ParsePostContainersWithContainerIdResponse(rsp *http.Response) (*PostContainersWithContainerIdResponse, error)
ParsePostContainersWithContainerIdResponse parses an HTTP response from a PostContainersWithContainerIdWithResponse call
func (PostContainersWithContainerIdResponse) Status ¶
func (r PostContainersWithContainerIdResponse) Status() string
Status returns HTTPResponse.Status
func (PostContainersWithContainerIdResponse) StatusCode ¶
func (r PostContainersWithContainerIdResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostManifestJSONRequestBody ¶
type PostManifestJSONRequestBody = Manifest
PostManifestJSONRequestBody defines body for PostManifest for application/json ContentType.
type PostManifestResponse ¶
type PostManifestResponse struct {
Body []byte
HTTPResponse *http.Response
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParsePostManifestResponse ¶
func ParsePostManifestResponse(rsp *http.Response) (*PostManifestResponse, error)
ParsePostManifestResponse parses an HTTP response from a PostManifestWithResponse call
func (PostManifestResponse) Status ¶
func (r PostManifestResponse) Status() string
Status returns HTTPResponse.Status
func (PostManifestResponse) StatusCode ¶
func (r PostManifestResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode