Documentation ¶
Overview ¶
Package tinymile_api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.1-0.20220609223533-7da811e1cf30 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateOrderRequest(server string, body CreateOrderJSONRequestBody) (*http.Request, error)
- func NewCreateOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostOrderDroppedOffRequest(server string, deliveryJobUuid openapi_types.UUID, ...) (*http.Request, error)
- func NewPostOrderDroppedOffRequestWithBody(server string, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*http.Request, error)
- func NewPostOrderPickedUpRequest(server string, deliveryJobUuid openapi_types.UUID, ...) (*http.Request, error)
- func NewPostOrderPickedUpRequestWithBody(server string, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*http.Request, error)
- func NewRequestQuoteRequest(server string, body RequestQuoteJSONRequestBody) (*http.Request, error)
- func NewRequestQuoteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewSetWebhooksRequest(server string, body SetWebhooksJSONRequestBody) (*http.Request, error)
- func NewSetWebhooksRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type AddressDescription
- type Client
- func (c *Client) CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostOrderDroppedOff(ctx context.Context, deliveryJobUuid openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) PostOrderDroppedOffWithBody(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*http.Response, error)
- func (c *Client) PostOrderPickedUp(ctx context.Context, deliveryJobUuid openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) PostOrderPickedUpWithBody(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*http.Response, error)
- func (c *Client) RequestQuote(ctx context.Context, body RequestQuoteJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RequestQuoteWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) SetWebhooks(ctx context.Context, body SetWebhooksJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) SetWebhooksWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateOrderResponse, error)
- func (c *ClientWithResponses) CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, ...) (*CreateOrderResponse, error)
- func (c *ClientWithResponses) PostOrderDroppedOffWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*PostOrderDroppedOffResponse, error)
- func (c *ClientWithResponses) PostOrderDroppedOffWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, ...) (*PostOrderDroppedOffResponse, error)
- func (c *ClientWithResponses) PostOrderPickedUpWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, ...) (*PostOrderPickedUpResponse, error)
- func (c *ClientWithResponses) PostOrderPickedUpWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, ...) (*PostOrderPickedUpResponse, error)
- func (c *ClientWithResponses) RequestQuoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RequestQuoteResponse, error)
- func (c *ClientWithResponses) RequestQuoteWithResponse(ctx context.Context, body RequestQuoteJSONRequestBody, ...) (*RequestQuoteResponse, error)
- func (c *ClientWithResponses) SetWebhooksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*SetWebhooksResponse, error)
- func (c *ClientWithResponses) SetWebhooksWithResponse(ctx context.Context, body SetWebhooksJSONRequestBody, ...) (*SetWebhooksResponse, error)
- type ClientWithResponsesInterface
- type CompleteAddress
- type Courier
- type CourierEvent
- type CourierEventKind
- type CourierState
- type CourierType
- type CreateOrderClientErrorResponse
- func (t CreateOrderClientErrorResponse) AsDeliveryOrderRejection() (DeliveryOrderRejection, error)
- func (t CreateOrderClientErrorResponse) AsInvalidClientActionError() (InvalidClientActionError, error)
- func (t *CreateOrderClientErrorResponse) FromDeliveryOrderRejection(v DeliveryOrderRejection) error
- func (t *CreateOrderClientErrorResponse) FromInvalidClientActionError(v InvalidClientActionError) error
- func (t CreateOrderClientErrorResponse) MarshalJSON() ([]byte, error)
- func (t *CreateOrderClientErrorResponse) UnmarshalJSON(b []byte) error
- type CreateOrderJSONBody
- type CreateOrderJSONRequestBody
- type CreateOrderResponse
- type DeliveryCharges
- type DeliveryJob
- type DeliveryJobEvent
- type DeliveryJobEventKind
- type DeliveryJobStage
- type DeliveryOrder
- type DeliveryOrderCreationRequest
- type DeliveryOrderParty
- type DeliveryOrderQuote
- type DeliveryOrderQuoteRequest
- type DeliveryOrderRejection
- type DeliveryOrderRejectionReason
- type DeliveryOrderStatus
- type DeliveryService
- type GeocodeLogEntry
- type GeocodedAddress
- type HttpRequestDoer
- type InvalidClientActionError
- type InvalidClientActionErrorReason
- type NotifyParty
- type PostOrderDroppedOffJSONBody
- type PostOrderDroppedOffJSONRequestBody
- type PostOrderDroppedOffResponse
- type PostOrderPickedUpJSONBody
- type PostOrderPickedUpJSONRequestBody
- type PostOrderPickedUpResponse
- type RequestEditorFn
- type RequestQuoteClientErrorResponse
- func (t RequestQuoteClientErrorResponse) AsDeliveryOrderRejection() (DeliveryOrderRejection, error)
- func (t RequestQuoteClientErrorResponse) AsInvalidClientActionError() (InvalidClientActionError, error)
- func (t *RequestQuoteClientErrorResponse) FromDeliveryOrderRejection(v DeliveryOrderRejection) error
- func (t *RequestQuoteClientErrorResponse) FromInvalidClientActionError(v InvalidClientActionError) error
- func (t RequestQuoteClientErrorResponse) MarshalJSON() ([]byte, error)
- func (t *RequestQuoteClientErrorResponse) UnmarshalJSON(b []byte) error
- type RequestQuoteJSONBody
- type RequestQuoteJSONRequestBody
- type RequestQuoteResponse
- type SetWebhooksJSONBody
- type SetWebhooksJSONRequestBody
- type SetWebhooksResponse
- type Webhook
- type Webhooks
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateOrderRequest ¶
func NewCreateOrderRequest(server string, body CreateOrderJSONRequestBody) (*http.Request, error)
NewCreateOrderRequest calls the generic CreateOrder builder with application/json body
func NewCreateOrderRequestWithBody ¶
func NewCreateOrderRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateOrderRequestWithBody generates requests for CreateOrder with any type of body
func NewPostOrderDroppedOffRequest ¶
func NewPostOrderDroppedOffRequest(server string, deliveryJobUuid openapi_types.UUID, body PostOrderDroppedOffJSONRequestBody) (*http.Request, error)
NewPostOrderDroppedOffRequest calls the generic PostOrderDroppedOff builder with application/json body
func NewPostOrderDroppedOffRequestWithBody ¶
func NewPostOrderDroppedOffRequestWithBody(server string, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)
NewPostOrderDroppedOffRequestWithBody generates requests for PostOrderDroppedOff with any type of body
func NewPostOrderPickedUpRequest ¶
func NewPostOrderPickedUpRequest(server string, deliveryJobUuid openapi_types.UUID, body PostOrderPickedUpJSONRequestBody) (*http.Request, error)
NewPostOrderPickedUpRequest calls the generic PostOrderPickedUp builder with application/json body
func NewPostOrderPickedUpRequestWithBody ¶
func NewPostOrderPickedUpRequestWithBody(server string, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)
NewPostOrderPickedUpRequestWithBody generates requests for PostOrderPickedUp with any type of body
func NewRequestQuoteRequest ¶
func NewRequestQuoteRequest(server string, body RequestQuoteJSONRequestBody) (*http.Request, error)
NewRequestQuoteRequest calls the generic RequestQuote builder with application/json body
func NewRequestQuoteRequestWithBody ¶
func NewRequestQuoteRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewRequestQuoteRequestWithBody generates requests for RequestQuote with any type of body
func NewSetWebhooksRequest ¶
func NewSetWebhooksRequest(server string, body SetWebhooksJSONRequestBody) (*http.Request, error)
NewSetWebhooksRequest calls the generic SetWebhooks builder with application/json body
Types ¶
type AddressDescription ¶
type AddressDescription struct { AddressLine1 string `json:"addressLine1"` AddressLine2 *string `json:"addressLine2,omitempty"` Country string `json:"country"` EstablishmentName *string `json:"establishmentName,omitempty"` Locality string `json:"locality"` PostalCode string `json:"postalCode"` State string `json:"state"` }
AddressDescription defines model for AddressDescription.
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) CreateOrder ¶
func (c *Client) CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateOrderWithBody ¶
func (*Client) PostOrderDroppedOff ¶
func (c *Client) PostOrderDroppedOff(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderDroppedOffJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostOrderDroppedOffWithBody ¶
func (*Client) PostOrderPickedUp ¶
func (c *Client) PostOrderPickedUp(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderPickedUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostOrderPickedUpWithBody ¶
func (*Client) RequestQuote ¶
func (c *Client) RequestQuote(ctx context.Context, body RequestQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) RequestQuoteWithBody ¶
func (*Client) SetWebhooks ¶
func (c *Client) SetWebhooks(ctx context.Context, body SetWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // PostOrderDroppedOff request with any body PostOrderDroppedOffWithBody(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostOrderDroppedOff(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderDroppedOffJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // PostOrderPickedUp request with any body PostOrderPickedUpWithBody(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostOrderPickedUp(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderPickedUpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateOrder request with any body CreateOrderWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateOrder(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // RequestQuote request with any body RequestQuoteWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) RequestQuote(ctx context.Context, body RequestQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // SetWebhooks request with any body SetWebhooksWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) SetWebhooks(ctx context.Context, body SetWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithAPIKeyAuthentication ¶
func WithAPIKeyAuthentication(apiKey string) ClientOption
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) CreateOrderWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error)
CreateOrderWithBodyWithResponse request with arbitrary body returning *CreateOrderResponse
func (*ClientWithResponses) CreateOrderWithResponse ¶
func (c *ClientWithResponses) CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error)
func (*ClientWithResponses) PostOrderDroppedOffWithBodyWithResponse ¶
func (c *ClientWithResponses) PostOrderDroppedOffWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrderDroppedOffResponse, error)
PostOrderDroppedOffWithBodyWithResponse request with arbitrary body returning *PostOrderDroppedOffResponse
func (*ClientWithResponses) PostOrderDroppedOffWithResponse ¶
func (c *ClientWithResponses) PostOrderDroppedOffWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderDroppedOffJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrderDroppedOffResponse, error)
func (*ClientWithResponses) PostOrderPickedUpWithBodyWithResponse ¶
func (c *ClientWithResponses) PostOrderPickedUpWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrderPickedUpResponse, error)
PostOrderPickedUpWithBodyWithResponse request with arbitrary body returning *PostOrderPickedUpResponse
func (*ClientWithResponses) PostOrderPickedUpWithResponse ¶
func (c *ClientWithResponses) PostOrderPickedUpWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderPickedUpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrderPickedUpResponse, error)
func (*ClientWithResponses) RequestQuoteWithBodyWithResponse ¶
func (c *ClientWithResponses) RequestQuoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestQuoteResponse, error)
RequestQuoteWithBodyWithResponse request with arbitrary body returning *RequestQuoteResponse
func (*ClientWithResponses) RequestQuoteWithResponse ¶
func (c *ClientWithResponses) RequestQuoteWithResponse(ctx context.Context, body RequestQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestQuoteResponse, error)
func (*ClientWithResponses) SetWebhooksWithBodyWithResponse ¶
func (c *ClientWithResponses) SetWebhooksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetWebhooksResponse, error)
SetWebhooksWithBodyWithResponse request with arbitrary body returning *SetWebhooksResponse
func (*ClientWithResponses) SetWebhooksWithResponse ¶
func (c *ClientWithResponses) SetWebhooksWithResponse(ctx context.Context, body SetWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*SetWebhooksResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // PostOrderDroppedOff request with any body PostOrderDroppedOffWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrderDroppedOffResponse, error) PostOrderDroppedOffWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderDroppedOffJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrderDroppedOffResponse, error) // PostOrderPickedUp request with any body PostOrderPickedUpWithBodyWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrderPickedUpResponse, error) PostOrderPickedUpWithResponse(ctx context.Context, deliveryJobUuid openapi_types.UUID, body PostOrderPickedUpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrderPickedUpResponse, error) // CreateOrder request with any body CreateOrderWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) CreateOrderWithResponse(ctx context.Context, body CreateOrderJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateOrderResponse, error) // RequestQuote request with any body RequestQuoteWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RequestQuoteResponse, error) RequestQuoteWithResponse(ctx context.Context, body RequestQuoteJSONRequestBody, reqEditors ...RequestEditorFn) (*RequestQuoteResponse, error) // SetWebhooks request with any body SetWebhooksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetWebhooksResponse, error) SetWebhooksWithResponse(ctx context.Context, body SetWebhooksJSONRequestBody, reqEditors ...RequestEditorFn) (*SetWebhooksResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CompleteAddress ¶
type CompleteAddress struct { AddressDescription AddressDescription `json:"addressDescription"` GeocodedAddress GeocodedAddress `json:"geocodedAddress"` }
CompleteAddress defines model for CompleteAddress.
type Courier ¶
type Courier struct { ActiveDeliveryUuid openapi_types.UUID `json:"activeDeliveryUuid"` IsAcceptingDeliveries bool `json:"isAcceptingDeliveries"` LastKnownPosition *GeocodeLogEntry `json:"lastKnownPosition,omitempty"` Name string `json:"name"` State CourierState `json:"state"` Type CourierType `json:"type"` Uuid openapi_types.UUID `json:"uuid"` }
Courier defines model for Courier.
type CourierEvent ¶
type CourierEvent struct { Courier Courier `json:"courier"` CourierBefore *Courier `json:"courierBefore,omitempty"` Kind CourierEventKind `json:"kind"` ProducedAt time.Time `json:"producedAt"` Uuid openapi_types.UUID `json:"uuid"` }
CourierEvent defines model for CourierEvent.
type CourierEventKind ¶
type CourierEventKind string
CourierEventKind defines model for CourierEvent.Kind.
const ( CourierAbortedDelivery CourierEventKind = "courier-aborted-delivery" CourierAcceptedDeliveryOffer CourierEventKind = "courier-accepted-delivery-offer" CourierArrivedAtDropOff CourierEventKind = "courier-arrived-at-drop-off" CourierArrivedAtPickUp CourierEventKind = "courier-arrived-at-pick-up" CourierDelegatedActiveDelivery CourierEventKind = "courier-delegated-active-delivery" CourierDroppedOffPackage CourierEventKind = "courier-dropped-off-package" CourierHandedOverPackage CourierEventKind = "courier-handed-over-package" CourierLeftForDropOff CourierEventKind = "courier-left-for-drop-off" CourierLeftForPickUp CourierEventKind = "courier-left-for-pick-up" CourierPickedUpPackage CourierEventKind = "courier-picked-up-package" CourierPositionChanged CourierEventKind = "courier-position-changed" CourierPreparedToHandOver CourierEventKind = "courier-prepared-to-hand-over" CourierReceivedDeliveryOffer CourierEventKind = "courier-received-delivery-offer" CourierRejectedDeliveryOffer CourierEventKind = "courier-rejected-delivery-offer" CourierStartedAcceptingDeliveries CourierEventKind = "courier-started-accepting-deliveries" CourierStoppedAcceptingDeliveries CourierEventKind = "courier-stopped-accepting-deliveries" )
Defines values for CourierEventKind.
type CourierState ¶
type CourierState string
CourierState defines model for Courier.State.
const ( AnalyzingDeliveryOffer CourierState = "analyzing-delivery-offer" EnRouteToDropOff CourierState = "en-route-to-drop-off" EnRouteToPickUp CourierState = "en-route-to-pick-up" PlanningDropOffRoute CourierState = "planning-drop-off-route" PlanningPickUpRoute CourierState = "planning-pick-up-route" Unspecified CourierState = "unspecified" WaitingForDropOff CourierState = "waiting-for-drop-off" WaitingForPickUp CourierState = "waiting-for-pick-up" WaitingToHandOver CourierState = "waiting-to-hand-over" )
Defines values for CourierState.
type CourierType ¶
type CourierType string
CourierType defines model for Courier.Type.
const ( Conventional CourierType = "conventional" Robot CourierType = "robot" )
Defines values for CourierType.
type CreateOrderClientErrorResponse ¶
type CreateOrderClientErrorResponse struct {
// contains filtered or unexported fields
}
CreateOrderClientErrorResponse defines model for CreateOrderClientErrorResponse.
func (CreateOrderClientErrorResponse) AsDeliveryOrderRejection ¶
func (t CreateOrderClientErrorResponse) AsDeliveryOrderRejection() (DeliveryOrderRejection, error)
func (CreateOrderClientErrorResponse) AsInvalidClientActionError ¶
func (t CreateOrderClientErrorResponse) AsInvalidClientActionError() (InvalidClientActionError, error)
func (*CreateOrderClientErrorResponse) FromDeliveryOrderRejection ¶
func (t *CreateOrderClientErrorResponse) FromDeliveryOrderRejection(v DeliveryOrderRejection) error
func (*CreateOrderClientErrorResponse) FromInvalidClientActionError ¶
func (t *CreateOrderClientErrorResponse) FromInvalidClientActionError(v InvalidClientActionError) error
func (CreateOrderClientErrorResponse) MarshalJSON ¶
func (t CreateOrderClientErrorResponse) MarshalJSON() ([]byte, error)
func (*CreateOrderClientErrorResponse) UnmarshalJSON ¶
func (t *CreateOrderClientErrorResponse) UnmarshalJSON(b []byte) error
type CreateOrderJSONBody ¶
type CreateOrderJSONBody = DeliveryOrderCreationRequest
CreateOrderJSONBody defines parameters for CreateOrder.
type CreateOrderJSONRequestBody ¶
type CreateOrderJSONRequestBody = CreateOrderJSONBody
CreateOrderJSONRequestBody defines body for CreateOrder for application/json ContentType.
type CreateOrderResponse ¶
type CreateOrderResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DeliveryOrder JSON400 *CreateOrderClientErrorResponse }
func ParseCreateOrderResponse ¶
func ParseCreateOrderResponse(rsp *http.Response) (*CreateOrderResponse, error)
ParseCreateOrderResponse parses an HTTP response from a CreateOrderWithResponse call
func (CreateOrderResponse) Status ¶
func (r CreateOrderResponse) Status() string
Status returns HTTPResponse.Status
func (CreateOrderResponse) StatusCode ¶
func (r CreateOrderResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeliveryCharges ¶
type DeliveryCharges struct {
TotalInCents int32 `json:"totalInCents"`
}
DeliveryCharges defines model for DeliveryCharges.
type DeliveryJob ¶
type DeliveryJob struct { CompletedAt *time.Time `json:"completedAt,omitempty"` CurrentCourierUUID *openapi_types.UUID `json:"currentCourierUUID,omitempty"` DeliveryCharges DeliveryCharges `json:"deliveryCharges"` DeliveryOrderUuid openapi_types.UUID `json:"deliveryOrderUuid"` DropOffService DeliveryService `json:"dropOffService"` NextCourierUUID *openapi_types.UUID `json:"nextCourierUUID,omitempty"` PickUpService DeliveryService `json:"pickUpService"` Stage DeliveryJobStage `json:"stage"` Uuid openapi_types.UUID `json:"uuid"` }
DeliveryJob defines model for DeliveryJob.
type DeliveryJobEvent ¶
type DeliveryJobEvent struct { DeliveryJob DeliveryJob `json:"deliveryJob"` DeliveryJobBefore *DeliveryJob `json:"deliveryJobBefore,omitempty"` Kind DeliveryJobEventKind `json:"kind"` ProducedAt time.Time `json:"producedAt"` Uuid openapi_types.UUID `json:"uuid"` }
DeliveryJobEvent defines model for DeliveryJobEvent.
type DeliveryJobEventKind ¶
type DeliveryJobEventKind string
DeliveryJobEventKind defines model for DeliveryJobEvent.Kind.
const ( DeliveryJobEventKindDeliveryCanceled DeliveryJobEventKind = "delivery-canceled" DeliveryJobEventKindDeliveryCompleted DeliveryJobEventKind = "delivery-completed" DeliveryJobEventKindDeliveryHandedOver DeliveryJobEventKind = "delivery-handed-over" DeliveryJobEventKindDeliveryJobAcceptedByNextCourier DeliveryJobEventKind = "delivery-job-accepted-by-next-courier" DeliveryJobEventKindDeliveryJobAssigned DeliveryJobEventKind = "delivery-job-assigned" DeliveryJobEventKindDeliveryJobCreated DeliveryJobEventKind = "delivery-job-created" DeliveryJobEventKindDeliveryJobDelegatedToNextCourier DeliveryJobEventKind = "delivery-job-delegated-to-next-courier" DeliveryJobEventKindDeliveryJobOfferedToCourier DeliveryJobEventKind = "delivery-job-offered-to-courier" DeliveryJobEventKindDeliveryJobOfferedToNextCourier DeliveryJobEventKind = "delivery-job-offered-to-next-courier" DeliveryJobEventKindDeliveryJobRejectedByCourier DeliveryJobEventKind = "delivery-job-rejected-by-courier" DeliveryJobEventKindDeliveryJobRejectedByNextCourier DeliveryJobEventKind = "delivery-job-rejected-by-next-courier" DeliveryJobEventKindDeliveryJobUnassigned DeliveryJobEventKind = "delivery-job-unassigned" DeliveryJobEventKindDeliveryPickedUp DeliveryJobEventKind = "delivery-picked-up" DeliveryJobEventKindReceivedNewCourierPosition DeliveryJobEventKind = "received-new-courier-position" DeliveryJobEventKindUnassignedNextCourier DeliveryJobEventKind = "unassigned-next-courier" )
Defines values for DeliveryJobEventKind.
type DeliveryJobStage ¶
type DeliveryJobStage string
DeliveryJobStage defines model for DeliveryJob.Stage.
const ( DeliveryJobStageCourierAssignment DeliveryJobStage = "courier-assignment" DeliveryJobStageDeliveryCanceled DeliveryJobStage = "delivery-canceled" DeliveryJobStageDeliveryCompleted DeliveryJobStage = "delivery-completed" DeliveryJobStageDropOff DeliveryJobStage = "drop-off" DeliveryJobStagePickUp DeliveryJobStage = "pick-up" )
Defines values for DeliveryJobStage.
type DeliveryOrder ¶
type DeliveryOrder struct { DeliveryCharges DeliveryCharges `json:"deliveryCharges"` DropOff DeliveryService `json:"dropOff"` ExternalID string `json:"externalID"` IsMock bool `json:"isMock"` PickUp DeliveryService `json:"pickUp"` ReceivedAt time.Time `json:"receivedAt"` Receiver DeliveryOrderParty `json:"receiver"` Shipper DeliveryOrderParty `json:"shipper"` Status DeliveryOrderStatus `json:"status"` Uuid openapi_types.UUID `json:"uuid"` }
DeliveryOrder defines model for DeliveryOrder.
type DeliveryOrderCreationRequest ¶
type DeliveryOrderCreationRequest struct { DropOffAddress CompleteAddress `json:"dropOffAddress"` DropOffDeadlineAt *time.Time `json:"dropOffDeadlineAt,omitempty"` DropOffNotes *string `json:"dropOffNotes,omitempty"` DropOffNotifyParty *NotifyParty `json:"dropOffNotifyParty,omitempty"` ExternalID string `json:"externalID"` IsMock *bool `json:"isMock,omitempty"` PickUpAddress CompleteAddress `json:"pickUpAddress"` PickUpDeadlineAt *time.Time `json:"pickUpDeadlineAt,omitempty"` PickUpNotes *string `json:"pickUpNotes,omitempty"` PickUpNotifyParty *NotifyParty `json:"pickUpNotifyParty,omitempty"` Receiver DeliveryOrderParty `json:"receiver"` Shipper DeliveryOrderParty `json:"shipper"` }
DeliveryOrderCreationRequest defines model for DeliveryOrderCreationRequest.
type DeliveryOrderParty ¶
type DeliveryOrderParty struct { Email *string `json:"email,omitempty"` IsBusiness bool `json:"isBusiness"` Name string `json:"name"` PhoneNumber *string `json:"phoneNumber,omitempty"` }
DeliveryOrderParty defines model for DeliveryOrderParty.
type DeliveryOrderQuote ¶
type DeliveryOrderQuote struct { DeliveryCharges DeliveryCharges `json:"deliveryCharges"` DropOffAddress CompleteAddress `json:"dropOffAddress"` DropOffAfter time.Time `json:"dropOffAfter"` DropOffDeadlineAt time.Time `json:"dropOffDeadlineAt"` GoodUntil time.Time `json:"goodUntil"` IsMock bool `json:"isMock"` PickUpAddress CompleteAddress `json:"pickUpAddress"` PickUpAfter time.Time `json:"pickUpAfter"` PickUpDeadlineAt time.Time `json:"pickUpDeadlineAt"` ReceivedAt time.Time `json:"receivedAt"` Uuid openapi_types.UUID `json:"uuid"` }
DeliveryOrderQuote defines model for DeliveryOrderQuote.
type DeliveryOrderQuoteRequest ¶
type DeliveryOrderQuoteRequest struct { DropOffAddress GeocodedAddress `json:"dropOffAddress"` IsMock *bool `json:"isMock,omitempty"` PickUpAddress GeocodedAddress `json:"pickUpAddress"` }
DeliveryOrderQuoteRequest defines model for DeliveryOrderQuoteRequest.
type DeliveryOrderRejection ¶
type DeliveryOrderRejection struct { Message string `json:"message"` Reason DeliveryOrderRejectionReason `json:"reason"` }
DeliveryOrderRejection defines model for DeliveryOrderRejection.
type DeliveryOrderRejectionReason ¶
type DeliveryOrderRejectionReason string
DeliveryOrderRejectionReason defines model for DeliveryOrderRejection.Reason.
const ( DeliveryDistanceTooLarge DeliveryOrderRejectionReason = "delivery-distance-too-large" NoCapacity DeliveryOrderRejectionReason = "no-capacity" OutsideDeliveryArea DeliveryOrderRejectionReason = "outside-delivery-area" ScheduledDeliveryNotSupported DeliveryOrderRejectionReason = "scheduled-delivery-not-supported" )
Defines values for DeliveryOrderRejectionReason.
type DeliveryOrderStatus ¶
type DeliveryOrderStatus string
DeliveryOrderStatus defines model for DeliveryOrder.Status.
const ( OrderAccepted DeliveryOrderStatus = "order-accepted" OrderCanceled DeliveryOrderStatus = "order-canceled" OrderReceived DeliveryOrderStatus = "order-received" OrderRejected DeliveryOrderStatus = "order-rejected" )
Defines values for DeliveryOrderStatus.
type DeliveryService ¶
type DeliveryService struct { Address CompleteAddress `json:"address"` DeadlineAt time.Time `json:"deadlineAt"` EstimatedAt time.Time `json:"estimatedAt"` IsSelfServiceAvailable bool `json:"isSelfServiceAvailable"` Notes string `json:"notes"` NotifyParty NotifyParty `json:"notifyParty"` ServiceAfter time.Time `json:"serviceAfter"` }
DeliveryService defines model for DeliveryService.
type GeocodeLogEntry ¶
type GeocodeLogEntry struct { GeocodedAddress GeocodedAddress `json:"geocodedAddress"` RecordedAt time.Time `json:"recordedAt"` }
GeocodeLogEntry defines model for GeocodeLogEntry.
type GeocodedAddress ¶
type GeocodedAddress struct { GooglePlaceID *string `json:"googlePlaceID,omitempty"` Lat float64 `json:"lat"` Lng float64 `json:"lng"` }
GeocodedAddress defines model for GeocodedAddress.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InvalidClientActionError ¶
type InvalidClientActionError struct { Message string `json:"message"` Reason InvalidClientActionErrorReason `json:"reason"` }
InvalidClientActionError defines model for InvalidClientActionError.
type InvalidClientActionErrorReason ¶
type InvalidClientActionErrorReason string
InvalidClientActionErrorReason defines model for InvalidClientActionError.Reason.
const ( DeactivatedClient InvalidClientActionErrorReason = "deactivated-client" InvalidArgument InvalidClientActionErrorReason = "invalid-argument" )
Defines values for InvalidClientActionErrorReason.
type NotifyParty ¶
type NotifyParty struct { Email *string `json:"email,omitempty"` Name *string `json:"name,omitempty"` PhoneNumber *string `json:"phoneNumber,omitempty"` }
NotifyParty defines model for NotifyParty.
type PostOrderDroppedOffJSONBody ¶
type PostOrderDroppedOffJSONBody interface{}
PostOrderDroppedOffJSONBody defines parameters for PostOrderDroppedOff.
type PostOrderDroppedOffJSONRequestBody ¶
type PostOrderDroppedOffJSONRequestBody PostOrderDroppedOffJSONBody
PostOrderDroppedOffJSONRequestBody defines body for PostOrderDroppedOff for application/json ContentType.
type PostOrderDroppedOffResponse ¶
type PostOrderDroppedOffResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DeliveryJob JSON400 *InvalidClientActionError }
func ParsePostOrderDroppedOffResponse ¶
func ParsePostOrderDroppedOffResponse(rsp *http.Response) (*PostOrderDroppedOffResponse, error)
ParsePostOrderDroppedOffResponse parses an HTTP response from a PostOrderDroppedOffWithResponse call
func (PostOrderDroppedOffResponse) Status ¶
func (r PostOrderDroppedOffResponse) Status() string
Status returns HTTPResponse.Status
func (PostOrderDroppedOffResponse) StatusCode ¶
func (r PostOrderDroppedOffResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostOrderPickedUpJSONBody ¶
type PostOrderPickedUpJSONBody interface{}
PostOrderPickedUpJSONBody defines parameters for PostOrderPickedUp.
type PostOrderPickedUpJSONRequestBody ¶
type PostOrderPickedUpJSONRequestBody PostOrderPickedUpJSONBody
PostOrderPickedUpJSONRequestBody defines body for PostOrderPickedUp for application/json ContentType.
type PostOrderPickedUpResponse ¶
type PostOrderPickedUpResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DeliveryJob JSON400 *InvalidClientActionError }
func ParsePostOrderPickedUpResponse ¶
func ParsePostOrderPickedUpResponse(rsp *http.Response) (*PostOrderPickedUpResponse, error)
ParsePostOrderPickedUpResponse parses an HTTP response from a PostOrderPickedUpWithResponse call
func (PostOrderPickedUpResponse) Status ¶
func (r PostOrderPickedUpResponse) Status() string
Status returns HTTPResponse.Status
func (PostOrderPickedUpResponse) StatusCode ¶
func (r PostOrderPickedUpResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RequestQuoteClientErrorResponse ¶
type RequestQuoteClientErrorResponse struct {
// contains filtered or unexported fields
}
RequestQuoteClientErrorResponse defines model for RequestQuoteClientErrorResponse.
func (RequestQuoteClientErrorResponse) AsDeliveryOrderRejection ¶
func (t RequestQuoteClientErrorResponse) AsDeliveryOrderRejection() (DeliveryOrderRejection, error)
func (RequestQuoteClientErrorResponse) AsInvalidClientActionError ¶
func (t RequestQuoteClientErrorResponse) AsInvalidClientActionError() (InvalidClientActionError, error)
func (*RequestQuoteClientErrorResponse) FromDeliveryOrderRejection ¶
func (t *RequestQuoteClientErrorResponse) FromDeliveryOrderRejection(v DeliveryOrderRejection) error
func (*RequestQuoteClientErrorResponse) FromInvalidClientActionError ¶
func (t *RequestQuoteClientErrorResponse) FromInvalidClientActionError(v InvalidClientActionError) error
func (RequestQuoteClientErrorResponse) MarshalJSON ¶
func (t RequestQuoteClientErrorResponse) MarshalJSON() ([]byte, error)
func (*RequestQuoteClientErrorResponse) UnmarshalJSON ¶
func (t *RequestQuoteClientErrorResponse) UnmarshalJSON(b []byte) error
type RequestQuoteJSONBody ¶
type RequestQuoteJSONBody = DeliveryOrderQuoteRequest
RequestQuoteJSONBody defines parameters for RequestQuote.
type RequestQuoteJSONRequestBody ¶
type RequestQuoteJSONRequestBody = RequestQuoteJSONBody
RequestQuoteJSONRequestBody defines body for RequestQuote for application/json ContentType.
type RequestQuoteResponse ¶
type RequestQuoteResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DeliveryOrderQuote JSON400 *RequestQuoteClientErrorResponse }
func ParseRequestQuoteResponse ¶
func ParseRequestQuoteResponse(rsp *http.Response) (*RequestQuoteResponse, error)
ParseRequestQuoteResponse parses an HTTP response from a RequestQuoteWithResponse call
func (RequestQuoteResponse) Status ¶
func (r RequestQuoteResponse) Status() string
Status returns HTTPResponse.Status
func (RequestQuoteResponse) StatusCode ¶
func (r RequestQuoteResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SetWebhooksJSONBody ¶
type SetWebhooksJSONBody = Webhooks
SetWebhooksJSONBody defines parameters for SetWebhooks.
type SetWebhooksJSONRequestBody ¶
type SetWebhooksJSONRequestBody = SetWebhooksJSONBody
SetWebhooksJSONRequestBody defines body for SetWebhooks for application/json ContentType.
type SetWebhooksResponse ¶
type SetWebhooksResponse struct { Body []byte HTTPResponse *http.Response JSON200 *Webhooks JSON400 *interface{} }
func ParseSetWebhooksResponse ¶
func ParseSetWebhooksResponse(rsp *http.Response) (*SetWebhooksResponse, error)
ParseSetWebhooksResponse parses an HTTP response from a SetWebhooksWithResponse call
func (SetWebhooksResponse) Status ¶
func (r SetWebhooksResponse) Status() string
Status returns HTTPResponse.Status
func (SetWebhooksResponse) StatusCode ¶
func (r SetWebhooksResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode