deliverect

package
v9.0.95 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: Unlicense Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name          string `json:"name"`
	POSCategoryID string `json:"posCategoryId"`
}

type Customer

type Customer struct {
	Name            *string `json:"name,omitempty"`
	CompanyName     *string `json:"companyName,omitempty"`
	PhoneNumber     *string `json:"phoneNumber,omitempty"`
	PhoneAccessCode *string `json:"phoneAccessCode,omitempty"`
	Email           *string `json:"email,omitempty"`
	Note            *string `json:"note,omitempty"`
	TIN             *string `json:"tin,omitempty"`
}

type DeliveryAddress

type DeliveryAddress struct {
	Street           *string `json:"street,omitempty"`
	PostalCode       *string `json:"postalCode,omitempty"`
	City             *string `json:"city,omitempty"`
	Country          *string `json:"country,omitempty"`
	Source           *string `json:"source,omitempty"`
	ExtraAddressInfo *string `json:"extraAddressInfo,omitempty"`
}

type DiscountType

type DiscountType string
const (
	DiscountTypeOrderPercentOff    DiscountType = "order_percent_off"
	DiscountTypeOrderFlatOff       DiscountType = "order_flat_off"
	DiscountTypeItemBogof          DiscountType = "item_bogof"
	DiscountTypeItemFree           DiscountType = "item_free"
	DiscountTypeItemPercentOff     DiscountType = "item_percent_off"
	DiscountTypeItemFlatOff        DiscountType = "item_flat_off"
	DiscountTypeCategoryDiscount   DiscountType = "category_discount"
	DiscountTypeFreeDelivery       DiscountType = "free_delivery"
	DiscountTypeDeliveryDiscount   DiscountType = "delivery_discount"
	DiscountTypeFreeServiceFee     DiscountType = "free_service_fee"
	DiscountTypeServiceFeeDiscount DiscountType = "service_fee_discount"
	DiscountTypeStampCard          DiscountType = "stamp_card"
	DiscountTypeUnknown            DiscountType = "unknown"
)

type NameTranslations

type NameTranslations struct {
	EN *string `json:"en,omitempty"`
	ES *string `json:"es,omitempty"`
	FR *string `json:"fr,omitempty"`
	NL *string `json:"nl,omitempty"`
	AR *string `json:"ar,omitempty"`
	EL *string `json:"el,omitempty"`
}

type NutritionalInfo

type NutritionalInfo struct {
	Fat           *int `json:"fat,omitempty"`
	Sugar         *int `json:"sugar,omitempty"`
	SaturatedFat  *int `json:"saturatedFat,omitempty"`
	Carbohydrates *int `json:"carbohydrates,omitempty"`
	Protein       *int `json:"protein,omitempty"`
	Salt          *int `json:"salt,omitempty"`
}

type Order

