Documentation
¶
Index ¶
- type Account
- type Acknowledgement
- type Campus
- type Cart
- type CartItem
- type CartOption
- type CartSelection
- type CartValue
- type CheckoutOptions
- type Client
- func (c *Client) Account(ctx context.Context) (*Account, error)
- func (c *Client) BuildCart(ctx context.Context, s CartSelection) (*Cart, error)
- func (c *Client) Campuses(ctx context.Context) ([]Campus, error)
- func (c *Client) CancelOrder(ctx context.Context, id int) (*Acknowledgement, error)
- func (c *Client) CheckInOrder(ctx context.Context, id int, barcode string) (*Acknowledgement, error)
- func (c *Client) CheckoutOptions(ctx context.Context, o MenuOptions) (*CheckoutOptions, error)
- func (c *Client) ContinueOrder(ctx context.Context, id int) (*OrderProgress, error)
- func (c *Client) Item(ctx context.Context, o MenuOptions, id int) (*Item, error)
- func (c *Client) Locations(ctx context.Context) ([]Location, error)
- func (c *Client) Menu(ctx context.Context, o MenuOptions) (*Menu, error)
- func (c *Client) Orders(ctx context.Context, pending bool) ([]Order, error)
- func (c *Client) PaymentMethods(ctx context.Context) ([]PaymentMethod, error)
- func (c *Client) PlaceOrder(ctx context.Context, cart Cart, expectedTotal int) (*OrderProgress, error)
- func (c *Client) Quote(ctx context.Context, cart Cart) (*Quote, error)
- func (c *Client) USC(ctx context.Context) (*Campus, error)
- type FlatMenu
- type FlatMenuItem
- type Fulfillment
- type Item
- type ItemOption
- type ItemValue
- type Location
- type Menu
- type MenuItem
- type MenuOptions
- type MenuSection
- type Order
- type OrderProgress
- type OutcomeUnknown
- type PaymentMethod
- type Quote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Acknowledgement ¶
type Acknowledgement struct {
Accepted bool `json:"accepted"`
}
type Cart ¶
type Cart struct {
LocationID int `json:"location_id"`
Fulfillment Fulfillment `json:"fulfillment"`
PaymentMethod *int `json:"payment_method"`
TenderID int `json:"tender_id"`
SecondaryTenderID int `json:"secondary_tender_id"`
Date *string `json:"date"`
Time *string `json:"time"`
PickupSpotID int `json:"pickup_spot_id"`
Comment string `json:"comment"`
CheckoutChoices []int `json:"checkout_choices"`
Items []CartItem `json:"items"`
}
type CartItem ¶
type CartItem struct {
ItemID int `json:"itemid"`
SectionID int `json:"sectionid"`
MealExchange bool `json:"meal_ex_applied"`
Options []CartOption `json:"options"`
}
type CartOption ¶
type CartSelection ¶
type CheckoutOptions ¶
type CheckoutOptions struct {
LocationID int `json:"location_id"`
Status string `json:"status"`
Instructions string `json:"instructions,omitempty"`
CommentRequired bool `json:"comment_required"`
CommentInstructions string `json:"comment_instructions,omitempty"`
Dates json.RawMessage `json:"dates"`
Times json.RawMessage `json:"times"`
Tenders json.RawMessage `json:"tenders"`
PickupSpots json.RawMessage `json:"pickup_spots"`
Questions json.RawMessage `json:"questions"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelOrder ¶
func (*Client) CheckInOrder ¶
func (*Client) CheckoutOptions ¶
func (c *Client) CheckoutOptions(ctx context.Context, o MenuOptions) (*CheckoutOptions, error)
func (*Client) ContinueOrder ¶
func (*Client) PaymentMethods ¶
func (c *Client) PaymentMethods(ctx context.Context) ([]PaymentMethod, error)
func (*Client) PlaceOrder ¶
type FlatMenu ¶
type FlatMenu struct {
Status string `json:"status"`
LocationID int `json:"location_id"`
Items []FlatMenuItem `json:"items"`
}
type FlatMenuItem ¶
type Fulfillment ¶
type Fulfillment string
const ( Pickup Fulfillment = "pickup" Delivery Fulfillment = "delivery" Address Fulfillment = "address" )
type Item ¶
type Item struct {
MenuItem
SectionID int `json:"section_id"`
Description string `json:"description,omitempty"`
Options []ItemOption `json:"options"`
}
type ItemOption ¶
type Menu ¶
type Menu struct {
Status string `json:"status"`
LocationID int `json:"location_id"`
Sections []MenuSection `json:"sections"`
}
type MenuOptions ¶
type MenuSection ¶
type OrderProgress ¶
type OutcomeUnknown ¶
type OutcomeUnknown struct{ ID int }
func (*OutcomeUnknown) Error ¶
func (e *OutcomeUnknown) Error() string
func (*OutcomeUnknown) ErrorCode ¶
func (e *OutcomeUnknown) ErrorCode() string
type PaymentMethod ¶
Click to show internal directories.
Click to hide internal directories.