Documentation
¶
Overview ¶
Package shipping provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func NewCancelShipmentRequest(server string, shipmentId string) (*http.Request, error)
- func NewCreateShipmentRequest(server string, body CreateShipmentJSONRequestBody) (*http.Request, error)
- func NewCreateShipmentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetAccountRequest(server string) (*http.Request, error)
- func NewGetRatesRequest(server string, body GetRatesJSONRequestBody) (*http.Request, error)
- func NewGetRatesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetShipmentRequest(server string, shipmentId string) (*http.Request, error)
- func NewGetTrackingInformationRequest(server string, trackingId string) (*http.Request, error)
- func NewPurchaseLabelsRequest(server string, shipmentId string, body PurchaseLabelsJSONRequestBody) (*http.Request, error)
- func NewPurchaseLabelsRequestWithBody(server string, shipmentId string, contentType string, body io.Reader) (*http.Request, error)
- func NewPurchaseShipmentRequest(server string, body PurchaseShipmentJSONRequestBody) (*http.Request, error)
- func NewPurchaseShipmentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewRetrieveShippingLabelRequest(server string, shipmentId string, trackingId string, ...) (*http.Request, error)
- func NewRetrieveShippingLabelRequestWithBody(server string, shipmentId string, trackingId string, contentType string, ...) (*http.Request, error)
- type AcceptedRate
- type Account
- type AccountId
- type Address
- type CancelShipmentResp
- type CancelShipmentResponse
- type City
- type Client
- func (c *Client) CancelShipment(ctx context.Context, shipmentId string) (*http.Response, error)
- func (c *Client) CreateShipment(ctx context.Context, body CreateShipmentJSONRequestBody) (*http.Response, error)
- func (c *Client) CreateShipmentWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) GetAccount(ctx context.Context) (*http.Response, error)
- func (c *Client) GetRates(ctx context.Context, body GetRatesJSONRequestBody) (*http.Response, error)
- func (c *Client) GetRatesWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) GetShipment(ctx context.Context, shipmentId string) (*http.Response, error)
- func (c *Client) GetTrackingInformation(ctx context.Context, trackingId string) (*http.Response, error)
- func (c *Client) PurchaseLabels(ctx context.Context, shipmentId string, body PurchaseLabelsJSONRequestBody) (*http.Response, error)
- func (c *Client) PurchaseLabelsWithBody(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) PurchaseShipment(ctx context.Context, body PurchaseShipmentJSONRequestBody) (*http.Response, error)
- func (c *Client) PurchaseShipmentWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
- func (c *Client) RetrieveShippingLabel(ctx context.Context, shipmentId string, trackingId string, ...) (*http.Response, error)
- func (c *Client) RetrieveShippingLabelWithBody(ctx context.Context, shipmentId string, trackingId string, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientReferenceId
- type ClientWithResponses
- func (c *ClientWithResponses) CancelShipmentWithResponse(ctx context.Context, shipmentId string) (*CancelShipmentResp, error)
- func (c *ClientWithResponses) CreateShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateShipmentResp, error)
- func (c *ClientWithResponses) CreateShipmentWithResponse(ctx context.Context, body CreateShipmentJSONRequestBody) (*CreateShipmentResp, error)
- func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context) (*GetAccountResp, error)
- func (c *ClientWithResponses) GetRatesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetRatesResp, error)
- func (c *ClientWithResponses) GetRatesWithResponse(ctx context.Context, body GetRatesJSONRequestBody) (*GetRatesResp, error)
- func (c *ClientWithResponses) GetShipmentWithResponse(ctx context.Context, shipmentId string) (*GetShipmentResp, error)
- func (c *ClientWithResponses) GetTrackingInformationWithResponse(ctx context.Context, trackingId string) (*GetTrackingInformationResp, error)
- func (c *ClientWithResponses) PurchaseLabelsWithBodyWithResponse(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*PurchaseLabelsResp, error)
- func (c *ClientWithResponses) PurchaseLabelsWithResponse(ctx context.Context, shipmentId string, body PurchaseLabelsJSONRequestBody) (*PurchaseLabelsResp, error)
- func (c *ClientWithResponses) PurchaseShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*PurchaseShipmentResp, error)
- func (c *ClientWithResponses) PurchaseShipmentWithResponse(ctx context.Context, body PurchaseShipmentJSONRequestBody) (*PurchaseShipmentResp, error)
- func (c *ClientWithResponses) RetrieveShippingLabelWithBodyWithResponse(ctx context.Context, shipmentId string, trackingId string, contentType string, ...) (*RetrieveShippingLabelResp, error)
- func (c *ClientWithResponses) RetrieveShippingLabelWithResponse(ctx context.Context, shipmentId string, trackingId string, ...) (*RetrieveShippingLabelResp, error)
- type ClientWithResponsesInterface
- type Container
- type ContainerContainerType
- type ContainerItem
- type ContainerList
- type ContainerReferenceId
- type ContainerSpecification
- type ContainerSpecificationList
- type CountryCode
- type CreateShipmentJSONRequestBody
- type CreateShipmentRequest
- type CreateShipmentResp
- type CreateShipmentResponse
- type CreateShipmentResult
- type Currency
- type Dimensions
- type DimensionsUnit
- type Error
- type ErrorList
- type Event
- type EventCode
- type EventList
- type GetAccountResp
- type GetAccountResponse
- type GetRatesJSONRequestBody
- type GetRatesRequest
- type GetRatesResp
- type GetRatesResponse
- type GetRatesResult
- type GetShipmentResp
- type GetShipmentResponse
- type GetTrackingInformationResp
- type GetTrackingInformationResponse
- type HttpRequestDoer
- type Label
- type LabelResult
- type LabelResultList
- type LabelSpecification
- type LabelSpecificationLabelFormat
- type LabelSpecificationLabelStockSize
- type LabelStream
- type Location
- type Party
- type PostalCode
- type PromisedDeliveryDate
- type PurchaseLabelsJSONRequestBody
- type PurchaseLabelsRequest
- type PurchaseLabelsResp
- type PurchaseLabelsResponse
- type PurchaseLabelsResult
- type PurchaseShipmentJSONRequestBody
- type PurchaseShipmentRequest
- type PurchaseShipmentResp
- type PurchaseShipmentResponse
- type PurchaseShipmentResult
- type Rate
- type RateId
- type RateList
- type RequestEditorFn
- type ResponseEditorFn
- type RetrieveShippingLabelJSONRequestBody
- type RetrieveShippingLabelRequest
- type RetrieveShippingLabelResp
- type RetrieveShippingLabelResponse
- type RetrieveShippingLabelResult
- type ServiceRate
- type ServiceRateList
- type ServiceType
- type ServiceTypeList
- type Shipment
- type ShipmentId
- type ShippingPromiseSet
- type StateOrRegion
- type TimeRange
- type TrackingId
- type TrackingInformation
- type TrackingSummary
- type Weight
- type WeightUnit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCancelShipmentRequest ¶
NewCancelShipmentRequest generates requests for CancelShipment
func NewCreateShipmentRequest ¶
func NewCreateShipmentRequest(server string, body CreateShipmentJSONRequestBody) (*http.Request, error)
NewCreateShipmentRequest calls the generic CreateShipment builder with application/json body
func NewCreateShipmentRequestWithBody ¶
func NewCreateShipmentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateShipmentRequestWithBody generates requests for CreateShipment with any type of body
func NewGetAccountRequest ¶
NewGetAccountRequest generates requests for GetAccount
func NewGetRatesRequest ¶
func NewGetRatesRequest(server string, body GetRatesJSONRequestBody) (*http.Request, error)
NewGetRatesRequest calls the generic GetRates builder with application/json body
func NewGetRatesRequestWithBody ¶
func NewGetRatesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewGetRatesRequestWithBody generates requests for GetRates with any type of body
func NewGetShipmentRequest ¶
NewGetShipmentRequest generates requests for GetShipment
func NewGetTrackingInformationRequest ¶
NewGetTrackingInformationRequest generates requests for GetTrackingInformation
func NewPurchaseLabelsRequest ¶
func NewPurchaseLabelsRequest(server string, shipmentId string, body PurchaseLabelsJSONRequestBody) (*http.Request, error)
NewPurchaseLabelsRequest calls the generic PurchaseLabels builder with application/json body
func NewPurchaseLabelsRequestWithBody ¶
func NewPurchaseLabelsRequestWithBody(server string, shipmentId string, contentType string, body io.Reader) (*http.Request, error)
NewPurchaseLabelsRequestWithBody generates requests for PurchaseLabels with any type of body
func NewPurchaseShipmentRequest ¶
func NewPurchaseShipmentRequest(server string, body PurchaseShipmentJSONRequestBody) (*http.Request, error)
NewPurchaseShipmentRequest calls the generic PurchaseShipment builder with application/json body
func NewPurchaseShipmentRequestWithBody ¶
func NewPurchaseShipmentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPurchaseShipmentRequestWithBody generates requests for PurchaseShipment with any type of body
func NewRetrieveShippingLabelRequest ¶
func NewRetrieveShippingLabelRequest(server string, shipmentId string, trackingId string, body RetrieveShippingLabelJSONRequestBody) (*http.Request, error)
NewRetrieveShippingLabelRequest calls the generic RetrieveShippingLabel builder with application/json body
func NewRetrieveShippingLabelRequestWithBody ¶
func NewRetrieveShippingLabelRequestWithBody(server string, shipmentId string, trackingId string, contentType string, body io.Reader) (*http.Request, error)
NewRetrieveShippingLabelRequestWithBody generates requests for RetrieveShippingLabel with any type of body
Types ¶
type AcceptedRate ¶
type AcceptedRate struct {
// BilledWeight The weight.
BilledWeight *Weight `json:"billedWeight,omitempty"`
// Promise The promised delivery time and pickup time.
Promise *ShippingPromiseSet `json:"promise,omitempty"`
// ServiceType The type of shipping service that will be used for the service offering.
ServiceType *ServiceType `json:"serviceType,omitempty"`
// TotalCharge The total value of all items in the container.
TotalCharge *Currency `json:"totalCharge,omitempty"`
}
AcceptedRate The specific rate purchased for the shipment, or null if unpurchased.
type Account ¶
type Account struct {
// AccountId This is the Amazon Shipping account id generated during the Amazon Shipping onboarding process.
AccountId AccountId `json:"accountId"`
}
Account The account related data.
type AccountId ¶
type AccountId = string
AccountId This is the Amazon Shipping account id generated during the Amazon Shipping onboarding process.
type Address ¶
type Address struct {
// AddressLine1 First line of that address.
AddressLine1 string `json:"addressLine1"`
// AddressLine2 Additional address information, if required.
AddressLine2 *string `json:"addressLine2,omitempty"`
// AddressLine3 Additional address information, if required.
AddressLine3 *string `json:"addressLine3,omitempty"`
// City The city where the person, business or institution is located.
City City `json:"city"`
// CopyEmails The email cc addresses of the contact associated with the address.
CopyEmails *[]string `json:"copyEmails,omitempty"`
// CountryCode The two digit country code. In ISO 3166-1 alpha-2 format.
CountryCode CountryCode `json:"countryCode"`
// Email The email address of the contact associated with the address.
Email *string `json:"email,omitempty"`
// Name The name of the person, business or institution at that address.
Name string `json:"name"`
// PhoneNumber The phone number of the person, business or institution located at that address.
PhoneNumber *string `json:"phoneNumber,omitempty"`
// PostalCode The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation.
PostalCode PostalCode `json:"postalCode"`
// StateOrRegion The state or region where the person, business or institution is located.
StateOrRegion StateOrRegion `json:"stateOrRegion"`
}
Address The address.
type CancelShipmentResp ¶
type CancelShipmentResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CancelShipmentResponse
JSON400 *CancelShipmentResponse
JSON401 *CancelShipmentResponse
JSON403 *CancelShipmentResponse
JSON404 *CancelShipmentResponse
JSON429 *CancelShipmentResponse
JSON500 *CancelShipmentResponse
JSON503 *CancelShipmentResponse
}
func ParseCancelShipmentResp ¶
func ParseCancelShipmentResp(rsp *http.Response) (*CancelShipmentResp, error)
ParseCancelShipmentResp parses an HTTP response from a CancelShipmentWithResponse call
func (CancelShipmentResp) Status ¶
func (r CancelShipmentResp) Status() string
Status returns HTTPResponse.Status
func (CancelShipmentResp) StatusCode ¶
func (r CancelShipmentResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CancelShipmentResponse ¶
type CancelShipmentResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
}
CancelShipmentResponse The response schema for the cancelShipment operation.
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
// A callback for modifying response which are generated after receive from the network.
ResponseEditors []ResponseEditorFn
// The user agent header identifies your application, its version number, and the platform and programming language you are using.
// You must include a user agent header in each request submitted to the sales partner API.
UserAgent string
}
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) CancelShipment ¶
func (*Client) CreateShipment ¶
func (*Client) CreateShipmentWithBody ¶
func (*Client) GetAccount ¶
func (*Client) GetRatesWithBody ¶
func (*Client) GetShipment ¶
func (*Client) GetTrackingInformation ¶
func (*Client) PurchaseLabels ¶
func (*Client) PurchaseLabelsWithBody ¶
func (*Client) PurchaseShipment ¶
func (*Client) PurchaseShipmentWithBody ¶
func (*Client) RetrieveShippingLabel ¶
type ClientInterface ¶
type ClientInterface interface {
// GetAccount request
GetAccount(ctx context.Context) (*http.Response, error)
// PurchaseShipmentWithBody request with any body
PurchaseShipmentWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
PurchaseShipment(ctx context.Context, body PurchaseShipmentJSONRequestBody) (*http.Response, error)
// GetRatesWithBody request with any body
GetRatesWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
GetRates(ctx context.Context, body GetRatesJSONRequestBody) (*http.Response, error)
// CreateShipmentWithBody request with any body
CreateShipmentWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
CreateShipment(ctx context.Context, body CreateShipmentJSONRequestBody) (*http.Response, error)
// GetShipment request
GetShipment(ctx context.Context, shipmentId string) (*http.Response, error)
// CancelShipment request
CancelShipment(ctx context.Context, shipmentId string) (*http.Response, error)
// RetrieveShippingLabelWithBody request with any body
RetrieveShippingLabelWithBody(ctx context.Context, shipmentId string, trackingId string, contentType string, body io.Reader) (*http.Response, error)
RetrieveShippingLabel(ctx context.Context, shipmentId string, trackingId string, body RetrieveShippingLabelJSONRequestBody) (*http.Response, error)
// PurchaseLabelsWithBody request with any body
PurchaseLabelsWithBody(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*http.Response, error)
PurchaseLabels(ctx context.Context, shipmentId string, body PurchaseLabelsJSONRequestBody) (*http.Response, error)
// GetTrackingInformation request
GetTrackingInformation(ctx context.Context, trackingId string) (*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.
func WithResponseEditorFn ¶
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CancelShipmentWithResponse ¶
func (c *ClientWithResponses) CancelShipmentWithResponse(ctx context.Context, shipmentId string) (*CancelShipmentResp, error)
CancelShipmentWithResponse request returning *CancelShipmentResp
func (*ClientWithResponses) CreateShipmentWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateShipmentResp, error)
CreateShipmentWithBodyWithResponse request with arbitrary body returning *CreateShipmentResp
func (*ClientWithResponses) CreateShipmentWithResponse ¶
func (c *ClientWithResponses) CreateShipmentWithResponse(ctx context.Context, body CreateShipmentJSONRequestBody) (*CreateShipmentResp, error)
func (*ClientWithResponses) GetAccountWithResponse ¶
func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context) (*GetAccountResp, error)
GetAccountWithResponse request returning *GetAccountResp
func (*ClientWithResponses) GetRatesWithBodyWithResponse ¶
func (c *ClientWithResponses) GetRatesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetRatesResp, error)
GetRatesWithBodyWithResponse request with arbitrary body returning *GetRatesResp
func (*ClientWithResponses) GetRatesWithResponse ¶
func (c *ClientWithResponses) GetRatesWithResponse(ctx context.Context, body GetRatesJSONRequestBody) (*GetRatesResp, error)
func (*ClientWithResponses) GetShipmentWithResponse ¶
func (c *ClientWithResponses) GetShipmentWithResponse(ctx context.Context, shipmentId string) (*GetShipmentResp, error)
GetShipmentWithResponse request returning *GetShipmentResp
func (*ClientWithResponses) GetTrackingInformationWithResponse ¶
func (c *ClientWithResponses) GetTrackingInformationWithResponse(ctx context.Context, trackingId string) (*GetTrackingInformationResp, error)
GetTrackingInformationWithResponse request returning *GetTrackingInformationResp
func (*ClientWithResponses) PurchaseLabelsWithBodyWithResponse ¶
func (c *ClientWithResponses) PurchaseLabelsWithBodyWithResponse(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*PurchaseLabelsResp, error)
PurchaseLabelsWithBodyWithResponse request with arbitrary body returning *PurchaseLabelsResp
func (*ClientWithResponses) PurchaseLabelsWithResponse ¶
func (c *ClientWithResponses) PurchaseLabelsWithResponse(ctx context.Context, shipmentId string, body PurchaseLabelsJSONRequestBody) (*PurchaseLabelsResp, error)
func (*ClientWithResponses) PurchaseShipmentWithBodyWithResponse ¶
func (c *ClientWithResponses) PurchaseShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*PurchaseShipmentResp, error)
PurchaseShipmentWithBodyWithResponse request with arbitrary body returning *PurchaseShipmentResp
func (*ClientWithResponses) PurchaseShipmentWithResponse ¶
func (c *ClientWithResponses) PurchaseShipmentWithResponse(ctx context.Context, body PurchaseShipmentJSONRequestBody) (*PurchaseShipmentResp, error)
func (*ClientWithResponses) RetrieveShippingLabelWithBodyWithResponse ¶
func (c *ClientWithResponses) RetrieveShippingLabelWithBodyWithResponse(ctx context.Context, shipmentId string, trackingId string, contentType string, body io.Reader) (*RetrieveShippingLabelResp, error)
RetrieveShippingLabelWithBodyWithResponse request with arbitrary body returning *RetrieveShippingLabelResp
func (*ClientWithResponses) RetrieveShippingLabelWithResponse ¶
func (c *ClientWithResponses) RetrieveShippingLabelWithResponse(ctx context.Context, shipmentId string, trackingId string, body RetrieveShippingLabelJSONRequestBody) (*RetrieveShippingLabelResp, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAccountWithResponse request
GetAccountWithResponse(ctx context.Context) (*GetAccountResp, error)
// PurchaseShipmentWithBodyWithResponse request with any body
PurchaseShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*PurchaseShipmentResp, error)
PurchaseShipmentWithResponse(ctx context.Context, body PurchaseShipmentJSONRequestBody) (*PurchaseShipmentResp, error)
// GetRatesWithBodyWithResponse request with any body
GetRatesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*GetRatesResp, error)
GetRatesWithResponse(ctx context.Context, body GetRatesJSONRequestBody) (*GetRatesResp, error)
// CreateShipmentWithBodyWithResponse request with any body
CreateShipmentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*CreateShipmentResp, error)
CreateShipmentWithResponse(ctx context.Context, body CreateShipmentJSONRequestBody) (*CreateShipmentResp, error)
// GetShipmentWithResponse request
GetShipmentWithResponse(ctx context.Context, shipmentId string) (*GetShipmentResp, error)
// CancelShipmentWithResponse request
CancelShipmentWithResponse(ctx context.Context, shipmentId string) (*CancelShipmentResp, error)
// RetrieveShippingLabelWithBodyWithResponse request with any body
RetrieveShippingLabelWithBodyWithResponse(ctx context.Context, shipmentId string, trackingId string, contentType string, body io.Reader) (*RetrieveShippingLabelResp, error)
RetrieveShippingLabelWithResponse(ctx context.Context, shipmentId string, trackingId string, body RetrieveShippingLabelJSONRequestBody) (*RetrieveShippingLabelResp, error)
// PurchaseLabelsWithBodyWithResponse request with any body
PurchaseLabelsWithBodyWithResponse(ctx context.Context, shipmentId string, contentType string, body io.Reader) (*PurchaseLabelsResp, error)
PurchaseLabelsWithResponse(ctx context.Context, shipmentId string, body PurchaseLabelsJSONRequestBody) (*PurchaseLabelsResp, error)
// GetTrackingInformationWithResponse request
GetTrackingInformationWithResponse(ctx context.Context, trackingId string) (*GetTrackingInformationResp, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Container ¶
type Container struct {
// ContainerReferenceId An identifier for the container. This must be unique within all the containers in the same shipment.
ContainerReferenceId ContainerReferenceId `json:"containerReferenceId"`
// ContainerType The type of physical container being used. (always 'PACKAGE')
ContainerType *ContainerContainerType `json:"containerType,omitempty"`
// Dimensions A set of measurements for a three-dimensional object.
Dimensions Dimensions `json:"dimensions"`
// Items A list of the items in the container.
Items []ContainerItem `json:"items"`
// Value The total value of all items in the container.
Value Currency `json:"value"`
// Weight The weight.
Weight Weight `json:"weight"`
}
Container Container in the shipment.
type ContainerContainerType ¶
type ContainerContainerType string
ContainerContainerType The type of physical container being used. (always 'PACKAGE')
const (
PACKAGE ContainerContainerType = "PACKAGE"
)
Defines values for ContainerContainerType.
type ContainerItem ¶
type ContainerItem struct {
// Quantity The quantity of the items of this type in the container.
Quantity float32 `json:"quantity"`
// Title A descriptive title of the item.
Title string `json:"title"`
// UnitPrice The total value of all items in the container.
UnitPrice Currency `json:"unitPrice"`
// UnitWeight The weight.
UnitWeight Weight `json:"unitWeight"`
}
ContainerItem Item in the container.
type ContainerReferenceId ¶
type ContainerReferenceId = string
ContainerReferenceId An identifier for the container. This must be unique within all the containers in the same shipment.
type ContainerSpecification ¶
type ContainerSpecification struct {
// Dimensions A set of measurements for a three-dimensional object.
Dimensions Dimensions `json:"dimensions"`
// Weight The weight.
Weight Weight `json:"weight"`
}
ContainerSpecification Container specification for checking the service rate.
type ContainerSpecificationList ¶
type ContainerSpecificationList = []ContainerSpecification
ContainerSpecificationList A list of container specifications.
type CountryCode ¶
type CountryCode = string
CountryCode The two digit country code. In ISO 3166-1 alpha-2 format.
type CreateShipmentJSONRequestBody ¶
type CreateShipmentJSONRequestBody = CreateShipmentRequest
CreateShipmentJSONRequestBody defines body for CreateShipment for application/json ContentType.
type CreateShipmentRequest ¶
type CreateShipmentRequest struct {
// ClientReferenceId Client reference id.
ClientReferenceId ClientReferenceId `json:"clientReferenceId"`
// Containers A list of container.
Containers ContainerList `json:"containers"`
// ShipFrom The address.
ShipFrom Address `json:"shipFrom"`
// ShipTo The address.
ShipTo Address `json:"shipTo"`
}
CreateShipmentRequest The request schema for the createShipment operation.
type CreateShipmentResp ¶
type CreateShipmentResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *CreateShipmentResponse
JSON400 *CreateShipmentResponse
JSON401 *CreateShipmentResponse
JSON403 *CreateShipmentResponse
JSON404 *CreateShipmentResponse
JSON429 *CreateShipmentResponse
JSON500 *CreateShipmentResponse
JSON503 *CreateShipmentResponse
}
func ParseCreateShipmentResp ¶
func ParseCreateShipmentResp(rsp *http.Response) (*CreateShipmentResp, error)
ParseCreateShipmentResp parses an HTTP response from a CreateShipmentWithResponse call
func (CreateShipmentResp) Status ¶
func (r CreateShipmentResp) Status() string
Status returns HTTPResponse.Status
func (CreateShipmentResp) StatusCode ¶
func (r CreateShipmentResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateShipmentResponse ¶
type CreateShipmentResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the createShipment operation.
Payload *CreateShipmentResult `json:"payload,omitempty"`
}
CreateShipmentResponse The response schema for the createShipment operation.
type CreateShipmentResult ¶
type CreateShipmentResult struct {
// EligibleRates A list of all the available rates that can be used to send the shipment.
EligibleRates RateList `json:"eligibleRates"`
// ShipmentId The unique shipment identifier.
ShipmentId ShipmentId `json:"shipmentId"`
}
CreateShipmentResult The payload schema for the createShipment operation.
type Currency ¶
type Currency struct {
// Unit A 3-character currency code.
Unit string `json:"unit"`
// Value The amount of currency.
Value float32 `json:"value"`
}
Currency The total value of all items in the container.
type Dimensions ¶
type Dimensions struct {
// Height The height of the container.
Height float32 `json:"height"`
// Length The length of the container.
Length float32 `json:"length"`
// Unit The unit of these measurements.
Unit DimensionsUnit `json:"unit"`
// Width The width of the container.
Width float32 `json:"width"`
}
Dimensions A set of measurements for a three-dimensional object.
type DimensionsUnit ¶
type DimensionsUnit string
DimensionsUnit The unit of these measurements.
const ( CM DimensionsUnit = "CM" IN DimensionsUnit = "IN" )
Defines values for DimensionsUnit.
type Error ¶
type Error struct {
// Code An error code that identifies the type of error that occurred.
Code string `json:"code"`
// Details Additional details that can help the caller understand or fix the issue.
Details *string `json:"details,omitempty"`
// Message A message that describes the error condition.
Message string `json:"message"`
}
Error Error response returned when the request is unsuccessful.
type ErrorList ¶
type ErrorList = []Error
ErrorList A list of error responses returned when a request is unsuccessful.
type Event ¶
type Event struct {
// EventCode The event code of a shipment, such as Departed, Received, and ReadyForReceive.
EventCode EventCode `json:"eventCode"`
// EventTime The date and time of an event for a shipment.
EventTime time.Time `json:"eventTime"`
// Location The location where the person, business or institution is located.
Location *Location `json:"location,omitempty"`
}
Event An event of a shipment
type EventCode ¶
type EventCode = string
EventCode The event code of a shipment, such as Departed, Received, and ReadyForReceive.
type GetAccountResp ¶
type GetAccountResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetAccountResponse
JSON400 *GetAccountResponse
JSON401 *GetAccountResponse
JSON403 *GetAccountResponse
JSON404 *GetAccountResponse
JSON429 *GetAccountResponse
JSON500 *GetAccountResponse
JSON503 *GetAccountResponse
}
func ParseGetAccountResp ¶
func ParseGetAccountResp(rsp *http.Response) (*GetAccountResp, error)
ParseGetAccountResp parses an HTTP response from a GetAccountWithResponse call
func (GetAccountResp) Status ¶
func (r GetAccountResp) Status() string
Status returns HTTPResponse.Status
func (GetAccountResp) StatusCode ¶
func (r GetAccountResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAccountResponse ¶
type GetAccountResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The account related data.
Payload *Account `json:"payload,omitempty"`
}
GetAccountResponse The response schema for the getAccount operation.
type GetRatesJSONRequestBody ¶
type GetRatesJSONRequestBody = GetRatesRequest
GetRatesJSONRequestBody defines body for GetRates for application/json ContentType.
type GetRatesRequest ¶
type GetRatesRequest struct {
// ContainerSpecifications A list of container specifications.
ContainerSpecifications ContainerSpecificationList `json:"containerSpecifications"`
// ServiceTypes A list of service types that can be used to send the shipment.
ServiceTypes ServiceTypeList `json:"serviceTypes"`
// ShipDate The start date and time. This defaults to the current date and time.
ShipDate *time.Time `json:"shipDate,omitempty"`
// ShipFrom The address.
ShipFrom Address `json:"shipFrom"`
// ShipTo The address.
ShipTo Address `json:"shipTo"`
}
GetRatesRequest The payload schema for the getRates operation.
type GetRatesResp ¶
type GetRatesResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetRatesResponse
JSON400 *GetRatesResponse
JSON401 *GetRatesResponse
JSON403 *GetRatesResponse
JSON404 *GetRatesResponse
JSON429 *GetRatesResponse
JSON500 *GetRatesResponse
JSON503 *GetRatesResponse
}
func ParseGetRatesResp ¶
func ParseGetRatesResp(rsp *http.Response) (*GetRatesResp, error)
ParseGetRatesResp parses an HTTP response from a GetRatesWithResponse call
func (GetRatesResp) Status ¶
func (r GetRatesResp) Status() string
Status returns HTTPResponse.Status
func (GetRatesResp) StatusCode ¶
func (r GetRatesResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetRatesResponse ¶
type GetRatesResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the getRates operation.
Payload *GetRatesResult `json:"payload,omitempty"`
}
GetRatesResponse The response schema for the getRates operation.
type GetRatesResult ¶
type GetRatesResult struct {
// ServiceRates A list of service rates.
ServiceRates ServiceRateList `json:"serviceRates"`
}
GetRatesResult The payload schema for the getRates operation.
type GetShipmentResp ¶
type GetShipmentResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetShipmentResponse
JSON400 *GetShipmentResponse
JSON401 *GetShipmentResponse
JSON403 *GetShipmentResponse
JSON404 *GetShipmentResponse
JSON429 *GetShipmentResponse
JSON500 *GetShipmentResponse
JSON503 *GetShipmentResponse
}
func ParseGetShipmentResp ¶
func ParseGetShipmentResp(rsp *http.Response) (*GetShipmentResp, error)
ParseGetShipmentResp parses an HTTP response from a GetShipmentWithResponse call
func (GetShipmentResp) Status ¶
func (r GetShipmentResp) Status() string
Status returns HTTPResponse.Status
func (GetShipmentResp) StatusCode ¶
func (r GetShipmentResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetShipmentResponse ¶
type GetShipmentResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The shipment related data.
Payload *Shipment `json:"payload,omitempty"`
}
GetShipmentResponse The response schema for the getShipment operation.
type GetTrackingInformationResp ¶
type GetTrackingInformationResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetTrackingInformationResponse
JSON400 *GetTrackingInformationResponse
JSON401 *GetTrackingInformationResponse
JSON403 *GetTrackingInformationResponse
JSON404 *GetTrackingInformationResponse
JSON429 *GetTrackingInformationResponse
JSON500 *GetTrackingInformationResponse
JSON503 *GetTrackingInformationResponse
}
func ParseGetTrackingInformationResp ¶
func ParseGetTrackingInformationResp(rsp *http.Response) (*GetTrackingInformationResp, error)
ParseGetTrackingInformationResp parses an HTTP response from a GetTrackingInformationWithResponse call
func (GetTrackingInformationResp) Status ¶
func (r GetTrackingInformationResp) Status() string
Status returns HTTPResponse.Status
func (GetTrackingInformationResp) StatusCode ¶
func (r GetTrackingInformationResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTrackingInformationResponse ¶
type GetTrackingInformationResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the getTrackingInformation operation.
Payload *TrackingInformation `json:"payload,omitempty"`
}
GetTrackingInformationResponse The response schema for the getTrackingInformation operation.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Label ¶
type Label struct {
// LabelSpecification The label specification info.
LabelSpecification *LabelSpecification `json:"labelSpecification,omitempty"`
// LabelStream Contains binary image data encoded as a base-64 string.
LabelStream *LabelStream `json:"labelStream,omitempty"`
}
Label The label details of the container.
type LabelResult ¶
type LabelResult struct {
// ContainerReferenceId An identifier for the container. This must be unique within all the containers in the same shipment.
ContainerReferenceId *ContainerReferenceId `json:"containerReferenceId,omitempty"`
// Label The label details of the container.
Label *Label `json:"label,omitempty"`
// TrackingId The tracking identifier assigned to the container.
TrackingId *string `json:"trackingId,omitempty"`
}
LabelResult Label details including label stream, format, size.
type LabelSpecification ¶
type LabelSpecification struct {
// LabelFormat The format of the label. Enum of PNG only for now.
LabelFormat LabelSpecificationLabelFormat `json:"labelFormat"`
// LabelStockSize The label stock size specification in length and height. Enum of 4x6 only for now.
LabelStockSize LabelSpecificationLabelStockSize `json:"labelStockSize"`
}
LabelSpecification The label specification info.
type LabelSpecificationLabelFormat ¶
type LabelSpecificationLabelFormat string
LabelSpecificationLabelFormat The format of the label. Enum of PNG only for now.
const (
PNG LabelSpecificationLabelFormat = "PNG"
)
Defines values for LabelSpecificationLabelFormat.
type LabelSpecificationLabelStockSize ¶
type LabelSpecificationLabelStockSize string
LabelSpecificationLabelStockSize The label stock size specification in length and height. Enum of 4x6 only for now.
const (
N4x6 LabelSpecificationLabelStockSize = "4x6"
)
Defines values for LabelSpecificationLabelStockSize.
type LabelStream ¶
type LabelStream = string
LabelStream Contains binary image data encoded as a base-64 string.
type Location ¶
type Location struct {
// City The city where the person, business or institution is located.
City *City `json:"city,omitempty"`
// CountryCode The two digit country code. In ISO 3166-1 alpha-2 format.
CountryCode *CountryCode `json:"countryCode,omitempty"`
// PostalCode The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation.
PostalCode *PostalCode `json:"postalCode,omitempty"`
// StateOrRegion The state or region where the person, business or institution is located.
StateOrRegion *StateOrRegion `json:"stateOrRegion,omitempty"`
}
Location The location where the person, business or institution is located.
type Party ¶
type Party struct {
// AccountId This is the Amazon Shipping account id generated during the Amazon Shipping onboarding process.
AccountId *AccountId `json:"accountId,omitempty"`
}
Party The account related with the shipment.
type PostalCode ¶
type PostalCode = string
PostalCode The postal code of that address. It contains a series of letters or digits or both, sometimes including spaces or punctuation.
type PromisedDeliveryDate ¶
PromisedDeliveryDate The promised delivery date and time of a shipment.
type PurchaseLabelsJSONRequestBody ¶
type PurchaseLabelsJSONRequestBody = PurchaseLabelsRequest
PurchaseLabelsJSONRequestBody defines body for PurchaseLabels for application/json ContentType.
type PurchaseLabelsRequest ¶
type PurchaseLabelsRequest struct {
// LabelSpecification The label specification info.
LabelSpecification LabelSpecification `json:"labelSpecification"`
// RateId An identifier for the rating.
RateId RateId `json:"rateId"`
}
PurchaseLabelsRequest The request schema for the purchaseLabels operation.
type PurchaseLabelsResp ¶
type PurchaseLabelsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PurchaseLabelsResponse
JSON400 *PurchaseLabelsResponse
JSON401 *PurchaseLabelsResponse
JSON403 *PurchaseLabelsResponse
JSON404 *PurchaseLabelsResponse
JSON429 *PurchaseLabelsResponse
JSON500 *PurchaseLabelsResponse
JSON503 *PurchaseLabelsResponse
}
func ParsePurchaseLabelsResp ¶
func ParsePurchaseLabelsResp(rsp *http.Response) (*PurchaseLabelsResp, error)
ParsePurchaseLabelsResp parses an HTTP response from a PurchaseLabelsWithResponse call
func (PurchaseLabelsResp) Status ¶
func (r PurchaseLabelsResp) Status() string
Status returns HTTPResponse.Status
func (PurchaseLabelsResp) StatusCode ¶
func (r PurchaseLabelsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PurchaseLabelsResponse ¶
type PurchaseLabelsResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the purchaseLabels operation.
Payload *PurchaseLabelsResult `json:"payload,omitempty"`
}
PurchaseLabelsResponse The response schema for the purchaseLabels operation.
type PurchaseLabelsResult ¶
type PurchaseLabelsResult struct {
// AcceptedRate The specific rate purchased for the shipment, or null if unpurchased.
AcceptedRate AcceptedRate `json:"acceptedRate"`
// ClientReferenceId Client reference id.
ClientReferenceId *ClientReferenceId `json:"clientReferenceId,omitempty"`
// LabelResults A list of label results
LabelResults LabelResultList `json:"labelResults"`
// ShipmentId The unique shipment identifier.
ShipmentId ShipmentId `json:"shipmentId"`
}
PurchaseLabelsResult The payload schema for the purchaseLabels operation.
type PurchaseShipmentJSONRequestBody ¶
type PurchaseShipmentJSONRequestBody = PurchaseShipmentRequest
PurchaseShipmentJSONRequestBody defines body for PurchaseShipment for application/json ContentType.
type PurchaseShipmentRequest ¶
type PurchaseShipmentRequest struct {
// ClientReferenceId Client reference id.
ClientReferenceId ClientReferenceId `json:"clientReferenceId"`
// Containers A list of container.
Containers ContainerList `json:"containers"`
// LabelSpecification The label specification info.
LabelSpecification LabelSpecification `json:"labelSpecification"`
// ServiceType The type of shipping service that will be used for the service offering.
ServiceType ServiceType `json:"serviceType"`
// ShipDate The start date and time. This defaults to the current date and time.
ShipDate *time.Time `json:"shipDate,omitempty"`
// ShipFrom The address.
ShipFrom Address `json:"shipFrom"`
// ShipTo The address.
ShipTo Address `json:"shipTo"`
}
PurchaseShipmentRequest The payload schema for the purchaseShipment operation.
type PurchaseShipmentResp ¶
type PurchaseShipmentResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PurchaseShipmentResponse
JSON400 *PurchaseShipmentResponse
JSON401 *PurchaseShipmentResponse
JSON403 *PurchaseShipmentResponse
JSON404 *PurchaseShipmentResponse
JSON429 *PurchaseShipmentResponse
JSON500 *PurchaseShipmentResponse
JSON503 *PurchaseShipmentResponse
}
func ParsePurchaseShipmentResp ¶
func ParsePurchaseShipmentResp(rsp *http.Response) (*PurchaseShipmentResp, error)
ParsePurchaseShipmentResp parses an HTTP response from a PurchaseShipmentWithResponse call
func (PurchaseShipmentResp) Status ¶
func (r PurchaseShipmentResp) Status() string
Status returns HTTPResponse.Status
func (PurchaseShipmentResp) StatusCode ¶
func (r PurchaseShipmentResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PurchaseShipmentResponse ¶
type PurchaseShipmentResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the purchaseShipment operation.
Payload *PurchaseShipmentResult `json:"payload,omitempty"`
}
PurchaseShipmentResponse The response schema for the purchaseShipment operation.
type PurchaseShipmentResult ¶
type PurchaseShipmentResult struct {
// LabelResults A list of label results
LabelResults LabelResultList `json:"labelResults"`
// ServiceRate The specific rate for a shipping service, or null if no service available.
ServiceRate ServiceRate `json:"serviceRate"`
// ShipmentId The unique shipment identifier.
ShipmentId ShipmentId `json:"shipmentId"`
}
PurchaseShipmentResult The payload schema for the purchaseShipment operation.
type Rate ¶
type Rate struct {
// BilledWeight The weight.
BilledWeight *Weight `json:"billedWeight,omitempty"`
// ExpirationTime The time after which the offering will expire.
ExpirationTime *time.Time `json:"expirationTime,omitempty"`
// Promise The promised delivery time and pickup time.
Promise *ShippingPromiseSet `json:"promise,omitempty"`
// RateId An identifier for the rate.
RateId *string `json:"rateId,omitempty"`
// ServiceType The type of shipping service that will be used for the service offering.
ServiceType *ServiceType `json:"serviceType,omitempty"`
// TotalCharge The total value of all items in the container.
TotalCharge *Currency `json:"totalCharge,omitempty"`
}
Rate The available rate that can be used to send the shipment
type RateList ¶
type RateList = []Rate
RateList A list of all the available rates that can be used to send the shipment.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResponseEditorFn ¶
ResponseEditorFn is the function signature for the ResponseEditor callback function
type RetrieveShippingLabelJSONRequestBody ¶
type RetrieveShippingLabelJSONRequestBody = RetrieveShippingLabelRequest
RetrieveShippingLabelJSONRequestBody defines body for RetrieveShippingLabel for application/json ContentType.
type RetrieveShippingLabelRequest ¶
type RetrieveShippingLabelRequest struct {
// LabelSpecification The label specification info.
LabelSpecification LabelSpecification `json:"labelSpecification"`
}
RetrieveShippingLabelRequest The request schema for the retrieveShippingLabel operation.
type RetrieveShippingLabelResp ¶
type RetrieveShippingLabelResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *RetrieveShippingLabelResponse
JSON400 *RetrieveShippingLabelResponse
JSON401 *RetrieveShippingLabelResponse
JSON403 *RetrieveShippingLabelResponse
JSON404 *RetrieveShippingLabelResponse
JSON429 *RetrieveShippingLabelResponse
JSON500 *RetrieveShippingLabelResponse
JSON503 *RetrieveShippingLabelResponse
}
func ParseRetrieveShippingLabelResp ¶
func ParseRetrieveShippingLabelResp(rsp *http.Response) (*RetrieveShippingLabelResp, error)
ParseRetrieveShippingLabelResp parses an HTTP response from a RetrieveShippingLabelWithResponse call
func (RetrieveShippingLabelResp) Status ¶
func (r RetrieveShippingLabelResp) Status() string
Status returns HTTPResponse.Status
func (RetrieveShippingLabelResp) StatusCode ¶
func (r RetrieveShippingLabelResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RetrieveShippingLabelResponse ¶
type RetrieveShippingLabelResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The payload schema for the retrieveShippingLabel operation.
Payload *RetrieveShippingLabelResult `json:"payload,omitempty"`
}
RetrieveShippingLabelResponse The response schema for the retrieveShippingLabel operation.
type RetrieveShippingLabelResult ¶
type RetrieveShippingLabelResult struct {
// LabelSpecification The label specification info.
LabelSpecification LabelSpecification `json:"labelSpecification"`
// LabelStream Contains binary image data encoded as a base-64 string.
LabelStream LabelStream `json:"labelStream"`
}
RetrieveShippingLabelResult The payload schema for the retrieveShippingLabel operation.
type ServiceRate ¶
type ServiceRate struct {
// BillableWeight The weight.
BillableWeight Weight `json:"billableWeight"`
// Promise The promised delivery time and pickup time.
Promise ShippingPromiseSet `json:"promise"`
// ServiceType The type of shipping service that will be used for the service offering.
ServiceType ServiceType `json:"serviceType"`
// TotalCharge The total value of all items in the container.
TotalCharge Currency `json:"totalCharge"`
}
ServiceRate The specific rate for a shipping service, or null if no service available.
type ServiceRateList ¶
type ServiceRateList = []ServiceRate
ServiceRateList A list of service rates.
type ServiceType ¶
type ServiceType string
ServiceType The type of shipping service that will be used for the service offering.
const ( AmazonShippingGround ServiceType = "Amazon Shipping Ground" AmazonShippingPremium ServiceType = "Amazon Shipping Premium" AmazonShippingStandard ServiceType = "Amazon Shipping Standard" )
Defines values for ServiceType.
type ServiceTypeList ¶
type ServiceTypeList = []ServiceType
ServiceTypeList A list of service types that can be used to send the shipment.
type Shipment ¶
type Shipment struct {
// AcceptedRate The specific rate purchased for the shipment, or null if unpurchased.
AcceptedRate *AcceptedRate `json:"acceptedRate,omitempty"`
// ClientReferenceId Client reference id.
ClientReferenceId ClientReferenceId `json:"clientReferenceId"`
// Containers A list of container.
Containers ContainerList `json:"containers"`
// ShipFrom The address.
ShipFrom Address `json:"shipFrom"`
// ShipTo The address.
ShipTo Address `json:"shipTo"`
// ShipmentId The unique shipment identifier.
ShipmentId ShipmentId `json:"shipmentId"`
// Shipper The account related with the shipment.
Shipper *Party `json:"shipper,omitempty"`
}
Shipment The shipment related data.
type ShippingPromiseSet ¶
type ShippingPromiseSet struct {
// DeliveryWindow The time range.
DeliveryWindow *TimeRange `json:"deliveryWindow,omitempty"`
// ReceiveWindow The time range.
ReceiveWindow *TimeRange `json:"receiveWindow,omitempty"`
}
ShippingPromiseSet The promised delivery time and pickup time.
type StateOrRegion ¶
type StateOrRegion = string
StateOrRegion The state or region where the person, business or institution is located.
type TimeRange ¶
type TimeRange struct {
// End The end date and time. This must come after the value of start. This defaults to the next business day from the start.
End *time.Time `json:"end,omitempty"`
// Start The start date and time. This defaults to the current date and time.
Start *time.Time `json:"start,omitempty"`
}
TimeRange The time range.
type TrackingId ¶
type TrackingId = string
TrackingId The tracking id generated to each shipment. It contains a series of letters or digits or both.
type TrackingInformation ¶
type TrackingInformation struct {
// EventHistory A list of events of a shipment.
EventHistory EventList `json:"eventHistory"`
// PromisedDeliveryDate The promised delivery date and time of a shipment.
PromisedDeliveryDate PromisedDeliveryDate `json:"promisedDeliveryDate"`
// Summary The tracking summary.
Summary TrackingSummary `json:"summary"`
// TrackingId The tracking id generated to each shipment. It contains a series of letters or digits or both.
TrackingId TrackingId `json:"trackingId"`
}
TrackingInformation The payload schema for the getTrackingInformation operation.
type TrackingSummary ¶
type TrackingSummary struct {
// Status The derived status based on the events in the eventHistory.
Status *string `json:"status,omitempty"`
}
TrackingSummary The tracking summary.
type Weight ¶
type Weight struct {
// Unit The unit of measurement.
Unit WeightUnit `json:"unit"`
// Value The measurement value.
Value float32 `json:"value"`
}
Weight The weight.
type WeightUnit ¶
type WeightUnit string
WeightUnit The unit of measurement.
const ( G WeightUnit = "g" Kg WeightUnit = "kg" Lb WeightUnit = "lb" Oz WeightUnit = "oz" )
Defines values for WeightUnit.