Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Address string `json:"address"`
Address2 string `json:"address2"`
City string `json:"city"`
State string `json:"state"`
ZipCode string `json:"zipCode"`
}
Address represents a customer's address
type Client ¶
type Client struct {
Host string
RestaurantCode string
ClientID string
ClientSecret string
Username string
Password string
HTTPClient *http.Client
}
Client represents an EdgeServPOS API client
func (*Client) GetOAuthToken ¶
GetOAuthToken retrieves an OAuth token for the client
func (*Client) ListCustomers ¶
ListCustomers retrieves all customers for the restaurant with automatic token management
type Customer ¶
type Customer struct {
ServerID int `json:"serverId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
EmailAddress string `json:"emailAddress"`
Point int `json:"point"`
PhoneNumbers []string `json:"phoneNumbers"`
LastVisitDate int64 `json:"lastVisitDate"`
Addresses []Address `json:"addresses"`
}
Customer represents each customer in the response array
type OAuthResponse ¶
type OAuthResponse struct {
Value string `json:"value"`
}
OAuthResponse represents the expected JSON response from the OAuth token endpoint
Click to show internal directories.
Click to hide internal directories.