vdfinventoryv1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubmitInventoryUpdateRequest

func NewSubmitInventoryUpdateRequest(server string, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*http.Request, error)

NewSubmitInventoryUpdateRequest calls the generic SubmitInventoryUpdate builder with application/json body

func NewSubmitInventoryUpdateRequestWithBody

func NewSubmitInventoryUpdateRequestWithBody(server string, warehouseId string, contentType string, body io.Reader) (*http.Request, error)

NewSubmitInventoryUpdateRequestWithBody generates requests for SubmitInventoryUpdate 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

	// 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) SubmitInventoryUpdate

func (c *Client) SubmitInventoryUpdate(ctx context.Context, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*http.Response, error)

func (*Client) SubmitInventoryUpdateWithBody

func (c *Client) SubmitInventoryUpdateWithBody(ctx context.Context, warehouseId string, contentType string, body io.Reader) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// SubmitInventoryUpdateWithBody request with any body
	SubmitInventoryUpdateWithBody(ctx context.Context, warehouseId string, contentType string, body io.Reader) (*http.Response, error)

	SubmitInventoryUpdate(ctx context.Context, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*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.

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

func (c *ClientWithResponses) SubmitInventoryUpdateWithBodyWithResponse(ctx context.Context, warehouseId string, contentType string, body io.Reader) (*SubmitInventoryUpdateResp, error)

SubmitInventoryUpdateWithBodyWithResponse request with arbitrary body returning *SubmitInventoryUpdateResp

func (*ClientWithResponses) SubmitInventoryUpdateWithResponse

func (c *ClientWithResponses) SubmitInventoryUpdateWithResponse(ctx context.Context, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*SubmitInventoryUpdateResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// SubmitInventoryUpdateWithBodyWithResponse request with any body
	SubmitInventoryUpdateWithBodyWithResponse(ctx context.Context, warehouseId string, contentType string, body io.Reader) (*SubmitInventoryUpdateResp, error)

	SubmitInventoryUpdateWithResponse(ctx context.Context, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*SubmitInventoryUpdateResp, error)
}

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

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 HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InventoryUpdate

type InventoryUpdate struct {
	// IsFullUpdate When `true`, this request contains a full feed. When `false`, this request contains a partial feed. When sending a full feed, you must send information about all items in the warehouse. Any items not in the full feed are updated as not available. When sending a partial feed, only include the items that need an inventory update. The status of other items will remain unchanged.
	IsFullUpdate bool `json:"isFullUpdate"`

	// Items A list of inventory items with updated details, including quantity available.
	Items []ItemDetails `json:"items"`

	// SellingParty Name, address and tax details for a group.
	SellingParty PartyIdentification `json:"sellingParty"`
}

InventoryUpdate Inventory details required to update some or all items for the requested warehouse.

type ItemDetails

type ItemDetails struct {
	// AvailableQuantity Details about item quantity.
	AvailableQuantity ItemQuantity `json:"availableQuantity"`

	// BuyerProductIdentifier The buyer-selected product identification for the item. Either `buyerProductIdentifier` or `vendorProductIdentifier` must be submitted.
	BuyerProductIdentifier *string `json:"buyerProductIdentifier,omitempty"`

	// IsObsolete When `true`, the item is permanently unavailable.
	IsObsolete *bool `json:"isObsolete,omitempty"`

	// VendorProductIdentifier The vendor selected product identification for the item. Either `buyerProductIdentifier` or `vendorProductIdentifier` must be submitted.
	VendorProductIdentifier *string `json:"vendorProductIdentifier,omitempty"`
}

ItemDetails Updated inventory details for an item.

type ItemQuantity

type ItemQuantity struct {
	// Amount Quantity of units available for a specific item.
	Amount *int `json:"amount,omitempty"`

	// UnitOfMeasure Unit of measure for the available quantity.
	UnitOfMeasure string `json:"unitOfMeasure"`
}

ItemQuantity Details about item quantity.

type PartyIdentification

type PartyIdentification struct {
	// PartyId Assigned identification for the party.
	PartyId string `json:"partyId"`
}

PartyIdentification Name, address and tax details for a group.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

type SubmitInventoryUpdateJSONRequestBody

type SubmitInventoryUpdateJSONRequestBody = SubmitInventoryUpdateRequest

SubmitInventoryUpdateJSONRequestBody defines body for SubmitInventoryUpdate for application/json ContentType.

type SubmitInventoryUpdateRequest

type SubmitInventoryUpdateRequest struct {
	// Inventory Inventory details required to update some or all items for the requested warehouse.
	Inventory *InventoryUpdate `json:"inventory,omitempty"`
}

SubmitInventoryUpdateRequest The request body for the `submitInventoryUpdate` operation.

type SubmitInventoryUpdateResp

func ParseSubmitInventoryUpdateResp

func ParseSubmitInventoryUpdateResp(rsp *http.Response) (*SubmitInventoryUpdateResp, error)

ParseSubmitInventoryUpdateResp parses an HTTP response from a SubmitInventoryUpdateWithResponse call

func (SubmitInventoryUpdateResp) Status

func (r SubmitInventoryUpdateResp) Status() string

Status returns HTTPResponse.Status

func (SubmitInventoryUpdateResp) StatusCode

func (r SubmitInventoryUpdateResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SubmitInventoryUpdateResponse

type SubmitInventoryUpdateResponse struct {
	// Errors A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// Payload A response that contains the transaction ID.
	Payload *TransactionReference `json:"payload,omitempty"`
}

SubmitInventoryUpdateResponse The response schema for the `submitInventoryUpdate` operation.

type TransactionReference

type TransactionReference struct {
	// TransactionId GUID to identify this transaction. This value can be used with the Transaction Status API to return the status of this transaction.
	TransactionId *string `json:"transactionId,omitempty"`
}

TransactionReference A response that contains the transaction ID.

Jump to

Keyboard shortcuts

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