worldease

package
v1.0.0 Latest Latest
Warning

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

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

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

Documentation

Overview

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

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

Index

Constants

View Source
const (
	OAuth2Scopes = "OAuth2.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteChildShipmentRequest

func NewDeleteChildShipmentRequest(server string, shipmentGccn string, trackingNumber string, params *DeleteChildShipmentParams) (*http.Request, error)

NewDeleteChildShipmentRequest generates requests for DeleteChildShipment

func NewDeleteMasterShipmentRequest

func NewDeleteMasterShipmentRequest(server string, shipmentGccn string, params *DeleteMasterShipmentParams, body DeleteMasterShipmentJSONRequestBody) (*http.Request, error)

NewDeleteMasterShipmentRequest calls the generic DeleteMasterShipment builder with application/json body

func NewDeleteMasterShipmentRequestWithBody

func NewDeleteMasterShipmentRequestWithBody(server string, shipmentGccn string, params *DeleteMasterShipmentParams, contentType string, body io.Reader) (*http.Request, error)

NewDeleteMasterShipmentRequestWithBody generates requests for DeleteMasterShipment with any type of body

func NewSaveCloseOutShipmentRequest

func NewSaveCloseOutShipmentRequest(server string, shipmentGccn string, params *SaveCloseOutShipmentParams, body SaveCloseOutShipmentJSONRequestBody) (*http.Request, error)

NewSaveCloseOutShipmentRequest calls the generic SaveCloseOutShipment builder with application/json body

func NewSaveCloseOutShipmentRequestWithBody

func NewSaveCloseOutShipmentRequestWithBody(server string, shipmentGccn string, params *SaveCloseOutShipmentParams, contentType string, body io.Reader) (*http.Request, error)

NewSaveCloseOutShipmentRequestWithBody generates requests for SaveCloseOutShipment with any type of body

Types

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) DeleteChildShipment

