Documentation ¶
Overview ¶
Package sellers provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Package sellers provides primitives to interact the openapi HTTP API.
Code generated by go-sdk-codegen DO NOT EDIT.
Index ¶
- func NewGetMarketplaceParticipationsRequest(endpoint string) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- type ClientWithResponsesInterface
- type Error
- type ErrorList
- type GetMarketplaceParticipationsResp
- type GetMarketplaceParticipationsResponse
- type HttpRequestDoer
- type Marketplace
- type MarketplaceParticipation
- type MarketplaceParticipationList
- type Participation
- type RequestBeforeFn
- type ResponseAfterFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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. Endpoint string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A callback for modifying requests which are generated before sending over // the network. RequestBefore RequestBeforeFn // A callback for modifying response which are generated before sending over // the network. ResponseAfter ResponseAfterFn // 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.
type ClientInterface ¶
type ClientInterface interface { // 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 WithRequestBefore ¶
func WithRequestBefore(fn RequestBeforeFn) ClientOption
WithRequestBefore allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
func WithResponseAfter ¶
func WithResponseAfter(fn ResponseAfterFn) ClientOption
WithResponseAfter allows setting up a callback function, which will be called right after get response the request. This can be used to log.
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
WithUserAgent set up useragent add user agent to every request automatically
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(endpoint string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetMarketplaceParticipationsWithResponse ¶
func (c *ClientWithResponses) GetMarketplaceParticipationsWithResponse(ctx context.Context) (*GetMarketplaceParticipationsResp, error)
GetMarketplaceParticipationsWithResponse request returning *GetMarketplaceParticipationsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetMarketplaceParticipations request GetMarketplaceParticipationsWithResponse(ctx context.Context) (*GetMarketplaceParticipationsResp, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct { // An error code that identifies the type of error that occured. Code string `json:"code"` // Additional details that can help the caller understand or fix the issue. Details *string `json:"details,omitempty"` // A message that describes the error condition in a human-readable form. Message string `json:"message"` }
Error defines model for Error.
type GetMarketplaceParticipationsResp ¶
type GetMarketplaceParticipationsResp struct { Body []byte HTTPResponse *http.Response Model *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 { // A list of error responses returned when a request is unsuccessful. Errors *ErrorList `json:"errors,omitempty"` // List of marketplace participations. Payload *MarketplaceParticipationList `json:"payload,omitempty"` }
GetMarketplaceParticipationsResponse defines model for GetMarketplaceParticipationsResponse.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type Marketplace ¶
type Marketplace struct { // The ISO 3166-1 alpha-2 format country code of the marketplace. CountryCode string `json:"countryCode"` // The ISO 4217 format currency code of the marketplace. DefaultCurrencyCode string `json:"defaultCurrencyCode"` // The ISO 639-1 format language code of the marketplace. DefaultLanguageCode string `json:"defaultLanguageCode"` // The domain name of the marketplace. DomainName string `json:"domainName"` // The encrypted marketplace value. Id string `json:"id"` // Marketplace name. Name string `json:"name"` }
Marketplace defines model for Marketplace.
type MarketplaceParticipation ¶
type MarketplaceParticipation struct { // Detailed information about an Amazon market where a seller can list items for sale and customers can view and purchase items. Marketplace Marketplace `json:"marketplace"` // Detailed information that is specific to a seller in a Marketplace. Participation Participation `json:"participation"` }
MarketplaceParticipation defines model for MarketplaceParticipation.
type MarketplaceParticipationList ¶
type MarketplaceParticipationList []MarketplaceParticipation
MarketplaceParticipationList defines model for MarketplaceParticipationList.
type Participation ¶
type Participation struct { // Specifies if the seller has suspended listings. True if the seller Listing Status is set to Inactive, otherwise False. HasSuspendedListings bool `json:"hasSuspendedListings"` IsParticipating bool `json:"isParticipating"` }
Participation defines model for Participation.
type RequestBeforeFn ¶
RequestBeforeFn is the function signature for the RequestBefore callback function