financesv20240619

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package financesv20240619 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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewListTransactionsRequest

func NewListTransactionsRequest(server string, params *ListTransactionsParams) (*http.Request, error)

NewListTransactionsRequest generates requests for ListTransactions

Types

type AmazonPayContext

type AmazonPayContext struct {
	// Channel Channel details of related transaction.
	Channel *string `json:"channel,omitempty"`

	// OrderType The transaction's order type.
	OrderType *string `json:"orderType,omitempty"`

	// StoreName The name of the store that is related to the transaction.
	StoreName *string `json:"storeName,omitempty"`
}

AmazonPayContext Additional information related to Amazon Pay.

type BigDecimal

type BigDecimal = float32

BigDecimal A signed decimal number.

type Breakdown

type Breakdown struct {
	// BreakdownAmount A currency type and amount.
	BreakdownAmount *Currency `json:"breakdownAmount,omitempty"`

	// BreakdownType The type of charge.
	BreakdownType *string `json:"breakdownType,omitempty"`

	// Breakdowns Details about the movement of money in the financial transaction. Breakdowns are further categorized into breakdown types, breakdown amounts, and further breakdowns.
	Breakdowns *Breakdown `json:"breakdowns,omitempty"`
}

Breakdown Details about the movement of money in the financial transaction. Breakdowns are further categorized into breakdown types, breakdown amounts, and further breakdowns.

type Breakdowns

type Breakdowns = []Breakdown

Breakdowns A list of breakdowns that provide details on how the total amount is calculated for the transaction.

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) ListTransactions

func (c *Client) ListTransactions(ctx context.Context, params *ListTransactionsParams) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListTransactions request
	ListTransactions(ctx context.Context, params *ListTransactionsParams) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) ListTransactionsWithResponse

func (c *ClientWithResponses) ListTransactionsWithResponse(ctx context.Context, params *ListTransactionsParams) (*ListTransactionsResp, error)