func (c *Client) DeleteChildShipment(ctx context.Context, shipmentGccn string, trackingNumber string, params *DeleteChildShipmentParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteMasterShipment

func (c *Client) DeleteMasterShipment(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, body DeleteMasterShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteMasterShipmentWithBody

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

func (*Client) SaveCloseOutShipment

func (c *Client) SaveCloseOutShipment(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, body SaveCloseOutShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SaveCloseOutShipmentWithBody

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

type ClientInterface

type ClientInterface interface {
	// DeleteChildShipment request
	DeleteChildShipment(ctx context.Context, shipmentGccn string, trackingNumber string, params *DeleteChildShipmentParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SaveCloseOutShipment(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, body SaveCloseOutShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	DeleteMasterShipment(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, body DeleteMasterShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

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

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

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

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

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

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

func (*ClientWithResponses) DeleteChildShipmentWithResponse

func (c *ClientWithResponses) DeleteChildShipmentWithResponse(ctx context.Context, shipmentGccn string, trackingNumber string, params *DeleteChildShipmentParams, reqEditors ...RequestEditorFn) (*DeleteChildShipmentResponse, error)

DeleteChildShipmentWithResponse request returning *DeleteChildShipmentResponse

func (*ClientWithResponses) DeleteMasterShipmentWithBodyWithResponse

func (c *ClientWithResponses) DeleteMasterShipmentWithBodyWithResponse(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMasterShipmentResponse, error)

DeleteMasterShipmentWithBodyWithResponse request with arbitrary body returning *DeleteMasterShipmentResponse

func (*ClientWithResponses) DeleteMasterShipmentWithResponse

func (c *ClientWithResponses) DeleteMasterShipmentWithResponse(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, body DeleteMasterShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMasterShipmentResponse, error)

func (*ClientWithResponses) SaveCloseOutShipmentWithBodyWithResponse

func (c *ClientWithResponses) SaveCloseOutShipmentWithBodyWithResponse(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveCloseOutShipmentResponse, error)

SaveCloseOutShipmentWithBodyWithResponse request with arbitrary body returning *SaveCloseOutShipmentResponse

func (*ClientWithResponses) SaveCloseOutShipmentWithResponse

func (c *ClientWithResponses) SaveCloseOutShipmentWithResponse(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, body SaveCloseOutShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveCloseOutShipmentResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// DeleteChildShipmentWithResponse request
	DeleteChildShipmentWithResponse(ctx context.Context, shipmentGccn string, trackingNumber string, params *DeleteChildShipmentParams, reqEditors ...RequestEditorFn) (*DeleteChildShipmentResponse, error)

	// SaveCloseOutShipmentWithBodyWithResponse request with any body
	SaveCloseOutShipmentWithBodyWithResponse(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SaveCloseOutShipmentResponse, error)

	SaveCloseOutShipmentWithResponse(ctx context.Context, shipmentGccn string, params *SaveCloseOutShipmentParams, body SaveCloseOutShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*SaveCloseOutShipmentResponse, error)

	// DeleteMasterShipmentWithBodyWithResponse request with any body
	DeleteMasterShipmentWithBodyWithResponse(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteMasterShipmentResponse, error)

	DeleteMasterShipmentWithResponse(ctx context.Context, shipmentGccn string, params *DeleteMasterShipmentParams, body DeleteMasterShipmentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteMasterShipmentResponse, error)
}

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

type CustomTransactionId

type CustomTransactionId = string

CustomTransactionId Client generated id which is treated as the Transaction ID

type CustomTransactionSrc

type CustomTransactionSrc = string

CustomTransactionSrc An identifier of the client/source application that is making the request.Length 512

type DeleteChildShipmentParams

type DeleteChildShipmentParams struct {
	TransId        CustomTransactionId  `json:"transId"`
	TransactionSrc CustomTransactionSrc `json:"transactionSrc"`
}

DeleteChildShipmentParams defines parameters for DeleteChildShipment.

type DeleteChildShipmentResponse

type DeleteChildShipmentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteResponse
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
}

func ParseDeleteChildShipmentResponse

func ParseDeleteChildShipmentResponse(rsp *http.Response) (*DeleteChildShipmentResponse, error)

ParseDeleteChildShipmentResponse parses an HTTP response from a DeleteChildShipmentWithResponse call

func (DeleteChildShipmentResponse) Status

Status returns HTTPResponse.Status

func (DeleteChildShipmentResponse) StatusCode

func (r DeleteChildShipmentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteMasterShipmentJSONRequestBody

type DeleteMasterShipmentJSONRequestBody = PostRequest

DeleteMasterShipmentJSONRequestBody defines body for DeleteMasterShipment for application/json ContentType.

type DeleteMasterShipmentParams

type DeleteMasterShipmentParams struct {
	TransId        CustomTransactionId  `json:"transId"`
	TransactionSrc CustomTransactionSrc `json:"transactionSrc"`
}

DeleteMasterShipmentParams defines parameters for DeleteMasterShipment.

type DeleteMasterShipmentResponse

type DeleteMasterShipmentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteResponse
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
}

func ParseDeleteMasterShipmentResponse

func ParseDeleteMasterShipmentResponse(rsp *http.Response) (*DeleteMasterShipmentResponse, error)

ParseDeleteMasterShipmentResponse parses an HTTP response from a DeleteMasterShipmentWithResponse call

func (DeleteMasterShipmentResponse) Status

Status returns HTTPResponse.Status

func (DeleteMasterShipmentResponse) StatusCode

func (r DeleteMasterShipmentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteResponse

type DeleteResponse struct {
	// Code Identifies the success or failure of the transaction. 1 = Successful
	Code string `json:"code"`

	// Message Succesful text message
	Message string `json:"message"`
}

DeleteResponse defines model for deleteResponse.

type Error

type Error struct {
	// Code The code is specific to the error
	Code *string `json:"code,omitempty"`

	// Message The message that associated with the above error code
	Message *string `json:"message,omitempty"`
}

Error defines model for Error.

type ErrorResponse

type ErrorResponse struct {
	// Errors error payload - array containing one or more Errors
	Errors []Error `json:"errors"`
}

ErrorResponse Error response entity

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type PostRequest

type PostRequest struct {
	// ShipperAccountNumber This is the unique account number associated with the Shipper. It is also known as UPS Shipper Account Number
	ShipperAccountNumber string `json:"shipperAccountNumber"`
}

PostRequest defines model for PostRequest.

type PostResponse

type PostResponse struct {
	// Label This will contain master shipment label
	Label struct {
		// LblData Base64 encoded label image
		LblData *string `json:"lblData,omitempty"`

		// LblNmbr The label number assigned to this label
		LblNmbr *string `json:"lblNmbr,omitempty"`

		// OpTyp The is the output type in which label is generated
		OpTyp *PostResponseLabelOpTyp `json:"opTyp,omitempty"`
	} `json:"label"`

	// TransId Client generated id which is treated as the Transaction ID
	TransId CustomTransactionId `json:"transId"`
}

PostResponse defines model for PostResponse.

type PostResponseLabelOpTyp

type PostResponseLabelOpTyp string

PostResponseLabelOpTyp The is the output type in which label is generated

const (
	EPL  PostResponseLabelOpTyp = "EPL"
	GIF  PostResponseLabelOpTyp = "GIF"
	PDF  PostResponseLabelOpTyp = "PDF"
	PNG  PostResponseLabelOpTyp = "PNG"
	SPL  PostResponseLabelOpTyp = "SPL"
	STAR PostResponseLabelOpTyp = "STAR"
	ZPL  PostResponseLabelOpTyp = "ZPL"
)

Defines values for PostResponseLabelOpTyp.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SaveCloseOutShipmentJSONRequestBody

type SaveCloseOutShipmentJSONRequestBody = PostRequest

SaveCloseOutShipmentJSONRequestBody defines body for SaveCloseOutShipment for application/json ContentType.

type SaveCloseOutShipmentParams

type SaveCloseOutShipmentParams struct {
	TransId        CustomTransactionId  `json:"transId"`
	TransactionSrc CustomTransactionSrc `json:"transactionSrc"`
}

SaveCloseOutShipmentParams defines parameters for SaveCloseOutShipment.

type SaveCloseOutShipmentResponse

type SaveCloseOutShipmentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *PostResponse
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON404      *ErrorResponse
}

func ParseSaveCloseOutShipmentResponse

func ParseSaveCloseOutShipmentResponse(rsp *http.Response) (*SaveCloseOutShipmentResponse, error)

ParseSaveCloseOutShipmentResponse parses an HTTP response from a SaveCloseOutShipmentWithResponse call

func (SaveCloseOutShipmentResponse) Status

Status returns HTTPResponse.Status

func (SaveCloseOutShipmentResponse) StatusCode

func (r SaveCloseOutShipmentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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