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 ¶
- func NewSubmitInventoryUpdateRequest(server string, warehouseId string, body SubmitInventoryUpdateJSONRequestBody) (*http.Request, error)
- func NewSubmitInventoryUpdateRequestWithBody(server string, warehouseId string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) SubmitInventoryUpdateWithBodyWithResponse(ctx context.Context, warehouseId string, contentType string, body io.Reader) (*SubmitInventoryUpdateResp, error)
- func (c *ClientWithResponses) SubmitInventoryUpdateWithResponse(ctx context.Context, warehouseId string, ...) (*SubmitInventoryUpdateResp, error)
- type ClientWithResponsesInterface
- type Error
- type ErrorList
- type HttpRequestDoer
- type InventoryUpdate
- type ItemDetails
- type ItemQuantity
- type PartyIdentification
- type RequestEditorFn
- type ResponseEditorFn
- type SubmitInventoryUpdateJSONRequestBody
- type SubmitInventoryUpdateRequest
- type SubmitInventoryUpdateResp
- type SubmitInventoryUpdateResponse
- type TransactionReference
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
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 ¶
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 ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseEditorFn ¶
func WithResponseEditorFn(fn ResponseEditorFn) ClientOption
WithResponseEditorFn allows setting up a callback function, which will be called right after receive the response.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) 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 ¶
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 ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResponseEditorFn ¶
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 ¶
type SubmitInventoryUpdateResp struct { Body []byte HTTPResponse *http.Response JSON202 *SubmitInventoryUpdateResponse JSON400 *SubmitInventoryUpdateResponse JSON403 *SubmitInventoryUpdateResponse JSON404 *SubmitInventoryUpdateResponse JSON413 *SubmitInventoryUpdateResponse JSON415 *SubmitInventoryUpdateResponse JSON429 *SubmitInventoryUpdateResponse JSON500 *SubmitInventoryUpdateResponse JSON503 *SubmitInventoryUpdateResponse }
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.