Documentation
¶
Overview ¶
Package sellers provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.6.0 DO NOT EDIT.
Index ¶
- func NewGetAccountRequest(server string) (*http.Request, error)
- func NewGetMarketplaceParticipationsRequest(server string) (*http.Request, error)
- type Account
- type AccountBusinessType
- type AccountSellingPlan
- type Address
- type Business
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Error
- type ErrorList
- type GetAccountResp
- type GetAccountResponse
- type GetMarketplaceParticipationsResp
- type GetMarketplaceParticipationsResponse
- type HttpRequestDoer
- type Marketplace
- type MarketplaceParticipation
- type MarketplaceParticipationList
- type Participation
- type PrimaryContact
- type RequestEditorFn
- type ResponseEditorFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetAccountRequest ¶
NewGetAccountRequest generates requests for GetAccount
Types ¶
type Account ¶
type Account struct {
// Business Information about the seller's business. Certain fields may be omitted depending on the seller's `businessType`.
Business *Business `json:"business,omitempty"`
// BusinessType The type of business registered for the seller account.
BusinessType AccountBusinessType `json:"businessType"`
// MarketplaceParticipationList List of marketplace participations.
MarketplaceParticipationList MarketplaceParticipationList `json:"marketplaceParticipationList"`
// PrimaryContact Information about the seller's primary contact.
PrimaryContact *PrimaryContact `json:"primaryContact,omitempty"`
// SellingPlan The selling plan details.
SellingPlan AccountSellingPlan `json:"sellingPlan"`
}
Account The response schema for the `getAccount` operation.
type AccountBusinessType ¶
type AccountBusinessType string
AccountBusinessType The type of business registered for the seller account.
const ( AccountBusinessTypeCHARITY AccountBusinessType = "CHARITY" AccountBusinessTypeCRAFTSMAN AccountBusinessType = "CRAFTSMAN" AccountBusinessTypeINDIVIDUAL AccountBusinessType = "INDIVIDUAL" AccountBusinessTypeNATURALPERSONCOMPANY AccountBusinessType = "NATURAL_PERSON_COMPANY" AccountBusinessTypePRIVATELIMITED AccountBusinessType = "PRIVATE_LIMITED" AccountBusinessTypePUBLICLISTED AccountBusinessType = "PUBLIC_LISTED" AccountBusinessTypeSOLEPROPRIETORSHIP AccountBusinessType = "SOLE_PROPRIETORSHIP" AccountBusinessTypeSTATEOWNED AccountBusinessType = "STATE_OWNED" )
Defines values for AccountBusinessType.
type AccountSellingPlan ¶
type AccountSellingPlan string
AccountSellingPlan The selling plan details.
const ( AccountSellingPlanINDIVIDUAL AccountSellingPlan = "INDIVIDUAL" AccountSellingPlanPROFESSIONAL AccountSellingPlan = "PROFESSIONAL" )
Defines values for AccountSellingPlan.
type Address ¶
type Address struct {
// AddressLine1 Street address information.
AddressLine1 string `json:"addressLine1"`
// AddressLine2 Additional street address information.
AddressLine2 *string `json:"addressLine2,omitempty"`
// City The city.
City *string `json:"city,omitempty"`
// CountryCode The country code in two-character ISO 3166-1 alpha-2 format.
CountryCode string `json:"countryCode"`
// PostalCode The postal code.
PostalCode *string `json:"postalCode,omitempty"`
// StateOrProvinceCode The state or province code.
StateOrProvinceCode *string `json:"stateOrProvinceCode,omitempty"`
}
Address Represents an address
type Business ¶
type Business struct {
// CompanyRegistrationNumber The seller's company registration number, if applicable. This field will be absent for individual sellers and sole proprietorships.
CompanyRegistrationNumber *string `json:"companyRegistrationNumber,omitempty"`
// CompanyTaxIdentificationNumber The seller's company tax identification number, if applicable. This field will be present for certain business types only, such as sole proprietorships.
CompanyTaxIdentificationNumber *string `json:"companyTaxIdentificationNumber,omitempty"`
// Name The registered business name.
Name string `json:"name"`
// NonLatinName The non-Latin script version of the registered business name, if applicable.
NonLatinName *string `json:"nonLatinName,omitempty"`
// RegisteredBusinessAddress Represents an address
RegisteredBusinessAddress Address `json:"registeredBusinessAddress"`
}
Business Information about the seller's business. Certain fields may be omitted depending on the seller's `businessType`.
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) GetAccount ¶
type ClientInterface ¶
type ClientInterface interface {
// GetAccount request
GetAccount(ctx context.Context) (*http.Response, error)
// GetMarketplaceParticipations request
GetMarketplaceParticipations(ctx context.Context) (*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) GetAccountWithResponse ¶
func (c *ClientWithResponses) GetAccountWithResponse(ctx context.Context) (*GetAccountResp, error)
GetAccountWithResponse request returning *GetAccountResp
func (*ClientWithResponses) GetMarketplaceParticipationsWithResponse ¶
func (c *ClientWithResponses) GetMarketplaceParticipationsWithResponse(ctx context.Context) (*GetMarketplaceParticipationsResp, error)
GetMarketplaceParticipationsWithResponse request returning *GetMarketplaceParticipationsResp
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAccountWithResponse request
GetAccountWithResponse(ctx context.Context) (*GetAccountResp, error)
// GetMarketplaceParticipationsWithResponse request
GetMarketplaceParticipationsWithResponse(ctx context.Context) (*GetMarketplaceParticipationsResp, 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 you understand or fix the issue.
Details *string `json:"details,omitempty"`
// Message A message that describes the error condition in a human-readable form.
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 GetAccountResp ¶
type GetAccountResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetAccountResponse
JSON400 *GetAccountResponse
JSON403 *GetAccountResponse
JSON404 *GetAccountResponse
JSON413 *GetAccountResponse
JSON415 *GetAccountResponse
JSON429 *GetAccountResponse
JSON500 *GetAccountResponse
JSON503 *GetAccountResponse
}
func ParseGetAccountResp ¶
func ParseGetAccountResp(rsp *http.Response) (*GetAccountResp, error)
ParseGetAccountResp parses an HTTP response from a GetAccountWithResponse call
func (GetAccountResp) Status ¶
func (r GetAccountResp) Status() string
Status returns HTTPResponse.Status
func (GetAccountResp) StatusCode ¶
func (r GetAccountResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAccountResponse ¶
type GetAccountResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload The response schema for the `getAccount` operation.
Payload *Account `json:"payload,omitempty"`
}
GetAccountResponse The response schema for the `getAccount` operation.
type GetMarketplaceParticipationsResp ¶
type GetMarketplaceParticipationsResp struct {
Body []byte
HTTPResponse *http.Response
JSON200 *GetMarketplaceParticipationsResponse
JSON400 *GetMarketplaceParticipationsResponse
JSON403 *GetMarketplaceParticipationsResponse
JSON404 *GetMarketplaceParticipationsResponse
JSON413 *GetMarketplaceParticipationsResponse
JSON415 *GetMarketplaceParticipationsResponse
JSON429 *GetMarketplaceParticipationsResponse
JSON500 *GetMarketplaceParticipationsResponse
JSON503 *GetMarketplaceParticipationsResponse
}
func ParseGetMarketplaceParticipationsResp ¶
func ParseGetMarketplaceParticipationsResp(rsp *http.Response) (*GetMarketplaceParticipationsResp, error)
ParseGetMarketplaceParticipationsResp parses an HTTP response from a GetMarketplaceParticipationsWithResponse call
func (GetMarketplaceParticipationsResp) Status ¶
func (r GetMarketplaceParticipationsResp) Status() string
Status returns HTTPResponse.Status
func (GetMarketplaceParticipationsResp) StatusCode ¶
func (r GetMarketplaceParticipationsResp) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetMarketplaceParticipationsResponse ¶
type GetMarketplaceParticipationsResponse struct {
// Errors A list of error responses returned when a request is unsuccessful.
Errors *ErrorList `json:"errors,omitempty"`
// Payload List of marketplace participations.
Payload *MarketplaceParticipationList `json:"payload,omitempty"`
}
GetMarketplaceParticipationsResponse The response schema for the `getMarketplaceParticipations` operation.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Marketplace ¶
type Marketplace struct {
// CountryCode The ISO 3166-1 alpha-2 format country code of the marketplace.
CountryCode string `json:"countryCode"`
// DefaultCurrencyCode The ISO 4217 format currency code of the marketplace.
DefaultCurrencyCode string `json:"defaultCurrencyCode"`
// DefaultLanguageCode The ISO 639-1 format language code of the marketplace.
DefaultLanguageCode string `json:"defaultLanguageCode"`
// DomainName The domain name of the marketplace.
DomainName string `json:"domainName"`
// Id The encrypted marketplace value.
Id string `json:"id"`
// Name The marketplace name.
Name string `json:"name"`
}
Marketplace Information about an Amazon marketplace where a seller can list items and customers can view and purchase items.
type MarketplaceParticipation ¶
type MarketplaceParticipation struct {
// Marketplace Information about an Amazon marketplace where a seller can list items and customers can view and purchase items.
Marketplace Marketplace `json:"marketplace"`
// Participation Information that is specific to a seller in a marketplace.
Participation Participation `json:"participation"`
// StoreName The name of the seller's store as displayed in the marketplace.
StoreName string `json:"storeName"`
}
MarketplaceParticipation defines model for MarketplaceParticipation.
type MarketplaceParticipationList ¶
type MarketplaceParticipationList = []MarketplaceParticipation
MarketplaceParticipationList List of marketplace participations.
type Participation ¶
type Participation struct {
// HasSuspendedListings Specifies if the seller has suspended listings. `true` if the seller Listing Status is set to Inactive, otherwise `false`.
HasSuspendedListings bool `json:"hasSuspendedListings"`
// IsParticipating If `true`, the seller participates in the marketplace. Otherwise `false`.
IsParticipating bool `json:"isParticipating"`
}
Participation Information that is specific to a seller in a marketplace.
type PrimaryContact ¶
type PrimaryContact struct {
// Address Represents an address
Address Address `json:"address"`
// Name The full name of the seller's primary contact.
Name string `json:"name"`
// NonLatinName The non-Latin script version of the primary contact's name, if applicable.
NonLatinName *string `json:"nonLatinName,omitempty"`
}
PrimaryContact Information about the seller's primary contact.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function