ListTransactionsWithResponse request returning *ListTransactionsResp

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListTransactionsWithResponse request
	ListTransactionsWithResponse(ctx context.Context, params *ListTransactionsParams) (*ListTransactionsResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Context

type Context struct {
	// Asin The Amazon Standard Identification Number (ASIN) of the item.
	Asin *string `json:"asin,omitempty"`

	// Channel Channel details of related transaction.
	Channel     *string `json:"channel,omitempty"`
	ContextType string  `json:"contextType"`

	// DeferralReason Deferral policy applied on the transaction.
	//
	// **Examples:** `B2B`,`DD7`
	DeferralReason *string `json:"deferralReason,omitempty"`

	// DeferralStatus The status of the transaction. For example, `HOLD`,`RELEASE`.
	DeferralStatus *string `json:"deferralStatus,omitempty"`

	// EndTime A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	EndTime *Date `json:"endTime,omitempty"`

	// FulfillmentNetwork The fulfillment network of the item.
	FulfillmentNetwork *string `json:"fulfillmentNetwork,omitempty"`

	// MaturityDate A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	MaturityDate *Date `json:"maturityDate,omitempty"`

	// OrderType The transaction's order type.
	OrderType *string `json:"orderType,omitempty"`

	// PaymentDate A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	PaymentDate *Date `json:"paymentDate,omitempty"`

	// PaymentMethod The method of payment.
	PaymentMethod *string `json:"paymentMethod,omitempty"`

	// PaymentReference The reference number of the payment.
	PaymentReference *string `json:"paymentReference,omitempty"`

	// PaymentType The type of payment.
	PaymentType *string `json:"paymentType,omitempty"`

	// QuantityShipped The quantity of the item shipped.
	QuantityShipped *int32 `json:"quantityShipped,omitempty"`

	// Sku The Stock Keeping Unit (SKU) of the item.
	Sku *string `json:"sku,omitempty"`

	// StartTime A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	StartTime *Date `json:"startTime,omitempty"`

	// StoreName The name of the store that is related to the transaction.
	StoreName *string `json:"storeName,omitempty"`
}

Context defines model for Context.

type Contexts

type Contexts = []Context

Contexts A list of additional information about the item.

type Currency

type Currency struct {
	// CurrencyAmount A signed decimal number.
	CurrencyAmount *BigDecimal `json:"currencyAmount,omitempty"`

	// CurrencyCode The three-digit currency code in ISO 4217 format.
	CurrencyCode *string `json:"currencyCode,omitempty"`
}

Currency A currency type and amount.

type Date

type Date = time.Time

Date A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.

type DeferredContext

type DeferredContext struct {
	// DeferralReason Deferral policy applied on the transaction.
	//
	// **Examples:** `B2B`,`DD7`
	DeferralReason *string `json:"deferralReason,omitempty"`

	// DeferralStatus The status of the transaction. For example, `HOLD`,`RELEASE`.
	DeferralStatus *string `json:"deferralStatus,omitempty"`

	// MaturityDate A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	MaturityDate *Date `json:"maturityDate,omitempty"`
}

DeferredContext Additional information related to deferred transactions.

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 An error response returned when the request is unsuccessful.

type ErrorList

type ErrorList struct {
	// Errors The error responses that are returned when the request is unsuccessful.
	Errors []Error `json:"errors"`
}

ErrorList A list of error responses returned when a request is unsuccessful.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Item

type Item struct {
	// Breakdowns A list of breakdowns that provide details on how the total amount is calculated for the transaction.
	Breakdowns *Breakdowns `json:"breakdowns,omitempty"`

	// Contexts A list of additional information about the item.
	Contexts *Contexts `json:"contexts,omitempty"`

	// Description A description of the items in a transaction.
	Description *string `json:"description,omitempty"`

	// RelatedIdentifiers Related business identifiers of the item in the transaction.
	RelatedIdentifiers *ItemRelatedIdentifiers `json:"relatedIdentifiers,omitempty"`

	// TotalAmount A currency type and amount.
	TotalAmount *Currency `json:"totalAmount,omitempty"`
}

Item Additional information about the items in a transaction.

type ItemRelatedIdentifier

type ItemRelatedIdentifier struct {
	// ItemRelatedIdentifierName Enumerated set of related item identifier names for the item.
	ItemRelatedIdentifierName *ItemRelatedIdentifierItemRelatedIdentifierName `json:"itemRelatedIdentifierName,omitempty"`

	// ItemRelatedIdentifierValue Corresponding value to `ItemRelatedIdentifierName`.
	ItemRelatedIdentifierValue *string `json:"itemRelatedIdentifierValue,omitempty"`
}

ItemRelatedIdentifier Related business identifiers of the item.

type ItemRelatedIdentifierItemRelatedIdentifierName

type ItemRelatedIdentifierItemRelatedIdentifierName string

ItemRelatedIdentifierItemRelatedIdentifierName Enumerated set of related item identifier names for the item.

const (
	COUPONID              ItemRelatedIdentifierItemRelatedIdentifierName = "COUPON_ID"
	ORDERADJUSTMENTITEMID ItemRelatedIdentifierItemRelatedIdentifierName = "ORDER_ADJUSTMENT_ITEM_ID"
	REMOVALSHIPMENTITEMID ItemRelatedIdentifierItemRelatedIdentifierName = "REMOVAL_SHIPMENT_ITEM_ID"
	TRANSACTIONID         ItemRelatedIdentifierItemRelatedIdentifierName = "TRANSACTION_ID"
)

Defines values for ItemRelatedIdentifierItemRelatedIdentifierName.

type ItemRelatedIdentifiers

type ItemRelatedIdentifiers = []ItemRelatedIdentifier

ItemRelatedIdentifiers Related business identifiers of the item in the transaction.

type Items

type Items = []Item

Items A list of items in the transaction.

type ListTransactionsParams

type ListTransactionsParams struct {
	// PostedAfter The response includes financial events posted after (or on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request.
	PostedAfter time.Time `form:"postedAfter" json:"postedAfter"`

	// PostedBefore The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	//
	// The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty.
	//
	// **Default:** Two minutes before the time of the request.
	PostedBefore *time.Time `form:"postedBefore,omitempty" json:"postedBefore,omitempty"`

	// MarketplaceId The ID of the marketplace from which you want to retrieve transactions.
	MarketplaceId *string `form:"marketplaceId,omitempty" json:"marketplaceId,omitempty"`

	// NextToken The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
	NextToken *string `form:"nextToken,omitempty" json:"nextToken,omitempty"`
}

ListTransactionsParams defines parameters for ListTransactions.

type ListTransactionsResp

type ListTransactionsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListTransactionsResponse
	JSON400      *ErrorList
	JSON403      *ErrorList
	JSON404      *ErrorList
	JSON413      *ErrorList
	JSON415      *ErrorList
	JSON429      *ErrorList
	JSON500      *ErrorList
	JSON503      *ErrorList
}

