models

package
v0.0.0-...-3ce5cd6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartItem

type CartItem struct {

	// id
	// Read Only: true
	ID int64 `json:"id,omitempty"`

	// product
	// Read Only: true
	Product *Product `json:"product,omitempty"`

	// product id
	// Required: true
	ProductID *int64 `json:"product_id"`
}

CartItem cart item

swagger:model CartItem

func (*CartItem) MarshalBinary

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

MarshalBinary interface implementation

func (*CartItem) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*CartItem) Validate

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

Validate validates this cart item

type CartItems

type CartItems []*CartItem

CartItems cart items

swagger:model CartItems

func (CartItems) Validate

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

Validate validates this cart items

type Category

type Category struct {

	// id
	// Read Only: true
	ID int64 `json:"id,omitempty"`

	// name
	// Required: true
	// Min Length: 1
	Name *string `json:"name"`
}

Category category

swagger:model Category

func (*Category) MarshalBinary

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

MarshalBinary interface implementation

func (*Category) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Category) Validate

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

Validate validates this category

type Error

type Error struct {

	// code
	Code int64 `json:"code,omitempty"`

	// message
	// Required: true
	Message *string `json:"message"`
}

Error error

swagger:model Error

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 ExtendedOrder

type ExtendedOrder struct {
	Order

	// cart items
	CartItems CartItems `json:"cart_items,omitempty"`

	// payment account number
	PaymentAccountNumber string `json:"payment_account_number,omitempty"`

	// payment amount
	PaymentAmount int64 `json:"payment_amount,omitempty"`

	// payment method
	PaymentMethod string `json:"payment_method,omitempty"`
}

ExtendedOrder extended order

swagger:model ExtendedOrder

func (*ExtendedOrder) MarshalBinary

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

MarshalBinary interface implementation

func (ExtendedOrder) MarshalJSON

func (m ExtendedOrder) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*ExtendedOrder) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ExtendedOrder) UnmarshalJSON

func (m *ExtendedOrder) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*ExtendedOrder) Validate

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

Validate validates this extended order

type Order

type Order struct {

	// cart items
	CartItems CartItems `json:"cart_items,omitempty"`

	// customer address
	// Required: true
	// Min Length: 1
	CustomerAddress *string `json:"customer_address"`

	// customer email
	// Required: true
	// Min Length: 1
	// Format: email
	CustomerEmail *strfmt.Email `json:"customer_email"`

	// customer name
	// Required: true
	// Min Length: 1
	CustomerName *string `json:"customer_name"`

	// id
	// Read Only: true
	// Format: uuid
	ID strfmt.UUID `json:"id,omitempty"`

	// payment account number
	PaymentAccountNumber string `json:"payment_account_number,omitempty"`

	// payment amount
	PaymentAmount int64 `json:"payment_amount,omitempty"`

	// payment method
	PaymentMethod string `json:"payment_method,omitempty"`
}

Order order

swagger:model Order

func (*Order) MarshalBinary

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

MarshalBinary interface implementation

func (*Order) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Order) Validate

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

Validate validates this order

type Product

type Product struct {

	// category id
	// Required: true
	CategoryID *int64 `json:"category_id"`

	// description
	// Required: true
	// Min Length: 1
	Description *string `json:"description"`

	// id
	// Read Only: true
	ID int64 `json:"id,omitempty"`

	// name
	// Required: true
	// Min Length: 1
	Name *string `json:"name"`

	// photo
	Photo string `json:"photo,omitempty"`

	// price
	// Required: true
	Price *int64 `json:"price"`
}

Product product

swagger:model Product

func (*Product) MarshalBinary

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

MarshalBinary interface implementation

func (*Product) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Product) Validate

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

Validate validates this product

Jump to

Keyboard shortcuts

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