Documentation
¶
Overview ¶
Package company is the B2B company domain: a customer organization that buys through the store. Employees (models/employee) belong to a company and buy on its behalf, gated by per-employee spending limits and (optionally) spend-approval workflows (models/approval).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Company ¶
type Company struct {
mixin.Model[Company]
Name string `json:"name"`
Phone string `json:"phone,omitempty"`
Email string `json:"email,omitempty"`
AddressLine1 string `json:"addressLine1,omitempty"`
AddressLine2 string `json:"addressLine2,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
Zip string `json:"zip,omitempty"`
Country string `json:"country,omitempty"`
CurrencyCode currency.Type `json:"currencyCode" orm:"default:usd"`
// SpendingLimitResetFrequency governs how often committed spend resets
// against employee limits: never/daily/weekly/monthly/yearly.
SpendingLimitResetFrequency string `json:"spendingLimitResetFrequency" orm:"default:never"`
Metadata Map `json:"metadata,omitempty" datastore:"-"`
Metadata_ string `json:"-" datastore:",noindex"`
}
Company is a B2B customer organization scoped to the issuing store's namespace. Its CurrencyCode governs the currency employee spending limits and quote totals are denominated in.