Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drink ¶
type Drink struct { // The name of the drink. Name string `json:"name"` // The price of one unit of the drink in US cents. Price float64 `json:"price"` // The product code of the drink, only available when authenticated. ProductCode *string `json:"productCode,omitempty"` // The number of units of the drink in stock, only available when authenticated. Stock *int64 `json:"stock,omitempty"` // The type of drink. Type *DrinkType `json:"type,omitempty"` }
func (*Drink) GetProductCode ¶
type DrinkInput ¶
type DrinkInput struct { // The name of the drink. Name string `json:"name"` // The price of one unit of the drink in US cents. Price float64 `json:"price"` // The product code of the drink, only available when authenticated. ProductCode *string `json:"productCode,omitempty"` // The type of drink. Type *DrinkType `json:"type,omitempty"` }
func (*DrinkInput) GetName ¶
func (o *DrinkInput) GetName() string
func (*DrinkInput) GetPrice ¶
func (o *DrinkInput) GetPrice() float64
func (*DrinkInput) GetProductCode ¶
func (o *DrinkInput) GetProductCode() *string
func (*DrinkInput) GetType ¶
func (o *DrinkInput) GetType() *DrinkType
type DrinkType ¶
type DrinkType string
DrinkType - The type of drink.
func (*DrinkType) UnmarshalJSON ¶
type Error ¶
type Error struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` }
func (*Error) GetMessage ¶
type Ingredient ¶
type Ingredient struct { // The name of the ingredient. Name string `json:"name"` // The product code of the ingredient, only available when authenticated. ProductCode *string `json:"productCode,omitempty"` // The number of units of the ingredient in stock, only available when authenticated. Stock *int64 `json:"stock,omitempty"` // The type of ingredient. Type IngredientType `json:"type"` }
func (*Ingredient) GetName ¶
func (o *Ingredient) GetName() string
func (*Ingredient) GetProductCode ¶
func (o *Ingredient) GetProductCode() *string
func (*Ingredient) GetStock ¶
func (o *Ingredient) GetStock() *int64
func (*Ingredient) GetType ¶
func (o *Ingredient) GetType() IngredientType
type IngredientInput ¶
type IngredientInput struct { // The name of the ingredient. Name string `json:"name"` // The product code of the ingredient, only available when authenticated. ProductCode *string `json:"productCode,omitempty"` // The type of ingredient. Type IngredientType `json:"type"` }
func (*IngredientInput) GetName ¶
func (o *IngredientInput) GetName() string
func (*IngredientInput) GetProductCode ¶
func (o *IngredientInput) GetProductCode() *string
func (*IngredientInput) GetType ¶
func (o *IngredientInput) GetType() IngredientType
type IngredientType ¶
type IngredientType string
IngredientType - The type of ingredient.
const ( IngredientTypeFresh IngredientType = "fresh" IngredientTypeLongLife IngredientType = "long-life" IngredientTypePackaged IngredientType = "packaged" )
func (IngredientType) ToPointer ¶
func (e IngredientType) ToPointer() *IngredientType
func (*IngredientType) UnmarshalJSON ¶
func (e *IngredientType) UnmarshalJSON(data []byte) error
type Order ¶
type Order struct { // The product code of the drink or ingredient. ProductCode string `json:"productCode"` // The number of units of the drink or ingredient to order. Quantity int64 `json:"quantity"` // The status of the order. Status OrderStatus `json:"status"` // The type of order. Type OrderType `json:"type"` }
Order - An order for a drink or ingredient.
func (*Order) GetProductCode ¶
func (*Order) GetQuantity ¶
func (*Order) GetStatus ¶
func (o *Order) GetStatus() OrderStatus
type OrderInput ¶
type OrderInput struct { // The product code of the drink or ingredient. ProductCode string `json:"productCode"` // The number of units of the drink or ingredient to order. Quantity int64 `json:"quantity"` // The type of order. Type OrderType `json:"type"` }
OrderInput - An order for a drink or ingredient.
func (*OrderInput) GetProductCode ¶
func (o *OrderInput) GetProductCode() string
func (*OrderInput) GetQuantity ¶
func (o *OrderInput) GetQuantity() int64
func (*OrderInput) GetType ¶
func (o *OrderInput) GetType() OrderType
type OrderStatus ¶ added in v0.5.0
type OrderStatus string
OrderStatus - The status of the order.
const ( OrderStatusPending OrderStatus = "pending" OrderStatusProcessing OrderStatus = "processing" OrderStatusComplete OrderStatus = "complete" )
func (OrderStatus) ToPointer ¶ added in v0.5.0
func (e OrderStatus) ToPointer() *OrderStatus
func (*OrderStatus) UnmarshalJSON ¶ added in v0.5.0
func (e *OrderStatus) UnmarshalJSON(data []byte) error
type OrderType ¶
type OrderType string
OrderType - The type of order.
func (*OrderType) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.