type Order struct {
	Created                   string           `json:"_created"`
	Updated                   string           `json:"_updated"`
	ID                        string           `json:"_id"`
	Account                   string           `json:"account"`
	ChannelOrderID            string           `json:"channelOrderId"`
	ChannelOrderDisplayId     string           `json:"channelOrderDisplayId"`
	POSID                     *string          `json:"posId,omitempty"`
	POSReceiptID              *string          `json:"posReceiptId"`
	POSLocationID             *string          `json:"posLocationId,omitempty"`
	Location                  string           `json:"location"`
	ChannelLink               *string          `json:"channelLink,omitempty"`
	Status                    *OrderStatus     `json:"status,omitempty"`
	StatusHistory             *[]any           `json:"statusHistory,omitempty"`
	By                        *string          `json:"by,omitempty"`
	OrderType                 OrderType        `json:"orderType"`
	Channel                   int              `json:"channel"`
	POS                       *int             `json:"pos,omitempty"`
	PickupTime                *string          `json:"pickupTime,omitempty"`
	EstimatedPickupTime       *string          `json:"estimatedPickupTime,omitempty"`
	DeliveryTime              *string          `json:"deliveryTime,omitempty"`
	DeliveryIsAsap            *bool            `json:"deliveryIsAsap,omitempty"`
	Customer                  *Customer        `json:"customer,omitempty"`
	DeliveryAddress           *DeliveryAddress `json:"deliveryAddress,omitempty"`
	OrderIsAlreadyPaid        bool             `json:"orderIsAlreadyPaid"`
	TaxTotal                  *int             `json:"taxTotal,omitempty"`
	Taxes                     *[]OrderTax      `json:"taxes,omitempty"`
	TaxRemitted               *int             `json:"taxRemitted,omitempty"`
	Payment                   *OrderPayment    `json:"payment,omitempty"`
	Note                      *string          `json:"note,omitempty"`
	Items                     *[]OrderItem     `json:"items,omitempty"`
	DecimalDigits             *int             `json:"decimalDigits,omitempty"`
	NumberOfCustomers         *int             `json:"numberOfCustomers,omitempty"`
	ChannelOrderRawID         *string          `json:"channelOrderRawId,omitempty"`
	ChannelOrderHistoryRawIDs *[]string        `json:"channelOrderHistoryRawIds,omitempty"`
	ServiceCharge             *int             `json:"serviceCharge,omitempty"`
	DeliveryCost              *int             `json:"deliveryCost,omitempty"`
	BagFee                    *int             `json:"bagFee,omitempty"`
	Tip                       *int             `json:"tip,omitempty"`
	DriverTip                 *int             `json:"driverTip,omitempty"`
	DiscountTotal             *int             `json:"discountTotal,omitempty"`
	Discounts                 *[]OrderDiscount `json:"discounts,omitempty"`
	CapacityUsages            *[]string        `json:"capacityUsages,omitempty"`
	BrandId                   *string          `json:"brandId,omitempty"`
	TestOrder                 *bool            `json:"testOrder,omitempty"`
	Timezone                  *string          `json:"timezone,omitempty"`
	Date                      *int             `json:"date,omitempty"` // Date In format YMD
	Tags                      *[]string        `json:"tags,omitempty"`
}

type OrderDiscount

type OrderDiscount struct {
	Type                *DiscountType `json:"type,omitempty"`
	Provider            *any          `json:"provider,omitempty"`
	Name                *string       `json:"name,omitempty"`
	ChannelDiscountCode *string       `json:"channelDiscountCode,omitempty"`
	ReferenceId         *int          `json:"referenceId,omitempty"`
	Value               *int          `json:"value,omitempty"`
	Amount              *int          `json:"amount,omitempty"`
	AmountRestaurant    *int          `json:"amountRestaurant,omitempty"`
	AmountChannel       *int          `json:"amountChannel,omitempty"`
}

type OrderItem

type OrderItem struct {
	PLU         string       `json:"plu"`
	Name        string       `json:"name"`
	Price       int          `json:"price"`
	Quantity    int          `json:"quantity"`
	ProductType ProductType  `json:"productType"`
	Remark      *string      `json:"remark,omitempty"`
	IsInternal  *bool        `json:"isInternal,omitempty"`
	SubItems    *[]OrderItem `json:"subItems,omitempty"`
	ProductTags *[]int       `json:"productTags,omitempty"`
	IsCombo     *bool        `json:"isCombo,omitempty"`
	SortOrder   *int         `json:"sortOrder,omitempty"`
}

type OrderPayment

type OrderPayment struct {
	Amount int              `json:"amount"`
	Type   OrderPaymentType `json:"type"`
	Due    *int             `json:"due,omitempty"`
	Rebate *int             `json:"rebate,omitempty"`
}

type OrderPaymentType

type OrderPaymentType int
const (
	OrderPaymentTypeCreditCardOnline OrderPaymentType = 0
	OrderPaymentTypeCash             OrderPaymentType = 1
	OrderPaymentTypeOnDelivery       OrderPaymentType = 2
	OrderPaymentTypeOnline           OrderPaymentType = 3
	OrderPaymentTypeCreditCardAtDoor OrderPaymentType = 4
	OrderPaymentTypePINAtDoor        OrderPaymentType = 5
	OrderPaymentTypeVoucherAtDoor    OrderPaymentType = 6
	OrderPaymentTypeMealVoucher      OrderPaymentType = 7
	OrderPaymentTypeBankContact      OrderPaymentType = 8
	OrderPaymentTypeOther            OrderPaymentType = 9
)

