Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressParam ¶
type AddressParam struct {
// Valid deliverable address (no PO boxes).
Address1 param.Field[string] `json:"address1,required"`
// Unit or apartment number (if applicable).
Address2 param.Field[string] `json:"address2"`
// Name of city.
City param.Field[string] `json:"city,required"`
// Valid country code. Only USA is currently supported, entered in uppercase ISO
// 3166-1 alpha-3 three-character format.
Country param.Field[string] `json:"country,required"`
// Valid postal code. Only USA ZIP codes are currently supported, entered as a
// five-digit ZIP or nine-digit ZIP+4.
PostalCode param.Field[string] `json:"postal_code,required"`
// Valid state code. Only USA state codes are currently supported, entered in
// uppercase ISO 3166-2 two-character format.
State param.Field[string] `json:"state,required"`
}
func (AddressParam) MarshalJSON ¶
func (r AddressParam) MarshalJSON() (data []byte, err error)
type CursorPage ¶
type CursorPage[T any] struct { Data []T `json:"data,required"` HasMore bool `json:"has_more,required"` JSON cursorPageJSON // contains filtered or unexported fields }
func (*CursorPage[T]) GetNextPage ¶
func (r *CursorPage[T]) GetNextPage() (res *CursorPage[T], err error)
NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error
func (*CursorPage[T]) SetPageConfig ¶
func (r *CursorPage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*CursorPage[T]) UnmarshalJSON ¶
func (r *CursorPage[T]) UnmarshalJSON(data []byte) (err error)
type CursorPageAutoPager ¶
type CursorPageAutoPager[T any] struct { // contains filtered or unexported fields }
func NewCursorPageAutoPager ¶
func NewCursorPageAutoPager[T any](page *CursorPage[T], err error) *CursorPageAutoPager[T]
func (*CursorPageAutoPager[T]) Current ¶
func (r *CursorPageAutoPager[T]) Current() T
func (*CursorPageAutoPager[T]) Err ¶
func (r *CursorPageAutoPager[T]) Err() error
func (*CursorPageAutoPager[T]) Index ¶
func (r *CursorPageAutoPager[T]) Index() int
func (*CursorPageAutoPager[T]) Next ¶
func (r *CursorPageAutoPager[T]) Next() bool
type Page ¶
type Page[T any] struct { Data []T `json:"data,required"` // Page number. Page int64 `json:"page,required"` // Total number of entries. TotalEntries int64 `json:"total_entries,required"` // Total number of pages. TotalPages int64 `json:"total_pages,required"` JSON pageJSON // contains filtered or unexported fields }
func (*Page[T]) GetNextPage ¶
NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error
func (*Page[T]) SetPageConfig ¶
func (r *Page[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*Page[T]) UnmarshalJSON ¶
type PageAutoPager ¶
type PageAutoPager[T any] struct { // contains filtered or unexported fields }
func NewPageAutoPager ¶
func NewPageAutoPager[T any](page *Page[T], err error) *PageAutoPager[T]
func (*PageAutoPager[T]) Current ¶
func (r *PageAutoPager[T]) Current() T
func (*PageAutoPager[T]) Err ¶
func (r *PageAutoPager[T]) Err() error
func (*PageAutoPager[T]) Index ¶
func (r *PageAutoPager[T]) Index() int
func (*PageAutoPager[T]) Next ¶
func (r *PageAutoPager[T]) Next() bool
type ShippingAddressParam ¶
type ShippingAddressParam struct {
// Customer's first name. This will be the first name printed on the physical card.
FirstName param.Field[string] `json:"first_name,required"`
// Customer's surname (family name). This will be the last name printed on the
// physical card.
LastName param.Field[string] `json:"last_name,required"`
// Text to be printed on line two of the physical card. Use of this field requires
// additional permissions.
Line2Text param.Field[string] `json:"line2_text"`
// Valid USPS routable address.
Address1 param.Field[string] `json:"address1,required"`
// Unit number (if applicable).
Address2 param.Field[string] `json:"address2"`
// City
City param.Field[string] `json:"city,required"`
// Uppercase ISO 3166-2 two character abbreviation for US and CA. Optional with a
// limit of 24 characters for other countries.
State param.Field[string] `json:"state,required"`
// Postal code (formerly zipcode). For US addresses, either five-digit zipcode or
// nine-digit "ZIP+4".
PostalCode param.Field[string] `json:"postal_code,required"`
// Uppercase ISO 3166-1 alpha-3 three character abbreviation.
Country param.Field[string] `json:"country,required"`
// Email address to be contacted for expedited shipping process purposes. Required
// if `shipping_method` is `EXPEDITED`.
Email param.Field[string] `json:"email"`
// Cardholder's phone number in E.164 format to be contacted for expedited shipping
// process purposes. Required if `shipping_method` is `EXPEDITED`.
PhoneNumber param.Field[string] `json:"phone_number"`
}
func (ShippingAddressParam) MarshalJSON ¶
func (r ShippingAddressParam) MarshalJSON() (data []byte, err error)
type SinglePage ¶
type SinglePage[T any] struct { Data []T `json:"data,required"` // More data exists. HasMore bool `json:"has_more,required"` JSON singlePageJSON // contains filtered or unexported fields }
func (*SinglePage[T]) GetNextPage ¶
func (r *SinglePage[T]) GetNextPage() (res *SinglePage[T], err error)
NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error
func (*SinglePage[T]) SetPageConfig ¶
func (r *SinglePage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*SinglePage[T]) UnmarshalJSON ¶
func (r *SinglePage[T]) UnmarshalJSON(data []byte) (err error)
type SinglePageAutoPager ¶
type SinglePageAutoPager[T any] struct { // contains filtered or unexported fields }
func NewSinglePageAutoPager ¶
func NewSinglePageAutoPager[T any](page *SinglePage[T], err error) *SinglePageAutoPager[T]
func (*SinglePageAutoPager[T]) Current ¶
func (r *SinglePageAutoPager[T]) Current() T
func (*SinglePageAutoPager[T]) Err ¶
func (r *SinglePageAutoPager[T]) Err() error
func (*SinglePageAutoPager[T]) Index ¶
func (r *SinglePageAutoPager[T]) Index() int
func (*SinglePageAutoPager[T]) Next ¶
func (r *SinglePageAutoPager[T]) Next() bool