domain

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 4 Imported by: 11

Documentation

Index

Constants

View Source
const (
	// GenderMale for male customers
	GenderMale = "male"
	// GenderFemale for female customers
	GenderFemale = "female"
	// GenderOther for other customers
	GenderOther = "other"
	// GenderUnknown unknown
	GenderUnknown = ""
)

Variables

View Source
var (
	// ErrCustomerNotFoundError - semantic error returned if no customer was found
	ErrCustomerNotFoundError = errors.New("Customer not found")
)

Functions

This section is empty.

Types

type Address

type Address struct {
	ID                     string
	RegionCode             string
	CountryCode            string
	Company                string
	Street                 string
	StreetNr               string
	State                  string
	AdditionalAddressLines []string
	Telephone              string
	PostCode               string
	City                   string
	Firstname              string
	Lastname               string
	Email                  string
	Prefix                 string
	DefaultBilling         bool
	DefaultShipping        bool
}

Address data of a customer

type Customer

type Customer interface {
	GetID() string
	GetPersonalData() PersonData
	GetAddresses() []Address
	GetDefaultShippingAddress() *Address
	GetDefaultBillingAddress() *Address
}

Customer data interface

type CustomerIdentityService added in v3.3.0

type CustomerIdentityService interface {
	GetByIdentity(ctx context.Context, identity auth.Identity) (Customer, error)
}

CustomerIdentityService to retrieve customers by Identity

type PersonData

type PersonData struct {
	// Gender male, female, other, unknown
	Gender     string
	FirstName  string
	LastName   string
	MiddleName string
	MainEmail  string
	// Prefix such as (mr, mrs, ms) string
	Prefix      string
	Birthday    time.Time
	Nationality string
}

PersonData contains personal data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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