// Package fees provides primitives to interact the openapi HTTP API.
//
// Code generated by go-sdk-codegen DO NOT EDIT.
package fees

import (
	"time"
)

// Error defines model for Error.
type Error struct {

	// An error code that identifies the type of error that occurred.
	Code string `json:"code"`

	// Additional information that can help the caller understand or fix the issue.
	Details *string `json:"details,omitempty"`

	// A message that describes the error condition.
	Message string `json:"message"`
}

// ErrorList defines model for ErrorList.
type ErrorList []Error

// FeeDetail defines model for FeeDetail.
type FeeDetail struct {
	FeeAmount    MoneyType  `json:"FeeAmount"`
	FeePromotion *MoneyType `json:"FeePromotion,omitempty"`

	// The type of fee charged to a seller.
	FeeType  string    `json:"FeeType"`
	FinalFee MoneyType `json:"FinalFee"`

	// A list of other fees that contribute to a given fee.
	IncludedFeeDetailList *IncludedFeeDetailList `json:"IncludedFeeDetailList,omitempty"`
	TaxAmount             *MoneyType             `json:"TaxAmount,omitempty"`
}

// FeeDetailList defines model for FeeDetailList.
type FeeDetailList []FeeDetail

// FeesEstimate defines model for FeesEstimate.
type FeesEstimate struct {

	// A list of other fees that contribute to a given fee.
	FeeDetailList *FeeDetailList `json:"FeeDetailList,omitempty"`

	// The time for which the fees were estimated. This defaults to the time the request is made.
	TimeOfFeesEstimation time.Time  `json:"TimeOfFeesEstimation"`
	TotalFeesEstimate    *MoneyType `json:"TotalFeesEstimate,omitempty"`
}

// FeesEstimateError defines model for FeesEstimateError.
type FeesEstimateError struct {

	// An error code that identifies the type of error that occurred.
	Code string `json:"Code"`

	// Additional information that can help the caller understand or fix the issue.
	Detail FeesEstimateErrorDetail `json:"Detail"`

	// A message that describes the error condition in a human-readable form.
	Message string `json:"Message"`

	// An error type, identifying either the receiver or the sender as the originator of the error.
	Type string `json:"Type"`
}

// FeesEstimateErrorDetail defines model for FeesEstimateErrorDetail.
type FeesEstimateErrorDetail []map[string]interface{}

// FeesEstimateIdentifier defines model for FeesEstimateIdentifier.
type FeesEstimateIdentifier struct {

	// The type of item identifier specified.
	IdType *string `json:"IdType,omitempty"`

	// The item identifier.
	IdValue *string `json:"IdValue,omitempty"`

	// When true, the offer is fulfilled by Amazon.
	IsAmazonFulfilled *bool `json:"IsAmazonFulfilled,omitempty"`

	// A marketplace identifier.
	MarketplaceId *string `json:"MarketplaceId,omitempty"`

	// Price information for an item, used to estimate fees.
	PriceToEstimateFees *PriceToEstimateFees `json:"PriceToEstimateFees,omitempty"`

	// The seller identifier.
	SellerId *string `json:"SellerId,omitempty"`

	// A unique identifier provided by the caller to track this request.
	SellerInputIdentifier *string `json:"SellerInputIdentifier,omitempty"`
}

// FeesEstimateRequest defines model for FeesEstimateRequest.
type FeesEstimateRequest struct {

	// The product price on which the fee estimate is based.
	Identifier string `json:"Identifier"`

	// When true, the offer is fulfilled by Amazon.
	IsAmazonFulfilled *bool `json:"IsAmazonFulfilled,omitempty"`

	// A marketplace identifier.
	MarketplaceId string `json:"MarketplaceId"`

	// Price information for an item, used to estimate fees.
	PriceToEstimateFees PriceToEstimateFees `json:"PriceToEstimateFees"`
}

// FeesEstimateResult defines model for FeesEstimateResult.
type FeesEstimateResult struct {

	// An unexpected error occurred during this operation.
	Error *FeesEstimateError `json:"Error,omitempty"`

	// The total estimated fees for an item and a list of details.
	FeesEstimate *FeesEstimate `json:"FeesEstimate,omitempty"`

	// An item identifier, marketplace, time of request, and other details that identify an estimate.
	FeesEstimateIdentifier *FeesEstimateIdentifier `json:"FeesEstimateIdentifier,omitempty"`

	// The status of the fee request. Possible values: Success, ClientError, ServiceError.
	Status *string `json:"Status,omitempty"`
}

// GetMyFeesEstimateRequest defines model for GetMyFeesEstimateRequest.
type GetMyFeesEstimateRequest struct {
	FeesEstimateRequest *FeesEstimateRequest `json:"FeesEstimateRequest,omitempty"`
}

// GetMyFeesEstimateResponse defines model for GetMyFeesEstimateResponse.
type GetMyFeesEstimateResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// Response schema.
	Payload *GetMyFeesEstimateResult `json:"payload,omitempty"`
}

// GetMyFeesEstimateResult defines model for GetMyFeesEstimateResult.
type GetMyFeesEstimateResult struct {

	// An item identifier and the estimated fees for the item.
	FeesEstimateResult *FeesEstimateResult `json:"FeesEstimateResult,omitempty"`
}

// IncludedFeeDetail defines model for IncludedFeeDetail.
type IncludedFeeDetail struct {
	FeeAmount    MoneyType  `json:"FeeAmount"`
	FeePromotion *MoneyType `json:"FeePromotion,omitempty"`

	// The type of fee charged to a seller.
	FeeType   string     `json:"FeeType"`
	FinalFee  MoneyType  `json:"FinalFee"`
	TaxAmount *MoneyType `json:"TaxAmount,omitempty"`
}

// IncludedFeeDetailList defines model for IncludedFeeDetailList.
type IncludedFeeDetailList []IncludedFeeDetail

// MoneyType defines model for MoneyType.
type MoneyType struct {

	// The monetary value.
	Amount *float32 `json:"Amount,omitempty"`

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

// Points defines model for Points.
type Points struct {
	PointsMonetaryValue *MoneyType `json:"PointsMonetaryValue,omitempty"`
	PointsNumber        *int32     `json:"PointsNumber,omitempty"`
}

// PriceToEstimateFees defines model for PriceToEstimateFees.
type PriceToEstimateFees struct {
	ListingPrice MoneyType  `json:"ListingPrice"`
	Points       *Points    `json:"Points,omitempty"`
	Shipping     *MoneyType `json:"Shipping,omitempty"`
}

// GetMyFeesEstimateForASINJSONBody defines parameters for GetMyFeesEstimateForASIN.
type GetMyFeesEstimateForASINJSONBody GetMyFeesEstimateRequest

// GetMyFeesEstimateForSKUJSONBody defines parameters for GetMyFeesEstimateForSKU.
type GetMyFeesEstimateForSKUJSONBody GetMyFeesEstimateRequest

// GetMyFeesEstimateForASINRequestBody defines body for GetMyFeesEstimateForASIN for application/json ContentType.
type GetMyFeesEstimateForASINJSONRequestBody GetMyFeesEstimateForASINJSONBody

// GetMyFeesEstimateForSKURequestBody defines body for GetMyFeesEstimateForSKU for application/json ContentType.
type GetMyFeesEstimateForSKUJSONRequestBody GetMyFeesEstimateForSKUJSONBody
