func (u *UserProfile) Cards() ([]*UserCard, error) {
	cards := make([]*UserCard, 0)
	return cards, u.customerEndpoint(u.cli, "card", nil, &cards)
}
TODO: write tests for GetCards, Loyalty, PreviousOrders, GetEasyOrder, initOrdersMeta, and customerEndpoint
Cards will get the cards that Dominos has saved in their database. (see UserCard)
package dawg
import (
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"
)
func SignIn(username, password string) (*UserProfile, error) {
	err := authorize(orderClient.Client, username, password)
	if err != nil {
		return nil, err
	}
	return login(orderClient)
}
type UserProfile struct {
	FirstName string
	LastName  string
	Phone     string
	Type string
	ID string `json:"CustomerID"`
	Identifiers []string `json:"CustomerIdentifiers"`
	AgreedToTermsOfUse bool `json:"AgreeToTermsOfUse"`
	Gender string
	Addresses []*UserAddress
	Email string
	EmailOptIn bool
	EmailOptInTime string
	SmsPhone string
	SmsOptIn bool
	SmsOptInTime string
	UpdateTime string
	ServiceMethod string `json:"-"`  
	ordersMeta  *customerOrders
	cli         *client
	store       *Store
	loyaltyData *CustomerLoyalty
}
func (u *UserProfile) AddAddress(a Address) {
	u.Addresses = append(u.Addresses, UserAddressFromAddress(a))
}
var (
	errNoServiceMethod     = errors.New("no service method given")
	errUserNoServiceMethod = errors.New("User has no ServiceMethod set")
)
func (u *UserProfile) StoresNearMe() ([]*Store, error) {
	if u.ServiceMethod == "" {
		return nil, errUserNoServiceMethod
	}
	if err := u.addressCheck(); err != nil {
		return nil, err
	}
	return asyncNearbyStores(u.cli, u.DefaultAddress(), u.ServiceMethod)
}
func (u *UserProfile) NearestStore(service string) (*Store, error) {
	var err error
	if u.store != nil {
		return u.store, nil
	}
	c := &client{host: orderHost, Client: u.cli.Client}
	if err = u.addressCheck(); err != nil {
		return nil, err
	}
	u.store, err = getNearestStore(c, u.DefaultAddress(), service)
	return u.store, err
}
func (u *UserProfile) DefaultAddress() *UserAddress {
	if len(u.Addresses) == 0 || u.Addresses == nil {
		return nil
	}
	for _, a := range u.Addresses {
		if a.IsDefault {
			return a
		}
	}
	return u.Addresses[0]
}
func (u *UserProfile) SetServiceMethod(service string) error {
	if !(service == Delivery || service == Carryout) {
		return ErrBadService
	}
	u.ServiceMethod = service
	return nil
}
func (u *UserProfile) SetStore(store *Store) error {
	if store == nil {
		return errors.New("cannot set UserProfile store to a nil value")
	}
	if store.ID == "" {
		return errors.New("UserProfile.SetStore: store is uninitialized")
	}
	u.store = store
	return nil
}