func ParseListTransactionsResp

func ParseListTransactionsResp(rsp *http.Response) (*ListTransactionsResp, error)

ParseListTransactionsResp parses an HTTP response from a ListTransactionsWithResponse call

func (ListTransactionsResp) Status

func (r ListTransactionsResp) Status() string

Status returns HTTPResponse.Status

func (ListTransactionsResp) StatusCode

func (r ListTransactionsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTransactionsResponse

type ListTransactionsResponse struct {
	// NextToken The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
	NextToken *string `json:"nextToken,omitempty"`

	// Transactions A list of transactions within the specified time period.
	Transactions *Transactions `json:"transactions,omitempty"`
}

ListTransactionsResponse The response schema for the `listTransactions` operation.

type MarketplaceDetails

type MarketplaceDetails struct {
	// MarketplaceId The identifier of the marketplace where the transaction occured.
	MarketplaceId *string `json:"marketplaceId,omitempty"`

	// MarketplaceName The name of the marketplace where the transaction occurred. For example: `Amazon.com`,`Amazon.in`
	MarketplaceName *string `json:"marketplaceName,omitempty"`
}

MarketplaceDetails Information about the marketplace where the transaction occurred.

type PaymentsContext

type PaymentsContext struct {
	// PaymentDate A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	PaymentDate *Date `json:"paymentDate,omitempty"`

	// PaymentMethod The method of payment.
	PaymentMethod *string `json:"paymentMethod,omitempty"`

	// PaymentReference The reference number of the payment.
	PaymentReference *string `json:"paymentReference,omitempty"`

	// PaymentType The type of payment.
	PaymentType *string `json:"paymentType,omitempty"`
}

PaymentsContext Additional information related to payments-related transactions.

type ProductContext

type ProductContext struct {
	// Asin The Amazon Standard Identification Number (ASIN) of the item.
	Asin *string `json:"asin,omitempty"`

	// FulfillmentNetwork The fulfillment network of the item.
	FulfillmentNetwork *string `json:"fulfillmentNetwork,omitempty"`

	// QuantityShipped The quantity of the item shipped.
	QuantityShipped *int32 `json:"quantityShipped,omitempty"`

	// Sku The Stock Keeping Unit (SKU) of the item.
	Sku *string `json:"sku,omitempty"`
}

ProductContext Additional information related to the product.

type RelatedIdentifier

type RelatedIdentifier struct {
	// RelatedIdentifierName An enumerated set of related business identifier names.
	RelatedIdentifierName *RelatedIdentifierRelatedIdentifierName `json:"relatedIdentifierName,omitempty"`

	// RelatedIdentifierValue Corresponding value of `RelatedIdentifierName`.
	RelatedIdentifierValue *string `json:"relatedIdentifierValue,omitempty"`
}

RelatedIdentifier Related business identifier of the transaction.

type RelatedIdentifierRelatedIdentifierName

type RelatedIdentifierRelatedIdentifierName string

RelatedIdentifierRelatedIdentifierName An enumerated set of related business identifier names.

const (
	DEFERREDTRANSACTIONID RelatedIdentifierRelatedIdentifierName = "DEFERRED_TRANSACTION_ID"
	DISBURSEMENTID        RelatedIdentifierRelatedIdentifierName = "DISBURSEMENT_ID"
	EVENTGROUPID          RelatedIdentifierRelatedIdentifierName = "EVENT_GROUP_ID"
	INVOICEID             RelatedIdentifierRelatedIdentifierName = "INVOICE_ID"
	ORDERID               RelatedIdentifierRelatedIdentifierName = "ORDER_ID"
	REFUNDID              RelatedIdentifierRelatedIdentifierName = "REFUND_ID"
	SHIPMENTID            RelatedIdentifierRelatedIdentifierName = "SHIPMENT_ID"
	TRANSFERID            RelatedIdentifierRelatedIdentifierName = "TRANSFER_ID"
)

Defines values for RelatedIdentifierRelatedIdentifierName.

type RelatedIdentifiers

type RelatedIdentifiers = []RelatedIdentifier

RelatedIdentifiers Related business identifiers of the transaction.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ResponseEditorFn

type ResponseEditorFn func(ctx context.Context, rsp *http.Response) error

ResponseEditorFn is the function signature for the ResponseEditor callback function

type SellingPartnerMetadata

type SellingPartnerMetadata struct {
	// AccountType The type of account in the transaction.
	AccountType *string `json:"accountType,omitempty"`

	// MarketplaceId The identifier of the marketplace where the transaction occurred.
	MarketplaceId *string `json:"marketplaceId,omitempty"`

	// SellingPartnerId A unique seller identifier.
	SellingPartnerId *string `json:"sellingPartnerId,omitempty"`
}

SellingPartnerMetadata Metadata that describes the seller.

type TimeRangeContext

type TimeRangeContext struct {
	// EndTime A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	EndTime *Date `json:"endTime,omitempty"`

	// StartTime A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	StartTime *Date `json:"startTime,omitempty"`
}

TimeRangeContext Additional information that is related to the time range of the transaction.

type Transaction

type Transaction struct {
	// Breakdowns A list of breakdowns that provide details on how the total amount is calculated for the transaction.
	Breakdowns *Breakdowns `json:"breakdowns,omitempty"`

	// Contexts A list of additional information about the item.
	Contexts *Contexts `json:"contexts,omitempty"`

	// Description Describes the reasons for the transaction.
	//
	// **Example:** 'Order Payment', 'Refund Order'
	Description *string `json:"description,omitempty"`

	// Items A list of items in the transaction.
	Items *Items `json:"items,omitempty"`

	// MarketplaceDetails Information about the marketplace where the transaction occurred.
	MarketplaceDetails *MarketplaceDetails `json:"marketplaceDetails,omitempty"`

	// PostedDate A date in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
	PostedDate *Date `json:"postedDate,omitempty"`

	// RelatedIdentifiers Related business identifiers of the transaction.
	RelatedIdentifiers *RelatedIdentifiers `json:"relatedIdentifiers,omitempty"`

	// SellingPartnerMetadata Metadata that describes the seller.
	SellingPartnerMetadata *SellingPartnerMetadata `json:"sellingPartnerMetadata,omitempty"`

	// TotalAmount A currency type and amount.
	TotalAmount *Currency `json:"totalAmount,omitempty"`

	// TransactionId The unique identifier of the transaction.
	TransactionId *string `json:"transactionId,omitempty"`

	// TransactionStatus The status of the transaction.
	//
	// **Possible values:**
	//
	// * `Deferred`
	// * `Released`
	TransactionStatus *string `json:"transactionStatus,omitempty"`

	// TransactionType The type of transaction.
	//
	// **Possible value:** `Shipment`
	TransactionType *string `json:"transactionType,omitempty"`
}

Transaction All the information related to a transaction.

type Transactions

type Transactions = []Transaction

Transactions A list of transactions within the specified time period.

Jump to

Keyboard shortcuts

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