func (s *Store) GetVariant(code string) (*Variant, error) {
	menu, err := s.Menu()
	if err != nil {
		return nil, err
	}
	return menu.GetVariant(code)
}
GetVariant will get a fully initialized variant from the menu.
package dawg
import (
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"sync"
	"time"
	"github.com/harrybrwn/apizza/dawg/internal/auth"
)
const (
	Delivery = "Delivery"
	Carryout = "Carryout"
	DefaultLang = "en"
	profileEndpoint = "/power/store/%s/profile"
	orderHost       = "order.dominos.com"
)
func NearestStore(addr Address, service string) (*Store, error) {
	return getNearestStore(orderClient, addr, service)
}
func GetNearbyStores(addr Address, service string) ([]*Store, error) {
	return asyncNearbyStores(orderClient, addr, service)
}
func NewStore(id string, service string, addr Address) (*Store, error) {
	store := &Store{userService: service, userAddress: addr, cli: orderClient}
	return store, InitStore(id, store)
}
func InitStore(id string, obj interface{}) error {
	return initStore(orderClient, id, obj)
}
var orderClient = &client{
	host: orderHost,
	Client: &http.Client{
		Timeout:       60 * time.Second,
		CheckRedirect: noRedirects,
		Transport: newRoundTripper(func(req *http.Request) error {
			auth.SetDawgUserAgent(req.Header)
			return nil
		}),
	},
}
func initStore(cli *client, id string, obj interface{}) error {
	path := fmt.Sprintf(profileEndpoint, id)
	b, err := cli.get(path, nil)
	if err != nil {
		return err
	}
	if store, ok := obj.(*Store); ok {
		store.cli = cli
	}
	return errpair(json.Unmarshal(b, obj), dominosErr(b))
}
type Store struct {
	ID string `json:"StoreID"`
	IsOpen          bool
	IsOnlineNow     bool
	IsDeliveryStore bool
	Phone           string
	PaymentTypes    []string `json:"AcceptablePaymentTypes"`
	CreditCardTypes []string `json:"AcceptableCreditCards"`
	Address     string `json:"AddressDescription"`
	PostalCode  string
	City        string
	StreetName  string
	StoreCoords map[string]string `json:"StoreCoordinates"`
	MinDistance, MaxDistance float64
	ServiceIsOpen        map[string]bool
	ServiceEstimatedWait map[string]struct {
		Min, Max int
	} `json:"ServiceMethodEstimatedWaitMinutes"`
	AllowCarryoutOrders, AllowDeliveryOrders bool
	Hours StoreHours
	ServiceHours map[string]StoreHours
	MinDeliveryOrderAmnt float64 `json:"MinimumDeliveryOrderAmount"`
	Status int
	userAddress Address
	userService string
	menu        *Menu
	cli         *client
}
type StoreHours struct {
	Sun, Mon, Tue, Wed, Thu, Fri, Sat []struct {
		OpenTime  string
		CloseTime string
	}
}
func (s *Store) Menu() (*Menu, error) {
	var err error
	if s.menu != nil && s.menu.ID == s.ID {
		return s.menu, nil
	}
	s.menu, err = newMenu(s.cli, s.ID)
	return s.menu, err
}
func (s *Store) NewOrder() *Order {
	return &Order{
		LanguageCode:  DefaultLang,
		ServiceMethod: s.userService,
		StoreID:       s.ID,
		Products:      []*OrderProduct{},
		Address:       StreetAddrFromAddress(s.userAddress),
		Payments:      []*orderPayment{},
		cli:           orderClient,
	}
}
func (s *Store) MakeOrder(firstname, lastname, email string) *Order {
	return &Order{
		FirstName:     firstname,
		LastName:      lastname,
		Email:         email,
		LanguageCode:  DefaultLang,
		ServiceMethod: s.userService,
		StoreID:       s.ID,
		Products:      []*OrderProduct{},
		Address:       StreetAddrFromAddress(s.userAddress),
		Payments:      []*orderPayment{},
		cli:           orderClient,
	}
}
func (s *Store) GetProduct(code string) (*Product, error) {
	menu, err := s.Menu()
	if err != nil {
		return nil, err
	}
	return menu.GetProduct(code)
}