type OrderStatus

type OrderStatus int
const (
	OrderStatusNew           OrderStatus = 10
	OrderStatusAccepted      OrderStatus = 20
	OrderStatusPrinted       OrderStatus = 40
	OrderStatusPreparing     OrderStatus = 50
	OrderStatusPrepared      OrderStatus = 60
	OrderStatusPickupReady   OrderStatus = 70
	OrderStatusFinalized     OrderStatus = 90
	OrderStatusAutoFinalized OrderStatus = 95
	OrderStatusCanceled      OrderStatus = 110
	OrderStatusFailed        OrderStatus = 120

	OrderStatusParsed OrderStatus = 1
)

type OrderTax

type OrderTax struct {
	Name       *string `json:"name,omitempty"`
	TaxClassID *int    `json:"taxClassId,omitempty"`
	Total      *int    `json:"total,omitempty"`
}

type OrderType

type OrderType int
const (
	OrderTypePickup   OrderType = 1
	OrderTypeDelivery OrderType = 2
	OrderTypeEatIn    OrderType = 3
)

type PriceLevels

type PriceLevels struct {
	Name  *string `json:"name,omitempty"`
	POSID *string `json:"posId,omitempty"`
}

type Product

type Product struct {
	Name               string              `json:"name"`
	PLU                string              `json:"plu"`
	Price              int                 `json:"price"`
	Description        *string             `json:"description,omitempty"`
	ProductType        ProductType         `json:"productType"`
	IsVariant          *bool               `json:"isVariant,omitempty"`
	IsCombo            *bool               `json:"isCombo,omitempty"`
	DeliveryTax        int                 `json:"deliveryTax"`
	TakeawayTax        int                 `json:"takeawayTax"`
	EatInTax           int                 `json:"eatInTax"`
	PriceLevels        *ProductPriceLevels `json:"priceLevels,omitempty"`
	Overloads          *[]any              `json:"overloads,omitempty"`
	POSProductID       *string             `json:"posProductId,omitempty"`
	POSCategoryIDs     []string            `json:"posCategoryIds"`
	ImageURL           *string             `json:"imageUrl,omitempty"`
	NameTranslations   *NameTranslations   `json:"nameTranslations,omitempty"`
	ProductTags        *[]int              `json:"productTags,omitempty"`
	MultiMax           int                 `json:"multiMax"`
	Min                int                 `json:"min"`
	Max                int                 `json:"max"`
	DefaultQuantity    *int                `json:"defaultQuantity,omitempty"`
	NutritionalInfo    *NutritionalInfo    `json:"nutritionalInfo,omitempty"`
	SupplementalInfo   *SupplementalInfo   `json:"supplementalInfo,omitempty"`
	BottleDepositPrice *int                `json:"bottleDepositPrice,omitempty"`
	Visible            *bool               `json:"visible,omitempty"`
	SubProducts        []string            `json:"subProducts,omitempty"`
}

type ProductPriceLevels

type ProductPriceLevels struct {
	TA *int `json:"TA,omitempty"`
	DL *int `json:"DL,omitempty"`
	UE *int `json:"UE,omitempty"`
}

type ProductType

type ProductType int
const (
	ProductTypeProduct       ProductType = 1
	ProductTypeModifier      ProductType = 2
	ProductTypeModifierGroup ProductType = 3
	ProductTypeBundle        ProductType = 4
)

type SupplementalInfo

type SupplementalInfo struct {
	InstructionsForUse *string   `json:"instructionsForUse,omitempty"`
	Ingredients        *[]string `json:"ingredients,omitempty"`
	Additives          *[]string `json:"additives,omitempty"`
	Prepackaged        *bool     `json:"prepackaged,omitempty"`
	Deposit            *int      `json:"deposit,omitempty"`
}

type WebhookProductsResponse

type WebhookProductsResponse struct {
	AccountID   string         `json:"accountId"`
	LocationID  string         `json:"locationId"`
	Products    []Product      `json:"products"`
	Categories  *[]Category    `json:"categories,omitempty"`
	PriceLevels *[]PriceLevels `json:"priceLevels,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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