Documentation ¶
Overview ¶
Package vendorDirectFulfillmentPaymentsv1 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.4 DO NOT EDIT.
Index ¶
- func NewSubmitInvoiceRequest(server string, body SubmitInvoiceJSONRequestBody) (*http.Request, error)
- func NewSubmitInvoiceRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type AdditionalDetails
- type AdditionalDetailsType
- type Address
- type ChargeDetails
- type ChargeDetailsType
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Decimal
- type Error
- type ErrorList
- type HttpRequestDoer
- type InvoiceDetail
- type InvoiceItem
- type ItemQuantity
- type Money
- type PartyIdentification
- type RequestEditorFn
- type ResponseEditorFn
- type SubmitInvoiceJSONRequestBody
- type SubmitInvoiceRequest
- type SubmitInvoiceResp
- type SubmitInvoiceResponse
- type TaxDetail
- type TaxDetailTaxType
- type TaxRegistrationDetail
- type TaxRegistrationDetailTaxRegistrationType
- type TransactionReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSubmitInvoiceRequest ¶
func NewSubmitInvoiceRequest(server string, body SubmitInvoiceJSONRequestBody) (*http.Request, error)
NewSubmitInvoiceRequest calls the generic SubmitInvoice builder with application/json body
Types ¶
type AdditionalDetails ¶
type AdditionalDetails struct { // Detail The detail of the additional information provided by the selling party. Detail string `json:"detail"` // LanguageCode The language code of the additional information detail. LanguageCode *string `json:"languageCode,omitempty"` // Type The type of the additional information provided by the selling party. Type AdditionalDetailsType `json:"type"` }
AdditionalDetails A field where the selling party can provide additional information for tax-related or any other purposes.
type AdditionalDetailsType ¶
type AdditionalDetailsType string
AdditionalDetailsType The type of the additional information provided by the selling party.
const ( OCR AdditionalDetailsType = "OCR" SUR AdditionalDetailsType = "SUR" )
Defines values for AdditionalDetailsType.
type Address ¶
type Address struct { // AddressLine1 First line of the address. AddressLine1 string `json:"addressLine1"` // AddressLine2 Additional street address information, if required. AddressLine2 *string `json:"addressLine2,omitempty"` // AddressLine3 Additional street address information, if required. AddressLine3 *string `json:"addressLine3,omitempty"` // City The city where the person, business or institution is located. City string `json:"city"` // CountryCode The two digit country code in ISO 3166-1 alpha-2 format. CountryCode string `json:"countryCode"` // County The county where person, business or institution is located. County *string `json:"county,omitempty"` // District The district where person, business or institution is located. District *string `json:"district,omitempty"` // Name The name of the person, business or institution at that address. Name string `json:"name"` // Phone The phone number of the person, business or institution located at that address. Phone *string `json:"phone,omitempty"` // PostalCode The postal code of that address. It conatins a series of letters or digits or both, sometimes including spaces or punctuation. PostalCode string `json:"postalCode"` // StateOrRegion The state or region where person, business or institution is located. StateOrRegion string `json:"stateOrRegion"` }
Address Address of the party.
type ChargeDetails ¶
type ChargeDetails struct { // ChargeAmount An amount of money, including units in the form of currency. ChargeAmount Money `json:"chargeAmount"` // TaxDetails Individual tax details per line item. TaxDetails *[]TaxDetail `json:"taxDetails,omitempty"` // Type Type of charge applied. Type ChargeDetailsType `json:"type"` }
ChargeDetails Monetary and tax details of the charge.
type ChargeDetailsType ¶
type ChargeDetailsType string
ChargeDetailsType Type of charge applied.
const ( FREIGHTOUT ChargeDetailsType = "FREIGHTOUT" FULFILLMENT ChargeDetailsType = "FULFILLMENT" GIFTWRAP ChargeDetailsType = "GIFTWRAP" LOADING ChargeDetailsType = "LOADING" MARKETINGINSERT ChargeDetailsType = "MARKETINGINSERT" PACKAGING ChargeDetailsType = "PACKAGING" TAXCOLLECTEDATSOURCE ChargeDetailsType = "TAX_COLLECTED_AT_SOURCE" )
Defines values for ChargeDetailsType.
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) SubmitInvoice ¶
type ClientInterface ¶
type ClientInterface interface { // SubmitInvoiceWithBody request with any body SubmitInvoiceWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) SubmitInvoice(ctx context.Context, body SubmitInvoiceJSONRequestBody) (*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) SubmitInvoiceWithBodyWithResponse ¶
func (c *ClientWithResponses) SubmitInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SubmitInvoiceResp, error)
SubmitInvoiceWithBodyWithResponse request with arbitrary body returning *SubmitInvoiceResp
func (*ClientWithResponses) SubmitInvoiceWithResponse ¶
func (c *ClientWithResponses) SubmitInvoiceWithResponse(ctx context.Context, body SubmitInvoiceJSONRequestBody) (*SubmitInvoiceResp, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // SubmitInvoiceWithBodyWithResponse request with any body SubmitInvoiceWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader) (*SubmitInvoiceResp, error) SubmitInvoiceWithResponse(ctx context.Context, body SubmitInvoiceJSONRequestBody) (*SubmitInvoiceResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Decimal ¶
type Decimal = string
Decimal A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`.
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 InvoiceDetail ¶
type InvoiceDetail struct { // AdditionalDetails Additional details provided by the selling party, for tax-related or other purposes. AdditionalDetails *[]AdditionalDetails `json:"additionalDetails,omitempty"` BillToParty *PartyIdentification `json:"billToParty,omitempty"` // ChargeDetails Total charge amount details for all line items. ChargeDetails *[]ChargeDetails `json:"chargeDetails,omitempty"` // InvoiceDate Invoice date. InvoiceDate time.Time `json:"invoiceDate"` // InvoiceNumber The unique invoice number. InvoiceNumber string `json:"invoiceNumber"` // InvoiceTotal An amount of money, including units in the form of currency. InvoiceTotal Money `json:"invoiceTotal"` // Items Provides the details of the items in this invoice. Items []InvoiceItem `json:"items"` // PaymentTermsCode The payment terms for the invoice. PaymentTermsCode *string `json:"paymentTermsCode,omitempty"` // ReferenceNumber An additional unique reference number used for regulatory or other purposes. ReferenceNumber *string `json:"referenceNumber,omitempty"` RemitToParty PartyIdentification `json:"remitToParty"` ShipFromParty PartyIdentification `json:"shipFromParty"` // ShipToCountryCode Ship-to country code. ShipToCountryCode *string `json:"shipToCountryCode,omitempty"` // TaxTotals Individual tax details per line item. TaxTotals *[]TaxDetail `json:"taxTotals,omitempty"` }
InvoiceDetail defines model for InvoiceDetail.
type InvoiceItem ¶
type InvoiceItem struct { // BuyerProductIdentifier Buyer's standard identification number (ASIN) of an item. BuyerProductIdentifier *string `json:"buyerProductIdentifier,omitempty"` // ChargeDetails Individual charge details per line item. ChargeDetails *[]ChargeDetails `json:"chargeDetails,omitempty"` // HsnCode Harmonized System of Nomenclature (HSN) tax code. The HSN number cannot contain alphabets. HsnCode *string `json:"hsnCode,omitempty"` // InvoicedQuantity Details of item quantity. InvoicedQuantity ItemQuantity `json:"invoicedQuantity"` // ItemSequenceNumber Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on. ItemSequenceNumber string `json:"itemSequenceNumber"` // NetCost An amount of money, including units in the form of currency. NetCost Money `json:"netCost"` // PurchaseOrderNumber The purchase order number for this order. Formatting Notes: 8-character alpha-numeric code. PurchaseOrderNumber string `json:"purchaseOrderNumber"` // TaxDetails Individual tax details per line item. TaxDetails *[]TaxDetail `json:"taxDetails,omitempty"` // VendorOrderNumber The vendor's order number for this order. VendorOrderNumber *string `json:"vendorOrderNumber,omitempty"` // VendorProductIdentifier The vendor selected product identification of the item. VendorProductIdentifier *string `json:"vendorProductIdentifier,omitempty"` }
InvoiceItem defines model for InvoiceItem.
type ItemQuantity ¶
type ItemQuantity struct { // Amount Quantity of units available for a specific item. Amount int `json:"amount"` // UnitOfMeasure Unit of measure for the available quantity. UnitOfMeasure string `json:"unitOfMeasure"` }
ItemQuantity Details of item quantity.
type Money ¶
type Money struct { // Amount A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`. Amount Decimal `json:"amount"` // CurrencyCode Three digit currency code in ISO 4217 format. CurrencyCode string `json:"currencyCode"` }
Money An amount of money, including units in the form of currency.
type PartyIdentification ¶
type PartyIdentification struct { // Address Address of the party. Address *Address `json:"address,omitempty"` // PartyId Assigned Identification for the party. PartyId string `json:"partyId"` // TaxRegistrationDetails Tax registration details of the entity. TaxRegistrationDetails *[]TaxRegistrationDetail `json:"taxRegistrationDetails,omitempty"` }
PartyIdentification defines model for PartyIdentification.
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 SubmitInvoiceJSONRequestBody ¶
type SubmitInvoiceJSONRequestBody = SubmitInvoiceRequest
SubmitInvoiceJSONRequestBody defines body for SubmitInvoice for application/json ContentType.
type SubmitInvoiceRequest ¶
type SubmitInvoiceRequest struct {
Invoices *[]InvoiceDetail `json:"invoices,omitempty"`
}
SubmitInvoiceRequest The request schema for the submitInvoice operation.
type SubmitInvoiceResp ¶
type SubmitInvoiceResp struct { Body []byte HTTPResponse *http.Response JSON202 *SubmitInvoiceResponse JSON400 *SubmitInvoiceResponse JSON403 *SubmitInvoiceResponse JSON404 *SubmitInvoiceResponse JSON413 *SubmitInvoiceResponse JSON415 *SubmitInvoiceResponse JSON429 *SubmitInvoiceResponse JSON500 *SubmitInvoiceResponse JSON503 *SubmitInvoiceResponse }
func ParseSubmitInvoiceResp ¶
func ParseSubmitInvoiceResp(rsp *http.Response) (*SubmitInvoiceResp, error)
ParseSubmitInvoiceResp parses an HTTP response from a SubmitInvoiceWithResponse call
func (SubmitInvoiceResp) Status ¶
func (r SubmitInvoiceResp) Status() string
Status returns HTTPResponse.Status
func (SubmitInvoiceResp) StatusCode ¶
func (r SubmitInvoiceResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SubmitInvoiceResponse ¶
type SubmitInvoiceResponse struct { // Errors A list of error responses returned when a request is unsuccessful. Errors *ErrorList `json:"errors,omitempty"` Payload *TransactionReference `json:"payload,omitempty"` }
SubmitInvoiceResponse The response schema for the submitInvoice operation.
type TaxDetail ¶
type TaxDetail struct { // TaxAmount An amount of money, including units in the form of currency. TaxAmount Money `json:"taxAmount"` // TaxRate A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\d*))(\.\d+)?([eE][+-]?\d+)?$`. TaxRate *Decimal `json:"taxRate,omitempty"` // TaxType Type of the tax applied. TaxType TaxDetailTaxType `json:"taxType"` // TaxableAmount An amount of money, including units in the form of currency. TaxableAmount *Money `json:"taxableAmount,omitempty"` }
TaxDetail Details of tax amount applied.
type TaxDetailTaxType ¶
type TaxDetailTaxType string
TaxDetailTaxType Type of the tax applied.
const ( TaxDetailTaxTypeCESS TaxDetailTaxType = "CESS" TaxDetailTaxTypeCGST TaxDetailTaxType = "CGST" TaxDetailTaxTypeConsumption TaxDetailTaxType = "Consumption" TaxDetailTaxTypeDomesticVAT TaxDetailTaxType = "DomesticVAT" TaxDetailTaxTypeGST TaxDetailTaxType = "GST" TaxDetailTaxTypeIGST TaxDetailTaxType = "IGST" TaxDetailTaxTypeMutuallyDefined TaxDetailTaxType = "MutuallyDefined" TaxDetailTaxTypeMwSt TaxDetailTaxType = "MwSt." TaxDetailTaxTypePST TaxDetailTaxType = "PST" TaxDetailTaxTypeSGST TaxDetailTaxType = "SGST" TaxDetailTaxTypeST TaxDetailTaxType = "ST" TaxDetailTaxTypeTVA TaxDetailTaxType = "TVA" TaxDetailTaxTypeUTGST TaxDetailTaxType = "UTGST" TaxDetailTaxTypeVAT TaxDetailTaxType = "VAT" )
Defines values for TaxDetailTaxType.
type TaxRegistrationDetail ¶
type TaxRegistrationDetail struct { // TaxRegistrationAddress Address of the party. TaxRegistrationAddress *Address `json:"taxRegistrationAddress,omitempty"` // TaxRegistrationMessage Tax registration message that can be used for additional tax related details. TaxRegistrationMessage *string `json:"taxRegistrationMessage,omitempty"` // TaxRegistrationNumber Tax registration number for the entity. For example, VAT ID, Consumption Tax ID. TaxRegistrationNumber string `json:"taxRegistrationNumber"` // TaxRegistrationType Tax registration type for the entity. TaxRegistrationType *TaxRegistrationDetailTaxRegistrationType `json:"taxRegistrationType,omitempty"` }
TaxRegistrationDetail Tax registration details of the entity.
type TaxRegistrationDetailTaxRegistrationType ¶
type TaxRegistrationDetailTaxRegistrationType string
TaxRegistrationDetailTaxRegistrationType Tax registration type for the entity.
const ( TaxRegistrationDetailTaxRegistrationTypeGST TaxRegistrationDetailTaxRegistrationType = "GST" TaxRegistrationDetailTaxRegistrationTypeVAT TaxRegistrationDetailTaxRegistrationType = "VAT" )
Defines values for TaxRegistrationDetailTaxRegistrationType.
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 defines model for TransactionReference.