swagger

package
v0.0.0-...-c324a2f Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 20 Imported by: 0

README

Go API client for swagger

The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to https://sellingpartnerapi-na.amazon.com/

Class Method HTTP request Description
VendorInvoiceApi SubmitInvoice Post /vendor/directFulfillment/payments/v1/invoices

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Overview

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

* Selling Partner API for Direct Fulfillment Payments * * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor's invoice data. * * API version: v1 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	VendorInvoiceApi *VendorInvoiceApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Selling Partner API for Direct Fulfillment Payments API vv1 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AdditionalDetails

type AdditionalDetails struct {
	// The type of the additional information provided by the selling party.
	Type_ string `json:"type"`
	// The detail of the additional information provided by the selling party.
	Detail string `json:"detail"`
	// The language code of the additional information detail.
	LanguageCode string `json:"languageCode,omitempty"`
}

A field where the selling party can provide additional information for tax-related or any other purposes.

type Address

type Address struct {
	// The name of the person, business or institution at that address.
	Name string `json:"name"`
	// First line of the address.
	AddressLine1 string `json:"addressLine1"`
	// Additional street address information, if required.
	AddressLine2 string `json:"addressLine2,omitempty"`
	// Additional street address information, if required.
	AddressLine3 string `json:"addressLine3,omitempty"`
	// The city where the person, business or institution is located.
	City string `json:"city"`
	// The county where person, business or institution is located.
	County string `json:"county,omitempty"`
	// The district where person, business or institution is located.
	District string `json:"district,omitempty"`
	// The state or region where person, business or institution is located.
	StateOrRegion string `json:"stateOrRegion"`
	// 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"`
	// The two digit country code in ISO 3166-1 alpha-2 format.
	CountryCode string `json:"countryCode"`
	// The phone number of the person, business or institution located at that address.
	Phone string `json:"phone,omitempty"`
}

Address of the party.

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type ChargeDetails

type ChargeDetails struct {
	// Type of charge applied.
	Type_        string `json:"type"`
	ChargeAmount *Money `json:"chargeAmount"`
	// Individual tax details per line item.
	TaxDetails []TaxDetail `json:"taxDetails,omitempty"`
}

Monetary and tax details of the charge.

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type GenericSwaggerError

type GenericSwaggerError struct {
	// contains filtered or unexported fields
}

GenericSwaggerError Provides access to the body, error and model on returned errors.

func (GenericSwaggerError) Body

func (e GenericSwaggerError) Body() []byte

Body returns the raw bytes of the response

func (GenericSwaggerError) Error

func (e GenericSwaggerError) Error() string

Error returns non-empty string if there was an error.

func (GenericSwaggerError) Model

func (e GenericSwaggerError) Model() interface{}

Model returns the unpacked model of the error

type InvoiceDetail

type InvoiceDetail struct {
	// The unique invoice number.
	InvoiceNumber string `json:"invoiceNumber"`
	// Invoice date.
	InvoiceDate time.Time `json:"invoiceDate"`
	// An additional unique reference number used for regulatory or other purposes.
	ReferenceNumber string               `json:"referenceNumber,omitempty"`
	RemitToParty    *PartyIdentification `json:"remitToParty"`
	ShipFromParty   *PartyIdentification `json:"shipFromParty"`
	BillToParty     *PartyIdentification `json:"billToParty,omitempty"`
	// Ship-to country code.
	ShipToCountryCode string `json:"shipToCountryCode,omitempty"`
	// The payment terms for the invoice.
	PaymentTermsCode string `json:"paymentTermsCode,omitempty"`
	InvoiceTotal     *Money `json:"invoiceTotal"`
	// Individual tax details per line item.
	TaxTotals []TaxDetail `json:"taxTotals,omitempty"`
	// Additional details provided by the selling party, for tax-related or other purposes.
	AdditionalDetails []AdditionalDetails `json:"additionalDetails,omitempty"`
	// Total charge amount details for all line items.
	ChargeDetails []ChargeDetails `json:"chargeDetails,omitempty"`
	// Provides the details of the items in this invoice.
	Items []InvoiceItem `json:"items"`
}

