sales_models

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decimal

type Decimal float32

Decimal A decimal number with no loss of precision. Useful when precision loss is unnaceptable, as with currencies. Follows RFC7159 for number representation.

swagger:model Decimal

func (Decimal) ContextValidate

func (m Decimal) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this decimal based on context it is used

func (Decimal) Validate

func (m Decimal) Validate(formats strfmt.Registry) error

Validate validates this decimal

type Error

type Error struct {

	// An error code that identifies the type of error that occured.
	// Required: true
	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.
	// Required: true
	Message *string `json:"message"`
}

Error Error response returned when the request is unsuccessful.

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type ErrorList

type ErrorList []*Error

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

swagger:model ErrorList

func (ErrorList) ContextValidate

func (m ErrorList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this error list based on the context it is used

func (ErrorList) Validate

func (m ErrorList) Validate(formats strfmt.Registry) error

Validate validates this error list

type GetOrderMetricsResponse

type GetOrderMetricsResponse struct {

	// Encountered errors for the getOrderMetrics operation.
	Errors ErrorList `json:"errors,omitempty"`

	// The payload for the getOrderMetrics operation.
	Payload OrderMetricsList `json:"payload,omitempty"`
}

GetOrderMetricsResponse The response schema for the getOrderMetrics operation.

swagger:model GetOrderMetricsResponse

func (*GetOrderMetricsResponse) ContextValidate

func (m *GetOrderMetricsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this get order metrics response based on the context it is used

func (*GetOrderMetricsResponse) MarshalBinary

func (m *GetOrderMetricsResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetOrderMetricsResponse) UnmarshalBinary

func (m *GetOrderMetricsResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetOrderMetricsResponse) Validate

func (m *GetOrderMetricsResponse) Validate(formats strfmt.Registry) error

Validate validates this get order metrics response

type Money

type Money struct {

	// The currency amount.
	// Required: true
	Amount *Decimal `json:"amount"`

	// Three-digit currency code. In ISO 4217 format.
	// Required: true
	CurrencyCode *string `json:"currencyCode"`
}

Money The currency type and the amount.

swagger:model Money

func (*Money) ContextValidate

func (m *Money) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this money based on the context it is used

func (*Money) MarshalBinary

func (m *Money) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Money) UnmarshalBinary

func (m *Money) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Money) Validate

func (m *Money) Validate(formats strfmt.Registry) error

Validate validates this money

type OrderMetricsInterval

type OrderMetricsInterval struct {

	// The average price for an item based on the specified filters. Formula is totalSales/unitCount.
	// Required: true
	AverageUnitPrice *Money `json:"averageUnitPrice"`

	// The interval of time based on requested granularity (ex. Hour, Day, etc.) If this is the first or the last interval from the list, it might contain incomplete data if the requested interval doesn't align with the requested granularity (ex. request interval 2018-09-01T02:00:00Z--2018-09-04T19:00:00Z and granularity day will result in Sept 1st UTC day and Sept 4th UTC days having partial data).
	// Required: true
	Interval *string `json:"interval"`

	// The number of orders based on the specified filters.
	// Required: true
	OrderCount *int64 `json:"orderCount"`

	// The number of order items based on the specified filters.
	// Required: true
	OrderItemCount *int64 `json:"orderItemCount"`

	// The total ordered product sales for all orders based on the specified filters.
	// Required: true
	TotalSales *Money `json:"totalSales"`

	// The number of units in orders based on the specified filters.
	// Required: true
	UnitCount *int64 `json:"unitCount"`
}

OrderMetricsInterval Contains order metrics.

swagger:model OrderMetricsInterval

func (*OrderMetricsInterval) ContextValidate

func (m *OrderMetricsInterval) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order metrics interval based on the context it is used

func (*OrderMetricsInterval) MarshalBinary

func (m *OrderMetricsInterval) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OrderMetricsInterval) UnmarshalBinary

func (m *OrderMetricsInterval) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OrderMetricsInterval) Validate

func (m *OrderMetricsInterval) Validate(formats strfmt.Registry) error

Validate validates this order metrics interval

type OrderMetricsList

type OrderMetricsList []*OrderMetricsInterval

OrderMetricsList A set of order metrics, each scoped to a particular time interval.

swagger:model OrderMetricsList

func (OrderMetricsList) ContextValidate

func (m OrderMetricsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this order metrics list based on the context it is used

func (OrderMetricsList) Validate

func (m OrderMetricsList) Validate(formats strfmt.Registry) error

Validate validates this order metrics list

Jump to

Keyboard shortcuts

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