Documentation
¶
Overview ¶
Package gen 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 NewCancelShipmentRequest(server string, params *CancelShipmentParams, ...) (*http.Request, error)
- func NewCancelShipmentRequestWithBody(server string, params *CancelShipmentParams, contentType string, ...) (*http.Request, error)
- func NewCreateShipmentRequest(server string, params *CreateShipmentParams, ...) (*http.Request, error)
- func NewCreateShipmentRequestWithBody(server string, params *CreateShipmentParams, contentType string, ...) (*http.Request, error)
- func NewOauthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewOauthTokenRequestWithFormdataBody(server string, body OauthTokenFormdataRequestBody) (*http.Request, error)
- func NewRateQuotesRequest(server string, params *RateQuotesParams, body RateQuotesJSONRequestBody) (*http.Request, error)
- func NewRateQuotesRequestWithBody(server string, params *RateQuotesParams, contentType string, body io.Reader) (*http.Request, error)
- func NewResolveAddressRequest(server string, params *ResolveAddressParams, ...) (*http.Request, error)
- func NewResolveAddressRequestWithBody(server string, params *ResolveAddressParams, contentType string, ...) (*http.Request, error)
- func NewShipmentResultsRequest(server string, params *ShipmentResultsParams, ...) (*http.Request, error)
- func NewShipmentResultsRequestWithBody(server string, params *ShipmentResultsParams, contentType string, ...) (*http.Request, error)
- func NewTrackByNumbersRequest(server string, params *TrackByNumbersParams, ...) (*http.Request, error)
- func NewTrackByNumbersRequestWithBody(server string, params *TrackByNumbersParams, contentType string, ...) (*http.Request, error)
- type CancelShipmentJSONBody
- type CancelShipmentJSONRequestBody
- type CancelShipmentParams
- type CancelShipmentResponse
- type Client
- func (c *Client) CancelShipment(ctx context.Context, params *CancelShipmentParams, ...) (*http.Response, error)
- func (c *Client) CancelShipmentWithBody(ctx context.Context, params *CancelShipmentParams, contentType string, ...) (*http.Response, error)
- func (c *Client) CreateShipment(ctx context.Context, params *CreateShipmentParams, ...) (*http.Response, error)
- func (c *Client) CreateShipmentWithBody(ctx context.Context, params *CreateShipmentParams, contentType string, ...) (*http.Response, error)
- func (c *Client) OauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) OauthTokenWithFormdataBody(ctx context.Context, body OauthTokenFormdataRequestBody, ...) (*http.Response, error)
- func (c *Client) RateQuotes(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RateQuotesWithBody(ctx context.Context, params *RateQuotesParams, contentType string, ...) (*http.Response, error)
- func (c *Client) ResolveAddress(ctx context.Context, params *ResolveAddressParams, ...) (*http.Response, error)
- func (c *Client) ResolveAddressWithBody(ctx context.Context, params *ResolveAddressParams, contentType string, ...) (*http.Response, error)
- func (c *Client) ShipmentResults(ctx context.Context, params *ShipmentResultsParams, ...) (*http.Response, error)
- func (c *Client) ShipmentResultsWithBody(ctx context.Context, params *ShipmentResultsParams, contentType string, ...) (*http.Response, error)
- func (c *Client) TrackByNumbers(ctx context.Context, params *TrackByNumbersParams, ...) (*http.Response, error)
- func (c *Client) TrackByNumbersWithBody(ctx context.Context, params *TrackByNumbersParams, contentType string, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CancelShipmentWithBodyWithResponse(ctx context.Context, params *CancelShipmentParams, contentType string, ...) (*CancelShipmentResponse, error)
- func (c *ClientWithResponses) CancelShipmentWithResponse(ctx context.Context, params *CancelShipmentParams, ...) (*CancelShipmentResponse, error)
- func (c *ClientWithResponses) CreateShipmentWithBodyWithResponse(ctx context.Context, params *CreateShipmentParams, contentType string, ...) (*CreateShipmentResponse, error)
- func (c *ClientWithResponses) CreateShipmentWithResponse(ctx context.Context, params *CreateShipmentParams, ...) (*CreateShipmentResponse, error)
- func (c *ClientWithResponses) OauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*OauthTokenResponse, error)
- func (c *ClientWithResponses) OauthTokenWithFormdataBodyWithResponse(ctx context.Context, body OauthTokenFormdataRequestBody, ...) (*OauthTokenResponse, error)
- func (c *ClientWithResponses) RateQuotesWithBodyWithResponse(ctx context.Context, params *RateQuotesParams, contentType string, ...) (*RateQuotesResponse, error)
- func (c *ClientWithResponses) RateQuotesWithResponse(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, ...) (*RateQuotesResponse, error)
- func (c *ClientWithResponses) ResolveAddressWithBodyWithResponse(ctx context.Context, params *ResolveAddressParams, contentType string, ...) (*ResolveAddressResponse, error)
- func (c *ClientWithResponses) ResolveAddressWithResponse(ctx context.Context, params *ResolveAddressParams, ...) (*ResolveAddressResponse, error)
- func (c *ClientWithResponses) ShipmentResultsWithBodyWithResponse(ctx context.Context, params *ShipmentResultsParams, contentType string, ...) (*ShipmentResultsResponse, error)
- func (c *ClientWithResponses) ShipmentResultsWithResponse(ctx context.Context, params *ShipmentResultsParams, ...) (*ShipmentResultsResponse, error)
- func (c *ClientWithResponses) TrackByNumbersWithBodyWithResponse(ctx context.Context, params *TrackByNumbersParams, contentType string, ...) (*TrackByNumbersResponse, error)
- func (c *ClientWithResponses) TrackByNumbersWithResponse(ctx context.Context, params *TrackByNumbersParams, ...) (*TrackByNumbersResponse, error)
- type ClientWithResponsesInterface
- type CreateShipmentJSONBody
- type CreateShipmentJSONRequestBody
- type CreateShipmentParams
- type CreateShipmentResponse
- type ErrorResponse
- type HttpRequestDoer
- type OAuthTokenResponse
- type OauthTokenFormdataBody
- type OauthTokenFormdataBodyGrantType
- type OauthTokenFormdataRequestBody
- type OauthTokenResponse
- type RateQuotesJSONBody
- type RateQuotesJSONRequestBody
- type RateQuotesParams
- type RateQuotesResponse
- type RequestEditorFn
- type ResolveAddressJSONBody
- type ResolveAddressJSONRequestBody
- type ResolveAddressParams
- type ResolveAddressResponse
- type ShipmentResultsJSONBody
- type ShipmentResultsJSONRequestBody
- type ShipmentResultsParams
- type ShipmentResultsResponse
- type TrackByNumbersJSONBody
- type TrackByNumbersJSONRequestBody
- type TrackByNumbersParams
- type TrackByNumbersResponse
- type XCustomerTransactionId
- type XLocale
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCancelShipmentRequest ¶
func NewCancelShipmentRequest(server string, params *CancelShipmentParams, body CancelShipmentJSONRequestBody) (*http.Request, error)
NewCancelShipmentRequest calls the generic CancelShipment builder with application/json body
func NewCancelShipmentRequestWithBody ¶
func NewCancelShipmentRequestWithBody(server string, params *CancelShipmentParams, contentType string, body io.Reader) (*http.Request, error)
NewCancelShipmentRequestWithBody generates requests for CancelShipment with any type of body
func NewCreateShipmentRequest ¶
func NewCreateShipmentRequest(server string, params *CreateShipmentParams, body CreateShipmentJSONRequestBody) (*http.Request, error)
NewCreateShipmentRequest calls the generic CreateShipment builder with application/json body
func NewCreateShipmentRequestWithBody ¶
func NewCreateShipmentRequestWithBody(server string, params *CreateShipmentParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateShipmentRequestWithBody generates requests for CreateShipment with any type of body
func NewOauthTokenRequestWithBody ¶
func NewOauthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewOauthTokenRequestWithBody generates requests for OauthToken with any type of body
func NewOauthTokenRequestWithFormdataBody ¶
func NewOauthTokenRequestWithFormdataBody(server string, body OauthTokenFormdataRequestBody) (*http.Request, error)
NewOauthTokenRequestWithFormdataBody calls the generic OauthToken builder with application/x-www-form-urlencoded body
func NewRateQuotesRequest ¶
func NewRateQuotesRequest(server string, params *RateQuotesParams, body RateQuotesJSONRequestBody) (*http.Request, error)
NewRateQuotesRequest calls the generic RateQuotes builder with application/json body
func NewRateQuotesRequestWithBody ¶
func NewRateQuotesRequestWithBody(server string, params *RateQuotesParams, contentType string, body io.Reader) (*http.Request, error)
NewRateQuotesRequestWithBody generates requests for RateQuotes with any type of body
func NewResolveAddressRequest ¶
func NewResolveAddressRequest(server string, params *ResolveAddressParams, body ResolveAddressJSONRequestBody) (*http.Request, error)
NewResolveAddressRequest calls the generic ResolveAddress builder with application/json body
func NewResolveAddressRequestWithBody ¶
func NewResolveAddressRequestWithBody(server string, params *ResolveAddressParams, contentType string, body io.Reader) (*http.Request, error)
NewResolveAddressRequestWithBody generates requests for ResolveAddress with any type of body
func NewShipmentResultsRequest ¶
func NewShipmentResultsRequest(server string, params *ShipmentResultsParams, body ShipmentResultsJSONRequestBody) (*http.Request, error)
NewShipmentResultsRequest calls the generic ShipmentResults builder with application/json body
func NewShipmentResultsRequestWithBody ¶
func NewShipmentResultsRequestWithBody(server string, params *ShipmentResultsParams, contentType string, body io.Reader) (*http.Request, error)
NewShipmentResultsRequestWithBody generates requests for ShipmentResults with any type of body
func NewTrackByNumbersRequest ¶
func NewTrackByNumbersRequest(server string, params *TrackByNumbersParams, body TrackByNumbersJSONRequestBody) (*http.Request, error)
NewTrackByNumbersRequest calls the generic TrackByNumbers builder with application/json body
func NewTrackByNumbersRequestWithBody ¶
func NewTrackByNumbersRequestWithBody(server string, params *TrackByNumbersParams, contentType string, body io.Reader) (*http.Request, error)
NewTrackByNumbersRequestWithBody generates requests for TrackByNumbers with any type of body
Types ¶
type CancelShipmentJSONBody ¶
type CancelShipmentJSONBody map[string]interface{}
CancelShipmentJSONBody defines parameters for CancelShipment.
type CancelShipmentJSONRequestBody ¶
type CancelShipmentJSONRequestBody CancelShipmentJSONBody
CancelShipmentJSONRequestBody defines body for CancelShipment for application/json ContentType.
type CancelShipmentParams ¶
type CancelShipmentParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
CancelShipmentParams defines parameters for CancelShipment.
type CancelShipmentResponse ¶
type CancelShipmentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseCancelShipmentResponse ¶
func ParseCancelShipmentResponse(rsp *http.Response) (*CancelShipmentResponse, error)
ParseCancelShipmentResponse parses an HTTP response from a CancelShipmentWithResponse call
func (CancelShipmentResponse) Status ¶
func (r CancelShipmentResponse) Status() string
Status returns HTTPResponse.Status
func (CancelShipmentResponse) StatusCode ¶
func (r CancelShipmentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) CancelShipment ¶
func (c *Client) CancelShipment(ctx context.Context, params *CancelShipmentParams, body CancelShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CancelShipmentWithBody ¶
func (*Client) CreateShipment ¶
func (c *Client) CreateShipment(ctx context.Context, params *CreateShipmentParams, body CreateShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateShipmentWithBody ¶
func (*Client) OauthTokenWithBody ¶
func (*Client) OauthTokenWithFormdataBody ¶
func (c *Client) OauthTokenWithFormdataBody(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RateQuotes ¶
func (c *Client) RateQuotes(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RateQuotesWithBody ¶
func (*Client) ResolveAddress ¶
func (c *Client) ResolveAddress(ctx context.Context, params *ResolveAddressParams, body ResolveAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ResolveAddressWithBody ¶
func (*Client) ShipmentResults ¶
func (c *Client) ShipmentResults(ctx context.Context, params *ShipmentResultsParams, body ShipmentResultsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ShipmentResultsWithBody ¶
func (*Client) TrackByNumbers ¶
func (c *Client) TrackByNumbers(ctx context.Context, params *TrackByNumbersParams, body TrackByNumbersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) TrackByNumbersWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// ResolveAddressWithBody request with any body
ResolveAddressWithBody(ctx context.Context, params *ResolveAddressParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ResolveAddress(ctx context.Context, params *ResolveAddressParams, body ResolveAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// OauthTokenWithBody request with any body
OauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
OauthTokenWithFormdataBody(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// RateQuotesWithBody request with any body
RateQuotesWithBody(ctx context.Context, params *RateQuotesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RateQuotes(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateShipmentWithBody request with any body
CreateShipmentWithBody(ctx context.Context, params *CreateShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateShipment(ctx context.Context, params *CreateShipmentParams, body CreateShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// CancelShipmentWithBody request with any body
CancelShipmentWithBody(ctx context.Context, params *CancelShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CancelShipment(ctx context.Context, params *CancelShipmentParams, body CancelShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ShipmentResultsWithBody request with any body
ShipmentResultsWithBody(ctx context.Context, params *ShipmentResultsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ShipmentResults(ctx context.Context, params *ShipmentResultsParams, body ShipmentResultsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// TrackByNumbersWithBody request with any body
TrackByNumbersWithBody(ctx context.Context, params *TrackByNumbersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
TrackByNumbers(ctx context.Context, params *TrackByNumbersParams, body TrackByNumbersJSONRequestBody, 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) CancelShipmentWithBodyWithResponse ¶
func (c *ClientWithResponses) CancelShipmentWithBodyWithResponse(ctx context.Context, params *CancelShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelShipmentResponse, error)
CancelShipmentWithBodyWithResponse request with arbitrary body returning *CancelShipmentResponse
func (*ClientWithResponses) CancelShipmentWithResponse ¶
func (c *ClientWithResponses) CancelShipmentWithResponse(ctx context.Context, params *CancelShipmentParams, body CancelShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelShipmentResponse, error)
func (*ClientWithResponses) CreateShipmentWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateShipmentWithBodyWithResponse(ctx context.Context, params *CreateShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateShipmentResponse, error)
CreateShipmentWithBodyWithResponse request with arbitrary body returning *CreateShipmentResponse
func (*ClientWithResponses) CreateShipmentWithResponse ¶
func (c *ClientWithResponses) CreateShipmentWithResponse(ctx context.Context, params *CreateShipmentParams, body CreateShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateShipmentResponse, error)
func (*ClientWithResponses) OauthTokenWithBodyWithResponse ¶
func (c *ClientWithResponses) OauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)
OauthTokenWithBodyWithResponse request with arbitrary body returning *OauthTokenResponse
func (*ClientWithResponses) OauthTokenWithFormdataBodyWithResponse ¶
func (c *ClientWithResponses) OauthTokenWithFormdataBodyWithResponse(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)
func (*ClientWithResponses) RateQuotesWithBodyWithResponse ¶
func (c *ClientWithResponses) RateQuotesWithBodyWithResponse(ctx context.Context, params *RateQuotesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RateQuotesResponse, error)
RateQuotesWithBodyWithResponse request with arbitrary body returning *RateQuotesResponse
func (*ClientWithResponses) RateQuotesWithResponse ¶
func (c *ClientWithResponses) RateQuotesWithResponse(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*RateQuotesResponse, error)
func (*ClientWithResponses) ResolveAddressWithBodyWithResponse ¶
func (c *ClientWithResponses) ResolveAddressWithBodyWithResponse(ctx context.Context, params *ResolveAddressParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResolveAddressResponse, error)
ResolveAddressWithBodyWithResponse request with arbitrary body returning *ResolveAddressResponse
func (*ClientWithResponses) ResolveAddressWithResponse ¶
func (c *ClientWithResponses) ResolveAddressWithResponse(ctx context.Context, params *ResolveAddressParams, body ResolveAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*ResolveAddressResponse, error)
func (*ClientWithResponses) ShipmentResultsWithBodyWithResponse ¶
func (c *ClientWithResponses) ShipmentResultsWithBodyWithResponse(ctx context.Context, params *ShipmentResultsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ShipmentResultsResponse, error)
ShipmentResultsWithBodyWithResponse request with arbitrary body returning *ShipmentResultsResponse
func (*ClientWithResponses) ShipmentResultsWithResponse ¶
func (c *ClientWithResponses) ShipmentResultsWithResponse(ctx context.Context, params *ShipmentResultsParams, body ShipmentResultsJSONRequestBody, reqEditors ...RequestEditorFn) (*ShipmentResultsResponse, error)
func (*ClientWithResponses) TrackByNumbersWithBodyWithResponse ¶
func (c *ClientWithResponses) TrackByNumbersWithBodyWithResponse(ctx context.Context, params *TrackByNumbersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TrackByNumbersResponse, error)
TrackByNumbersWithBodyWithResponse request with arbitrary body returning *TrackByNumbersResponse
func (*ClientWithResponses) TrackByNumbersWithResponse ¶
func (c *ClientWithResponses) TrackByNumbersWithResponse(ctx context.Context, params *TrackByNumbersParams, body TrackByNumbersJSONRequestBody, reqEditors ...RequestEditorFn) (*TrackByNumbersResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ResolveAddressWithBodyWithResponse request with any body
ResolveAddressWithBodyWithResponse(ctx context.Context, params *ResolveAddressParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ResolveAddressResponse, error)
ResolveAddressWithResponse(ctx context.Context, params *ResolveAddressParams, body ResolveAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*ResolveAddressResponse, error)
// OauthTokenWithBodyWithResponse request with any body
OauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)
OauthTokenWithFormdataBodyWithResponse(ctx context.Context, body OauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*OauthTokenResponse, error)
// RateQuotesWithBodyWithResponse request with any body
RateQuotesWithBodyWithResponse(ctx context.Context, params *RateQuotesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RateQuotesResponse, error)
RateQuotesWithResponse(ctx context.Context, params *RateQuotesParams, body RateQuotesJSONRequestBody, reqEditors ...RequestEditorFn) (*RateQuotesResponse, error)
// CreateShipmentWithBodyWithResponse request with any body
CreateShipmentWithBodyWithResponse(ctx context.Context, params *CreateShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateShipmentResponse, error)
CreateShipmentWithResponse(ctx context.Context, params *CreateShipmentParams, body CreateShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateShipmentResponse, error)
// CancelShipmentWithBodyWithResponse request with any body
CancelShipmentWithBodyWithResponse(ctx context.Context, params *CancelShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CancelShipmentResponse, error)
CancelShipmentWithResponse(ctx context.Context, params *CancelShipmentParams, body CancelShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CancelShipmentResponse, error)
// ShipmentResultsWithBodyWithResponse request with any body
ShipmentResultsWithBodyWithResponse(ctx context.Context, params *ShipmentResultsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ShipmentResultsResponse, error)
ShipmentResultsWithResponse(ctx context.Context, params *ShipmentResultsParams, body ShipmentResultsJSONRequestBody, reqEditors ...RequestEditorFn) (*ShipmentResultsResponse, error)
// TrackByNumbersWithBodyWithResponse request with any body
TrackByNumbersWithBodyWithResponse(ctx context.Context, params *TrackByNumbersParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*TrackByNumbersResponse, error)
TrackByNumbersWithResponse(ctx context.Context, params *TrackByNumbersParams, body TrackByNumbersJSONRequestBody, reqEditors ...RequestEditorFn) (*TrackByNumbersResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateShipmentJSONBody ¶
type CreateShipmentJSONBody map[string]interface{}
CreateShipmentJSONBody defines parameters for CreateShipment.
type CreateShipmentJSONRequestBody ¶
type CreateShipmentJSONRequestBody CreateShipmentJSONBody
CreateShipmentJSONRequestBody defines body for CreateShipment for application/json ContentType.
type CreateShipmentParams ¶
type CreateShipmentParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
CreateShipmentParams defines parameters for CreateShipment.
type CreateShipmentResponse ¶
type CreateShipmentResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseCreateShipmentResponse ¶
func ParseCreateShipmentResponse(rsp *http.Response) (*CreateShipmentResponse, error)
ParseCreateShipmentResponse parses an HTTP response from a CreateShipmentWithResponse call
func (CreateShipmentResponse) Status ¶
func (r CreateShipmentResponse) Status() string
Status returns HTTPResponse.Status
func (CreateShipmentResponse) StatusCode ¶
func (r CreateShipmentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrorResponse ¶
type ErrorResponse struct {
Errors *[]map[string]interface{} `json:"errors,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorResponse defines model for ErrorResponse.
func (ErrorResponse) Get ¶
func (a ErrorResponse) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorResponse. Returns the specified element and whether it was found
func (ErrorResponse) MarshalJSON ¶
func (a ErrorResponse) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorResponse to handle AdditionalProperties
func (*ErrorResponse) Set ¶
func (a *ErrorResponse) Set(fieldName string, value interface{})
Setter for additional properties for ErrorResponse
func (*ErrorResponse) UnmarshalJSON ¶
func (a *ErrorResponse) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorResponse to handle AdditionalProperties
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type OAuthTokenResponse ¶
type OAuthTokenResponse struct {
AccessToken *string `json:"access_token,omitempty"`
ExpiresIn *int `json:"expires_in,omitempty"`
Scope *string `json:"scope,omitempty"`
TokenType *string `json:"token_type,omitempty"`
}
OAuthTokenResponse defines model for OAuthTokenResponse.
type OauthTokenFormdataBody ¶
type OauthTokenFormdataBody struct {
ClientId string `form:"client_id" json:"client_id"`
ClientSecret string `form:"client_secret" json:"client_secret"`
GrantType OauthTokenFormdataBodyGrantType `form:"grant_type" json:"grant_type"`
}
OauthTokenFormdataBody defines parameters for OauthToken.
type OauthTokenFormdataBodyGrantType ¶
type OauthTokenFormdataBodyGrantType string
OauthTokenFormdataBodyGrantType defines parameters for OauthToken.
const (
ClientCredentials OauthTokenFormdataBodyGrantType = "client_credentials"
)
Defines values for OauthTokenFormdataBodyGrantType.
type OauthTokenFormdataRequestBody ¶
type OauthTokenFormdataRequestBody OauthTokenFormdataBody
OauthTokenFormdataRequestBody defines body for OauthToken for application/x-www-form-urlencoded ContentType.
type OauthTokenResponse ¶
type OauthTokenResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *OAuthTokenResponse
JSONDefault *ErrorResponse
}
func ParseOauthTokenResponse ¶
func ParseOauthTokenResponse(rsp *http.Response) (*OauthTokenResponse, error)
ParseOauthTokenResponse parses an HTTP response from a OauthTokenWithResponse call
func (OauthTokenResponse) Status ¶
func (r OauthTokenResponse) Status() string
Status returns HTTPResponse.Status
func (OauthTokenResponse) StatusCode ¶
func (r OauthTokenResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RateQuotesJSONBody ¶
type RateQuotesJSONBody map[string]interface{}
RateQuotesJSONBody defines parameters for RateQuotes.
type RateQuotesJSONRequestBody ¶
type RateQuotesJSONRequestBody RateQuotesJSONBody
RateQuotesJSONRequestBody defines body for RateQuotes for application/json ContentType.
type RateQuotesParams ¶
type RateQuotesParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
RateQuotesParams defines parameters for RateQuotes.
type RateQuotesResponse ¶
type RateQuotesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseRateQuotesResponse ¶
func ParseRateQuotesResponse(rsp *http.Response) (*RateQuotesResponse, error)
ParseRateQuotesResponse parses an HTTP response from a RateQuotesWithResponse call
func (RateQuotesResponse) Status ¶
func (r RateQuotesResponse) Status() string
Status returns HTTPResponse.Status
func (RateQuotesResponse) StatusCode ¶
func (r RateQuotesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResolveAddressJSONBody ¶
type ResolveAddressJSONBody map[string]interface{}
ResolveAddressJSONBody defines parameters for ResolveAddress.
type ResolveAddressJSONRequestBody ¶
type ResolveAddressJSONRequestBody ResolveAddressJSONBody
ResolveAddressJSONRequestBody defines body for ResolveAddress for application/json ContentType.
type ResolveAddressParams ¶
type ResolveAddressParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
ResolveAddressParams defines parameters for ResolveAddress.
type ResolveAddressResponse ¶
type ResolveAddressResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseResolveAddressResponse ¶
func ParseResolveAddressResponse(rsp *http.Response) (*ResolveAddressResponse, error)
ParseResolveAddressResponse parses an HTTP response from a ResolveAddressWithResponse call
func (ResolveAddressResponse) Status ¶
func (r ResolveAddressResponse) Status() string
Status returns HTTPResponse.Status
func (ResolveAddressResponse) StatusCode ¶
func (r ResolveAddressResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ShipmentResultsJSONBody ¶
type ShipmentResultsJSONBody map[string]interface{}
ShipmentResultsJSONBody defines parameters for ShipmentResults.
type ShipmentResultsJSONRequestBody ¶
type ShipmentResultsJSONRequestBody ShipmentResultsJSONBody
ShipmentResultsJSONRequestBody defines body for ShipmentResults for application/json ContentType.
type ShipmentResultsParams ¶
type ShipmentResultsParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
ShipmentResultsParams defines parameters for ShipmentResults.
type ShipmentResultsResponse ¶
type ShipmentResultsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseShipmentResultsResponse ¶
func ParseShipmentResultsResponse(rsp *http.Response) (*ShipmentResultsResponse, error)
ParseShipmentResultsResponse parses an HTTP response from a ShipmentResultsWithResponse call
func (ShipmentResultsResponse) Status ¶
func (r ShipmentResultsResponse) Status() string
Status returns HTTPResponse.Status
func (ShipmentResultsResponse) StatusCode ¶
func (r ShipmentResultsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type TrackByNumbersJSONBody ¶
type TrackByNumbersJSONBody map[string]interface{}
TrackByNumbersJSONBody defines parameters for TrackByNumbers.
type TrackByNumbersJSONRequestBody ¶
type TrackByNumbersJSONRequestBody TrackByNumbersJSONBody
TrackByNumbersJSONRequestBody defines body for TrackByNumbers for application/json ContentType.
type TrackByNumbersParams ¶
type TrackByNumbersParams struct {
XCustomerTransactionId *XCustomerTransactionId `json:"x-customer-transaction-id,omitempty"`
XLocale *XLocale `json:"x-locale,omitempty"`
}
TrackByNumbersParams defines parameters for TrackByNumbers.
type TrackByNumbersResponse ¶
type TrackByNumbersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *map[string]interface{}
JSONDefault *ErrorResponse
}
func ParseTrackByNumbersResponse ¶
func ParseTrackByNumbersResponse(rsp *http.Response) (*TrackByNumbersResponse, error)
ParseTrackByNumbersResponse parses an HTTP response from a TrackByNumbersWithResponse call
func (TrackByNumbersResponse) Status ¶
func (r TrackByNumbersResponse) Status() string
Status returns HTTPResponse.Status
func (TrackByNumbersResponse) StatusCode ¶
func (r TrackByNumbersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type XCustomerTransactionId ¶
type XCustomerTransactionId = string
XCustomerTransactionId defines model for XCustomerTransactionId.