type InvoiceItem

type InvoiceItem struct {
	// Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on.
	ItemSequenceNumber string `json:"itemSequenceNumber"`
	// Buyer's standard identification number (ASIN) of an item.
	BuyerProductIdentifier string `json:"buyerProductIdentifier,omitempty"`
	// The vendor selected product identification of the item.
	VendorProductIdentifier string        `json:"vendorProductIdentifier,omitempty"`
	InvoicedQuantity        *ItemQuantity `json:"invoicedQuantity"`
	NetCost                 *Money        `json:"netCost"`
	// The purchase order number for this order. Formatting Notes: 8-character alpha-numeric code.
	PurchaseOrderNumber string `json:"purchaseOrderNumber"`
	// The vendor's order number for this order.
	VendorOrderNumber string `json:"vendorOrderNumber,omitempty"`
	// Harmonized System of Nomenclature (HSN) tax code. The HSN number cannot contain alphabets.
	HsnCode string `json:"hsnCode,omitempty"`
	// Individual tax details per line item.
	TaxDetails []TaxDetail `json:"taxDetails,omitempty"`
	// Individual charge details per line item.
	ChargeDetails []ChargeDetails `json:"chargeDetails,omitempty"`
}

type ItemQuantity

type ItemQuantity struct {
	// Quantity of units available for a specific item.
	Amount int32 `json:"amount"`
	// Unit of measure for the available quantity.
	UnitOfMeasure string `json:"unitOfMeasure"`
}

Details of item quantity.

type ModelError

type ModelError struct {
	// An error code that identifies the type of error that occurred.
	Code string `json:"code"`
	// A message that describes the error condition.
	Message string `json:"message"`
	// Additional details that can help the caller understand or fix the issue.
	Details string `json:"details,omitempty"`
}

Error response returned when the request is unsuccessful.

type Money

type Money struct {
	// Three digit currency code in ISO 4217 format.
	CurrencyCode string `json:"currencyCode"`
	Amount       string `json:"amount"`
}

An amount of money, including units in the form of currency.

type PartyIdentification

type PartyIdentification struct {
	// Assigned Identification for the party.
	PartyId string   `json:"partyId"`
	Address *Address `json:"address,omitempty"`
	// Tax registration details of the entity.
	TaxRegistrationDetails []TaxRegistrationDetail `json:"taxRegistrationDetails,omitempty"`
}

type SubmitInvoiceRequest

type SubmitInvoiceRequest struct {
	Invoices []InvoiceDetail `json:"invoices,omitempty"`
}

The request schema for the submitInvoice operation.

type SubmitInvoiceResponse

type SubmitInvoiceResponse struct {
	Payload *TransactionReference `json:"payload,omitempty"`
	Errors  *[]ModelError         `json:"errors,omitempty"`
}

The response schema for the submitInvoice operation.

type TaxDetail

type TaxDetail struct {
	// Type of the tax applied.
	TaxType       string `json:"taxType"`
	TaxRate       string `json:"taxRate,omitempty"`
	TaxAmount     *Money `json:"taxAmount"`
	TaxableAmount *Money `json:"taxableAmount,omitempty"`
}

Details of tax amount applied.

type TaxRegistrationDetail

type TaxRegistrationDetail struct {
	// Tax registration type for the entity.
	TaxRegistrationType string `json:"taxRegistrationType,omitempty"`
	// Tax registration number for the party. For example, VAT ID.
	TaxRegistrationNumber  string   `json:"taxRegistrationNumber"`
	TaxRegistrationAddress *Address `json:"taxRegistrationAddress,omitempty"`
	// Tax registration message that can be used for additional tax related details.
	TaxRegistrationMessage string `json:"taxRegistrationMessage,omitempty"`
}

Tax registration details of the entity.

type TransactionReference

type TransactionReference struct {
	// 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"`
}

type VendorInvoiceApiService

type VendorInvoiceApiService service

func (*VendorInvoiceApiService) SubmitInvoice

VendorInvoiceApiService Submits one or more invoices for a vendor's direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param body

@return SubmitInvoiceResponse

Jump to

Keyboard shortcuts

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